/* Add this to the top of css file to reset default 
margins and ensure the hero section fills the viewport height. */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}
/*-----------------------------------*/
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: #454054;
}

/* Video fills screen */
.hero-video {
  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  z-index: 1;
}

/* Dark overlay so text is readable */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(40, 30, 43, 0.28);
  z-index: 2;
}

/* Content on top */
.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  color: white;
   /* border: 3px solid red; */
}

.hero-logo {
  width: 180px;
  margin-bottom: 10px;
  padding: 15px;
  /* border: 3px solid green; */
}

.hero-left {
    width: 100%;
    flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding-left: 15px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  /* border: 3px solid green; */
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-end;
  padding: 15px;
    /* border: 3px solid yellow; */
}
.hero-logo {
  width: 180px;
}
.welcome-text {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #F5C84C;
  /* border: 3px solid purple; */
}
.hero-left h1 {
  margin: 0.25rem 0 1rem;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  color: white;
  /* border: 3px solid blue; */
}
.hero-description {
  max-width: 550px;
  margin: 0 0 1.5rem;
  font-size: 1.15rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
  /* border: 3px solid aqua; */
}
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #F5C84C;
  background: transparent;
  border: 1px solid rgba(240, 242, 80, 0.8);
  padding: 11px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s ease;
}
.hero-link:hover {
  background: rgba(245, 200, 76, 0.18);
  transform: translateX(4px);
}

.cta-btn {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 14px 18px;
  min-width: 240px;

  background: #E54F45;
  border: 1px solid var(--ff-brand-dark);

  color: white;
  text-decoration: none;

  border-radius: 10px;

  transition: background 0.2s ease, transform 0.2s ease;
}

.cta-btn:hover {
  background: #C83E36;
  color: white;
  border-color: var(--ff-brand-dark);
  transform: translateY(-1px);
}
.cta-btn.highlight span::before {
  content: "→ ";
}
.cta-btn.highlight {
  background: rgba(245, 200, 76, 0.95);
  border: 1px solid #F5C84C;
  color: black;
  font-weight: 700;
}

.cta-btn.highlight:hover {
  background: #F5C84C;
  transform: translateY(-3px) scale(1.02);
}
@media (max-width: 540px) {
  .hero {
    min-height: 100vh;
    height: auto;
    position: relative;
    overflow: hidden;
    background: #454054;
  }

  .hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    z-index: 1;
  }

  .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(40, 30, 43, 0.28);
    z-index: 2;
    pointer-events: none;
  }

  .hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 32px 16px 24px;
    gap: 14px;
    text-align: center;
    min-height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
  }

  .hero-left,
  .hero-right {
    width: 100%;
    padding: 0 12px;
    align-items: center;
  }

  .hero-logo {
    width: 120px;
    margin-bottom: 8px;
  }

  .hero-left h1 {
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    line-height: 1.05;
    color: #fff;
    margin-bottom: 0.75rem;
  }

  .hero-description {
    color: rgba(255,255,255,0.95);
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .cta-btn {
    min-width: 0;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
  }

  .cta-btn span {
    display: block;
    font-size: 0.85rem;
  }
}

/* On mobile, the decorative overlay must not block taps on its child buttons. */
@media (max-width: 540px) {
  .hero-overlay { pointer-events: auto; }
  .hero-content { max-height: none; overflow-y: visible; height: auto; }
  .hero { min-height: 100svh; height: auto; }
}

/* Mobile hero: let content grow beyond the visible screen, rather than
   clipping buttons behind the browser/system navigation controls. */
@media (max-width: 540px) {
  .hero {
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  .hero-overlay {
    position: relative;
    inset: auto;
    min-height: 100svh;
  }

  .hero-content {
    height: auto;
    min-height: 100svh;
    max-height: none;
    overflow: visible;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .hero-right {
    box-sizing: border-box;
    width: 100%;
    padding-bottom: 12px;
  }
}

/* Compact phone homepage: fit all six actions above system navigation. */
@media (max-width: 767px) {
  .hero { height: 100svh; min-height: 0; overflow: hidden; }
  .hero-overlay { position: absolute; inset: 0; min-height: 0; }
  .hero-content {
    height: 100%; min-height: 0; max-height: none;
    box-sizing: border-box; overflow: hidden;
    display: flex; flex-direction: column;
    justify-content: space-between; align-items: center;
    gap: clamp(4px, 1vh, 10px);
    padding: max(8px, env(safe-area-inset-top, 0px)) 12px
             max(8px, env(safe-area-inset-bottom, 0px));
    text-align: center;
  }
  .hero-left, .hero-right {
    flex: 0 1 auto; width: 100%; min-width: 0;
    padding: 0; align-items: center;
  }
  .hero-left { gap: 2px; }
  .hero-logo { width: clamp(65px, 12vh, 105px); padding: 0; margin: 0; }
  .welcome-text { font-size: clamp(.65rem, 1.6vh, .85rem); }
  .hero-left h1 { font-size: clamp(1.25rem, 3.3vh, 1.85rem); line-height: 1.08; margin: 0; }
  .hero-description {
    font-size: clamp(.7rem, 1.55vh, .88rem); line-height: 1.25;
    margin: 3px 0 0; max-width: 36rem;
  }
  .hero-right { gap: clamp(4px, .8vh, 8px); }
  .cta-btn {
    min-width: 0; width: 100%; padding: clamp(5px, .85vh, 9px) 10px;
    border-radius: 9px; line-height: 1.12;
    font-size: clamp(.82rem, 1.8vh, 1rem);
  }
  .cta-btn span { font-size: clamp(.66rem, 1.4vh, .8rem); margin-top: 2px; }
  .hero-link {
    justify-content: center; padding: clamp(5px, .8vh, 9px) 12px;
    font-size: clamp(.75rem, 1.6vh, .9rem);
    margin-top: 2px;
  }
}

/* Compact homepage navigation: featured action, 2x2 grid, about link. */
.hero-right .hero-actions-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;}
.hero-right .hero-actions-grid .cta-btn {min-width:0;width:100%;height:100%;box-sizing:border-box;}
.hero-right .cta-btn {box-sizing:border-box;}
.hero-right .hero-link {align-self:center;}
@media(max-width:767px){
 .hero-right .hero-actions-grid{gap:6px;}
 .hero-right .hero-actions-grid .cta-btn{min-height:55px;padding:8px 7px;}
 .hero-right .hero-actions-grid .cta-btn span{font-size:clamp(.64rem,1.25vh,.78rem);}
}
@media(max-width:350px){.hero-right .hero-actions-grid{gap:5px;}}

/* Keep the four homepage actions in two columns on narrow phones. */
@media (max-width: 767px) {
  .hero .hero-right .hero-actions-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100%;
    max-width: 100%;
    gap: 6px;
    align-items: stretch;
  }
  .hero .hero-right .hero-actions-grid > .cta-btn {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }
}

/* Desktop: smaller navigation at the lower-right of the hero video. */
@media (min-width: 768px) {
  .hero .hero-content { box-sizing: border-box; align-items: stretch; }
  .hero .hero-left { align-self: center; min-width: 0; }
  .hero .hero-right { box-sizing: border-box; flex: 0 0 365px; width: 365px; max-width: 38vw; align-self: flex-end; margin-top: auto; padding: 10px 10px 24px; gap: 8px; }
  .hero .hero-right .cta-btn { min-width: 0; padding: 10px 12px; font-size: .92rem; }
  .hero .hero-right .cta-btn span { font-size: .76rem; line-height: 1.3; }
  .hero .hero-right .hero-actions-grid { gap: 7px; }
  .hero .hero-right .hero-link { padding: 7px 12px; font-size: .83rem; }
}
