/* Shared guide page styles */

:root {
  --guide-bg: var(--bg-base, #f8f6f1);
  --guide-surface: var(--bg-white, #ffffff);
  --guide-surface-soft: #f7f3eb;
  --guide-surface-muted: #f3efe7;
  --guide-tip-bg: #eef6f2;
  --guide-warning-bg: #fff8ef;
  --guide-cta-bg: #f5f1e9;
  --guide-line: var(--border-color, #e0ded8);
  --guide-text: var(--color-text, #1a1a1a);
  --guide-text-muted: var(--color-text-muted, rgba(26, 26, 26, 0.62));
  --guide-accent: var(--color-primary, #1c3d31);
  --guide-accent-soft: rgba(28, 61, 49, 0.08);
  --guide-warning: #b7791f;
  --guide-shadow: 0 18px 40px rgba(28, 61, 49, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--guide-text);
  background: var(--guide-bg);
  font-family: var(--font-base, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

/* Minimal utility layer replacing Tailwind usage on guide pages */
.fixed { position: fixed; }
.hidden { display: none; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.z-50 { z-index: 50; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.gap-6 { gap: 1.5rem; }
.gap-7 { gap: 1.75rem; }
.gap-\[5px\] { gap: 5px; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }

/* Header */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(248, 246, 241, 0.94);
  border-bottom: 1px solid var(--guide-line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.24s ease, box-shadow 0.24s ease;
}

#site-header.scrolled {
  box-shadow: 0 10px 24px rgba(28, 61, 49, 0.08);
}

.header-inner,
.header-content,
#site-header > .max-w-6xl {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.header-logo,
.logo,
.logo-text {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  color: var(--guide-accent);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--guide-accent);
}

.brand-sub,
.header-logo small {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--guide-text-muted);
}

.header-nav,
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link,
#menu-drop a {
  color: var(--guide-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.nav-link:hover,
#menu-drop a:hover {
  color: var(--guide-accent);
}

.btn-primary,
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 0.7rem;
  background: var(--guide-accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  border: 0;
  box-shadow: 0 10px 20px rgba(28, 61, 49, 0.14);
}

.btn-primary:hover,
.header-cta:hover {
  opacity: 0.88;
}

#menu-btn,
#menu-toggle,
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--guide-text);
  cursor: pointer;
}

.hamburger {
  flex-direction: column;
  gap: 5px;
}

.ham {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#menu-toggle.open .ham:nth-child(1),
.hamburger.open .ham:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#menu-toggle.open .ham:nth-child(2),
.hamburger.open .ham:nth-child(2) {
  opacity: 0;
}

#menu-toggle.open .ham:nth-child(3),
.hamburger.open .ham:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#menu-drop {
  display: none;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 1rem;
  background: rgba(248, 246, 241, 0.98);
}

#menu-drop.active,
#menu-drop.open {
  display: block;
}

#menu-drop a {
  display: block;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--guide-line);
}

#menu-drop a:last-child {
  border-bottom: 0;
}

/* Main guide layout */
.guide-container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 104px 0 80px;
}

.guide-header {
  margin-bottom: 1.75rem;
  padding: 2rem;
  background: linear-gradient(180deg, var(--guide-surface-soft) 0%, rgba(247, 243, 235, 0.72) 100%);
  border: 1px solid var(--guide-line);
  border-radius: 1.25rem;
  box-shadow: var(--guide-shadow);
}

.guide-header h1 {
  margin: 0 0 0.875rem;
  color: var(--guide-accent);
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.guide-desc {
  margin: 0;
  max-width: 760px;
  color: var(--guide-text-muted);
  font-size: 1rem;
}

.guide-eyebrow {
  display: inline-block;
  margin: 0 0 0.875rem;
  color: var(--guide-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.guide-body {
  max-width: 920px;
  margin: 0 auto;
}

.guide-body > *:first-child {
  margin-top: 0;
}

.guide-body h2 {
  margin: 2.4rem 0 0.9rem;
  color: var(--guide-accent);
  font-size: clamp(1.4rem, 2vw, 1.7rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.guide-body h3 {
  margin: 1.55rem 0 0.65rem;
  color: var(--guide-text);
  font-size: 1.12rem;
  line-height: 1.45;
}

.guide-body p,
.guide-body li {
  color: var(--guide-text);
  font-size: 0.98rem;
}

.guide-body p {
  margin: 0 0 1rem;
}

.guide-body ul,
.guide-body ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.guide-body li + li {
  margin-top: 0.45rem;
}

.guide-body a:not(.cta-btn):not(.cta-btn-phone):not(.cta-btn-kakao) {
  color: var(--guide-accent);
}

.guide-body strong {
  font-weight: 700;
}

.guide-intro,
.guide-summary,
.guide-tip,
.guide-warning,
.guide-checklist,
.guide-cta,
.guide-cta-box,
.guide-related,
.guide-faq,
.guide-checklist-table {
  margin: 0 0 1.125rem;
  padding: 1.4rem 1.5rem;
  background: var(--guide-surface);
  border: 1px solid var(--guide-line);
  border-radius: 1rem;
}

.guide-intro {
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.92) 100%);
}

.guide-summary,
.guide-checklist,
.guide-related {
  background: var(--guide-surface-muted);
}

.guide-tip {
  background: var(--guide-tip-bg);
  border-left: 4px solid var(--guide-accent);
}

.guide-warning {
  background: var(--guide-warning-bg);
  border-left: 4px solid var(--guide-warning);
}

.guide-cta,
.guide-cta-box {
  background: linear-gradient(180deg, var(--guide-cta-bg) 0%, #ffffff 100%);
  border-color: rgba(28, 61, 49, 0.18);
  box-shadow: 0 14px 26px rgba(28, 61, 49, 0.08);
}

.guide-cta p:last-child,
.guide-cta-box p:last-child,
.guide-faq p:last-child,
.guide-related p:last-child,
.guide-warning p:last-child,
.guide-tip p:last-child,
.guide-summary p:last-child,
.guide-intro p:last-child {
  margin-bottom: 0;
}

.guide-faq h3,
.guide-faq dt {
  margin: 0 0 0.5rem;
  color: var(--guide-accent);
  font-size: 1rem;
}

.guide-faq dd {
  margin: 0;
}

.guide-nav,
.guide-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--guide-line);
}

.guide-nav a,
.guide-footer-nav a {
  color: var(--guide-accent);
  text-decoration: none;
  font-weight: 600;
}

.guide-nav a:hover,
.guide-footer-nav a:hover {
  text-decoration: underline;
}

.cta-title {
  margin: 0 0 0.75rem;
  color: var(--guide-accent);
  font-size: 1.1rem;
  font-weight: 700;
}

.sub {
  display: block;
  margin-top: 0.5rem;
  color: var(--guide-text-muted);
  font-size: 0.9rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.cta-btn,
.cta-btn-phone,
.cta-btn-kakao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.85rem 1.1rem;
  border-radius: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
}

.cta-btn,
.cta-btn-phone {
  background: var(--guide-accent);
  color: #fff;
  box-shadow: 0 10px 18px rgba(28, 61, 49, 0.14);
}

.cta-btn-kakao {
  background: #fee500;
  color: #191600;
  border-color: rgba(25, 22, 0, 0.08);
}

.cta-btn:hover,
.cta-btn-phone:hover,
.cta-btn-kakao:hover {
  transform: translateY(-1px);
}

.guide-dont-list {
  display: grid;
  gap: 0.9rem;
  margin: 0 0 1.125rem;
}

.guide-dont-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.15rem 1.25rem;
  background: var(--guide-surface);
  border: 1px solid var(--guide-line);
  border-radius: 1rem;
}

.guide-dont-item p:last-child {
  margin-bottom: 0;
}

.guide-dont-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 0.6rem;
  background: var(--guide-accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Tables */
.guide-body table,
.compare-table,
.timeline-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.25rem;
  overflow: hidden;
  border: 1px solid var(--guide-line);
  border-radius: 1rem;
  background: var(--guide-surface);
}

.guide-body th,
.guide-body td,
.compare-table th,
.compare-table td,
.timeline-table th,
.timeline-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--guide-line);
  border-right: 1px solid var(--guide-line);
  text-align: left;
  vertical-align: top;
}

.guide-body th:last-child,
.guide-body td:last-child,
.compare-table th:last-child,
.compare-table td:last-child,
.timeline-table th:last-child,
.timeline-table td:last-child {
  border-right: 0;
}

.guide-body tr:last-child td,
.compare-table tr:last-child td,
.timeline-table tr:last-child td {
  border-bottom: 0;
}

.guide-body th,
.compare-table th,
.timeline-table th {
  background: var(--guide-surface-soft);
  color: var(--guide-accent);
  font-weight: 700;
}

.guide-body tbody tr:nth-child(even) td,
.compare-table tbody tr:nth-child(even) td,
.timeline-table tbody tr:nth-child(even) td {
  background: rgba(28, 61, 49, 0.025);
}

.check-cat-row td,
.check-cat {
  background: rgba(28, 61, 49, 0.08) !important;
  color: var(--guide-accent);
  font-weight: 700;
}

.check-icon {
  width: 72px;
  text-align: center;
  font-size: 1.1rem;
}

/* Steps and checklist blocks */
.step-block {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin: 0 0 0.9rem;
  padding: 1rem 1.1rem;
  background: var(--guide-surface);
  border: 1px solid var(--guide-line);
  border-radius: 0.9rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 999px;
  background: var(--guide-accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.step-content {
  flex: 1;
}

/* FAQ patterns */
.faq-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--guide-line);
}

.faq-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.faq-q,
.faq-question {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0;
  color: var(--guide-accent);
  font-weight: 700;
  cursor: pointer;
}

.faq-q::before {
  content: "Q";
  flex: 0 0 auto;
  color: var(--guide-accent);
}

.faq-a,
.faq-answer {
  display: none;
  margin-top: 0.75rem;
  color: var(--guide-text);
  padding-left: 1.5rem;
}

.faq-q.open + .faq-a,
.faq-a.open,
.faq-answer.show {
  display: block;
}

.faq-toggle {
  flex: 0 0 auto;
  color: var(--guide-accent);
  transition: transform 0.2s ease;
}

.faq-toggle.open {
  transform: rotate(180deg);
}

/* Footer variants */
footer {
  margin-top: 4rem;
  border-top: 1px solid var(--guide-line);
  background: rgba(255, 255, 255, 0.62);
}

.footer-content,
.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 2rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.footer-section h4 {
  margin: 0 0 0.75rem;
  color: var(--guide-accent);
  font-size: 0.95rem;
}

.footer-section a {
  display: block;
  margin: 0.45rem 0;
  color: var(--guide-text-muted);
  text-decoration: none;
}

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

.footer-bottom {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 2rem;
  color: var(--guide-text-muted);
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 0;
  color: var(--guide-text-muted);
  font-size: 0.9rem;
}

.footer-inner a {
  color: var(--guide-accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--guide-accent);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .md\:flex { display: flex !important; }
  .md\:inline-flex { display: inline-flex !important; }
  .md\:hidden { display: none !important; }
}

@media (max-width: 767.98px) {
  .guide-container {
    width: min(100% - 24px, 1120px);
    padding: 88px 0 56px;
  }

  .guide-header {
    padding: 1.5rem 1.25rem;
    border-radius: 1rem;
  }

  .guide-body {
    max-width: 100%;
  }

  .guide-body h2 {
    margin-top: 2rem;
    font-size: 1.35rem;
  }

  .guide-intro,
  .guide-summary,
  .guide-tip,
  .guide-warning,
  .guide-checklist,
  .guide-cta,
  .guide-cta-box,
  .guide-related,
  .guide-faq,
  .guide-checklist-table {
    padding: 1.15rem 1rem;
    border-radius: 0.9rem;
  }

  .guide-dont-item {
    grid-template-columns: 1fr;
  }

  .guide-dont-num {
    width: fit-content;
  }

  .cta-buttons,
  .guide-nav,
  .guide-footer-nav {
    flex-direction: column;
  }

  .cta-btn,
  .cta-btn-phone,
  .cta-btn-kakao {
    width: 100%;
  }

  .guide-body table,
  .compare-table,
  .timeline-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .guide-body th,
  .guide-body td,
  .compare-table th,
  .compare-table td,
  .timeline-table th,
  .timeline-table td {
    padding: 0.8rem 0.85rem;
    font-size: 0.9rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }

  .hidden { display: none; }
  .md\:flex,
  .md\:inline-flex { display: none !important; }
  .md\:hidden,
  #menu-btn,
  #menu-toggle,
  .hamburger { display: inline-flex !important; }
}

@media (max-width: 520px) {
  .header-inner,
  .header-content,
  #site-header > .max-w-6xl,
  .footer-content,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1120px);
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}
