/* Single source of truth for the site's colour system + light/dark theme.
   Toggle is controlled by theme.js, which sets data-theme="dark" on <html>.

   --navy/--teal/--slate/--cloud/--text are the same brand tokens every page
   already uses everywhere (buttons, links, captions, section backgrounds) —
   redefining them under [data-theme="dark"] re-colours the whole site for
   free almost everywhere they're used, no per-page edits needed.

   --ink and --white are deliberately left unchanged in dark mode: they're
   used both as "page surface" AND as "white/dark text sitting on an
   already-dark block" (testimonials, contact section) in the existing
   pages, so redefining them globally would break that second role. Instead,
   --dm-bg / --dm-surface / --dm-header-bg / --dm-border below are new,
   single-purpose tokens for the handful of literal var(--white) surfaces
   (body, cards, header) that do need to go dark — each page adds a small
   `[data-theme="dark"] { ... }` override block using these, without
   touching any existing light-mode rule. */

:root{
  /* Site fonts, single source of truth — change the family here once instead
     of editing h1/h2/h3/body rules in all 4 pages. Each page still loads its
     own Google Fonts <link> in <head> (needed for preconnect/perf), but every
     font-family declaration in a page's own <style> should reference these
     tokens instead of naming a font directly. */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;

  --navy:#035994;
  --teal:#059397;
  --ink:#041E3A;
  --text:#111111;
  --slate:#6B7280;
  --cloud:#F2F4F6;
  --white:#FFFFFF;

  /* Fixed brand colours — identical in light AND dark mode, never brightened.
     --navy/--teal above brighten in dark mode because they're mostly used as
     TEXT on a dark page background (headings, prices, links) and need the
     lift to stay legible there. But a chunk of usages are the opposite: a
     SOLID block (buttons, the Contact/Request-a-Custom-Tour sections,
     mobile bar) with white text already sitting on top of it. Brightening
     navy/teal there makes the block lighter, not darker, which wrecks the
     white text's contrast and looks like a mismatched, washed-out patch
     against the rest of the dark theme. Those call sites use these fixed
     tokens instead, so they keep the original, correct-contrast brand
     colour in both themes. */
  --brand-navy:#035994;
  --brand-teal:#059397;

  --dm-bg: var(--white);
  --dm-surface: var(--white);
  --dm-header-bg: #FFFFFFF2;
  --dm-border: var(--cloud);
  --dm-input: var(--white);
}

[data-theme="dark"]{
  --navy:#F2F6FA;    /* headings/labels read as near-white on dark — the earlier
                        brightened blue (#2E86D6) looked muddy against the dark
                        navy background; --navy is text/icon/border-only (never
                        a background — grep-verified), so this is a safe global
                        swap. Price-specific text uses --teal instead (see e.g.
                        .tour-price/.side-price/.sc-price dark overrides) so it
                        stands out from headings rather than matching them. */
  --teal:#22D3D8;    /* vivid cyan-teal accent */
  --slate:#8FA8C2;   /* cool blue-grey for muted/secondary text */
  --cloud:#0F2338;   /* section/alt background — one step up from page bg */
  --text:#DCE6F0;    /* soft off-white body text */

  /* Elevation ladder, darkest to lightest: page < section (--cloud) < card
     (--dm-surface) < input (recessed, so it goes the other way). Cards need
     to read as "raised" above their section, so --dm-surface must stay
     lighter than --cloud, not darker. */
  --dm-bg:#0A1929;
  --dm-surface:#17324D;
  --dm-header-bg:#0A1929E8;
  --dm-border:#2A4A6B;
  --dm-input:#0D2036;
}

/* Theme toggle button — same look everywhere it appears */
.theme-toggle{
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--dm-border);
  background: var(--cloud);
  color: var(--text);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.theme-toggle:hover{ border-color: var(--teal); }

html{ transition: background-color .2s ease; }
body{ transition: background-color .2s ease, color .2s ease; }

/* Text selection + scrollbar — shared across all pages so both themes match.
   Selection uses the fixed brand teal (not the adaptive --teal) since it's a
   solid highlight block with white text, same reasoning as --brand-navy/teal
   above. */
::selection{ background: var(--brand-teal); color: #fff; }

html{ scrollbar-color: var(--slate) var(--cloud); scrollbar-width: thin; }
::-webkit-scrollbar{ width: 11px; height: 11px; }
::-webkit-scrollbar-track{ background: var(--cloud); }
::-webkit-scrollbar-thumb{ background: var(--slate); border-radius: 6px; border: 2px solid var(--cloud); }
::-webkit-scrollbar-thumb:hover{ background: var(--brand-navy); }

/* Scroll-reveal fade-in — paired with reveal.js. Add class="reveal" to an
   element to have it fade/slide in once visible; reveal.js adds
   .is-visible when that happens. */
.reveal{ opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; transition: none; }
}

/* ---------- Shared site header — injected by header.js into
   <div id="siteHeader" data-page="..."></div>. Centralized because it now
   carries interactive search, not just static nav — one copy instead of
   duplicating that logic on every page. ---------- */
.site-header{position:sticky;top:0;z-index:60;background:#FFFFFFF2;backdrop-filter:blur(6px);border-bottom:1px solid var(--cloud);}
[data-theme="dark"] .site-header{background:var(--dm-header-bg);border-bottom-color:var(--dm-border);}
.site-header nav{position:relative;display:flex;align-items:center;justify-content:space-between;padding:16px 24px;max-width:1160px;margin:0 auto;gap:20px;}
.site-header .navlinks{display:flex;gap:28px;font-size:14px;font-weight:500;color:var(--ink);}
[data-theme="dark"] .site-header .navlinks{color:var(--text);}
.site-header .navlinks a.active,.site-header .navlinks a:hover{color:var(--teal);}
@media(max-width:820px){.site-header .navlinks{display:none;}}

.site-header .icon-group{display:flex;align-items:center;gap:12px;flex-shrink:0;}
.site-header .navcta{background:var(--brand-navy);color:var(--white);padding:10px 20px;border-radius:3px;font-size:13px;font-weight:600;white-space:nowrap;}
.site-header .icon-btn{
  width:38px;height:38px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--dm-border);background:var(--cloud);color:var(--text);cursor:pointer;flex-shrink:0;
  transition:background .15s,border-color .15s;
}
.site-header .icon-btn:hover{border-color:var(--teal);}
.site-header .icon-btn svg{width:17px;height:17px;}
@media(max-width:600px){.site-header .signin-btn{display:none;}}

.header-search-panel{
  position:absolute;top:100%;left:0;right:0;background:var(--white);border-bottom:1px solid var(--cloud);
  box-shadow:0 12px 24px #00000018;padding:0;max-height:0;overflow:hidden;transition:max-height .2s ease;
}
[data-theme="dark"] .header-search-panel{background:var(--dm-surface);border-bottom-color:var(--dm-border);}
.header-search-panel.show{max-height:420px;padding:18px 24px;}
.header-search-inner{max-width:640px;margin:0 auto;}
.header-search-inner input{
  width:100%;padding:12px 16px;border:1px solid var(--dm-border);border-radius:6px;font-size:14.5px;
  font-family:var(--font-body);color:var(--text);background:var(--dm-input);
}
.header-search-inner input:focus{outline:none;border-color:var(--teal);}
.header-search-results{margin-top:10px;max-height:300px;overflow-y:auto;}
.hsr-item{display:flex;align-items:center;gap:12px;padding:9px 6px;border-radius:6px;}
.hsr-item:hover{background:var(--cloud);}
.hsr-item .hsr-thumb{width:44px;height:44px;border-radius:5px;object-fit:cover;flex-shrink:0;background:linear-gradient(135deg,var(--brand-teal),var(--brand-navy));}
.hsr-item .hsr-name{font-size:13.5px;font-weight:600;color:var(--ink);}
[data-theme="dark"] .hsr-item .hsr-name{color:var(--text);}
.hsr-item .hsr-meta{font-size:11.5px;color:var(--slate);}
.header-search-empty{font-size:13px;color:var(--slate);padding:10px 6px;}

/* ---------- Shared site footer — injected by footer.js into
   <div id="siteFooter"></div>. Uses the fixed --ink token as its background
   (unchanged between themes), so — like .contact/.cta-strip elsewhere — it
   needs no separate dark-mode override block. ---------- */
.site-footer{background:var(--ink);padding:52px 24px 0;}
.site-footer .footer-grid{max-width:1160px;margin:0 auto;display:grid;grid-template-columns:1.4fr 1fr 1fr 1.2fr;gap:32px;padding-bottom:36px;}
@media(max-width:820px){.site-footer .footer-grid{grid-template-columns:1fr 1fr;}}
@media(max-width:480px){.site-footer .footer-grid{grid-template-columns:1fr;}}
.site-footer .footer-brand p{font-size:13px;color:#FFFFFF99;margin-top:14px;line-height:1.7;max-width:260px;}
.site-footer h4{font-size:12.5px;text-transform:uppercase;letter-spacing:0.06em;color:#FFFFFF66;margin-bottom:16px;font-family:var(--font-body);font-weight:700;}
.site-footer .footer-col a,.site-footer .footer-col span{display:block;font-size:13.5px;color:#FFFFFFCC;margin-bottom:11px;}
.site-footer .footer-col a:hover{color:var(--teal);}
.site-footer .footer-bottom{
  max-width:1160px;margin:0 auto;border-top:1px solid #FFFFFF1A;padding:18px 0;
  font-size:12px;color:#FFFFFF77;text-align:center;
}

/* ---------- Auth screen — shared by admin.html's login and account.html's
   sign in/create account. Split brand-panel + form-panel layout, moved here
   so both pages get it for free instead of each keeping its own copy. ---------- */
.login-screen{min-height:100vh;display:grid;grid-template-columns:1.1fr 1fr;}

.login-brand-panel{
  position:relative;overflow:hidden;background:linear-gradient(135deg,var(--brand-navy),var(--brand-teal));
  display:flex;align-items:center;justify-content:center;padding:60px;
}
.login-brand-panel::before,.login-brand-panel::after{content:"";position:absolute;border-radius:50%;background:#FFFFFF0D;}
.login-brand-panel::before{width:420px;height:420px;top:-140px;right:-140px;}
.login-brand-panel::after{width:320px;height:320px;bottom:-100px;left:-100px;}
.login-brand-inner{position:relative;z-index:1;max-width:360px;color:#fff;}
.login-brand-inner h2{color:#fff;font-size:27px;line-height:1.35;margin-bottom:14px;}
.login-brand-inner p{color:#FFFFFFCC;font-size:14.5px;line-height:1.7;}

.login-form-panel{display:flex;align-items:center;justify-content:center;padding:40px 24px;background:var(--white);position:relative;}
[data-theme="dark"] .login-form-panel{background:var(--dm-bg);}
.login-form-inner{max-width:340px;width:100%;}
.logo-for-dark{display:none;}
[data-theme="dark"] .logo-for-light{display:none;}
[data-theme="dark"] .logo-for-dark{display:block;}
.login-form-inner h1{font-size:25px;margin-bottom:6px;text-align:center;}
.login-form-inner .sub{color:var(--slate);font-size:13.5px;margin-bottom:30px;text-align:center;}

.field{margin-bottom:16px;}
.field label{display:block;font-size:12px;font-weight:600;color:var(--ink);margin-bottom:6px;}
.field .input-wrap{position:relative;}
.field .field-icon{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--slate);pointer-events:none;}
.field input{width:100%;padding:11px 13px 11px 38px;border:1px solid #0359941f;border-radius:5px;font-size:14px;color:var(--text);transition:border-color .15s;}
.field input:focus{outline:none;border-color:var(--teal);}
.login-btn{
  width:100%;background:var(--brand-navy);color:var(--white);border:none;padding:13px;border-radius:5px;font-weight:700;
  font-size:14px;margin-top:8px;cursor:pointer;transition:opacity .15s,transform .1s;
}
.login-btn:hover{opacity:0.92;}
.login-btn:active{transform:scale(0.99);}
.login-error{font-size:12.5px;color:#c0392b;margin-bottom:14px;display:none;padding:9px 12px;background:#c0392b14;border-radius:5px;}

@media(max-width:760px){
  .login-screen{grid-template-columns:1fr;}
  .login-brand-panel{display:none;}
}

[data-theme="dark"] .field label{color:var(--text);}
[data-theme="dark"] .field input{background:var(--dm-input);border-color:var(--dm-border);color:var(--text);}

/* ---------- Sign-in prompt toast — shown by js/auth.js when an anonymous
   visitor tries to favorite a tour. ---------- */
.karotra-auth-toast{
  position:fixed;left:50%;bottom:24px;transform:translate(-50%,140%);z-index:300;
  background:var(--ink);color:#fff;padding:13px 18px;border-radius:8px;box-shadow:0 10px 30px #00000033;
  display:flex;align-items:center;gap:14px;font-size:13.5px;max-width:calc(100vw - 32px);
  transition:transform .25s ease;
}
.karotra-auth-toast.show{transform:translate(-50%,0);}
.karotra-auth-toast a{color:var(--teal);font-weight:700;white-space:nowrap;}
[data-theme="dark"] .karotra-auth-toast{background:var(--dm-surface);border:1px solid var(--dm-border);}
