/* ==========================================================================
   RE:PERSONAL — Shared Components
   "Editorial Intelligence" Design System
   Nav, Footer, Buttons, Cards, Tags, Section Headers, Badges, Print
   ========================================================================== */

/* ── Navigation ─────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  z-index: var(--z-nav);
  transition: background var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.nav.is-scrolled,
.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Nav inner — used when .container is not the direct child */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.nav-brand {
  font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-brand a {
  color: inherit;
  text-decoration: none;
}

.nav-brand a:hover {
  color: inherit;
}

.nav-brand span,
.nav-brand .brand-accent {
  color: inherit;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-links--desktop {
    display: flex;
  }
}

/* (old drawer auth styles removed — now in nav-drawer section above) */

.nav-links a {
  font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
  color: var(--text-secondary);
}

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

.nav-links a.active,
.nav-links a.is-active {
  color: var(--accent);
  font-weight: 600;
}

.nav-links a.active::after,
.nav-links a.is-active::after {
  width: 100%;
}

/* Mobile hamburger — 3 spans */
.nav-mobile-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  cursor: pointer;
  z-index: calc(var(--z-nav) + 1);
  border: none;
  background: none;
}

@media (min-width: 768px) {
  .nav-mobile-toggle {
    display: none;
  }
}

.nav-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
  transform-origin: center;
}

/* Hamburger to X animation */
.nav-mobile-toggle.is-open span:nth-child(1),
.nav-mobile-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-mobile-toggle.is-open span:nth-child(2),
.nav-mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-mobile-toggle.is-open span:nth-child(3),
.nav-mobile-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay — full-screen, centered links */
.nav-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 249, 246, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  z-index: var(--z-nav);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ease), visibility var(--ease);
}

.nav-mobile-menu.is-open,
.nav-mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.nav-mobile-menu a {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--text);
  transition: color var(--ease);
}

.nav-mobile-menu a:hover,
.nav-mobile-menu a.active,
.nav-mobile-menu a.is-active {
  color: var(--accent);
}

/* -- Mobile Drawer ------------------------------------------------------ */

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  height: 100dvh;
  background: var(--surface);
  box-shadow: -8px 0 32px rgba(0,0,0,0.08);
  z-index: 110;
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + 20px) 24px 24px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}

.nav-drawer.is-open {
  transform: translateX(0);
}

@media (min-width: 768px) {
  .nav-drawer { display: none; }
}

@media (max-width: 767px) {
  .nav-links--desktop { display: none !important; }
  .nav-toggle {
    z-index: 120 !important;
    position: relative;
    min-width: 44px;
    min-height: 44px;
  }
}

/* Drawer header (auth) */
.nav-drawer-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.nav-drawer-user {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-right: auto;
}

.nav-drawer-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.nav-drawer-sm:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-drawer-sm--fill {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-inverse);
}

.nav-drawer-sm--fill:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--text-inverse);
}

/* Drawer links */
.nav-drawer-list {
  display: flex;
  flex-direction: column;
}

.nav-drawer-link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-drawer-link:last-child {
  border-bottom: none;
}

.nav-drawer-link:hover {
  color: var(--text-secondary);
}

/* Desktop nav text button (logout) */
.nav-text-btn {
  font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.nav-text-btn:hover {
  color: var(--text-secondary);
}

/* Backdrop overlay when drawer is open */
.nav-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 105;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-backdrop.is-open {
  display: block;
  opacity: 1;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
  text-decoration: none;
  background: var(--accent);
  color: var(--text-inverse);
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--text-inverse);
}

.btn-primary:active {
  background: var(--bg-dark);
}

/* For dark backgrounds */
.btn-primary-dark,
.btn-primary--dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
  text-decoration: none;
  background: white;
  color: var(--bg-dark);
}

.btn-primary-dark:hover,
.btn-primary--dark:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--bg-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
  text-decoration: none;
  background: transparent;
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Outline on dark backgrounds */
.btn-outline-dark,
.btn-outline--dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
  text-decoration: none;
  background: transparent;
  color: var(--text-inverse);
}

.btn-outline-dark:hover,
.btn-outline--dark:hover {
  border-color: white;
  color: var(--text-inverse);
  transform: translateY(-2px);
}

/* Secondary variant */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
  text-decoration: none;
  background: transparent;
  color: var(--text-inverse);
}

.btn-secondary:hover {
  border-color: white;
  color: var(--text-inverse);
  transform: translateY(-1px);
}

/* Ghost style — no border, no bg */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: all var(--ease);
  text-decoration: none;
  position: relative;
}

.btn-ghost::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width var(--ease);
}

.btn-ghost:hover::after {
  width: 100%;
}

/* Size modifiers */
.btn-lg,
.btn-large,
.btn--lg {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn--sm {
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
}

/* Return variant */
.btn-return {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-return:hover {
  background: var(--accent);
  color: white;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.card--flat {
  box-shadow: none;
}

.card--flat:hover {
  box-shadow: var(--shadow-sm);
}

.card-dark {
  background: var(--bg-dark-card);
  border-color: var(--border-dark);
  color: var(--text-inverse);
}

/* ── Tags ───────────────────────────────────────────────────────────────── */

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--bg-warm);
  color: var(--text-secondary);
  white-space: nowrap;
  line-height: 1.4;
}

.tag-accent {
  background: var(--accent-light);
  color: var(--accent);
}

/* Type-specific tags */
.tag-magazine  { background: var(--color-magazine-light); color: var(--color-magazine); }
.tag-review    { background: var(--color-review-light);   color: var(--color-review); }
.tag-record    { background: var(--color-record-light);   color: var(--color-record); }
.tag-photo     { background: var(--color-photo-light);    color: var(--color-photo); }
.tag-podcast   { background: var(--color-podcast-light);  color: var(--color-podcast); }
.tag-interview { background: var(--color-interview-light); color: var(--color-interview); }

/* ── Section Labels ─────────────────────────────────────────────────────── */

.section-label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--space-sm);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1.5px;
  background: var(--accent);
  flex-shrink: 0;
}

/* When using a span for the line instead of ::before */
.section-label .section-label-line {
  display: inline-block;
  width: 20px;
  height: 1.5px;
  background: var(--accent);
  flex-shrink: 0;
}

/* If the label has an explicit .section-label-line, hide the ::before */
.section-label:has(.section-label-line)::before {
  display: none;
}

.section-label-dark {
  color: rgba(232, 121, 74, 0.8);
}

.section-label-dark::before,
.section-label-dark .section-label-line {
  background: rgba(232, 121, 74, 0.8);
}

/* ── Section Headings ───────────────────────────────────────────────────── */

.section-heading {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.section-heading-dark {
  color: var(--text-inverse);
}

/* Section title — legacy alias */
.section-title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: var(--space-xl);
}

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

.section-header--center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* ── Section Number (large decorative) ──────────────────────────────────── */

.section-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4rem, 8vw, 7rem);
  color: rgba(0, 0, 0, 0.03);
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.section-num-dark {
  color: rgba(255, 255, 255, 0.04);
}

/* ── Badge ──────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: white;
  line-height: 1.4;
}

.badge--magazine  { background: var(--color-magazine); }
.badge--review    { background: var(--color-review); }
.badge--record    { background: var(--color-record); }
.badge--photo     { background: var(--color-photo); }
.badge--podcast   { background: var(--color-podcast); }
.badge--interview { background: var(--color-interview); }

.badge--outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

/* ── Divider ────────────────────────────────────────────────────────────── */

.divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: var(--space-2xl) 0;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

@media (min-width: 640px) {
  .footer {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

@media (min-width: 640px) {
  .footer .container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-brand {
  font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
}

.footer-left,
.footer-copyright,
.footer-copy {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.footer-links a {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: color var(--ease);
}

.footer-links a:hover {
  color: var(--accent);
}

/* ── Footer CTA (Dark Banner) ───────────────────────────────────────────── */

.footer-cta {
  background: var(--bg-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  margin-bottom: var(--space-2xl);
}

@media (min-width: 640px) {
  .footer-cta {
    padding: var(--space-3xl) var(--space-2xl);
  }
}

.footer-cta-title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--text-inverse);
  margin-bottom: var(--space-sm);
}

.footer-cta-desc {
  color: var(--text-inverse-muted);
  font-size: 1rem;
  margin-bottom: var(--space-xl);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.footer-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

/* CTA inner — flex layout on desktop */
.footer-cta-inner {
  max-width: var(--container);
  margin: 0 auto;
  background: var(--bg-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

@media (max-width: 767px) {
  .footer-cta-inner {
    flex-direction: column;
    text-align: center;
    padding: var(--space-xl);
  }
}

.footer-cta-text h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: var(--text-inverse);
  margin-bottom: var(--space-xs);
}

.footer-cta-text p {
  color: var(--text-inverse-muted);
  font-size: 0.875rem;
  font-weight: 300;
}

.footer-cta-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* When footer-cta-inner is used, footer-cta is just a wrapper */
.footer-cta:has(.footer-cta-inner) {
  background: transparent;
  border-radius: 0;
  padding: 0 var(--pad);
  margin: var(--space-3xl) auto var(--space-xl);
  max-width: calc(var(--container) + 2 * var(--pad));
}

/* ── CTA Banner ─────────────────────────────────────────────────────────── */

.cta-banner {
  background: var(--bg-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  text-align: center;
}

@media (min-width: 768px) {
  .cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
}

/* CTA banner inner (linter-generated HTML variant) */
.cta-section {
  padding: var(--space-3xl) 0;
}

.cta-banner-inner {
  background: var(--bg-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

@media (max-width: 767px) {
  .cta-banner-inner {
    flex-direction: column;
    text-align: center;
    padding: var(--space-xl);
  }
}

.cta-banner-text h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: var(--text-inverse);
  margin-bottom: var(--space-xs);
}

.cta-banner-text p {
  color: var(--text-inverse-muted);
  font-size: 0.875rem;
  font-weight: 300;
}

.cta-banner-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Nav toggle alias for nav-mobile-toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  cursor: pointer;
  z-index: calc(var(--z-nav) + 1);
  border: none;
  background: none;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
  transform-origin: center;
}

.nav-toggle.is-open span:nth-child(1),
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2),
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3),
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Footer inner (flex layout inside container) */
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Courses content wrapper */
.courses-content {
  padding-bottom: var(--space-3xl);
}

/* ── Mobile Bottom Navigation ───────────────────────────────────────────── */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--border-light);
  z-index: var(--z-nav);
  justify-content: space-around;
  padding: 0.5rem 0.25rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {
  .bottom-nav {
    display: flex;
  }

  body {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
  }

  .cp-body .bottom-nav,
  .page-diagnosis .bottom-nav {
    display: none;
  }

  .cp-body,
  .page-diagnosis {
    padding-bottom: 0;
  }

  /* Mobile nav-links: hidden by default, fullscreen overlay when open */
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.2rem 0;
  min-width: 52px;
  text-decoration: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  opacity: 0.4;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.bottom-nav-item:active {
  transform: scale(0.92);
}

.bottom-nav-item.active {
  color: var(--accent);
}

.bottom-nav-item.active svg {
  opacity: 1;
}

.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2.5px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Print Styles ───────────────────────────────────────────────────────── */

@media print {
  .nav,
  .nav-mobile-menu,
  .footer,
  .footer-cta,
  .cta-banner,
  .report-actions,
  .bottom-nav {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
    line-height: 1.5;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .section {
    padding: 1rem 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}
