/* ============================================================
   CTC — Direction C "Bold Modern"
   Shared styles used across all pages (home, tours, detail, booking)

   Color palette is pulled DIRECTLY from the existing logo:
     --ink     matches the logo's wordmark (near-black)
     --blue    echoes the logo's blue peak
     --orange  echoes the logo's orange peak
   Single font family (Onest) — weight contrast does the work.
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */

:root {
  /* Surfaces */
  --bg:          #ffffff;
  --bg-soft:     #f5f5f3;
  --bg-card:     #fafaf8;
  --bg-orange-soft: #fff5ec;

  /* Ink (text) */
  --ink:         #0a0a0a;     /* matches logo wordmark */
  --ink-soft:    #3a3a3a;
  --mute:        #6b6b6b;
  --rule:        #e6e6e2;

  /* Brand accents — from logo peaks */
  --blue:        #1d4ed8;
  --blue-deep:   #1e3a8a;
  --orange:      #ea580c;
  --orange-deep: #c2410c;

  /* Type stack — single family, weight contrast */
  --sans: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Courier New", monospace;

  /* Layout */
  --header-h: 70px;
  --radius:   12px;
  --radius-lg:16px;

  /* Motion */
  --ease:     cubic-bezier(0.32, 0.72, 0, 1);
  --t-fast:   0.18s ease;
  --t-med:    0.3s var(--ease);
}

/* ---------- RESET & BASE ---------- */

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button { font-family: inherit; }

/* Lock scroll when mobile menu is open */
body.menu-open { overflow: hidden; }

/* ---------- LAYOUT ---------- */

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 768px) {
  .wrap { padding: 0 20px; }
}

/* ---------- TYPOGRAPHY UTILITIES ---------- */

/* Mono labels — small, technical, used for kicker text */
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.label-blue   { color: var(--blue); }
.label-orange { color: var(--orange); }

/* ---------- BUTTONS ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover {
  background: var(--blue);
  transform: translateY(-1px);
}

.btn-orange {
  background: var(--orange);
  color: #fff;
}
.btn-orange:hover {
  background: var(--orange-deep);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-large {
  padding: 16px 30px;
  font-size: 15px;
}

/* Arrow inside button — slides on hover */
.btn .arr {
  display: inline-block;
  transition: transform var(--t-fast);
}
.btn:hover .arr {
  transform: translateX(3px);
}

/* ---------- HEADER (sticky, white, blurred) ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  display: block;
  /* Sized for the official multi-line logo (wordmark + tagline) so the small
     "DESTINATION MANAGEMENT COMPANY" line stays readable. */
  height: 56px;
  flex-shrink: 0;
}
.logo img { height: 100%; width: auto; }

/* Desktop nav */
.nav-desktop {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-desktop a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--t-fast);
}
.nav-desktop a:hover { color: var(--blue); }
.nav-desktop a.active { color: var(--blue); }

/* Disabled / placeholder nav item — kept around for any future menu entry
   that doesn't yet have a target. Rendered as a <span> so it's not clickable;
   mutes the colour and disables the pointer to signal "coming soon". */
.nav-desktop .nav-disabled {
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
  cursor: not-allowed;
  user-select: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-pill {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: var(--bg-soft);
  padding: 6px 12px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: background var(--t-fast);
}
.lang-pill:hover { background: var(--rule); }

/* ---------- FAVORITES HEADER LINK ---------- */
/* Heart icon + numeric badge that links to /favorites/. Count is hidden
   when zero (the `.is-visible` toggle is driven by initFavorites() in
   scripts.js for guests and by server-rendered class for logged-in
   customers). */
.fav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.fav-link:hover,
.fav-link.active {
  background: var(--bg-soft);
  color: var(--orange);
}
.fav-link svg {
  pointer-events: none;
  transition: fill var(--t-fast);
}
.fav-link.has-items svg,
.fav-link.active svg {
  fill: var(--orange);
  stroke: var(--orange);
}
.fav-link-count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  display: none;
  font-family: var(--mono);
}
.fav-link-count.is-visible { display: inline-block; }

/* ---------- HAMBURGER BUTTON (mobile only) ---------- */

.hamburger {
  display: none;            /* shown only on mobile via media query */
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  position: absolute;
  left: 8px;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform var(--t-med), opacity 0.2s ease, top var(--t-med);
}
.hamburger span:nth-child(1) { top: 13px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 25px; }

/* When open, animate to an X */
.hamburger.is-open span:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
}
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) {
  top: 19px;
  transform: rotate(-45deg);
}

/* ---------- MOBILE MENU DRAWER ---------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--t-med), visibility 0s linear var(--t-med);
}
.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity var(--t-med), visibility 0s linear;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 88%;
  max-width: 380px;
  background: #fff;
  padding: 22px 26px 32px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--t-med);
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12);
}
.mobile-menu.is-open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}
/* Slightly larger than 32px so the official multi-line logo (with tagline)
   stays readable inside the mobile drawer header. */
.mobile-menu-head .logo { height: 44px; }

.mobile-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-soft);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
}
.mobile-close:hover { background: var(--rule); }

.mobile-nav {
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-nav li {
  border-bottom: 1px solid var(--rule);
}
.mobile-nav a {
  display: block;
  padding: 18px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--t-fast);
}
.mobile-nav a:hover,
.mobile-nav a.active { color: var(--blue); }

/* Mirror of .nav-desktop .nav-disabled for the mobile drawer. Same visual
   weight as real items so layout doesn't jump, but muted + non-interactive. */
.mobile-nav .nav-disabled {
  display: block;
  padding: 18px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--mute);
  cursor: not-allowed;
  user-select: none;
}

.mobile-cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mobile-cta .btn { justify-content: center; }

.mobile-meta {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ---------- HEADER RESPONSIVE ---------- */

@media (max-width: 960px) {
  .nav-desktop { display: none; }
  .header-actions .lang-pill,
  .header-actions .btn-primary,
  .header-actions .btn-orange { display: none; }
  /* Keep the favorites link visible on mobile — small icon, useful access. */
  .hamburger { display: block; }
}

/* On phones the 56px header logo crowds the hamburger / sign-in pill,
   so we step it down — still bigger than the previous 38px baseline. */
@media (max-width: 600px) {
  .site-header .logo { height: 44px; }
}

/* ---------- TOUR CARD (reused on home, listing, similar tours) ---------- */

.tour {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  text-decoration: none;
  color: var(--ink);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
  border: 1px solid var(--rule);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.tour:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.16);
  border-color: transparent;
}

.tour-img {
  height: 260px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.tour-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.32) 100%);
}

.tour-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
}
.tour-badge.is-new   { background: var(--orange);     color: #fff; }
.tour-badge.is-blue  { background: var(--blue);       color: #fff; }

.tour-fav {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: background var(--t-fast);
}
.tour-fav:hover { background: #fff; }
.tour-fav svg { stroke: var(--ink-soft); transition: all var(--t-fast); }
.tour-fav:hover svg { stroke: var(--orange); fill: var(--orange); }
/* Saved state — filled orange heart so the user can scan the grid and see
   at a glance which cards are already on their wishlist. Wins over :hover
   so a hovered+saved card stays filled instead of flickering. */
.tour-fav.is-active svg,
.tour-fav.is-active:hover svg {
  stroke: var(--orange);
  fill: var(--orange);
}
/* Tiny pop on save — non-blocking, only plays when JS toggles `.is-pop`
   right after marking is-active. */
.tour-fav.is-pop svg { animation: favPop 280ms ease-out; }
@keyframes favPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.tour-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tour-meta {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.tour-meta .label { color: var(--mute); }
.tour-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--rule);
}

.tour-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  color: var(--ink);
}

.tour-desc {
  font-size: 14px;
  color: var(--mute);
  line-height: 1.5;
  margin-bottom: 18px;
  flex: 1;
}

.tour-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.tour-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.tour-rating svg { color: var(--orange); }
.tour-rating .reviews {
  color: var(--mute);
  font-weight: 400;
  margin-left: 2px;
}

.tour-price { text-align: right; }
.tour-price .from {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  display: block;
  margin-bottom: 2px;
}
.tour-price .amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ---------- COMMON SECTION HEAD ---------- */

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.section-title {
  font-size: clamp(36px, 5.4vw, 68px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--ink);
  max-width: 760px;
}
.section-title em {
  font-style: normal;
  color: var(--blue);
}
.section-title em.orange { color: var(--orange); }

.section-sub {
  font-size: 16px;
  color: var(--mute);
  max-width: 380px;
  line-height: 1.55;
}

/* ---------- BREADCRUMB ---------- */

.breadcrumb {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--mute);
  text-decoration: none;
  transition: color var(--t-fast);
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { color: var(--rule); }
.breadcrumb .current { color: var(--ink); }

/* ---------- FORM CONTROLS ---------- */

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.field-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field-input,
.field-select,
.field-textarea {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

/* Error state — Nette's `n:name` macro adds class="error" automatically when the
   control has validation errors. We tint the border + focus ring orange to match
   the brand alert colour. */
.field-input.error,
.field-select.error,
.field-textarea.error {
  border-color: var(--orange);
}
.field-input.error:focus,
.field-select.error:focus,
.field-textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.14);
}

/* Inline error message rendered by `{inputError xyz}`. Wrap calls in
   <span class="field-error">{inputError xyz}</span> in templates so empty
   errors collapse cleanly. */
.field-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--orange);
  line-height: 1.4;
}
.field-error:empty {
  display: none;
}

.field-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
}

/* Custom checkbox / radio */
.check {
  display: flex;
  align-items: start;
  gap: 10px;
  padding: 10px 0;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-soft);
}
.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  transition: all var(--t-fast);
}
.check input[type="radio"] { border-radius: 50%; }
.check input:hover { border-color: var(--mute); }
.check input:checked {
  background: var(--blue);
  border-color: var(--blue);
}
.check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}

/* ---------- FOOTER ---------- */

.site-footer {
  background: var(--ink);
  color: #fff;
  padding: 80px 0 32px;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  /* Reduced from 64px because the "We are member of" strip now sits below */
  margin-bottom: 48px;
}
@media (max-width: 1000px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}

.footer-brand .logo {
  /* Sized to balance the footer column — official multi-colour logo carries the
     brand on the near-black footer without needing any filter. */
  height: 64px;
  margin-bottom: 18px;
}
.footer-brand p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 320px;
}

.footer-newsletter {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  overflow: hidden;
  max-width: 320px;
}
.footer-newsletter input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 14px;
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
}
.footer-newsletter input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.footer-newsletter button {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 0 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast);
}
.footer-newsletter button:hover { background: var(--orange-deep); }

.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 18px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
}
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--orange); }

/* Footer placeholder item — same vertical rhythm as a real link but muted
   and non-interactive. Used while we wait for node ids for items like
   Tailor-made, Group travel, About CTC, Sustainability, etc. */
.footer-col .footer-disabled {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  cursor: not-allowed;
  user-select: none;
}

/* "View all" trailing link under a footer column — slightly demoted from
   the regular links above so it reads as a section CTA, not another item. */
.footer-col .footer-col-all {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.footer-col .footer-col-all:hover { color: var(--orange); }

.footer-base {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 32px;
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* Left group: © year + (optional) licence string from config. Each is a
   <span>; gap between them mirrors the gap to the right-side legal nav so
   the spacing stays even. */
.footer-base-left {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

/* Right group: legal pages from node 515, rendered as dot-separated inline
   links. Sits at the right of the row in the desktop two-up layout;
   wraps under the © line on narrow viewports thanks to the parent's
   flex-wrap. */
.footer-base-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
}
.footer-base-legal a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color var(--t-fast);
}
.footer-base-legal a:hover { color: var(--orange); }
.footer-base-sep {
  color: rgba(255, 255, 255, 0.25);
  margin: 0 4px;
}

/* ---------- FOOTER — "We are member of" strip ---------- */
/* Sits between .footer-top (link columns) and .footer-base (legal line). */
/* Logos are JPGs with white backgrounds, so each one lives in a small white
   tile — this looks intentional on the dark footer and avoids the awkward
   "white blob" effect that mix-blend tricks produce on raster logos. */

.footer-members {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.footer-members-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.footer-members-logos {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-members-logos a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 8px 16px;
  background: #fff;
  border-radius: 8px;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.footer-members-logos a:hover {
  transform: translateY(-2px);
  /* Orange-tinted glow on hover, echoing the brand accent */
  box-shadow: 0 10px 22px -8px rgba(234, 88, 12, 0.45);
}
.footer-members-logos img {
  max-height: 100%;
  width: auto;
  display: block;
}

@media (max-width: 600px) {
  .footer-members { gap: 18px; }
  .footer-members-logos { gap: 10px; }
  .footer-members-logos a { height: 44px; padding: 6px 12px; }
}

/* ---------- FLASH TOASTS — top-center, auto-dismiss ---------- */
/* Container is fixed below the sticky header and centred on the viewport.
   `pointer-events: none` lets clicks pass through gaps between toasts; each
   toast re-enables them so the close button stays clickable. */

.toasts {
  position: fixed;
  top: calc(var(--header-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: 440px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--rule);
  box-shadow: 0 12px 28px -10px rgba(10, 10, 10, 0.18);
  font-size: 14px;
  line-height: 1.5;
  animation: toast-in 0.28s var(--ease) both;
}

.toast.is-leaving {
  animation: toast-out 0.22s ease forwards;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.toast-msg {
  flex: 1;
  color: var(--ink);
  font-weight: 500;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: 0;
  padding: 4px;
  margin: -4px -6px -4px 0;
  cursor: pointer;
  color: var(--mute);
  border-radius: 6px;
  transition: color var(--t-fast), background var(--t-fast);
  line-height: 0;
}
.toast-close:hover {
  color: var(--ink);
  background: var(--bg-soft);
}
.toast-close svg {
  width: 16px;
  height: 16px;
}

/* Type variants — coloured left accent + icon tint. Greys/reds/greens are
   chosen to harmonise with the brand palette without introducing new tokens. */
.toast-success { border-left: 3px solid #16a34a; }
.toast-success .toast-icon { color: #16a34a; }

.toast-error { border-left: 3px solid #dc2626; }
.toast-error .toast-icon { color: #dc2626; }

.toast-warning { border-left: 3px solid var(--orange); }
.toast-warning .toast-icon { color: var(--orange); }

.toast-info { border-left: 3px solid var(--blue); }
.toast-info .toast-icon { color: var(--blue); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-10px); }
}

@media (max-width: 600px) {
  .toasts { top: calc(var(--header-h) + 8px); }
}

/* ============================================================
   LANGUAGE PICKER MODAL
   Opens when the user clicks the lang-pill button (header / mobile menu).
   The active language card is highlighted; choosing a language sets the
   googtrans cookie and reloads the page for Google Translate to kick in.
   ============================================================ */

.lang-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med);
}

.lang-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lang-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(4px);
}

.lang-modal-panel {
  position: relative;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--t-med);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
}

.lang-modal.is-open .lang-modal-panel {
  transform: translateY(0);
}

/* --- Header row --- */

.lang-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.lang-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.lang-modal-sub {
  font-size: 13px;
  color: var(--mute);
  margin-top: 4px;
}

.lang-modal-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-soft);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.lang-modal-close:hover {
  background: var(--rule);
  color: var(--ink);
}

/* --- Language grid --- */

.lang-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.lang-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: var(--radius);
  border: 1.5px solid var(--rule);
  background: var(--bg);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
  text-align: center;
  font-family: var(--sans);
  line-height: 1;
}

.lang-card:hover {
  border-color: var(--ink-soft);
  background: var(--bg-soft);
}

/* Active (currently selected) language */
.lang-card.is-active {
  border-color: var(--orange);
  background: var(--bg-orange-soft);
}

.lang-card-flag {
  font-size: 22px;
  line-height: 1;
}

.lang-card-native {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.lang-card-eng {
  font-size: 10px;
  color: var(--mute);
}

/* --- Credit line --- */

.lang-modal-credit {
  font-size: 11px;
  color: var(--mute);
  text-align: center;
}

.lang-modal-credit a {
  color: var(--mute);
  text-decoration: underline;
}

/* --- Mobile lang button in drawer --- */

.mobile-lang {
  padding: 12px 24px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4px;
}

.mobile-lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  transition: color var(--t-fast);
}

.mobile-lang-btn:hover { color: var(--ink); }

/* --- Responsive grid --- */

@media (max-width: 500px) {
  .lang-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .lang-modal-panel {
    padding: 24px 16px;
  }
}

/* ============================================================
   GOOGLE TRANSLATE OVERRIDES
   We use a completely custom UI, so every piece of the default
   GT toolbar/banner must be suppressed.
   ============================================================ */

/* GT injects `body { top: 40px }` for the toolbar — cancel it */
body { top: 0 !important; }

/* The toolbar itself (rendered as a fixed iframe) */
/* All GT toolbar / banner iframes — covers every class variant GT uses */
.goog-te-banner-frame,
iframe.skiptranslate,
iframe.goog-te-menu-frame { display: none !important; }

/* GT pushes the body down by 40 px to make room for its toolbar — undo it */
body { top: 0 !important; }

/* Dotted highlight GT adds to translated text */
.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}

/* Loading spinner GT overlays on the page while translating */
.goog-te-spinner-pos,
.VIpgJd-yAWNEb-L7lbkb,
.VIpgJd-yAWNEb-hvhgNd { display: none !important; }

/* Hover tooltip / balloon GT shows over translated text (original-text popup) */
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover,
.jfk-bubble.gtx-bubble,
.VIpgJd-yAWNEb-VIpgJd-fmcmS { display: none !important; }

/* Keep the hidden widget div invisible */
#google_translate_element { display: none !important; }
