/*
Theme Name: Mattazie Expedition
Theme URI: https://mattazieexpedition.com
Author: Mattazie Expedition
Description: Custom WordPress theme for Mattazie Expedition
Version: 2.3.0
Text Domain: mattazie-expedition
*/

/* =========================================================
   TOKENS
========================================================= */
:root {
    --header-h: 92px;
    /* Palette */
    --color-cream:    #F8F1DE;   /* warm cream   - text on dark, page background */
    --color-sage:     #869192;   /* sage grey    - dividers, muted text, placeholders */
    --color-charcoal: #292728;   /* greyish black - header, menu panels, body text */
    --color-light:    #E2E1DF;   /* light grey   - secondary text, soft surfaces */
    --color-brown:    #2F180B;   /* dark brown   - headings, button text, overlays */
    --header-solid: var(--color-charcoal);
    --header-text: var(--color-cream);
    --mega-pad: clamp(16px, 2.6vw, 40px);
    --mega-col: 340px;
    --mega-h: clamp(430px, 58vh, 560px);   /* one height for every mega panel */
    --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --font-ui: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (max-width: 1023px) {
    :root { --header-h: 76px; }
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-ui);
    background: var(--color-cream);
    color: var(--color-charcoal);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--color-brown); }

::selection { background: var(--color-sage); color: var(--color-charcoal); }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link:focus {
    clip: auto; width: auto; height: auto;
    left: 12px; top: 12px; z-index: 100000;
    background: #fff; color: #000; padding: 10px 16px;
}

/* keeps the footer at the bottom of short pages */
.site-main { min-height: 50vh; }

/* Pages without a hero: push content below the fixed header */
body:not(.header-overlay) { padding-top: var(--header-h); }

/* =========================================================
   HEADER BASE
========================================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9000;
    height: var(--header-h);
    color: var(--header-text);
    background: var(--header-solid);
    border-bottom: 1px solid rgba(248, 241, 222, .26);   /* shows where the header ends */
    transition: background-color .35s ease;
}

.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Transparent over a hero until the visitor scrolls */
.header-overlay .site-header:not(.is-scrolled):not(.menu-open) {
    background: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,0));
    background-origin: border-box;     /* so the gradient doesn't repeat under the bottom line */
}

/* Solid when scrolled, or while a mega panel is open */
.site-header.is-scrolled,
body.header-overlay .site-header:has(.main-menu > li:hover),
body.header-overlay .site-header:has(.main-menu > li:focus-within),
body.header-overlay .site-header:has(.main-menu > li.is-open) {
    background: var(--header-solid);
}

.site-header a { color: inherit; text-decoration: none; }

.header-container {
    height: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 clamp(16px, 2.6vw, 40px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.header-left  { height: 100%; display: flex; align-items: center; justify-content: flex-start; }
.header-right { display: flex; align-items: center; justify-content: flex-end; }

/* =========================================================
   LOGO
========================================================= */
.site-logo { display: flex; justify-content: center; text-align: center; }

.site-logo .custom-logo-link { display: block; line-height: 0; }
.site-logo .custom-logo {
    display: block;
    width: auto;
    max-height: 58px;
    height: auto;
}

/* Text fallback styled as a wordmark */
.site-logo__text { display: inline-flex; flex-direction: column; align-items: stretch; padding: 8px 0; }

.site-logo__name {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-logo__tagline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    font-family: var(--font-ui);
    font-size: clamp(9px, .8vw, 11px);
    letter-spacing: .38em;
    text-transform: uppercase;
    white-space: nowrap;
}
.site-logo__tagline::before,
.site-logo__tagline::after {
    content: "";
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: .85;
}

/* =========================================================
   DESKTOP NAVIGATION + MEGA MENU
   Panels anchor to the fixed header (no positioned ancestor
   in between), so they span the full width underneath it.
========================================================= */
.main-navigation { height: 100%; }

.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    align-items: stretch;
    gap: 40px;
    justify-content: flex-start;
}

/* li fills the header height so the pointer can travel from link to panel without leaving it */
.main-menu > li {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    width: auto;
    margin: 0 !important;      /* guard: plugin / page-builder CSS must not add space between items */
    padding: 0 !important;
}
.main-menu > li:not(:has(> a)),
.main-menu > :not(li) { display: none !important; }   /* guard: stray empty items or injected markup */

.main-menu > li > a {
    position: relative;
    padding: 14px 0;           /* 46px tall: comfortable for touch laptops and tablets */
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .01em;
    white-space: nowrap;
}
.main-menu > li > a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 6px;
    height: 1px;
    background: var(--color-cream);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}
.main-menu > li:hover > a::after,
.main-menu > li:focus-within > a::after,
.main-menu > li.is-open > a::after,
.main-menu > .current-menu-item > a::after,
.main-menu > .current-menu-ancestor > a::after { transform: scaleX(1); }

.mega-panel {
    position: absolute;
    left: 0; right: 0;
    top: calc(100% + 1px);        /* sits directly under the header's border line */
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--header-solid);
    box-shadow: 0 28px 40px rgba(0,0,0,.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.main-menu > li:hover > .mega-panel,
.main-menu > li:focus-within > .mega-panel,
.main-menu > li.is-open > .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.mega-inner {
    position: relative;
    max-width: 1680px;
    height: var(--mega-h);
    margin: 0 auto;
    padding: 36px var(--mega-pad) 40px;
}
.mega-list { list-style: none; margin: 0; padding: 0; }

/* Variant: image cards (Our Safari) - cards fill the full panel height */
.mega-inner--cards .mega-list {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-template-rows: minmax(0, 1fr);
    gap: 20px;
}
.mega-inner--cards .mega-list > li { min-height: 0; }

.mega-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}
.mega-card__img {
    position: relative;
    flex: 1;
    min-height: 120px;
    overflow: hidden;
    background: linear-gradient(145deg, #869192, #4F5859);
}
.mega-card__img img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .7s ease;
}
.mega-card:hover .mega-card__img img,
.mega-card:focus-visible .mega-card__img img { transform: scale(1.05); }
.mega-card__label {
    display: block;
    margin-top: 14px;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 500;
    line-height: 1.15;
}

/* "View all" link (custom menus; hidden inside country flyouts on desktop) */
.mega-viewall { grid-column: 1 / -1; }
.mega-viewall__link {
    display: inline-block;
    padding-bottom: 3px;
    border-bottom: 1px solid currentColor;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    transition: opacity .25s ease;
}
.mega-viewall__link:hover,
.mega-viewall__link:focus-visible { opacity: .75; }

/* Variant: places (Destinations) - hover a country, its 3 destinations open on the right */
.mega-places { width: var(--mega-col); }
.mega-link--place {
    padding: 8px 0;
    font-size: 26px;
    transition: transform .25s ease;
}
.mega-places > li:hover > .mega-link--place,
.mega-places > li:focus-within > .mega-link--place,
.mega-places > li.is-active > .mega-link--place { transform: translateX(8px); }

.mega-flyout {
    position: absolute;
    top: 0; bottom: 0;
    left: calc(var(--mega-pad) + var(--mega-col));
    right: var(--mega-pad);
    padding: 36px 0 40px 56px;
    border-left: 1px solid rgba(134,145,146,.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
}
.flyout-list {
    height: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr) auto;   /* 3 big cards, then the View All link */
    column-gap: 24px;
    row-gap: 22px;
}
.flyout-list > li { min-height: 0; }
.flyout-viewall { grid-column: 1 / -1; }

/* last row without a flyout ("All Destinations") */
.mega-places > li:not(.has-flyout) > .mega-link--place {
    margin-top: 8px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .02em;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.mega-places > li:hover > .mega-flyout,
.mega-places > li:focus-within > .mega-flyout,
.mega-places > li.is-active > .mega-flyout { opacity: 1; visibility: visible; }

/* nothing hovered yet: show the first country, only while the panel is open */
.main-menu > li:hover .mega-places:not(:has(> li:hover)):not(:has(> li.is-active)) > li:first-child > .mega-flyout,
.main-menu > li:focus-within .mega-places:not(:has(> li:hover)):not(:has(> li.is-active)) > li:first-child > .mega-flyout,
.main-menu > li.is-open .mega-places:not(:has(> li:hover)):not(:has(> li.is-active)) > li:first-child > .mega-flyout {
    opacity: 1;
    visibility: visible;
}

/* focus on the hovered country, quietly dim the rest */
.mega-places:hover > li:not(:hover) > .mega-link--place { opacity: .45; }
.mega-link--place { transition: transform .25s ease, opacity .25s ease; }

/* Variant: link list + big cards (About Us) */
.mega-inner--list {
    display: grid;
    grid-template-columns: var(--mega-col);
    grid-template-rows: minmax(0, 1fr);
    gap: 56px;
}
.mega-inner--list.has-featured { grid-template-columns: var(--mega-col) 1fr; }

.mega-link {
    display: block;
    padding: 8px 0;
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 500;
    line-height: 1.2;
    transition: transform .25s ease;
}
.mega-link:hover,
.mega-link:focus-visible { transform: translateX(6px); }

.mega-featured {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    gap: 24px;
}
.mega-featured--topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.mega-post {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}
.mega-post__img {
    position: relative;
    flex: 1;
    min-height: 120px;
    overflow: hidden;
    background: linear-gradient(145deg, #869192, #4F5859);
}
.mega-post__img img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .7s ease;
}
.mega-post:hover .mega-post__img img { transform: scale(1.05); }
.mega-post__title {
    display: block;
    margin-top: 14px;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 500;
    line-height: 1.2;
}

/* =========================================================
   RIGHT SIDE: PHONE, SEARCH, CTA
========================================================= */
.header-action { display: flex; align-items: center; gap: clamp(16px, 1.8vw, 28px); }

.header-phone {
    padding: 12px 0;
    font-size: 15px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
    white-space: nowrap;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.icon-button:hover { opacity: .75; }

/* =========================================================
   BUTTONS - theme default, with a water-fill hover on every button
   Applies to: .btn, .button, .header-button, WordPress / Elementor /
   form buttons. Tune the colours with the --btn-* variables.
========================================================= */
:root {
    --btn-bg: var(--color-charcoal);
    --btn-text: var(--color-cream);
    --btn-border: var(--color-charcoal);
    --btn-water: var(--color-sage);          /* the main water */
    --btn-water-lead: var(--color-light);    /* the lighter wave that leads it */
    --btn-text-hover: var(--color-charcoal);
}

:where(.btn, .button, .header-button, .wp-block-button__link, .wp-element-button,
       .elementor-button, button[type="submit"]:not(.search-submit)) {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    isolation: isolate;
    overflow: hidden;
    padding: 15px 34px;
    border: 1px solid var(--btn-border);
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-text);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color .45s ease .12s, border-color .45s ease;
}

/* two water layers: a lighter wave leads, the main colour follows */
:where(.btn, .button, .header-button, .wp-block-button__link, .wp-element-button,
       .elementor-button, button[type="submit"]:not(.search-submit))::before,
:where(.btn, .button, .header-button, .wp-block-button__link, .wp-element-button,
       .elementor-button, button[type="submit"]:not(.search-submit))::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: -100%;
    top: 108%;                  /* parked just below the button */
    width: 300%;
    aspect-ratio: 1;
    border-radius: 40%;         /* the soft blob that makes the wave */
    background: var(--btn-water-lead);
    pointer-events: none;
    transition: top .85s cubic-bezier(.22, .8, .2, 1);
    animation: btn-wave 5s linear infinite;
    animation-play-state: paused;
}
:where(.btn, .button, .header-button, .wp-block-button__link, .wp-element-button,
       .elementor-button, button[type="submit"]:not(.search-submit))::after {
    background: var(--btn-water);
    border-radius: 38%;
    transition-duration: 1.05s;
    transition-delay: .07s;
    animation-duration: 7s;
    animation-direction: reverse;
}

/* hover / keyboard focus: the water rises and fills the button */
:where(.btn, .button, .header-button, .wp-block-button__link, .wp-element-button,
       .elementor-button, button[type="submit"]:not(.search-submit)):is(:hover, :focus-visible, :active) {
    color: var(--btn-text-hover);
    border-color: var(--btn-water);
}
:where(.btn, .button, .header-button, .wp-block-button__link, .wp-element-button,
       .elementor-button, button[type="submit"]:not(.search-submit)):is(:hover, :focus-visible, :active)::before,
:where(.btn, .button, .header-button, .wp-block-button__link, .wp-element-button,
       .elementor-button, button[type="submit"]:not(.search-submit)):is(:hover, :focus-visible, :active)::after {
    top: -45%;
    animation-play-state: running;
}

@keyframes btn-wave { to { transform: rotate(360deg); } }

/* form inputs cannot hold pseudo-elements: they get a simple fill instead */
:where(input[type="submit"]:not(.search-submit), input[type="button"], .wpcf7-submit) {
    padding: 15px 34px;
    border: 1px solid var(--btn-border);
    border-radius: 999px;
    background-color: var(--btn-bg);
    background-image: linear-gradient(var(--btn-water), var(--btn-water));
    background-repeat: no-repeat;
    background-position: bottom;
    background-size: 100% 0;
    color: var(--btn-text);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-size .7s cubic-bezier(.22, .8, .2, 1), color .45s ease .1s;
}
:where(input[type="submit"]:not(.search-submit), input[type="button"], .wpcf7-submit):is(:hover, :focus-visible, :active) {
    background-size: 100% 100%;
    color: var(--btn-text-hover);
}

/* Variant for dark surfaces (header, mobile menu, footer): outline button, cream water */
.header-button,
.btn--light {
    --btn-bg: transparent;
    --btn-text: var(--color-cream);
    --btn-border: rgba(248, 241, 222, .75);
    --btn-water: var(--color-cream);
    --btn-water-lead: var(--color-sage);
    --btn-text-hover: var(--color-brown);
}
/* Solid cream button (used for "Join"): sage water on hover */
.btn--cream {
    --btn-bg: var(--color-cream);
    --btn-text: var(--color-charcoal);
    --btn-border: var(--color-cream);
    --btn-water: var(--color-sage);
    --btn-water-lead: var(--color-light);
    --btn-text-hover: var(--color-charcoal);
}

/* beats ".site-header a" / ".mobile-panel__footer a" which set the link colour */
.header-button:is(:hover, :focus-visible, :active),
.btn--light:is(:hover, :focus-visible, :active) { color: var(--btn-text-hover); }

a:focus-visible, button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* =========================================================
   HAMBURGER (two bars, second shorter, as in the design)
========================================================= */
.menu-toggle {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 9px;
    width: 44px; height: 44px;
    padding: 0 6px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.menu-toggle__bar {
    display: block;
    height: 2px;
    width: 28px;
    background: currentColor;
    transition: transform .3s ease, width .3s ease;
}
.menu-toggle__bar:last-child { width: 20px; }

.menu-open .menu-toggle__bar:first-child { transform: translateY(5.5px) rotate(45deg); }
.menu-open .menu-toggle__bar:last-child  { width: 28px; transform: translateY(-5.5px) rotate(-45deg); }

/* =========================================================
   MOBILE PANEL (accordion)
========================================================= */
.mobile-panel {
    position: fixed;
    inset: 0;
    z-index: 8990;
    padding: calc(var(--header-h) + 12px) 24px calc(28px + env(safe-area-inset-bottom, 0px));
    background: var(--header-solid);
    color: var(--color-cream);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.mobile-panel[hidden] { display: none; }
.mobile-panel:not([hidden]) { animation: panel-in .3s ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.admin-bar .mobile-panel { padding-top: calc(var(--header-h) + 12px + 32px); }
@media (max-width: 782px) { .admin-bar .mobile-panel { padding-top: calc(var(--header-h) + 12px + 46px); } }

.mobile-menu,
.mobile-sub { list-style: none; margin: 0; padding: 0; }

.mobile-menu > li { border-bottom: 1px solid rgba(248,241,222,.16); }

.mobile-row { display: flex; align-items: center; justify-content: space-between; }
.mobile-row > a {
    flex: 1;
    padding: 20px 0;
    color: var(--color-cream);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 500;
    line-height: 1.1;
}

/* plus / minus toggle */
.submenu-toggle {
    position: relative;
    width: 52px; height: 52px;
    margin-right: -10px;
    border: 0;
    background: transparent;
    color: var(--color-cream);
    cursor: pointer;
}
.submenu-toggle span::before,
.submenu-toggle span::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 18px; height: 1.5px;
    background: currentColor;
    transform: translate(-50%, -50%);
    transition: transform .25s ease, opacity .25s ease;
}
.submenu-toggle span::after { transform: translate(-50%, -50%) rotate(90deg); }
.submenu-toggle[aria-expanded="true"] span::after { transform: translate(-50%, -50%) rotate(0deg); opacity: 0; }

.mobile-sub { padding: 0 0 20px; }
.mobile-sub a {
    display: block;
    padding: 11px 0;
    color: var(--color-light);
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
}
.mobile-sub a:hover { color: var(--color-cream); }

/* nested level (country -> destinations) */
.mobile-row--sub > a {
    padding: 12px 0;
    color: rgba(248,241,222,.95);
    font-family: var(--font-ui);
    font-size: 17px;
    font-weight: 500;
}
.mobile-row--sub .submenu-toggle { width: 44px; height: 44px; margin-right: -8px; }
.mobile-sub--nested { padding: 0 0 10px 16px; }
.mobile-sub--nested a { padding: 9px 0; font-size: 16px; color: rgba(248,241,222,.78); }

.mobile-panel__footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    margin-top: 36px;
}
.mobile-panel__footer a { color: var(--color-cream); text-decoration: none; }
.mobile-panel__footer .header-phone {
    align-self: flex-start;
    font-size: 19px;
    text-decoration: underline;
}
.mobile-panel__footer .header-button { width: 100%; }

body.menu-is-open,
body.search-is-open { overflow: hidden; }

/* =========================================================
   SEARCH OVERLAY
========================================================= */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(47, 24, 11, .97);
    color: var(--color-cream);
}
.search-overlay[hidden] { display: none; }

.search-overlay__close {
    position: absolute;
    top: 20px; right: 24px;
    width: 48px; height: 48px;
    border: 0;
    background: transparent;
    color: var(--color-cream);
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
}
.admin-bar .search-overlay__close { top: 52px; }

.search-overlay__inner { width: 100%; max-width: 720px; }

.search-overlay .search-form { display: flex; border-bottom: 1px solid rgba(248,241,222,.6); }
.search-overlay .search-form label { flex: 1; }
.search-overlay .search-field {
    width: 100%;
    padding: 18px 0;
    border: 0;
    background: transparent;
    color: var(--color-cream);
    font-family: var(--font-display);
    font-size: clamp(26px, 5vw, 42px);
    outline: none;
}
.search-overlay .search-field::placeholder { color: rgba(248,241,222,.55); }
.search-overlay .search-submit {
    border: 0;
    background: transparent;
    color: var(--color-cream);
    font-family: var(--font-ui);
    font-size: 13px;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
}

/* =========================================================
   FOOTER  (luxury edition)
   Layered glow + grain, ornament divider, private-concierge contact,
   outlined oversized brand name, scroll-reveal columns.
========================================================= */
.site-footer {
    position: relative;
    overflow: hidden;
    background: var(--color-charcoal);
    color: var(--color-cream);
    font-size: 15px;
    line-height: 1.6;
}
.site-footer a { color: inherit; text-decoration: none; }

/* atmosphere */
.footer-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 520px at 8% -5%, rgba(47, 24, 11, .95), transparent 62%),
        radial-gradient(760px 520px at 100% 100%, rgba(134, 145, 146, .17), transparent 62%),
        var(--color-charcoal);
}
.footer-bg::after {                      /* fine film grain */
    content: "";
    position: absolute;
    inset: 0;
    opacity: .09;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.footer-photo {                          /* optional photograph, fades into the charcoal */
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .28;
    filter: grayscale(.35);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
            mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
}

.footer-inner { position: relative; z-index: 1; }

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: var(--mega-pad);
    padding-right: var(--mega-pad);
}

/* "Ready to plan your safari?" band */
.footer-join__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 96px;
    padding-bottom: 72px;
}
.footer-join__title {
    margin: 0;
    color: var(--color-cream);
    font-family: var(--font-display);
    font-size: clamp(38px, 4.6vw, 64px);
    font-weight: 700;
    line-height: 1.08;
}
.footer-join__title em { font-style: italic; font-weight: 500; }
.footer-join__sub { margin: 18px 0 0; color: var(--color-light); font-size: 18px; }

.footer-join__form {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
    width: 100%;
    max-width: 640px;
    margin-top: 36px;
    text-align: left;
}
.footer-join__field { flex: 1; min-width: 0; }
.footer-join__field label { display: block; margin-bottom: 8px; color: var(--color-cream); font-size: 13px; }
.footer-join__field input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 1px solid var(--color-cream);
    border-radius: 0;
    background: transparent;
    color: var(--color-cream);
    font-family: var(--font-ui);
    font-size: 16px;            /* 16px stops iPhones zooming in */
    outline: none;
    transition: box-shadow .25s ease;
}
.footer-join__field input:focus { box-shadow: 0 0 0 3px rgba(134, 145, 146, .55); }
.footer-join__form .btn { height: 50px; padding: 0 44px; border-radius: 0; }
.footer-join__msg { margin: 18px 0 0; color: var(--color-cream); }
.footer-join__msg--error { color: var(--color-light); }

/* layout */
.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
    gap: 64px 72px;
    padding-top: 72px;
    padding-bottom: 64px;
    border-top: 1px solid rgba(248, 241, 222, .22);   /* the one divider line */
}
.footer-links {
    display: grid;
    grid-template-columns: 1.45fr 1fr .85fr;
    gap: 36px;
}

/* brand + concierge */
.footer-logo .custom-logo { display: block; width: auto; max-width: 220px; height: auto; max-height: 72px; margin-bottom: 28px; }
.footer-statement {
    max-width: 17ch;
    margin: 0 0 44px;
    color: var(--color-cream);
    font-family: var(--font-display);
    font-size: clamp(30px, 3vw, 44px);
    font-style: italic;
    font-weight: 500;
    line-height: 1.12;
}
.footer-kicker {
    margin: 0 0 12px;
    color: var(--color-sage);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .26em;
    text-transform: uppercase;
}
.footer-phone {
    position: relative;
    display: inline-block;
    padding: 6px 0;
    font-family: var(--font-display);
    font-size: clamp(32px, 3.4vw, 48px);
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.1;
}
.footer-phone::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 2px;
    height: 1px;
    background: var(--color-cream);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s ease;
}
.footer-phone:hover::after,
.footer-phone:focus-visible::after { transform: scaleX(1); }

.footer-meta { list-style: none; margin: 14px 0 0; padding: 0; font-size: 14px; color: var(--color-light); }
.footer-meta .footer-text { padding: 4px 0; }
.footer-address { font-style: normal; }
.footer-whatsapp { margin-top: 26px; }

/* link columns */
.footer-title {
    position: relative;
    margin: 0 0 30px;
    padding-bottom: 18px;
    color: var(--color-cream);
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 600;
    line-height: 1.12;
}
.footer-title::after {                   /* short sage rule under each title */
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 34px; height: 1px;
    background: var(--color-sage);
}

.footer-menu { list-style: none; margin: 0; padding: 0; font-size: 14px; letter-spacing: .02em; }

.footer-menu a,
.footer-link {
    position: relative;
    display: inline-block;
    padding: 11px 0;           /* 44px tap height */
    color: var(--color-light);
    transition: color .3s ease, transform .3s ease;
}
.footer-menu a::after,
.footer-link::after,
.footer-legal a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 9px;
    height: 1px;
    background: var(--color-cream);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}
.footer-menu a:hover,
.footer-menu a:focus-visible { color: var(--color-cream); transform: translateX(6px); }
.footer-link:hover,
.footer-link:focus-visible { color: var(--color-cream); }
.footer-menu a:hover::after,
.footer-link:hover::after,
.footer-menu a:focus-visible::after,
.footer-link:focus-visible::after,
.footer-legal a:hover::after,
.footer-legal a:focus-visible::after { transform: scaleX(1); }

/* middle row: social | affiliations | back to top */
.footer-mid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 40px;
    padding-top: 0;
    padding-bottom: 48px;
}
.footer-social { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 0 -10px; padding: 0; }
.footer-social a {
    display: grid;
    place-items: center;
    width: 40px; height: 44px;   /* icon is 20px; the rest is tap area */
    color: var(--color-cream);
    transition: color .3s ease, transform .3s ease;
}
.footer-social a:hover,
.footer-social a:focus-visible { color: var(--color-sage); transform: translateY(-3px); }

.footer-partners { flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 32px; }
.footer-partners .footer-kicker { margin: 0; }
.footer-partners__logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 36px; }
.footer-partner__img {
    display: block;
    width: auto;
    height: 38px;
    max-width: 130px;
    object-fit: contain;
    filter: brightness(0) invert(1);     /* every logo becomes one calm cream tone (use transparent PNG / SVG logos) */
    opacity: .7;
    transition: opacity .3s ease;
}
.footer-partner:hover .footer-partner__img { opacity: 1; }

/* bottom bar */
.footer-bottom { border-top: 1px solid rgba(248, 241, 222, .16); }
.footer-bottom__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 32px;
    padding-top: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    color: var(--color-light);
    font-size: 13px;
}
.footer-copy { margin: 0; padding: 12px 0; letter-spacing: .02em; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; list-style: none; margin: 0; padding: 0; }
.footer-legal a {
    position: relative;
    display: inline-block;
    padding: 14px 0;           /* 44px tap height */
    color: var(--color-light);
    transition: color .25s ease;
}
.footer-legal a:hover,
.footer-legal a:focus-visible { color: var(--color-cream); }

/* scroll reveal (JS adds .js to <html> and .is-visible when in view) */
.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .9s ease, transform .9s cubic-bezier(.22, .8, .2, 1);
    transition-delay: calc(var(--i, 0) * 110ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* keep the links aligned when a long title wraps on smaller laptops */
@media (min-width: 768px) and (max-width: 1279px) {
    .footer-title { min-height: 3.2em; }
}

/* ---- footer: tablets ---- */
@media (max-width: 1023px) {
    .footer-top { grid-template-columns: 1fr; gap: 56px; padding-top: 56px; padding-bottom: 48px; }
    .footer-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-statement { max-width: 22ch; margin-bottom: 36px; }
}

/* ---- footer: phones ---- */
@media (max-width: 767px) {
    .footer-links { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
    .footer-links .footer-col:last-child { grid-column: 1 / -1; }
}
@media (max-width: 479px) {
    .footer-links { grid-template-columns: 1fr; }
    .footer-title { margin-bottom: 22px; }
    .footer-join__form { flex-direction: column; align-items: stretch; }
    .footer-join__form .btn { width: 100%; }
    .footer-partners { order: 3; flex: 1 1 100%; justify-content: flex-start; }
    .footer-partners__logos { justify-content: flex-start; }
    .footer-bottom__inner { flex-direction: column; align-items: flex-start; }
    .footer-copy { padding-bottom: 0; }
    .footer-whatsapp { width: 100%; }
}
@media (max-width: 767px) {
    .footer-partners { order: 3; flex: 1 1 100%; justify-content: flex-start; }
    .footer-partners__logos { justify-content: flex-start; }
}

/* =========================================================
   RESPONSIVE
   >= 1024px : nav (mega menu) left | logo | phone + search + CTA
   <  1024px : search | logo | hamburger
========================================================= */
.search-toggle--mobile { display: none; }

@media (max-width: 1199px) {
    .header-action { gap: 14px; }
    .header-phone { font-size: 14px; }
    .header-button { padding: 13px 22px; }
    .main-menu { gap: 28px; }
    .mega-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mega-featured--topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mega-link--place { font-size: 24px; }
    .mega-flyout { padding-left: 32px; }
}

@media (max-width: 1023px) {
    .main-navigation,
    .header-action { display: none; }

    .search-toggle--mobile { display: inline-flex; margin-left: -10px; }
    .menu-toggle { display: inline-flex; margin-right: -6px; }

    /* search | logo | hamburger: the logo column shrinks instead of pushing the buttons off screen */
    .header-container { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
    .site-logo { min-width: 0; }
    .site-logo .custom-logo { max-height: 44px; max-width: 100%; }
    .site-logo__name { font-size: clamp(15px, 4vw, 28px); letter-spacing: .04em; }
    .site-logo__tagline { font-size: clamp(8px, 2.2vw, 10px); gap: 8px; letter-spacing: .3em; }

    .site-header { padding-top: env(safe-area-inset-top, 0); }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* =========================================================
   SEARCH RESULTS PAGE (search.php)
========================================================= */
.srp{background:var(--color-cream);color:var(--color-charcoal);font-family:var(--font-ui)}
.srp *{box-sizing:border-box}
.srp-wrap{max-width:1400px;margin:0 auto;padding:0 40px}
.srp-hero{background:var(--color-brown);color:var(--color-cream);padding:64px 0 56px}
.srp-eyebrow{display:block;font-size:11px;font-weight:700;letter-spacing:.28em;text-transform:uppercase;color:var(--color-sage);margin-bottom:14px}
.srp-title{margin:0 0 10px;font-family:"Cormorant Garamond",Georgia,serif;font-weight:500;font-size:clamp(34px,5vw,56px);line-height:1.1;color:var(--color-cream)}
.srp-count{margin:0 0 26px;font-size:14px;color:rgba(248,241,222,.75)}
.srp-form{display:flex;max-width:620px}
.srp-form input{flex:1;min-width:0;padding:15px 18px;border:0;background:var(--color-cream);color:var(--color-charcoal);font:inherit;font-size:15px;border-radius:0}
.srp-form button{padding:15px 26px;border:0;background:var(--color-sage);color:#fff;font:inherit;font-size:11px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;cursor:pointer;border-radius:0}
.srp-form button:hover{background:#6f7b7c}
.srp-results{padding:56px 0 80px}
.srp-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:32px}
.srp-card{background:#fff;border:1px solid rgba(47,24,11,.12);display:flex;flex-direction:column;transition:transform .3s ease,box-shadow .3s ease}
.srp-card:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(47,24,11,.12)}
.srp-card__img{position:relative;display:block;aspect-ratio:4/3;overflow:hidden;background:var(--color-sage)}
.srp-card__img img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .6s ease}
.srp-card:hover .srp-card__img img{transform:scale(1.05)}
.srp-card__ph{display:block;width:100%;height:100%;background:linear-gradient(145deg,var(--color-sage),#4F5859)}
.srp-card__tag{position:absolute;left:14px;top:14px;background:var(--color-brown);color:var(--color-cream);padding:6px 12px;font-size:10px;font-weight:700;letter-spacing:.18em;text-transform:uppercase}
.srp-card__body{padding:24px;display:flex;flex-direction:column;gap:10px;flex:1}
.srp-card__meta{font-size:11px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:#693613}
.srp-card__title{margin:0;font-family:"Cormorant Garamond",Georgia,serif;font-size:26px;font-weight:700;line-height:1.15}
.srp-card__title a{color:var(--color-brown);text-decoration:none}
.srp-card__title a:hover{color:#693613}
.srp-card__text{margin:0;font-size:14.5px;line-height:1.7;color:var(--color-charcoal);flex:1}
.srp-card__more{font-size:11px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:#693613;text-decoration:none;border-bottom:1px solid currentColor;align-self:flex-start;padding-bottom:2px}
.srp-pager{margin-top:48px;display:flex;justify-content:center}
.srp-pager .page-numbers{display:inline-block;min-width:42px;padding:11px 14px;margin:0 3px;text-align:center;background:#fff;border:1px solid rgba(47,24,11,.14);color:var(--color-brown);text-decoration:none;font-weight:600}
.srp-pager .page-numbers.current,.srp-pager a.page-numbers:hover{background:var(--color-brown);color:var(--color-cream)}
.srp-none{text-align:center;padding:40px 0}
.srp-none h2{font-family:"Cormorant Garamond",Georgia,serif;font-size:36px;color:var(--color-brown);margin:0 0 10px}
@media(max-width:1023px){.srp-grid{grid-template-columns:repeat(2,1fr);gap:24px}}
@media(max-width:640px){.srp-wrap{padding:0 20px}.srp-hero{padding:44px 0 40px}.srp-grid{grid-template-columns:1fr}.srp-form{flex-direction:column}.srp-results{padding:36px 0 56px}}
.srp-tabs{display:flex;flex-wrap:wrap;gap:10px;margin-top:26px}
.srp-tab{padding:10px 20px;border:1px solid rgba(248,241,222,.4);color:var(--color-cream);text-decoration:none;font-size:11px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;transition:background .25s ease,color .25s ease}
.srp-tab:hover,.srp-tab.is-active{background:var(--color-cream);color:var(--color-brown)}