/* ===== RESET & BASE ===== */
:root {
  --color-ink: #211d1a;
  --color-ink-soft: #544c45;
  --color-ink-muted: #756b63;
  --color-bg: #f7f3ec;
  --color-bg-alt: #efe7db;
  --color-surface: #fffdf9;
  --color-surface-strong: #f4ecdf;
  --color-line: #ded2c0;
  --color-line-soft: #ebe2d6;
  --color-accent: #b08a47;
  --color-accent-bright: #d2b06a;
  --color-accent-soft: rgba(176, 138, 71, 0.14);
  --color-dark: #191512;
  --color-dark-soft: #2a221d;
  --shadow-soft: 0 10px 28px rgba(33, 29, 26, 0.06);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: var(--color-ink);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--color-accent-bright);
  text-decoration: underline;
}

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

ul, ol {
  padding-left: 1.5em;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== HEADER ===== */
.site-header {
  background: rgba(25, 21, 18, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(176, 138, 71, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  max-width: 1140px;
  margin: 0 auto;
}

.site-logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: #d2b06a;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}

.site-logo:hover {
  color: #ead19c;
  text-decoration: none;
}

/* ===== NAVIGATION ===== */
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  transition: all 0.25s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--color-accent);
  color: #140f0c;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1.5px solid rgba(210, 176, 106, 0.55);
  color: var(--color-accent-bright);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  line-height: 1;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.menu-toggle:hover {
  border-color: var(--color-accent-bright);
  background: rgba(210, 176, 106, 0.12);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: 1.25rem 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #8b8177;
}

.breadcrumb a {
  color: var(--color-accent);
}

.breadcrumb span {
  margin: 0 0.4rem;
  color: #b7aa9c;
}

/* ===== MAIN CONTENT ===== */
.page-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding: 1.5rem 0 3rem;
}

.page-wrapper.full-width {
  grid-template-columns: 1fr;
}

article {
  min-width: 0;
}

article h1 {
  font-size: 2.1rem;
  color: var(--color-dark);
  margin-bottom: 1.25rem;
  line-height: 1.25;
  font-weight: 800;
  border-bottom: 3px solid var(--color-accent);
  padding-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

article h2 {
  font-size: 1.45rem;
  color: var(--color-dark);
  margin: 2.25rem 0 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--color-line-soft);
  font-weight: 700;
  letter-spacing: -0.01em;
}

article h3 {
  font-size: 1.15rem;
  color: var(--color-dark-soft);
  margin: 1.75rem 0 0.5rem;
  font-weight: 700;
}

article p {
  margin-bottom: 1rem;
  color: var(--color-ink-soft);
}

article ul, article ol {
  margin-bottom: 1rem;
}

article li {
  margin-bottom: 0.35rem;
  color: var(--color-ink-soft);
}

/* ===== TABLES ===== */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  border-radius: 8px;
  overflow: hidden;
}

.info-table thead {
  background: linear-gradient(135deg, #1b1613, #322821);
  color: #fff;
}

.info-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.info-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--color-line-soft);
}

.info-table tbody tr:nth-child(even) {
  background: #fbf7f0;
}

.info-table tbody tr:hover {
  background: var(--color-surface-strong);
}

/* ===== SIDEBAR ===== */
.sidebar-section {
  background: var(--color-surface);
  border: 1px solid var(--color-line-soft);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.sidebar-section h3 {
  font-size: 1rem;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent);
  font-weight: 700;
}

.sidebar-section ul {
  list-style: none;
  padding: 0;
}

.sidebar-section li {
  margin-bottom: 0.35rem;
}

.sidebar-section a {
  font-size: 0.88rem;
  display: block;
  padding: 0.35rem 0;
  color: var(--color-ink-muted);
  transition: color 0.2s ease;
}

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

/* ===== FAQ SECTION ===== */
.faq-section {
  margin: 2rem 0;
}

.faq-section h2 {
  border-bottom: 2px solid var(--color-accent);
}

.faq-item {
  border-bottom: 1px solid var(--color-line-soft);
  padding: 1rem 0;
}

.faq-item h3 {
  font-size: 1.02rem;
  color: var(--color-dark);
  margin: 0 0 0.5rem;
  cursor: pointer;
  font-weight: 600;
}

.faq-item p {
  margin: 0;
  color: var(--color-ink-soft);
}

/* ===== RELATED GUIDES ===== */
.related-guides {
  background: var(--color-surface);
  border: 1px solid var(--color-line-soft);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-soft);
}

.related-guides h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 0.4rem;
}

.related-guides ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.related-guides li {
  margin: 0;
}

.related-guides a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.88rem;
  transition: background 0.2s ease;
  color: var(--color-ink-muted);
}

.related-guides a:hover {
  background: var(--color-surface-strong);
  text-decoration: none;
  color: var(--color-accent);
}

/* ===== HOMEPAGE ===== */
.hero {
  background: linear-gradient(160deg, #16120f 0%, #241c17 42%, #382c24 100%);
  color: #fff;
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(212, 175, 55, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(255, 239, 211, 0.08) 0%, transparent 46%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.8rem;
  color: #fff;
  border: none;
  margin-bottom: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero h1 span,
.hero h1 {
  background: linear-gradient(135deg, #f5e5bf, #d6b16b, #f1ddae);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 2rem;
  color: rgba(255, 248, 236, 0.78);
  line-height: 1.75;
}

.hero-cta {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, #d8b36e, #b48946);
  color: #18120f;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
  letter-spacing: 0.01em;
  transition: all 0.3s ease;
  box-shadow: 0 12px 28px rgba(116, 84, 34, 0.22);
}

.hero-cta:hover {
  background: linear-gradient(135deg, #e0bf80, #bd9451);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(116, 84, 34, 0.3);
  text-decoration: none;
  color: #18120f;
}

.home-section {
  padding: 3.5rem 0;
}

.home-section:nth-child(even) {
  background: var(--color-bg-alt);
}

.home-section > .container > p {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2rem;
  color: var(--color-ink-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.home-section h2 {
  text-align: center;
  font-size: 1.75rem;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
  border: none;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  display: block;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(248, 241, 230, 0.92));
  border: 1px solid var(--color-line-soft);
  border-radius: 12px;
  padding: 1.75rem;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c49a57, #ead09a);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(33, 29, 26, 0.1);
  border-color: rgba(176, 138, 71, 0.34);
  text-decoration: none;
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  font-size: 1.1rem;
  color: var(--color-dark);
  margin-bottom: 0.6rem;
  font-weight: 700;
  transition: color 0.25s ease;
}

.card:hover h3 {
  color: var(--color-accent);
}

.card p {
  font-size: 0.9rem;
  color: var(--color-ink-muted);
  line-height: 1.65;
}

/* ===== CATEGORY INDEX ===== */
.guide-list {
  list-style: none;
  padding: 0;
}

.guide-list li {
  border-bottom: 1px solid var(--color-line-soft);
  padding: 0.85rem 0;
  transition: background 0.2s ease;
}

.guide-list li:hover {
  background: rgba(255, 253, 249, 0.75);
}

.guide-list a {
  font-size: 1.02rem;
  font-weight: 600;
}

.guide-list p {
  font-size: 0.88rem;
  color: var(--color-ink-muted);
  margin: 0.3rem 0 0;
}

/* ===== FOOTER ===== */
.site-footer {
  background: linear-gradient(180deg, #17120f, #110d0b);
  color: #a5988b;
  padding: 3rem 0 1.5rem;
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  color: #d8b36e;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.4rem;
}

.footer-col a {
  color: #988a7d;
  font-size: 0.85rem;
  transition: color 0.25s ease;
}

.footer-col a:hover {
  color: #ead19c;
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #7f7267;
  font-size: 0.8rem;
}

.footer-bottom a {
  color: #9c8e81;
  transition: color 0.25s ease;
}

.footer-bottom a:hover {
  color: #ead19c;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .page-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .related-guides ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 0.5rem 0;
  }

  .main-nav a {
    display: block;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .hero {
    padding: 3.5rem 0;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .home-section {
    padding: 2.5rem 0;
  }

  article h1 {
    font-size: 1.65rem;
  }

  article h2 {
    font-size: 1.25rem;
  }

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

  .info-table {
    font-size: 0.85rem;
  }

  .info-table th,
  .info-table td {
    padding: 0.5rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== HAMBURGER MENU SPANS ===== */
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-accent-bright);
  margin: 3px 0;
  border-radius: 1px;
  transition: all 0.3s ease;
}

/* ===== SEARCH TOGGLE ===== */
.search-toggle {
  color: rgba(255, 255, 255, 0.65);
  padding: 0.4rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.search-toggle:hover {
  color: var(--color-accent-bright);
  background: rgba(210, 176, 106, 0.12);
  text-decoration: none;
}

/* ===== CARD CATEGORY BADGE (search results) ===== */
.card-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* ===== SEARCH HIGHLIGHT ===== */
mark {
  background: rgba(210, 176, 106, 0.24);
  color: inherit;
  padding: 0.05em 0.15em;
  border-radius: 2px;
}

/* ===== SEARCH PAGE ===== */
.search-page {
  padding: 3rem 0 4rem;
  min-height: 60vh;
}

.search-page h1 {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.search-input-wrapper {
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3rem;
  font-size: 1.05rem;
  border: 2px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-ink);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  font-family: inherit;
}

.search-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(176, 138, 71, 0.16);
}

.search-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}

.search-results-count {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.search-no-results {
  text-align: center;
  color: #888;
  padding: 3rem 0;
  grid-column: 1 / -1;
}

.search-no-results p {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE — SEARCH & ICONS ===== */
@media (max-width: 768px) {
  .search-toggle {
    order: 2;
    margin-left: auto;
    margin-right: 0.5rem;
  }

  .search-page h1 {
    font-size: 1.5rem;
  }

  .search-input {
    font-size: 1rem;
  }

}

/* ===== ARTICLE HERO IMAGES ===== */
.article-hero-img {
  margin: 1.25rem 0 1.75rem;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.article-hero-img img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

/* ===== HOMEPAGE SECTION IMAGES ===== */
.section-hero-img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  margin: 0 auto 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .article-hero-img img {
    height: 200px;
  }

  .section-hero-img {
    height: 180px;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .article-hero-img img {
    height: 160px;
  }

  .section-hero-img {
    height: 140px;
  }
}
