/*
Theme Name: Adventure Star
Theme URI: https://example.com/
Author: Adventure Star
Description: Hybrid WordPress theme for Adventure Star hire car excess protection.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: adventure-star
*/

:root {
  --as-primary: #ffb87a;
  --as-secondary: #0f204b;
  --as-accent: #ff987c;
  --as-white: #ffffff;
  --as-light: #fff6ee;
  --as-dark: #08142f;
  --as-muted: #56617d;
  --as-radius: 1.25rem;
  --as-shadow: 0 18px 50px rgba(15, 32, 75, 0.18);
  --as-max-width: 1180px;
  --as-header-height: 96px;
  --as-banner-height: 36px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--as-light);
  color: var(--as-secondary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--as-secondary);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--as-dark);
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
}

.container {
  width: min(calc(100% - 2rem), var(--as-max-width));
  margin-inline: auto;
}

.site-main {
  min-height: 60vh;
}

.promo-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1001;
  height: var(--as-banner-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--as-dark);
  color: var(--as-accent);
}

.admin-bar .promo-banner {
  top: 32px;
}

.promo-banner-track {
  display: flex;
  width: max-content;
  animation: promo-banner-scroll 30s linear infinite;
}

.promo-banner-group {
  display: flex;
}

.promo-banner-item {
  white-space: nowrap;
  padding: 0 40px;
}

@keyframes promo-banner-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.site-header {
  position: fixed;
  inset: var(--as-banner-height) 0 auto 0;
  z-index: 1000;
  height: var(--as-header-height);
  display: flex;
  align-items: flex-start;
  padding-top: 0.85rem;
  background: rgba(255, 184, 122, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 32, 75, 0.12);
  transition: background 220ms ease, box-shadow 220ms ease;
}

body.logo-docked .site-header,
body:not(.home) .site-header {
  background: rgba(255, 184, 122, 0.98);
  box-shadow: 0 10px 30px rgba(15, 32, 75, 0.12);
}

.admin-bar .site-header {
  top: calc(32px + var(--as-banner-height));
}

/* No promo banner is rendered for single "cover_option" posts, so remove the offset it would otherwise reserve. */
body.single-cover_option .site-header {
  inset: 0 0 auto 0;
}

body.single-cover_option.admin-bar .site-header {
  top: 32px;
}

body.single-cover_option .page-hero {
  padding-top: calc(var(--as-header-height) + 4rem);
}

.header-inner {
  width: min(calc(100% - 2rem), var(--as-max-width));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-branding {
  display: flex;
  align-items: center;
  min-width: 170px;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
}

.site-logo-static {
  display: block;
  width: 176px;
  max-width: 42vw;
  max-height: calc(var(--as-header-height) - 26px);
  object-fit: contain;
  transition: opacity 180ms ease;
}

body.home.has-hero-js .site-logo-static {
  opacity: 0;
}

body.home.hero-logo-reduced .site-logo-static {
  opacity: 1;
}

.primary-navigation {
  display: flex;
  align-items: center;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu a {
  display: block;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  color: var(--as-secondary);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.primary-menu a:hover,
.primary-menu a:focus-visible,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
  background: var(--as-secondary);
  color: var(--as-white);
}

.primary-menu a:focus-visible {
  outline: 2px solid var(--as-secondary);
  outline-offset: 3px;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 0;
  background: var(--as-secondary);
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--as-secondary);
  outline-offset: 3px;
}

.menu-toggle .bar {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--as-white);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: transform 220ms ease, opacity 180ms ease, top 220ms ease;
}

.menu-toggle .bar:nth-child(1) {
  top: 16px;
}

.menu-toggle .bar:nth-child(2) {
  top: 22px;
}

.menu-toggle .bar:nth-child(3) {
  top: 28px;
}

body.nav-open .menu-toggle .bar:nth-child(1) {
  top: 22px;
  transform: translateX(-50%) rotate(45deg);
}

body.nav-open .menu-toggle .bar:nth-child(2) {
  opacity: 0;
}

body.nav-open .menu-toggle .bar:nth-child(3) {
  top: 22px;
  transform: translateX(-50%) rotate(-45deg);
}

.hero {
    position: relative;
    min-height: 100vh;

    display: flex;
    align-items: center;
}

.pencil-underline {
  position: relative;
  color: var(--as-secondary);
}

.pencil-underline::before,
.pencil-underline::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  background: var(--as-accent);  /* underline colour, independent of text */
  z-index: -1;
}

/* Main thick stroke */
.pencil-underline::before {
  bottom: -0.05em;
  height: 0.24em;
  border-radius: 60% 40% 55% 45% / 60% 65% 35% 40%;
  transform: rotate(-1deg);
  opacity: 0.95;
}

/* Thinner offset pass for texture */
.pencil-underline::after {
  bottom: 0em;
  height: 0.16em;
  border-radius: 40% 60% 45% 55% / 45% 40% 60% 55%;
  transform: rotate(0.8deg);
  opacity: 0.55;
}

/* Stacked, crossfading hero background layers, pinned to the viewport.
   position: fixed keeps the image in place as the person scrolls;
   the sections that follow (which all have solid/opaque backgrounds)
   scroll up over it in normal document flow and progressively cover
   it. z-index: -1 keeps all layers behind that normal-flow content
   without needing z-index on every section.

   Supports up to 4 images (.hero-bg-1 through .hero-bg-4). They are
   stacked in DOM/paint order, so .hero-bg-2 paints over .hero-bg-1,
   .hero-bg-3 paints over both, etc. Each layer after the first fades
   in on top of the previous ones as the person scrolls, driven by a
   --as-hero-opacity-N custom property (0 = not visible yet, 1 = fully
   visible/opaque), which is set in hero-logo.js. .hero-bg-1 is the
   base layer and has no opacity variable — it's always visible,
   simply covered up as later layers fade in above it.

   To use fewer than 4 images, delete the unused .hero-bg-N div in
   front-page.php and its matching rule here; the JS windows config
   just needs its trailing null/window entries removed too. */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg-1 {
  background-image:
    linear-gradient(
      rgba(10, 20, 35, 0.10),
      rgba(10, 20, 35, 0.25)
    ),
    url("assets/images/hero-image.png");
}

.hero-bg-2 {
  background-image:
    linear-gradient(
      rgba(10, 20, 35, 0.0),
      rgba(10, 20, 35, 0.0)
    ),
    url("assets/images/hero-image-night-northern-lights.png");
  opacity: var(--as-hero-opacity-2, 0);
}

.hero-bg-3 {
  /* Swap in a third hero image filename here. */
  background-image:
    linear-gradient(
      rgba(10, 20, 35, 0.0),
      rgba(10, 20, 35, 0.0)
    ),
    url("assets/images/hero-image-winter.png");
  opacity: var(--as-hero-opacity-3, 0);
}

.hero-bg-4 {
  /* Swap in a fourth hero image filename here. */
  background-image:
    linear-gradient(
      rgba(10, 20, 35, 0.0),
      rgba(10, 20, 35, 0.0)
    ),
    url("assets/images/hero-image-4.png");
  opacity: var(--as-hero-opacity-4, 0);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  height: 32%;
  /* background: linear-gradient(transparent, var(--as-light)); */
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(900px, 100%);
  margin-top: 9rem;
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.45rem 0.8rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--as-secondary);
  border-radius: 999px;
  font-weight: 850;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
  text-wrap: balance;
}

.hero p {
  max-width: 680px;
  margin: 1.25rem auto 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.95);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  background: var(--as-secondary);
  color: var(--as-white);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
button[type="submit"]:hover,
button[type="submit"]:focus {
  background: var(--as-dark);
  color: var(--as-white);
}

.button.button-light {
  background: var(--as-white);
  color: var(--as-secondary);
}

.button.button-light:hover,
.button.button-light:focus {
  background: var(--as-primary);
}

.hero-morph-logo {
  position: absolute;
  z-index: 5;
  top: 19%;
  left: 50%;
  width: min(74vw, 540px);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 16px 30px rgba(15, 32, 75, 0.32));
}

body.home.has-hero-js .hero-morph-logo {
  position: fixed;
  z-index: 1200;
  top: 50%;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition:
    left 480ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 480ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 480ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 480ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 260ms ease;
}

body.home.has-hero-js.is-loaded .hero-morph-logo {
  opacity: 1;
}

body.home.hero-logo-reduced .hero-morph-logo {
  position: absolute;
}

/* Prompt beneath the hero logo, inviting the visitor to scroll.
   It only appears once the JS-driven morph is active (has-hero-js)
   and is fully faded in after load (is-loaded). It fades out the
   moment the logo docks into the header (logo-docked), reusing the
   same body classes hero-logo.js already toggles — no JS changes
   needed. It's hidden outright when prefers-reduced-motion disables
   the morph entirely, since there's no "before it docks" moment to
   prompt for in that case. */
.hero-scroll-prompt {
  position: absolute;
  z-index: 4;
  top: 19%;
  left: 50%;
  transform: translate(-50%, calc(-50% + clamp(5.5rem, 22vw, 10rem)));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  color: var(--as-white);
  text-shadow: 0 1px 6px rgba(8, 20, 47, 0.55);
}

.hero-subheading {
  order: 2; /* was 1st in HTML, now renders 2nd */
}

.hero-scroll-prompt-text {
  order: 1; /* was 2nd in HTML, now renders 1st */
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.hero-scroll-prompt-arrow {
  order: 3; /* stays last */
  width: 14px;
  height: 14px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: as-scroll-bounce 1.6s ease-in-out infinite;
}

@keyframes as-scroll-bounce {
  0%, 100% {
    transform: rotate(45deg) translate(0, 0);
  }
  50% {
    transform: rotate(45deg) translate(4px, 4px);
  }
}

body.home.has-hero-js .hero-scroll-prompt {
  position: fixed;
  top: 50%;
  left: 50%;
  opacity: 0;
  transition: opacity 260ms ease;
}

body.home.has-hero-js.is-loaded .hero-scroll-prompt {
  opacity: 1;
}

body.home.has-hero-js.logo-docked .hero-scroll-prompt {
  opacity: 0;
  pointer-events: none;
}

body.home.hero-logo-reduced .hero-scroll-prompt {
  display: none;
}

.section {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.section-primary {
  background: rgba(0,0,0,0);/*var(--as-primary);*/
}

.accent-header{
    color: var(--as-accent);
}

.section-secondary {
  background: var(--as-secondary);
  color: var(--as-white);
}

.section-header {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-header.center {
  margin-inline: auto;
  text-align: center;
}

.section-eyebrow {
  color: var(--as-primary);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-secondary .section-eyebrow {
  color: var(--as-primary);
}

h1,
h2,
h3,
h4 {
  color: inherit;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 4.6rem);
  letter-spacing: -0.045em;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -0.04em;
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
}

.lead {
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  color: var(--as-white);
  text-shadow: 0 0 3px #000000;;
}

.lead-dark {
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  color: var(--as-dark);
}

.section-secondary .lead {
  color: rgba(255, 255, 255, 0.78);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.card {
  background: var(--as-white);
  border: 1px solid rgba(15, 32, 75, 0.1);
  border-radius: var(--as-radius);
  padding: 1.4rem;
  box-shadow: var(--as-shadow);
}

.card h3 {
  margin-top: 0;
}

.cover-card {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 0;
  background-size: cover;
  background-color: rgba(0,0,0,0);
  background-position: bottom center;
  background-repeat: no-repeat;
  border-radius: var(--as-radius);
}

.cover-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.05) 75%);
  z-index: 1;
}

.cover-card:not(.has-bg)::before {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.cover-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.cover-card-sticker {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: #e0272e;
  color: var(--as-white);
  font-weight: 900;
  font-size: 2.0rem;
  letter-spacing: -0.02em;
  text-align: center;
  box-shadow: 0 6px 16px rgba(8, 20, 47, 0.35);
  transform: rotate(12deg);
  pointer-events: none;
}

.cover-card-content {
  position: relative;
  z-index: 3;
  padding: 1.4rem;
  color: var(--as-white);
  pointer-events: none;
}

.cover-card-content h3,
.cover-card-content p {
  color: var(--as-white);
}

.cover-card-pricing {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.6rem;
}

.cover-card-price-old {
  align-self: flex-start;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: line-through;
  text-decoration-thickness: 0.09em;
  margin-bottom: 0.35em;
  transform: rotate(-12deg);
}

.cover-card-price-new {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--as-white);
  line-height: 1;
  margin-top: -0.5em;
}

.cover-card-content .button {
  position: relative;
  z-index: 4;
  pointer-events: auto;
}

.page-hero {
  padding: calc(var(--as-header-height) + var(--as-banner-height) + 4rem) 0 4rem;
  /*background:
    radial-gradient(circle at top left, rgba(255, 152, 124, 0.55), transparent 34rem),
    var(--as-primary);*/
    background:  url("assets/images/hero-image-autumn.png");
    background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  min-height: 550px;
}

.cover-options-header{
    background-color:#ff987c;
    border-radius:20px;
    white-space: nowrap;
    display: inline-block;
    line-height: 1;
    padding: 3px 10px;
    text-align: center;
}

.cover-options-header-centred{
    background-color:#ff987c;
    border-radius:20px;
    white-space: nowrap;
    display: inline-block;
    line-height: 1;
    padding: 3px 10px;
}

.page-hero h1 {
  margin: 0;
}

.content-area {
  padding: 4rem 0;
}

.entry-content {
  font-size: 1.05rem;
}

.entry-content > * {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.entry-content > .alignwide {
  max-width: var(--as-max-width);
}

.entry-content > .alignfull {
  max-width: none;
}

.faq-list details {
  background: var(--as-white);
  border-radius: 1rem;
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 10px 25px rgba(15, 32, 75, 0.08);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 850;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 2rem;
  align-items: start;
}

.contact-panel {
  background: var(--as-secondary);
  color: var(--as-white);
  border-radius: var(--as-radius);
  padding: 1.5rem;
}

.contact-form-panel {
  background: var(--as-white);
  border-radius: var(--as-radius);
  padding: 1.5rem;
  box-shadow: var(--as-shadow);
}

.wpcf7-form label {
  display: block;
  font-weight: 800;
}

.wpcf7-form input,
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid rgba(15, 32, 75, 0.2);
  border-radius: 0.8rem;
  padding: 0.8rem;
  font: inherit;
}

.site-footer {
  background: var(--as-secondary);
  color: var(--as-white);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
}

.footer-logo {
  width: 180px;
  filter: brightness(0) invert(1);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--as-white);
  font-weight: 750;
}

.footer-small {
  margin-top: 1.2rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  :root {
    --as-header-height: 82px;
    --as-banner-height: 40px;
  }
  
  .hero-scroll-prompt-text {
    order: 1; /* was 2nd in HTML, now renders 1st */
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
    padding-top: calc(100px + var(--as-banner-height));
  }

  .promo-banner-item {
    padding: 0 24px;
    font-size: 0.9rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .primary-navigation {
    position: absolute;
    z-index: 1300;
    top: calc(100% + 0.5rem);
    right: 1rem;
    left: 1rem;
    background: var(--as-white);
    border-radius: 1rem;
    padding: 0.75rem;
    box-shadow: var(--as-shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  }
  
  .page-hero {
      padding: calc(var(--as-header-height) + var(--as-banner-height) + 4rem) 0 4rem;
      /*background:
        radial-gradient(circle at top left, rgba(255, 152, 124, 0.55), transparent 34rem),
        var(--as-primary);*/
        background:  url("assets/images/hero-image-autumn.png");
        background-repeat: no-repeat;
      background-position: center;
      background-size: cover;
      min-height: 350px;
    }

  body.nav-open .primary-navigation {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .primary-menu {
    display: grid;
    gap: 0.25rem;
  }

  .primary-menu a {
    border-radius: 0.75rem;
  }

  .card-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-content {
    margin-top: 8rem;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .site-logo-static {
    width: 142px;
  }

  .hero-morph-logo {
    width: 84vw;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 16vw, 4rem);
  }
}