/* Cinematic forest and warm ivory theme inspired by the Sri Lanka cover photo */
:root {
  --bg: #f2eee4;
  --bg2: #fbf8f0;
  --bg3: #e8e0d1;
  --accent: #a47a45;
  --accent-light: #c7a66e;
  --accent-dark: #765633;
  --dark: #1d2b21;
  --text: #37352e;
  --text-muted: #716e62;
  --border: rgba(54, 48, 36, .16);
}

body {
  background-color: var(--bg);
  background-image: linear-gradient(135deg, #f4f0e6 0%, #ebe5d8 52%, #f1ebdf 100%);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

a { color: var(--accent-dark); }
a:hover { color: #a47a45; }

.sidebar {
  background: #18241c;
  border-right-color: rgba(237, 226, 202, .16);
}
.sidebar-logo a { color: #f5efe2; }
.sidebar-logo p { color: rgba(245, 239, 226, .58); }
.sidebar nav a { color: rgba(245, 239, 226, .76); }
.sidebar nav a:hover { background: rgba(232, 219, 192, .09); color: #fffaf0; }
.sidebar nav a.active { background: rgba(192, 153, 94, .19); color: #e6c995; }
.sidebar nav .nav-group { color: #c4b89e; }
.sidebar-cta { background: rgba(192, 153, 94, .10); border-color: rgba(192, 153, 94, .26); }
.sidebar-cta p { color: rgba(245, 239, 226, .72); }
.sidebar-cta a { color: #d7b982; }

.topbar {
  background: #18241c;
  border-bottom-color: rgba(237, 226, 202, .16);
}
.topbar-title { color: #f5efe2; }
.topbar-title em { color: #c5a36b; }
.topbar-lang { color: rgba(245, 239, 226, .78); border-color: rgba(237, 226, 202, .32); }
.topbar-lang:hover, .topbar-lang.active { background: #eee6d5; border-color: #eee6d5; color: #18241c; }
.sidebar-toggle span { background: #f5efe2; }

.main { background: rgba(246, 242, 233, .92); }
.ch-title, .info-card h4, .acc-head { color: var(--dark); }
.ch-label, .ch-divider { color: var(--accent); }
.ch-divider { background: var(--accent); }
.tip { background: rgba(164, 122, 69, .09); border-left-color: var(--accent); }
.tip strong { color: var(--accent-dark); }
.sidebar-cta a:hover { color: #f0d9ad; }
.map-filter:hover, .map-filter.active { border-color: var(--accent); background: rgba(164, 122, 69, .12); color: var(--accent-dark); }
.leaflet-popup-content a { color: var(--accent-dark) !important; }
.leaflet-popup-content strong { color: var(--dark); }
.auth-attempts { color: #d3c8b4; }

@media (max-width: 900px) {
  .main { background: rgba(246, 242, 233, .96); }
}

#auth-gate {
  background-color: #17241b;
  background-image: linear-gradient(135deg, #17241b, #2b3527 58%, #57432a);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.auth-logo { color: #f5efe2; }
.auth-sub { color: #d9d0bf; }
.auth-input { background: #202a21; border-color: #8e7958; color: #fffaf0; }
.auth-input::placeholder { color: #c6b89f; }
.auth-btn { color: #fffaf0; }
.auth-hint { color: #d9d0bf; }

.chapter-cover{max-width:900px;margin:0 0 28px}
.chapter-cover img{display:block;width:100%;height:auto;border-radius:10px;box-shadow:0 16px 44px rgba(20,25,18,.16)}
.visa-accordion .acc-item.open .acc-body{max-height:12000px}
.visa-article h4{font-family:var(--font-head);font-size:clamp(15px,2vw,18px);line-height:1.5;color:var(--dark);margin:28px 0 10px}
.visa-article p{margin:0 0 14px}
.visa-article ul{padding-left:22px;margin:8px 0 18px}
.visa-article li{margin:0 0 9px;padding-left:3px}
.visa-article a{color:var(--accent-dark);text-decoration:underline;text-decoration-color:rgba(164,122,69,.4);text-underline-offset:3px}
.visa-updated{font-size:12px;color:var(--text-muted);letter-spacing:.02em}
.visa-note{margin-top:24px;padding:16px 18px;border-left:2px solid var(--accent);background:rgba(164,122,69,.07);color:var(--text-muted)}
@media(max-width:600px){.chapter-cover{margin-bottom:22px}.visa-article h4{margin-top:24px}}

.insurance-accordion .acc-item.open .acc-body{max-height:60000px}
.insurance-cover{max-width:900px;margin:0 0 28px}
.insurance-cover img{display:block;width:100%;height:auto;border-radius:10px;box-shadow:0 16px 44px rgba(20,25,18,.16)}
.insurance-article h4{font-family:var(--font-head);font-size:clamp(16px,2.1vw,20px);line-height:1.5;color:var(--dark);margin:30px 0 12px}
.insurance-article h5{font-size:15px;line-height:1.6;color:var(--dark);margin:22px 0 8px}
.insurance-article p{margin:0 0 14px}
.insurance-article ul{padding-left:22px;margin:8px 0 18px}
.insurance-article li{margin:0 0 9px;padding-left:3px}
.insurance-article a{color:var(--accent-dark);text-decoration:underline;text-decoration-color:rgba(164,122,69,.4);text-underline-offset:3px}
.insurance-source{margin-top:24px;font-size:13px}
@media(max-width:600px){.insurance-cover{margin-bottom:22px}.insurance-article h4{margin-top:25px}}

/* Flight and arrival chapter */
.flight-accordion .acc-item.open .acc-body{max-height:90000px}
.flight-cover{max-width:1000px}
.flight-cover figcaption{margin-top:9px;color:var(--text-muted);font-size:13px;line-height:1.5}
.flight-article h4{font-family:var(--font-head);font-size:clamp(17px,2.2vw,21px);line-height:1.45;color:var(--dark);margin:30px 0 12px}
.flight-article h5{font-size:15px;line-height:1.6;color:var(--dark);margin:22px 0 8px}
.flight-article p{margin:0 0 14px}
.flight-article ul{padding-left:22px;margin:8px 0 18px}
.flight-article li{margin:0 0 9px;padding-left:3px}
.flight-article a{color:var(--accent-dark);text-decoration:underline;text-decoration-color:rgba(164,122,69,.4);text-underline-offset:3px}
@media(max-width:600px){.flight-cover{margin-bottom:22px}.flight-article h4{margin-top:25px}}

/* Keep long accordion sections fully readable when opened */
.acc-item.open .acc-body{max-height:100000px}

/* Nested navigation for the preparation chapter */
.sidebar nav .nav-sub{margin:-4px 0 6px 8px;border-left:1px solid rgba(237,226,202,.22)}
.sidebar nav .nav-sub a{display:block;padding:6px 10px 6px 14px;font-size:11px;line-height:1.4;color:rgba(245,239,226,.62);border-radius:0 4px 4px 0}
.sidebar nav .nav-sub a:hover{background:rgba(232,219,192,.08);color:#fffaf0}
#preparation-1-1,#preparation-1-2,#preparation-1-3,#preparation-1-4,#preparation-1-5,#preparation-1-6{scroll-margin-top:72px}

/* Keep guide illustrations aligned while preserving each image's natural proportions. */
.main .editorial-cover,
.main .chapter-cover,
.main .insurance-cover {
  width: 100%;
  max-width: 900px;
}
.main .editorial-cover.editorial-author-cover,
.main .flight-cover {
  max-width: 900px;
}
.main .chapter-cover img,
.main .insurance-cover img,
.main .editorial-cover img,
.main .editorial-article figure img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
  max-height: none !important;
  object-fit: initial !important;
}
.main .editorial-article figure {
  width: 100%;
  max-width: 900px;
  margin: 1.5rem auto;
}

/* Unified desktop reading width; all blocks remain fluid on smaller screens. */
.main .content-section,
.main .editorial-opening,
.main .editorial-article {
  max-width: 1000px;
}
.main .ch-desc,
.main .editorial-tagline {
  max-width: 1000px;
}
.main .editorial-cover,
.main .chapter-cover,
.main .insurance-cover,
.main .editorial-article figure {
  max-width: 1000px;
}
.main .editorial-cover.editorial-author-cover,
.main .flight-cover {
  max-width: 1000px;
}
