/* ==========================================================================
   GLOBAL STYLES — STRUCTURE & NAMING GUIDE
   ==========================================================================

   HOW THIS FILE IS ORGANIZED
   --------------------------------------------------------------------------
   1. DESIGN TOKENS (:root)    <- almost every global change happens here
        1.1 Palette            raw colors, named by what they ARE
        1.2 Semantic colors    colors named by what they're FOR
        1.3 Typography
        1.4 Spacing
        1.5 Shape (radius / shadow / borders)
        1.6 Motion
        1.7 Layout & z-index
        1.8 Component tokens   (buttons, header, tables…)
        1.9 Responsive overrides of tokens
   2. BASE                     element defaults (html, body, a, img…)
   3. UTILITIES                .bg-*, .text-*, .epic-*
   4. COMPONENTS & SECTIONS    buttons, header, footer, cards, tables…

   THE 3-LAYER COLOR RULE (the most important idea)
   --------------------------------------------------------------------------
   Layer 1  --palette-*     Raw values. ONLY defined here, never used in
                            components.   --palette-gold: #d0a75e;
   Layer 2  --color-*       Meaning/role. Points to a palette value.
                            --color-link: var(--palette-gold-dark);
   Layer 3  --button-*, --header-* ...  (optional) component-specific tokens
                            that point to a --color-* token.

   Components should use Layer 2 or 3 only. Then:
     - "Change the gold everywhere"       -> edit ONE --palette-* value
     - "Make links red"                   -> edit ONE --color-link value
     - "Make only the header darker"      -> edit ONE --header-bg value

   NAMING PATTERN:   --{category}-{property}-{variant}
   --------------------------------------------------------------------------
   --color-text-on-dark      category: color   property: text   variant: on-dark
   --font-size-md            category: font    property: size   variant: md
   --space-lg                category: space   variant: lg
   --radius-button           category: radius  variant: button
   --shadow-text / --shadow-box
   --transition-base
   --z-header

   RULES
   --------------------------------------------------------------------------
   - Name by ROLE, not by value.   Good: --color-link   Bad: --color-gold-text
     (if the link turns blue, "gold" would be a lie).
   - Never hard-code a color, size, or timing inside a component if it
     already exists as a token. If a value is used 2+ times, make a token.
   - One token = one job. Don't reuse --color-link for a border just because
     it's the same color today; create/use --color-border-*.
   - Component-only values (used in a single component) can be defined
     locally on that component, e.g. `.cards-wrapper { --cols: 3; }`.
   - Sizes scale: xs < sm < md < lg < xl.

   BREAKPOINTS (CSS variables can't be used inside @media, so they're
   documented here — keep them consistent):
     sm  575.98px   phones
     md  767.98px   large phones / small tablets
     lg  991.98px   tablets
     xl  1199.98px  small desktops (header collapses to hamburger)
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* ----------------------------------------------------------------------
     1.1 PALETTE — raw brand colors. Only edit values here to rebrand.
     Do NOT use these directly in components; use the --color-* roles below.
     ---------------------------------------------------------------------- */
  --palette-black: #231f20; /* "epic black" */
  --palette-black-pure: #000;
  --palette-white: #fff;
  --palette-gold: #d0a75e; /* "epic gold" */
  --palette-gold-dark: #c5a059; /* gold used for text/links on light bg */
  --palette-cream: #fce0a3; /* "golden cream" */
  --palette-red: #c4091d; /* "cherry red" */
  --palette-teal: #8cbeb3; /* "cloud blue" */
  --palette-grey-900: #333;
  --palette-grey-600: #6b7280;
  --palette-grey-300: #ccc;
  --palette-grey-200: #e0e0e0;
  --palette-grey-100: #eee;
  --palette-grey-50: #f9f9f9;
  --palette-green: #34a853;

  /* ----------------------------------------------------------------------
     1.2 SEMANTIC COLORS — what a color is FOR. Use these in components.
     ---------------------------------------------------------------------- */
  /* Brand roles */
  --color-primary: var(--palette-black);
  --color-secondary: var(--palette-gold);
  --color-accent: var(--palette-teal);
  --color-highlight: var(--palette-red); /* hover states, secondary CTAs */
  --color-brand: var(--palette-gold-dark); /* main brand color on light bg */

  /* Text */
  --color-text-on-light: var(--palette-black-pure);
  --color-text-on-dark: var(--palette-white);
  --color-text-muted: var(--palette-grey-600);
  --color-text-strong: var(--palette-grey-900);
  --color-link: var(--color-brand);
  --color-link-hover: var(--palette-gold);
  --color-heading-on-light: var(--color-brand);
  --color-heading-on-dark: var(--palette-gold);
  --color-text-cream: var(--palette-cream);

  /* Surfaces (backgrounds) */
  --color-surface-dark: var(--palette-black);
  --color-surface-darkest: var(--palette-black-pure);
  --color-surface-light: var(--palette-white);
  --color-surface-cream: #fce0a326; /* cream @ 15% */
  --color-surface-cream-subtle: #fce0a30d; /* cream @ 5% */
  --color-surface-muted: var(--palette-grey-50); /* zebra rows */
  --color-surface-note: #fcf8f7;
  --gradient-surface-dark: linear-gradient(
    to bottom,
    var(--palette-black-pure),
    var(--palette-black)
  );

  /* Borders */
  --color-border: var(--palette-grey-200);
  --color-border-subtle: var(--palette-grey-100);
  --color-border-input: var(--palette-grey-300);
  --color-border-strong: var(--palette-black-pure);
  --color-border-brand: var(--color-brand);
  --color-border-cream: var(--palette-cream);

  /* Status / icons */
  --color-success: var(--palette-green);
  --color-icon-muted: #00000057;

  /* ----------------------------------------------------------------------
     1.3 TYPOGRAPHY
     ---------------------------------------------------------------------- */
  --font-family-base: "Poppins", "Inter", sans-serif;
  --font-family-heading: "Poppins", "Inter", sans-serif;

  --font-size-base: 16px; /* drives rem on <html> */
  --font-size-h1: 3rem;
  --font-size-h2: 3rem;
  --font-size-h3: 1.5rem;
  --font-size-xs: 0.8125rem; /* buttons / small labels */
  --font-size-sm: 0.9rem;
  --font-size-md: 1.1rem;
  --font-size-lg: 1.2rem;

  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-h1: var(--font-weight-bold);
  --font-weight-h2: bold;
  --font-weight-nav: var(--font-weight-semibold);

  --line-height-base: 1.5;

  /* ----------------------------------------------------------------------
     1.4 SPACING SCALE
     ---------------------------------------------------------------------- */
  --space-xs: 5px;
  --space-sm: 10px;
  --space-md: 20px;
  --space-lg: 30px;
  --space-xl: 40px;
  --space-section: 65px;

  --gap-default: var(--space-lg); /* default grid/flex gap */
  --section-padding-y: 65px; /* vertical padding of a page section */
  --heading-margin-bottom: var(--space-lg); /* space under a title */
  --section-header-margin-bottom: var(--space-xl);
  --layout-gutter: 1rem; /* side padding for the mobile nav panel */

  /* ----------------------------------------------------------------------
     1.5 SHAPE — radius, shadows, borders
     (alternatives kept as comments so you can flip the whole look)
     ---------------------------------------------------------------------- */
  /* --radius-image: 15px; */
  --radius-image: 0;
  /* --radius-button: 5px; */
  --radius-button: 0;
  /* --radius-nav-link: 5px; */
  --radius-nav-link: 0;
  --radius-sm: 4px;

  --shadow-text: 3px 2px 3px #000;
  --shadow-box: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-dropdown: 0 8px 16px rgba(0, 0, 0, 0.1);

  /* ----------------------------------------------------------------------
     1.6 MOTION
     NOTE: --animate-* are read by Animate.css — don't rename them.
     ---------------------------------------------------------------------- */
  --animate-duration: 3000ms;
  --animate-delay: 0.9s;
  --transition-base: 300ms ease;
  --transition-slow: 0.4s ease;

  /* ----------------------------------------------------------------------
     1.7 LAYOUT & Z-INDEX
     ---------------------------------------------------------------------- */
  --header-height: 102px;
  --container-max-width-wide: 1800px;

  --z-header: 5;
  --z-mobile-menu: 100;

  /* ----------------------------------------------------------------------
     1.8 COMPONENT TOKENS — point to semantic tokens above.
     Add one here when a single component needs its own knob.
     ---------------------------------------------------------------------- */
  /* Buttons */
  --button-font-size: var(--font-size-xs);
  --button-padding: 7px 16px;
  --button-padding-wide: 7px 40px;

  --card-border-color: #e5e7eb;
  --card-border-radius: 0;

  /* Header / nav */
  --header-bg: var(--color-surface-light);
  --header-text-color: var(--color-text-on-light);
  --nav-link-color: var(--color-text-muted);
  --nav-link-active-color: var(--color-link);

  --logo-height: 50px;

  /* Footer */
  --footer-bg: var(--color-surface-dark);
  --footer-text-color: var(--color-text-on-dark);

  /* Tables */
  --table-cell-padding: 11px 20px;
  --table-zebra-bg: var(--color-surface-muted);
  --table-icon-size: 30px;

  /* Section headings */
  --section-ribbon-bg: var(--color-surface-darkest);
}

/* ----------------------------------------------------------------------
   1.9 RESPONSIVE TOKEN OVERRIDES
   Change a token per breakpoint here instead of inside each component.
   ---------------------------------------------------------------------- */
@media (max-width: 575.98px) {
  :root {
    --section-padding-y: 35px;
    /* --font-size-h1: 1.5rem; */
    --font-size-h1: 3rem;
    --font-size-base: 14px;
    --logo-height: 40px;
  }
}

/* ==========================================================================
   2. BASE — element defaults
   ========================================================================== */
html {
  font-size: var(--font-size-base);
}
body {
  font-family: var(--font-family-base);
  line-height: var(--line-height-base);
}
strong {
  font-weight: bolder;
}
a {
  color: var(--color-link);
}
img {
  border-radius: var(--radius-image);
  max-width: 100%;
  height: auto;
}
.node__meta,
.node__submitted,
.path-search .search-form {
  display: none;
}

/* ==========================================================================
   4a. BUTTONS / CTAs
   ========================================================================== */
.cta-transparent {
  background: transparent;
  border: 1px solid var(--color-text-on-dark);
  color: var(--color-text-on-dark);
  padding: var(--button-padding-wide);
  font-size: var(--button-font-size);

  font-family: var(--font-family-base);
  font-weight: var(--font-weight-light);
  position: relative;
  transition: all var(--transition-base);
  text-transform: uppercase;

  &:hover {
    border: 1px solid var(--color-highlight);
    background: var(--color-highlight);
  }
}

.cta-link {
  font-size: var(--button-font-size);
  font-weight: var(--font-weight-bold);
  color: var(--color-link);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all var(--transition-base);
  cursor: pointer;

  &:hover {
    color: var(--color-link-hover);
  }

  &.cta-link-md {
    font-size: var(--font-size-lg);
  }

  &::after {
    content: "→";
    padding-left: var(--space-xs);
  }
}

.cta-solid {
  color: var(--color-text-on-dark);
  background: var(--color-brand);
  padding: var(--button-padding);
  font-size: var(--button-font-size);
  transition: all var(--transition-base);
  border: 1px solid var(--color-border-brand);
  cursor: pointer;
  &:hover {
    background: transparent;
    border: 1px solid var(--color-border-brand);
    color: var(--color-brand);
    transition: all var(--transition-base);
  }
}
a.cta-solid {
  text-decoration: none;
  display: block;
}

.cta-secondary {
  color: var(--color-secondary);
  background: transparent;
  border: 1px solid;
  padding: var(--button-padding);
  transition: all var(--transition-base);
  cursor: pointer;
  &:hover {
    background-color: var(--color-secondary);
    color: var(--color-text-on-dark);
  }
}
:focus-visible {
  outline: none;
}

/* ==========================================================================
   3. UTILITIES — typography helpers, backgrounds, text colors
   ========================================================================== */
.epic-header,
h1 {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-h1);
  font-family: var(--font-family-heading);
  line-height: 1.2;
}
.epic-subheader,
h2,
h3 {
  font-size: var(--font-size-h2);
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-h2);
}
.epic-body-text {
  /* todo */
}
.epic-link-wrapper {
  margin-top: var(--space-xl);
}
.epic-text-shadow {
  text-shadow: var(--shadow-text);
}

/* Background utilities (each one sets a readable text color too) */
.bg-black {
  background-color: var(--color-surface-dark);
  color: var(--color-text-on-dark);
}
.bg-white {
  background-color: var(--color-surface-light);
  color: var(--color-text-on-light);
}
.bg-red {
  background-color: var(--color-highlight);
  color: var(--color-text-on-dark);
}
.bg-cream {
  background-color: var(--color-surface-cream);
  color: var(--color-text-on-light);
}
.bg-dark_gradient {
  background: var(--gradient-surface-dark);
  color: var(--color-text-on-dark);
}

/* Text color utilities */
.text-black {
  color: var(--color-text-on-light);
}
.text-white {
  color: var(--color-text-on-dark);
}
.text-gold {
  color: var(--palette-gold);
}
.text-cream {
  color: var(--color-text-cream);
}
.text-red {
  color: var(--color-highlight);
}

/* ==========================================================================
   4b. SECTIONS (page building blocks)
   ========================================================================== */
.section {
  padding: var(--section-padding-y) 0;

  &.content-center_align {
    text-align: center;
  }

  & .container .container {
    padding-left: 0;
    padding-right: 0;
  }

  & .section {
    padding: unset;
  }

  & .section-desc ol,
  & .section-desc ul {
    list-style-type: revert;
    margin-left: 2rem;
  }
}
.card-benefit-wrapper .text-wrapper ul,
.card-benefit-wrapper .text-wrapper ol {
  list-style-type: revert;
  margin-left: 2rem;
}
.section-md {
  padding: var(--space-xl) 0;

  &.content-center_align {
    text-align: center;
  }
}
.section-body > div {
  padding: var(--space-xl) 0;

  &:first-child {
    padding-top: 0;
  }

  &:last-child {
    padding-bottom: 0;
  }
}
.section-header {
  margin-bottom: var(--section-header-margin-bottom);
}
.section-title {
  margin-bottom: var(--heading-margin-bottom);
  position: relative;
  &::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--palette-black);
    margin-top: 12px;
  }

  .content-center_align &::after {
    /* margin-inline: auto; */
    display: none;
  }

  .section & {
    color: var(--color-heading-on-light);
  }

  .bg-black & {
    color: var(--color-heading-on-dark);

    /* &::after{

    } */
  }
}

.section-link-wrapper {
  margin-top: var(--space-xl);
  text-align: center;

  .content-left_align & {
    text-align: left;
  }
}

/* ==========================================================================
   4c. SECTION: Ribbon Header
   ========================================================================== */
.header-ribbon {
  text-align: center;
  background-color: var(--section-ribbon-bg);
  padding: 3px;
  color: var(--color-text-on-dark);
}

/* ==========================================================================
   4d. HEADER / NAVBAR
   ========================================================================== */
.site-logo img {
  height: var(--logo-height);
}
.menu {
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu a.is-active {
  color: var(--nav-link-active-color) !important;
}
.menu a:hover {
  color: var(--nav-link-active-color) !important;
}
.main-header {
  color: var(--header-text-color);
  background-color: var(--header-bg);
  transition:
    opacity var(--transition-slow),
    visibility 0s linear 0s;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: var(--z-header);

  & .region-ribbon {
    display: flex;
    justify-content: space-between;
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    @media screen and (max-width: 1199.98px) {
      justify-content: center;
      display: flex;
    }

    & > div:last-child {
      display: flex;
      justify-content: end;

      @media screen and (max-width: 1199.98px) {
        display: none;
      }
    }

    & a {
      color: white;
      text-decoration: none;

      &:hover {
        color: var(--color-secondary);
      }
    }
  }

  &.header-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity var(--transition-slow),
      visibility 0s linear 0.4s;
  }

  & .header-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
    position: relative; /* anchor for the mobile panel */

    @media screen and (max-width: 1199.98px) {
      justify-content: center;
    }
  }

  /* wrapper around primary menu + buttons */
  & .header-nav {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 2rem;
  }

  & .primary-menu-wrapper {
    margin-left: auto;
    margin-right: auto;

    & .region-primary-menu {
      display: flex;
      align-items: center;
      gap: var(--space-xs);

      & nav {
        @media screen and (max-width: 1199.98px) {
          width: 100%;
          & ul.menu {
            text-align: center;
          }
        }
      }
    }
  }

  & .region-primary-menu .menu {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: var(--space-md);

    & > li {
      list-style: none;
      padding-top: 0;
    }
    & a {
      text-decoration: none;
      color: var(--nav-link-color);
      padding: var(--space-sm);
      font-weight: var(--font-weight-h2);
      font-family: var(--font-family-heading);
    }
  }

  & .hamburger-menu {
    display: none;
  }

  & .nav-btns .cta-solid {
    max-width: fit-content;
    margin: 0 auto;
    text-transform: uppercase;
  }

  /* Tablet and below */
  @media (max-width: 1199.98px) {
    & .hamburger-menu {
      display: flex;
      position: absolute;
      left: var(--padding-inline);
    }

    & .header-nav {
      /* display: none; */
      display: flex;
      position: absolute;
      height: 0;
      top: 100%;
      left: 0;
      right: 0;
      flex: none;
      flex-direction: column;
      align-items: stretch;
      justify-content: center;
      gap: 16px;
      padding: 0;
      background: var(--header-bg);
      box-shadow: var(--shadow-dropdown);
      max-height: calc(100vh - 100%); /* see note below */
      overflow-y: auto;
      transition:
        height 0.4s ease-in-out,
        padding 0.4s ease-in-out;

      &.is-open {
        /* display: flex; */
        height: 100vh;
        padding: 16px var(--layout-gutter);
      }
    }

    & .primary-menu-wrapper {
      margin: 0;
      margin-top: -102px; /* header height */
    }

    & .region-primary-menu,
    & .region-primary-menu .menu {
      flex-direction: column;
      align-items: stretch;
      gap: 0;
    }

    & .region-primary-menu .menu a {
      display: block;
      padding: 12px 0;
      font-size: 1.4rem;
    }

    & .nav-btns {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
  }
}

/* Desktop-first: hide mobile menu on desktop */
.mobile-menu {
  display: none;
}

@media (max-width: 991.98px) {
  /* .primary-menu-wrapper,
  .nav-btns {
    display: none;
  } */

  .mobile-menu {
    display: block;
    position: relative;
  }

  .mobile-menu__panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: max-content;
    max-width: 100vw;
    background: var(--header-bg);
    padding: 16px;
    z-index: var(--z-mobile-menu);
  }

  .mobile-menu.is-open .mobile-menu__panel {
    display: block;
  }
}

/* SECTION Hamburger Mobile Menu */
.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 0;
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text-strong);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease-in-out;
  position: absolute;
}
.hamburger-menu span:nth-child(1) {
  top: 0px;
}
.hamburger-menu span:nth-child(2) {
  top: 10px;
}
.hamburger-menu span:nth-child(3) {
  top: 20px;
}
.hamburger-menu.active span:nth-child(1) {
  top: 10px;
  transform: rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  top: 10px;
  transform: rotate(-45deg);
}

main {
  margin-top: var(--header-height);
}

/* ==========================================================================
   4e. FOOTER
   ========================================================================== */
footer {
  background-color: var(--footer-bg);
  color: var(--footer-text-color);

  & a {
    text-decoration: none;
    color: inherit;
  }

  & .region-footer {
    display: grid;
    gap: 1rem;
    /* grid-template-columns: 30% 20% 25% 25%; */
    grid-template-columns: 20% 50% 20%;
    justify-content: center;
    padding: var(--section-padding-y) 0;

    & h2 {
      margin-top: var(--space-sm);
      margin-bottom: var(--space-md);
      font-size: 1rem;
      line-height: 22px;
      text-transform: uppercase;
    }
    /* Tablet and below */
    @media (max-width: 991.98px) {
      grid-template-columns: 1fr;
    }
  }

  & .footer-socials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: var(--space-sm);
    color: var(--footer-text-color);

    & svg {
      width: 32px;
      height: 32px;
    }
  }

  & .copyright {
    padding: var(--space-sm) 0;
    text-align: center;
    font-size: var(--font-size-sm);
  }
}
.prefooter-download-app {
  & .qr-code-image {
    max-width: fit-content;
    border: 1px solid var(--color-border-brand);
    margin: 0 auto;
  }
  & .qr-code-image img {
    height: 200px;
    width: auto;
  }
  & .hint-text {
    color: var(--color-brand);
  }

  & .column-layout {
    grid-template-columns: repeat(2, auto);
  }

  @media screen and (max-width: 991.98px) {
    & .qr-code-image-wrapper {
      display: none;
    }
  }
}
ul.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;

  & li {
    margin-bottom: var(--space-md);
    line-height: 1.3;
  }
}

/* ==========================================================================
   4f. SECTION: Hero Image Slider
   ========================================================================== */
.hero-image-slider {
  & img {
    margin: 0 auto;
    display: block;
  }
  /* height: 98vh;

  & .splide {
    height: 100%;
  }

  & .splide__track,
  & .splide__list,
  & .splide__slide {
    height: 100% !important;
  }

  & .splide__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
  }

  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  } */
}

/* ==========================================================================
   4g. SECTION: Search page / Search bar
   ========================================================================== */
.path-search #block-epicrewards-theme-content {
  padding: var(--section-padding-y) 0;
  max-width: var(--container-max-width-wide);
  padding-inline: var(--space-md);
  margin-left: auto;
  margin-right: auto;

  & .search-form {
    display: none;
  }

  & h2 {
    margin-bottom: var(--heading-margin-bottom);
    position: relative;
    &::after {
      content: "";
      display: block;
      width: 50px;
      height: 3px;
      background-color: var(--palette-gold);
      margin-top: 12px;
    }
  }

  & .item-list li {
    margin-bottom: var(--gap-default);
  }
}

#block-epicrewards-theme-searchform {
  & form,
  & .form-item-keys {
    position: relative;
  }

  & .form-item-keys::before {
    content: "";
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
    color: var(--color-text-muted); /* icon color */
    background-color: currentColor;
    --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-width='2' d='m21 21l-4.486-4.494M19 10.5a8.5 8.5 0 1 1-17 0a8.5 8.5 0 0 1 17 0Z'/%3E%3C/svg%3E");
    -webkit-mask-image: var(--svg);
    mask-image: var(--svg);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
  }

  & input.form-search {
    box-sizing: border-box;
    height: 2.5rem;
    width: 2.5rem; /* collapsed: icon only */
    padding: 0 0 0 2.5rem;
    border-color: transparent;
    background: transparent;
    color: transparent; /* hide text/caret while collapsed */
    cursor: pointer;
    transition:
      width 0.3s ease,
      border-color 0.3s ease;
  }

  /* expanded while the input has focus */
  & .form-item-keys:focus-within input.form-search {
    width: 15rem;
    padding: 0 0.5rem 0 2.5rem;
    border-color: var(--color-border-input);
    background: var(--color-surface-light);
    color: inherit;
    cursor: text;
  }

  & .button.form-submit {
    display: none;
  }

  @media screen and (max-width: 1199.98px) {
    display: none;
  }
}

/* ==========================================================================
   4h. SECTION: Hero Banner (Homepage)
   ========================================================================== */
.hero-banner {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--header-height));

  & iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100cqw, 177.78cqh); /* 16:9 → 100 / 56.25 */
    height: max(100cqh, 56.25cqw);
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;
  }

  & .banner-text-content {
    position: absolute;
    z-index: 1;
    bottom: 65px;
    text-align: center;
    color: var(--color-text-on-dark);
    left: 0;
    right: 0;
    font-size: var(--font-size-md);

    & h1 {
      font-size: 2.5rem;
    }
    & p {
      text-shadow: var(--shadow-text);
      margin-top: var(--space-sm);
      max-width: 700px;
      margin-inline: auto;
      line-height: 1.5;
    }
  }
}

/* ==========================================================================
   4i. Epic Cards (Paragraphs) — epic-card and epic-cards-container
   Local variables (--gap, --row-gap, --cols) are component-only knobs.
   ========================================================================== */
.cards-wrapper {
  --gap: var(--space-md);
  --row-gap: 60px;
  --cols: 3;

  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: var(--gap);
  row-gap: var(--row-gap);

  @media (max-width: 767.98px) {
    --cols: 2;
  }

  @media (max-width: 575.98px) {
    --cols: 1;
  }
}

.cards-wrapper .epic-card {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: center;
  height: 100%;

  & .card-image {
    height: 200px;
  }
  & img {
    width: auto;
    max-height: 200px;
  }

  & .card-name {
    font-size: var(--font-size-md);
    color: var(--color-heading-on-light);
    margin-block: var(--space-sm);
  }

  & .card-perks {
    max-width: 300px;
    margin: 0 auto;
  }

  & .card-benefits,
  & .card-category-benefits {
    display: none;
  }
}

/* ==========================================================================
   4j. SECTION: Column Layout / Column Content
   ========================================================================== */
.column-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--gap-default);

  &.col-4 {
    grid-template-columns: repeat(4, 1fr);
    @media screen and (max-width: 1199.98px) {
      grid-template-columns: repeat(3, 1fr);
    }
    @media (max-width: 767.98px) {
      grid-template-columns: repeat(2, 1fr);
    }

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

  & .column-title,
  & .epic-subheader {
    margin-bottom: 1rem;
  }
  & .column-body {
    text-align: justify;
  }

  &:has(.linked-image) {
    place-items: center;
  }

  .content-left_align & {
    gap: var(--space-sm);
    display: flex;
    @media (max-width: 991.98px) {
      flex-wrap: wrap;
    }
  }

  .content-center_align & {
    /* grid-template-columns: repeat(auto-fit, 250px); */
    justify-content: center;

    @media (max-width: 991.98px) {
      grid-template-columns: 1fr;
    }
  }
}
#partner-brands .column-layout {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-sm);
  row-gap: var(--gap-default);
  justify-content: center;

  & > .image-with-label {
    min-width: 200px;
    width: calc(25% - 10px);
    box-sizing: border-box;
  }
}

/* ==========================================================================
   4k. SECTION: Linked Images
   ========================================================================== */
.linked-image {
  & a {
    display: block;
    width: fit-content;
  }
  & img {
    height: 60px;
    width: auto;
  }
}

/* ==========================================================================
   4l. Epic Rewards Accordion
   ========================================================================== */
.accordion-item > .accordion-title > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem;
  background: none;
  border: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.accordion-item.is-open > .accordion-title > button::after {
  transform: rotate(225deg);
}
.accordion-note {
  margin-bottom: 1rem;
  padding: var(--space-sm);
  background-color: var(--color-surface-note);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  max-width: min(500px, 100%);
}
.accordion-item {
  margin-bottom: var(--space-sm);

  & h3 {
    font-size: var(--font-size-md);
  }

  & .accordion-body {
    padding: 1.5rem;
    overflow-x: auto;
  }

  & > .accordion-title {
    margin: 0;
    background-color: var(--color-brand);
    color: var(--color-text-on-dark);
  }

  & > .accordion-title > button::after {
    content: "";
    flex-shrink: 0;
    width: 0.6rem;
    height: 0.6rem;
    margin-left: 1rem;
    border-right: 2px solid var(--color-text-on-dark);
    border-bottom: 2px solid var(--color-text-on-dark);
    transform: rotate(45deg);
    transition: transform 0.25s ease;
    margin-right: 1rem;
  }
}

/* ==========================================================================
   4m. TABLES
   ========================================================================== */
table th,
table td {
  padding: var(--table-cell-padding);
}

.accordion-container,
.section-desc,
.epic-body {
  & table,
  & td,
  & th {
    border: 1px solid var(--color-border-strong);
    text-align: start;
  }
}
.accordion-container table {
  margin-block: 10px;
}
.accordion-container th {
  font-weight: var(--font-weight-h1);
}
.partner-brands table th:nth-child(3),
.partner-brands table th:nth-child(4),
.partner-brands td:nth-child(3),
.partner-brands td:nth-child(4) {
  text-align: center;
}

/* ==========================================================================
   4n. Paragraph: 2 Column Layout (Image and Content)
   ========================================================================== */
.column-layout-2 {
  --gap: var(--gap-default);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  justify-content: center;
  align-items: center;

  &.reverse-position {
    direction: rtl;

    & > * {
      direction: ltr;
    }
  }

  section.section & {
    padding: unset;
  }

  & .images-column {
    display: flex;
    justify-content: center;
    & img {
      width: auto;
    }
    & .splide img {
      margin-inline: auto;
      display: block;
    }
  }

  & .content-column {
    /* display: flex;
    align-items: center; */
    & > *:not(:first-child) {
      margin-top: var(--space-md);
    }
    & .column-title {
      margin-bottom: 1rem;
    }
  }

  & .left-col > *,
  & .right-col > * {
    margin-top: var(--space-md);

    &:first-child {
      margin-top: 0;
    }
  }

  @media screen and (max-width: 767.98px) {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
  }

  &.reverse-position {
    @media screen and (max-width: 767.98px) {
      flex-direction: row-reverse;
    }
  }
}

.title-body-link {
  & .epic-header {
    margin-bottom: 1rem;
    color: var(--color-heading-on-light);
  }

  & .epic-body {
    & p strong {
      color: var(--color-heading-on-light);
    }

    & table {
      margin-bottom: var(--space-lg);
    }
  }
}

/* ==========================================================================
   4o. SECTION: Benefits Table
   ========================================================================== */
.benefit-table-wrapper {
  /* margin-bottom: var(--space-xl); */
  width: 100%;
  overflow-x: auto;

  & .footnote-wrapper {
    margin-top: 2rem;
  }
}
.benefit-table {
  border-collapse: collapse;
  border-spacing: 0;
  /* max-width: 100%; */
  width: 100%;
  min-width: 56rem;
  table-layout: fixed;

  & tbody > tr:nth-of-type(odd) {
    background: var(--table-zebra-bg);
  }

  & tbody td:not(.row-label) {
    text-align: center;
    vertical-align: middle;
  }

  & .header-label {
    vertical-align: middle;
    font-size: var(--font-size-h1);
    text-align: start;
  }

  & tr.bold_label {
    .row-label {
      font-weight: var(--font-weight-bold);
      text-transform: uppercase;
    }
  }

  & tr.row_highlight {
    background-color: var(--color-secondary);
    color: var(--color-text-on-dark);
  }

  & .row-label {
    vertical-align: middle;
    text-align: start;
  }

  & .membership-card {
    min-width: 70px;
    text-align: center;

    & img {
      width: auto;
      max-height: 75px;
    }

    @media screen and (max-width: 575.98px) {
      min-width: none;
    }
  }

  & .hidden-cell {
    opacity: 0;
  }

  & span:has(svg) {
    & svg {
      width: var(--table-icon-size);
    }
    &.check-icon {
      color: var(--color-success);
    }
    &.cross-icon {
      color: var(--color-icon-muted);
    }
  }
}
.sticky-tier-header {
  position: fixed;
  top: 0;
  overflow: hidden;
  z-index: 90;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    top 0.25s ease,
    opacity 0.15s ease;

  &.is-visible {
    opacity: 1;
    visibility: visible;
  }

  & .benefit-table {
    margin: 0;
  }
}

.benefit-table th:has(> .membership-card),
.sticky-tier-header .benefit-table th:has(> .membership-card) {
  padding: 0;
}

/* ==========================================================================
   4p. SECTION: Image with Label
   ========================================================================== */
.image-with-label figcaption {
  text-align: center;
}

/* ==========================================================================
   4q. Contact Us
   ========================================================================== */
#contact-us-section {
  & .form-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  & input:not(.form-submit) {
    padding: var(--space-xs);
    width: 100%;
  }

  & input.form-submit {
    color: var(--color-brand);
    background: transparent;
    border: 1px solid;
    padding: var(--button-padding);
    transition: all var(--transition-base);
    cursor: pointer;
    &:hover {
      background-color: var(--color-highlight);
      color: var(--color-text-on-dark);
    }
  }

  & .column-layout-2 {
    justify-content: unset;
  }
}

/* .title-comp .epic-header{
  mb1e
} */

/* ==========================================================================
   4r. Misc components
   ========================================================================== */
.img-with-text-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 1em;
  margin-top: 1em;

  & h6 {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
  }
  & svg {
    width: 1.5rem;
    height: 1.5rem;
  }
}

.logos-container {
  display: flex;
  gap: 48px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  & img {
    max-height: 60px;
    height: 60px;
    width: auto;
  }
}

/* SECTION: Card with Image and Texts */
.card-img-txts {
  border: 1px solid;
  text-align: center;
  background-color: var(--color-surface-cream-subtle);
  border-color: var(--color-border-cream);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;

  &:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  }

  & .card-title {
    font-size: var(--font-size-lg);
    color: var(--color-heading-on-light);
  }

  & .card-desc {
    font-size: var(--font-size-sm);
  }

  & .card-img {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    overflow: hidden;
    width: 100%;
    height: 80px;
  }

  & .card-img img,
  & .card-img svg {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
  }
}

.default-card {
  min-width: calc((100% - 40px) / 3);
  box-sizing: border-box;
  background: white;
  border: 1px solid var(--card-border-color);
  border-radius: var(--card-border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
  height: 100%; /* Testing */
  box-shadow: var(--shadow-box);

  & img {
    width: 100%;
    /* height: 160px; */
    object-fit: cover;
    border-radius: 0;
    aspect-ratio: 4 / 3;
    height: auto;
  }

  & .card-body {
    padding: var(--space-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  & .card-text {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-lg);
    margin-top: var(--space-lg);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  & .card-title {
    font-weight: var(--font-weight-h2);
    color: var(--color-text-on-light);
    margin-bottom: 8px;
    font-family: var(--font-family-heading);

    & a {
      text-decoration: none;
      color: black;

      &:hover {
        color: var(--color-secondary);
      }
    }

    & h3 {
      font-size: var(--font-size-h3);
    }
  }

  & .card-link {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
  }
}

/* SECTION Tab and Panel Layout */
.tab-panel-layout .tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}
.tab-panel-layout .tab-btn.is-active {
  background-color: var(--color-secondary);
  color: var(--color-text-on-dark);
}
.tab-panel-layout .tab-btn.is-active .tab-panel-layout .panel[hidden] {
  display: none;
}

/* SECTION Promotion Page */
.promotion-page table,
.promotion-page td,
.promotion-page th {
  border: 1px solid var(--color-border-subtle);
}
.promotion-content {
  display: grid;
  /* gap: var(--gap-default); */
  gap: 4.5rem;
  grid-template-columns: 2fr 3fr;

  & .promo-image {
    padding: 15px;
    box-shadow: var(--shadow-box);
    height: fit-content;
  }

  & .preview-text {
    margin-top: var(--space-xs);
  }

  @media screen and (max-width: 767.98px) {
    grid-template-columns: 1fr;
  }
}

.trip-schedule .trip-info {
  width: 40%;
  vertical-align: top;
  vertical-align: middle;
  text-align: center;
}
table.trip-schedule,
table.trip-schedule th,
table.trip-schedule td {
  text-align: center;
}

.trip-schedule .gray-background td,
td.gray-background {
  background-color: var(--color-primary);
  color: white;
}
