/* === 1. Hero Section Grid === */
.hero-section {
  display: grid;
  grid-template-rows: auto 1fr;  /* nav auto-height / video fills the rest */
  width: 100%;
  height: auto;                /* full viewport height */
  overflow: hidden;             /* ensure video never escapes */
}

/* === 2. Top Bar (nav) === */
.hero-nav {
  width: 100%;
  z-index: 2; /* sit above the video */
}
.hero-nav-container {
  width: 94%;
  margin: 20px auto 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}
.hero-logo img {
  max-width: 360px;
  width: 100%;
  height: auto;
}
.hero-links {
  display: flex;
  gap: 1rem;
}
.hero-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.hero-link:hover {
  background-color: rgba(226, 10, 22, 0.1);
  opacity: 0.9;
}

/* Base button styles */
.hero-btn {
  padding: 0.5rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: background-color 0.2s ease, color 0.2s ease;
  display: inline-block;
}

/* Outline variant */
.hero-btn-outline {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}
.hero-btn-outline:hover {
  background-color: #ffffff;
  color: #e20a16;
}

/* Solid variant */
.hero-btn-solid {
  background-color: #ffffff;
  color: #e20a16;
  border: 2px solid #ffffff;
}
.hero-btn-solid:hover {
  color: #ffffff;
  background-color: #e20a16;
  border: 2px solid #ffffff;
}

/* === 3. Video Container (row 2 of the grid) === */
.video-container {
  position: relative;
  width: 95%;
  height: 85vh;           /* fill that 1fr row (the rest of 100vh) */
  overflow: hidden;       /* hide any overflow */
  border-radius: 20px;
  background: #e20a16; 
  border: 12px solid white;     /* fallback while video loads */
  margin: 0 auto;
}

/* Absolutely center the video, then let object-fit crop it */
.video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: 100%;
  min-width: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center center;
  z-index: 1;
}

/* new: center the logo */
.video-logo {
  position: absolute;
  bottom: 1rem;                  /* 1rem up from the bottom */
  right: 1rem;                   /* 1rem in from the right */
  z-index: 2;                    /* above the video */
  max-width: 200px;              /* never wider than 200px */
  height: auto;
  pointer-events: none;          /* clicks pass through */
  transform-origin: center center;
  animation: logo-rock 3s ease-in-out infinite alternate;
}
@keyframes logo-rock {
  from { transform: rotate(5deg); }
  to   { transform: rotate(15deg); }
}

/* Hero Now Open Overlay */
.video-now-open {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 1000px;
  width: 90%;
  height: auto;
  opacity: 0.88;
  z-index: 2;
  pointer-events: none;
}

/* === 4. Responsive Tweaks (optional) === */
@media (max-width: 991px) {
  .hero-nav-container {
    padding: 0.75rem 1rem;
  }
  .hero-logo img {
    max-width: 200px;
  }
  .hero-link,
  .hero-btn {
    font-size: 0.9rem;
    padding: 0.4rem 1.2rem;
  }
}
@media (max-width: 767px) {
  .hero-nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }
  .hero-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .hero-logo img {
    max-width: 180px;
  }
  .hero-link,
  .hero-btn {
    font-size: 0.85rem;
    padding: 0.3rem 1rem;
  }
  .video-container {
    height: 75vh;
    border: 8px solid white;
    border-radius: 15px;
  }
}

/* === 5. Video‐Logo Scaling & Side‐Space at Smaller Widths === */
@media (max-width: 991px) {
  .video-logo {
    max-width: 150px;
  }
}
@media (max-width: 767px) {
  .video-logo {
    max-width: 120px;
  }
}
@media (max-width: 575px) {
  .video-logo {
    display: none;
  }
  .video-container {
    width: 90%;      /* leaves ~5% gutter each side */
    height: 60vh;
    margin: 0 auto;
    /* border & radius remain as set above */
  }
}

/* === 6. Nav‐Stack & Full‐Width Elements under ~500px === */
@media (max-width: 500px) {
  .hero-logo img {
    width: 100%;
    max-width: initial;
  }
  .hero-nav-container {
    width: 100%;
    padding: 0.5rem 1rem;
  }
  .hero-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  .hero-link,
  .hero-btn {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
}
