/*
Theme Name: フルート上達ラボ・マガジン
Theme URI:
Author: フルート上達ラボ
Author URI:
Description: フルート上達ラボ 専用のカスタムテーマ
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: Proprietary
License URI:
Text Domain: flute-lab-magazine
Tags: blog, news, custom-logo, custom-menu, featured-images, responsive-layout
*/

:root {
  --pn-bg: #f8f9fa;
  --pn-surface: #ffffff;
  --pn-text: #333333;
  --pn-muted: #666666;
  --pn-border: #e2e2e2;
  --pn-accent: #d4af37;
  --pn-accent-soft: #f3e5ab;
  --pn-main: #0f172a;
  --pn-radius: 0px;
  --pn-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  --pn-shadow-soft: 0 12px 24px rgba(15, 23, 42, 0.08);
  --pn-font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --pn-font-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
  --pn-font-en: "Cinzel", "Georgia", "Times New Roman", serif;
  --pn-base-size: 16px;
  --pn-line-height: 1.8;
  --pn-max: 1200px;
  --pn-header-height: 80px;
  --pn-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--pn-font-sans);
  color: var(--pn-text);
  background: var(--pn-bg);
  font-size: var(--pn-base-size);
  line-height: var(--pn-line-height);
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.pn-menu-open {
  overflow: hidden;
}

.pn-theme-dark {
  --pn-bg: #0b0f1a;
  --pn-surface: #101626;
  --pn-text: #f4f5f7;
  --pn-muted: #9aa4b2;
  --pn-border: #1e2638;
  --pn-main: #e2e8f0;
}

.pn-theme-dark .site-header {
  background: rgba(16, 22, 38, 0.9);
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--pn-transition);
}

a:hover,
a:focus {
  color: var(--pn-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--pn-accent);
  color: #111;
  padding: 10px 14px;
  z-index: 1000;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

.screen-reader-text {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.site.pn-site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container,
.pn-container {
  max-width: var(--pn-max);
  margin: 0 auto;
  padding: 0 20px;
}

.container {
  margin: 60px auto;
}

.en-font {
  font-family: var(--pn-font-en);
}

.serif-font {
  font-family: var(--pn-font-serif);
}

.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.pn-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--pn-cta-bg, var(--pn-accent));
  color: var(--pn-cta-text, #0f172a);
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: var(--pn-transition);
}

.pn-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--pn-shadow-soft);
}

.pn-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.1em;
  fill: currentColor;
}

.pn-cta-icon {
  width: 1em;
  height: 1em;
}

.pn-icon-muted {
  color: var(--pn-muted);
}

.pn-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pn-border);
  height: var(--pn-header-height);
  display: flex;
  align-items: center;
}

.pn-site {
  overflow-x: hidden;
}

body.admin-bar .site-header {
  top: 32px;
}

.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--pn-font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--pn-main);
}

.site-logo-text {
  display: inline-block;
}

.site-logo-icon {
  width: 1.2em;
  height: 1.2em;
  color: var(--pn-accent);
}

.site-logo .custom-logo-link img {
  max-height: 48px;
  width: auto;
}

.site-title {
  margin: 0;
  font: inherit;
}

.site-description {
  margin: 0;
  color: var(--pn-muted);
  font-size: 0.9rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-cta {
  background: var(--pn-cta-header-bg, var(--pn-accent));
  color: var(--pn-cta-header-text, #0f172a);
}

.main-nav {
  display: flex;
  align-items: center;
}

.main-nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.9rem;
}

.main-nav-list a {
  position: relative;
  padding: 6px 0;
}

.main-nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--pn-accent);
  transition: var(--pn-transition);
}

.main-nav .menu-item-has-children {
  position: relative;
}

.main-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid var(--pn-border);
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
  z-index: 1002;
}

.main-nav .menu-item-has-children:hover > .sub-menu,
.main-nav .menu-item-has-children:focus-within > .sub-menu {
  display: flex;
}

.pn-submenu-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  margin-left: 6px;
}

.pn-submenu-caret {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--pn-text);
  border-bottom: 2px solid var(--pn-text);
  transform: rotate(45deg);
}

.main-nav-list a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pn-border);
  background: transparent;
  height: 44px;
  width: 44px;
  cursor: pointer;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--pn-text);
  transition: var(--pn-transition);
  position: relative;
}

.menu-toggle-lines::before {
  position: absolute;
  top: -6px;
}

.menu-toggle-lines::after {
  position: absolute;
  top: 6px;
}

.menu-close {
  display: none;
  background: transparent;
  border: none;
  color: var(--pn-text);
  font-size: 1.8rem;
  align-self: flex-end;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 900;
}

/* Hero */
.hero-section {
  padding: 60px 20px;
  max-width: var(--pn-max);
  margin: 0 auto;
}

.hero-slider {
  max-width: 100%;
  margin: 0;
  position: relative;
}

.pn-hero-slider[data-slider="1"] .pn-hero-slide {
  display: none;
}

.pn-hero-slider[data-slider="1"] .pn-hero-slide.is-active {
  display: block;
}

.pn-hero-controls {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: flex;
  gap: 8px;
}

.pn-hero-nav {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 6px 10px;
  cursor: pointer;
}

.pn-hero-dots {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: flex;
  gap: 8px;
}

.pn-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  cursor: pointer;
}

.pn-hero-dot.is-active {
  background: var(--pn-accent);
  border-color: var(--pn-accent);
}

.hero-grid {
  max-width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  height: 500px;
}

.hero-sub {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  background: var(--pn-main);
  color: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.2);
  cursor: pointer;
}

.hero-card-main {
  height: 100%;
}

.hero-card-sub {
  height: 100%;
}

.hero-card-slider {
  height: 520px;
}

.hero-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.hero-media {
  width: 100%;
  height: 100%;
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: transform 0.6s ease;
}

.hero-card:hover .hero-media img,
.hero-card:hover .hero-media video {
  transform: scale(1.05);
  opacity: 0.5;
}

.hero-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1f2937 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-placeholder-icon {
  width: 4rem;
  height: 4rem;
  color: #1e293b;
}

.hero-card-main .hero-placeholder {
  background: #0f172a;
}

.hero-card-sub:nth-child(1) .hero-placeholder {
  background: #334155;
}

.hero-card-sub:nth-child(1) .hero-placeholder-icon {
  color: #475569;
}

.hero-card-sub:nth-child(2) .hero-placeholder {
  background: #475569;
}

.hero-card-sub:nth-child(2) .hero-placeholder-icon {
  color: #64748b;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.hero-align-center .hero-content {
  text-align: center;
}

.hero-align-right .hero-content {
  text-align: right;
}

.hero-card-sub .hero-content {
  padding: 20px;
}

.hero-cat {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--pn-accent);
  margin-bottom: 10px;
  display: inline-block;
  border: 1px solid var(--pn-accent);
  padding: 4px 12px;
}

.hero-title {
  font-family: var(--pn-font-serif);
  font-size: 2rem;
  line-height: 1.4;
  margin: 0 0 10px;
}

.hero-card-sub .hero-title {
  font-size: 1.2rem;
}

.hero-text {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.hero-button {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 14px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: var(--pn-cta-bg, transparent);
  color: inherit;
}

.hero-scroll {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.hero-scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--pn-muted);
}

.hero-scroll-text {
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-scroll-icon {
  transform: rotate(90deg);
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
}

.layout.no-sidebar {
  grid-template-columns: 1fr;
}

.content-area {
  min-width: 0;
}

.pn-content-area {
  min-width: 0;
}

.section-header {
  margin-bottom: 40px;
  border-bottom: 2px solid var(--pn-main);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--pn-font-en);
  font-size: 2.5rem;
  color: var(--pn-main);
  letter-spacing: 0.05em;
  margin: 0;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--pn-muted);
}

.pn-posts-tabs {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 0.85rem;
}

.pn-posts-tab-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pn-posts-tab {
  padding: 6px 12px;
  border: 1px solid var(--pn-border);
  color: var(--pn-muted);
  transition: var(--pn-transition);
}

.pn-posts-tab.is-active,
.pn-posts-tab:hover {
  border-color: var(--pn-accent);
  color: var(--pn-accent);
}

.pn-posts-tab-note {
  color: var(--pn-muted);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.pn-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.post-card {
  display: flex;
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  transition: var(--pn-transition);
  max-width: 100%;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--pn-shadow);
  border-color: var(--pn-accent);
}

.post-card-grid,
.post-card-magazine {
  flex-direction: column;
}

.post-card-featured .post-thumb {
  height: 320px;
}

.post-card-no-media {
  padding: 24px;
}

.post-card-empty {
  flex-direction: column;
}

.post-thumb {
  width: 280px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  max-width: 100%;
}

.post-card-list .post-thumb {
  width: 320px;
  aspect-ratio: 16 / 9;
}

.post-card-list .post-thumb img,
.post-card-list .post-thumb .post-placeholder {
  width: 100%;
  height: 100%;
}

.post-card-grid .post-thumb,
.post-card-magazine .post-thumb {
  width: 100%;
  height: 220px;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--pn-transition);
}

.post-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.post-placeholder-icon {
  width: 2rem;
  height: 2rem;
}

.post-body {
  padding: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  overflow-wrap: anywhere;
}

.post-meta {
  margin-bottom: 10px;
}

.post-card-no-media .post-body {
  padding: 0;
}

.pn-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--pn-muted);
  margin: 0;
}

.pn-meta a {
  color: inherit;
}

.pn-meta-sep {
  opacity: 0.5;
}

.post-card .pn-meta {
  gap: 15px;
}

.post-card .pn-meta-sep {
  display: none;
}

.post-title {
  font-family: var(--pn-font-serif);
  font-size: 1.4rem;
  margin: 0 0 15px;
  line-height: 1.5;
}

.post-excerpt {
  font-size: 0.95rem;
  color: var(--pn-muted);
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-read {
  align-self: flex-start;
  font-size: 0.85rem;
  color: var(--pn-main);
  border-bottom: 1px solid var(--pn-main);
  padding-bottom: 2px;
  font-family: var(--pn-font-en);
}

.btn-read:hover {
  color: var(--pn-accent);
  border-color: var(--pn-accent);
}

/* Sidebar */
.sidebar {
  height: fit-content;
}

.pn-sidebar-sticky {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.widget {
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  padding: 30px;
  margin-bottom: 40px;
}

.widget-title {
  font-family: var(--pn-font-serif);
  font-size: 1.1rem;
  border-left: 4px solid var(--pn-accent);
  padding-left: 15px;
  margin-bottom: 25px;
  letter-spacing: 0.1em;
}

.widget .wp-block-heading {
  font-family: var(--pn-font-serif);
  font-size: 1.1rem;
  border-left: 4px solid var(--pn-accent);
  padding-left: 15px;
  margin: 0 0 25px;
  letter-spacing: 0.1em;
}

.pn-widget-title-icon {
  margin-right: 6px;
  color: var(--pn-accent);
}

.search-form {
  display: flex;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 56px 12px 15px;
  border: 1px solid var(--pn-border);
  background: #fdfdfd;
  outline: none;
  font-family: var(--pn-font-sans);
  border-radius: 12px;
}

.search-input:focus {
  border-color: var(--pn-accent);
}

.search-submit {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 52px;
  border: none;
  background: var(--pn-accent);
  color: #fff;
  border-radius: 0 12px 12px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--pn-transition);
  padding: 0;
  line-height: 1;
}

.search-submit:hover {
  background: var(--pn-main);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.pn-search-icon {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
}

.profile-widget .avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 15px;
  clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-widget {
  text-align: center;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-placeholder .pn-icon {
  width: 2rem;
  height: 2rem;
  color: var(--pn-accent);
}

.profile-name {
  text-align: center;
  font-family: var(--pn-font-serif);
  font-weight: 700;
  margin-bottom: 6px;
}

.profile-role {
  text-align: center;
  font-size: 0.85rem;
  color: var(--pn-muted);
  margin-bottom: 10px;
}

.profile-desc {
  font-size: 0.9rem;
  text-align: center;
  color: var(--pn-muted);
}

.profile-link a {
  display: inline-block;
  margin-top: 10px;
  border-bottom: 1px solid var(--pn-accent);
}

.ranking-list {
  counter-reset: rank;
}

.ranking-period {
  font-size: 0.75rem;
  color: var(--pn-muted);
  text-align: right;
  margin-bottom: 12px;
}

.ranking-item {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dotted var(--pn-border);
  position: relative;
  align-items: flex-start;
}

.ranking-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.rank-num {
  font-family: var(--pn-font-en);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pn-border);
  line-height: 1;
  min-width: 32px;
  position: absolute;
  left: -8px;
  top: 6px;
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  padding: 4px 6px;
  z-index: 1;
}

.ranking-item:nth-child(1) .rank-num { color: #d4af37; }
.ranking-item:nth-child(2) .rank-num { color: #c0c0c0; }
.ranking-item:nth-child(3) .rank-num { color: #cd7f32; }

.ranking-content {
  flex: 1;
  display: grid;
  grid-template-columns: 120px 1fr;
  column-gap: 12px;
  align-items: start;
  margin-left: 8px;
}

.ranking-title {
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0 0 6px;
  grid-column: 2;
}

.ranking-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--pn-accent);
}

.ranking-meta {
  font-size: 0.75rem;
  color: var(--pn-muted);
  grid-column: 2;
}

.ranking-thumb {
  width: 120px;
  aspect-ratio: 16 / 9;
  height: auto;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--pn-border);
  grid-row: 1 / span 2;
}

.ranking-thumb img,
.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.related-item {
  display: flex;
  gap: 12px;
}

.related-thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--pn-border);
}

.related-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}

.related-date {
  color: var(--pn-muted);
  font-size: 0.75rem;
}

.cat-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}

.pn-cat-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pn-cat-icon,
.pn-archive-icon {
  color: var(--pn-accent);
}

.cat-item a:hover {
  color: var(--pn-accent);
  padding-left: 5px;
}

.pn-cat-count,
.pn-archive-count {
  font-size: 0.8rem;
  color: #aaa;
  font-family: var(--pn-font-en);
}

.ad-widget {
  text-align: center;
}

.ad-label {
  font-size: 0.7rem;
  color: #ccc;
  display: block;
  margin-bottom: 5px;
  text-align: right;
}

.ad-box {
  background: #f0f0f0;
  padding: 20px;
  border: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Footer */
.site-footer {
  background: var(--pn-footer-bg, var(--pn-main));
  color: var(--pn-footer-text, #aeb4be);
  padding: 80px 0 30px;
  margin-top: 100px;
}

.site-footer .widget {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
}

.site-footer .widget-title,
.site-footer .widget .wp-block-heading {
  color: #ffffff;
}

.site-footer .widget a {
  color: var(--pn-footer-link, #ffffff);
}

.site-footer .footer-grid a,
.site-footer .footer-bottom a {
  color: var(--pn-footer-link, #ffffff);
}

.footer-cta {
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-cta .pn-button {
  background: var(--pn-cta-footer-bg, var(--pn-accent));
  color: var(--pn-cta-footer-text, #ffffff);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  margin-bottom: 60px;
}

.footer-logo {
  color: #ffffff;
  font-family: var(--pn-font-serif);
  font-size: 1.5rem;
  margin-bottom: 20px;
  display: block;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-title {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 25px;
  font-family: var(--pn-font-serif);
}

.footer-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-menu a:hover {
  color: var(--pn-footer-link-hover, var(--pn-accent));
}

.footer-tags a,
.site-footer .tagcloud a {
  font-size: 0.8rem !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  margin: 0 6px 6px 0;
  display: inline-block;
  color: #fff;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  font-size: 0.8rem;
  font-family: var(--pn-font-en);
}

.footer-bottom-menu {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.footer-bottom .copyright {
  margin: 0;
}

/* Post content */
.pn-post {
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  padding: 30px;
}

.pn-card {
  background: var(--pn-surface);
  border: 1px solid var(--pn-border);
  padding: 24px;
}

.pn-post-title {
  font-family: var(--pn-font-serif);
  margin-top: 0;
}

.pn-post-title a {
  color: inherit;
}

.pn-post-thumb {
  margin: 20px 0;
}

.pn-post-thumb img {
  width: 100%;
  height: auto;
}

.pn-content {
  line-height: 1.9;
}

.pn-content h2,
.pn-content h3,
.pn-content h4 {
  font-family: var(--pn-font-serif);
}

.pn-content h2 {
  font-size: 1.6rem;
  margin: 2.2em 0 0.9em;
  padding: 0.35em 0 0.35em 0.7em;
  border-left: 4px solid var(--pn-accent);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.12), transparent 70%);
  background: linear-gradient(90deg, color-mix(in srgb, var(--pn-accent) 18%, transparent), transparent 70%);
  color: var(--pn-main);
}

.pn-content h3 {
  font-size: 1.25rem;
  margin: 1.8em 0 0.75em;
  padding-left: 0.7em;
  position: relative;
  color: var(--pn-text);
}

.pn-content h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--pn-accent);
}

.pn-content h4 {
  font-size: 1.05rem;
  margin: 1.5em 0 0.6em;
  padding-bottom: 0.35em;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.2);
  border-bottom: 1px dashed color-mix(in srgb, var(--pn-accent) 30%, transparent);
  color: var(--pn-main);
}

.pn-content img {
  max-width: 100%;
  height: auto;
}

.pn-toc {
  background: var(--pn-toc-bg, #ffffff);
  color: var(--pn-toc-text, var(--pn-text));
  border: 1px solid var(--pn-border);
  padding: 18px 20px;
  margin: 30px 0;
  border-radius: 0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.pn-toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pn-toc-title {
  font-family: var(--pn-font-serif);
  margin: 0;
  font-size: 1rem;
}

.pn-toc-toggle {
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #fff;
  color: var(--pn-main);
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--pn-transition);
}

.pn-toc-toggle:hover {
  border-color: var(--pn-accent);
  color: var(--pn-accent);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.pn-toc-body {
  overflow: hidden;
  transition: max-height 0.45s ease;
  position: relative;
}

.pn-toc-body.is-collapsed::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--pn-toc-bg, #ffffff));
  pointer-events: none;
}

.pn-toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pn-toc-list a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  transition: var(--pn-transition);
}

.pn-toc-list a:hover {
  color: var(--pn-toc-accent, var(--pn-accent));
}

.pn-toc-has-icons .pn-icon {
  margin-right: 6px;
  color: var(--pn-toc-accent, var(--pn-accent));
}

.pn-toc-h3 {
  margin-left: 12px;
}

.pn-toc-h4 {
  margin-left: 24px;
}

.pn-toc-h3 a {
  font-size: 0.95rem;
}

.pn-toc-h4 a {
  font-size: 0.9rem;
  color: var(--pn-muted);
}

.pn-breadcrumbs {
  font-size: 0.85rem;
  color: var(--pn-muted);
  margin-bottom: 12px;
}

.pn-widget-area {
  margin-bottom: 40px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.widget-area,
.widget-area * {
  max-width: 100%;
}

.widget-area .alignwide,
.widget-area .alignfull,
.pn-content .alignwide,
.pn-content .alignfull {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

iframe,
embed,
object,
video,
table {
  max-width: 100%;
}

table {
  width: 100%;
  display: block;
  overflow-x: auto;
}

.sidebar .tagcloud a {
  font-size: 0.85rem !important;
  border: 1px solid var(--pn-border);
  padding: 6px 10px;
  margin: 0 6px 6px 0;
  display: inline-block;
  color: var(--pn-text);
  background: #fff;
  border-radius: 999px;
  transition: var(--pn-transition);
}

.sidebar .tagcloud a:hover {
  border-color: var(--pn-accent);
  color: var(--pn-accent);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.pn-share {
  margin: 30px 0;
}

.pn-share-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--pn-font-serif);
  font-size: 1rem;
  color: var(--pn-main);
  margin-bottom: 12px;
}

.pn-share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pn-share-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid var(--pn-border);
  background: #ffffff;
  color: var(--pn-text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--pn-transition);
  cursor: pointer;
}

.pn-share-button:hover {
  border-color: var(--pn-accent);
  color: var(--pn-accent);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.pn-share-icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.pn-share-x:hover {
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.5);
  background: rgba(15, 23, 42, 0.06);
}

.pn-share-facebook:hover {
  color: #1877f2;
  border-color: rgba(24, 119, 242, 0.5);
  background: rgba(24, 119, 242, 0.08);
}

.pn-share-line:hover {
  color: #06c755;
  border-color: rgba(6, 199, 85, 0.55);
  background: rgba(6, 199, 85, 0.08);
}

.pn-share-pocket:hover {
  color: #ef3f56;
  border-color: rgba(239, 63, 86, 0.55);
  background: rgba(239, 63, 86, 0.08);
}

.pn-share-hatena:hover {
  color: #00a4de;
  border-color: rgba(0, 164, 222, 0.55);
  background: rgba(0, 164, 222, 0.08);
}

.pn-share-copy:hover {
  color: var(--pn-accent);
  border-color: var(--pn-accent);
  background: color-mix(in srgb, var(--pn-accent) 12%, #ffffff);
}

/* Contact Form 7 */
.wpcf7 form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
}

.wpcf7 .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.wpcf7 .wpcf7-form-control {
  width: 100%;
}

.wpcf7 label {
  font-family: var(--pn-font-serif);
  color: var(--pn-main);
  display: block;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--pn-border);
  background: #fff;
  border-radius: 4px;
  font-family: var(--pn-font-sans);
  transition: var(--pn-transition);
  box-sizing: border-box;
}

.wpcf7 textarea {
  min-height: 160px;
  resize: vertical;
}

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  border-color: var(--pn-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pn-accent) 18%, transparent);
  outline: none;
}

.wpcf7 .wpcf7-submit {
  align-self: flex-start;
  background: var(--pn-accent);
  color: #fff;
  border: 1px solid var(--pn-accent);
  border-radius: 4px;
  padding: 10px 22px;
  cursor: pointer;
  transition: var(--pn-transition);
}

.wpcf7-response-output {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 4px;
  border: 1px solid var(--pn-border);
  background: #fff;
}

.wpcf7-not-valid-tip {
  color: #b91c1c;
  font-size: 0.85rem;
  margin-top: 6px;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
  border-color: rgba(185, 28, 28, 0.4);
  background: rgba(185, 28, 28, 0.06);
}

.wpcf7 form.sent .wpcf7-response-output {
  border-color: color-mix(in srgb, var(--pn-accent) 60%, transparent);
  background: color-mix(in srgb, var(--pn-accent) 12%, #ffffff);
}

.wpcf7 .wpcf7-submit:hover {
  background: var(--pn-main);
  border-color: var(--pn-main);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

/* Comments */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--pn-border);
  background: #fff;
  border-radius: 4px;
  font-family: var(--pn-font-sans);
  transition: var(--pn-transition);
  box-sizing: border-box;
  display: block;
  max-width: 100%;
}

.comment-form {
  max-width: 100%;
  display: grid;
  gap: 16px;
}

.comment-respond {
  max-width: 100%;
}

.comment-respond .comment-form-comment {
  width: 100%;
}

.comment-respond .comment-form-comment textarea {
  width: 100%;
  max-width: 100%;
}

.comment-form textarea,
.comment-form input {
  max-width: 100%;
}

.comment-form label {
  display: block;
  font-family: var(--pn-font-serif);
  color: var(--pn-main);
  margin-bottom: 6px;
}

.comment-form p {
  margin: 0;
}

.comment-form textarea {
  min-height: 160px;
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--pn-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pn-accent) 18%, transparent);
  outline: none;
}

.comment-form .submit {
  background: var(--pn-accent);
  color: #fff;
  border: 1px solid var(--pn-accent);
  border-radius: 4px;
  padding: 10px 22px;
  cursor: pointer;
  transition: var(--pn-transition);
}

.comment-form .submit:hover {
  background: var(--pn-main);
  border-color: var(--pn-main);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

.comment-reply-link,
.comment-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--pn-border);
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--pn-text);
  transition: var(--pn-transition);
}

.comment-reply-link:hover,
.comment-edit-link:hover {
  border-color: var(--pn-accent);
  color: var(--pn-accent);
}

.pn-comments {
  margin-top: 40px;
}

.pn-post-cta {
  margin-top: 40px;
  padding: 30px;
  background: var(--pn-cta-post-bg, var(--pn-main));
  color: var(--pn-cta-post-text, #ffffff);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pn-post-cta a {
  color: inherit;
}

/* Pagination */
.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.page-numbers {
  border: 1px solid var(--pn-border);
  padding: 6px 12px;
}

.page-numbers.current {
  background: var(--pn-main);
  color: #fff;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

/* Responsive */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .pn-posts-tabs {
    align-items: flex-start;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .hero-card {
    height: 300px;
  }

  .hero-card-slider {
    height: 320px;
  }

  .post-card {
    flex-direction: column;
  }

  .post-thumb {
    width: 100%;
    height: 200px;
  }

  .main-nav {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: min(320px, 90vw);
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    transform: translateX(100%);
    transition: var(--pn-transition);
    z-index: 1001;
  }

  body.pn-menu-open .main-nav {
    transform: translateX(0);
  }

  .main-nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .main-nav .sub-menu {
    position: static;
    border: none;
    padding: 0 0 0 16px;
    background: transparent;
    display: flex;
  }

  .menu-close {
    display: block;
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .menu-overlay[hidden] {
    display: none;
  }

  body.pn-menu-open .menu-overlay {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .header-cta {
    display: none;
  }

  .footer-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .pn-post-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}
