/* =========================================
   HOME PAGE SPECIFIC STYLES (FULL CLEANSED)
   ========================================= */

/* --- Global Reset & Background --- */
html, body {
  background: #0b0c10;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Prevent horizontal scroll from breakout sections */
}

/* Hide standard profile topbar if present in shared HTML */
.topbar { display: none !important; }

/* --- Mobile: Hide Navigation completely --- */
@media (max-width: 768px) {
  .homeBody .topbar {
    display: none !important;
  }
}

/* --- Immersive Layout Overrides --- */
.homeBody .wrap {
  max-width: 100%;
  padding: 0;
  margin: 0;
}

/* --- 1. Glass Header (Non-Sticky per request) --- */
.homeBody .topbar {
  display: flex; /* Re-enable for home desktop */
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1200px;
  z-index: 100;
  
  /* Glass Effect */
  background: rgba(209, 0, 108, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  
  /* Reset margins */
  margin: 0;
  border-radius: 16px;
  padding: 12px 20px;
  align-items: center;
  justify-content: space-between;
}

/* --- 2. Full Screen Hero --- */
section.hero {
  position: relative;
  height: 100vh;
  width: 100vw;
  margin: 0;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;     /* Vertically Center Content */
  justify-content: center; /* Horizontally Center Content */
}

section.hero .heroMedia {
  /* Absolute positioning is REQUIRED to take video out of the flex flow */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

section.hero .heroMedia video, 
section.hero .heroMedia img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

section.hero .heroOverlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 2;
  /* Original Dark Gradient */
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 60%, rgba(11,12,16,0.8) 92%, #0b0c10 100%);
}

section.hero .heroContent {
  position: relative;
  z-index: 10; /* Sits on top of video */
  text-align: center;
  width: 100%;
  max-width: 900px;
  padding: 0 20px;
  margin-top: 60px;
}

/* Original Typography Restoration */
section.hero .heroContent h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.1;
  margin: 0 0 20px 0;
  font-weight: 900;
  color: #fff;
}

.brandText {
  background: linear-gradient(90deg, #d1006c, #ff2d88);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

section.hero .heroContent p {
  font-size: clamp(18px, 2vw, 22px);
  color: rgba(255,255,255,0.9);
  margin-bottom: 30px;
}

/* Ensure Rota has breathing room from buttons */
.heroRota {
  margin-top: 40px;
}

/* Hero Buttons */
.heroActions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 40px;
  position: relative;
  z-index: 11;
}

@media (min-width: 768px) {
  .heroActions { gap: 24px; }
  .heroActions .btn {
    font-size: 18px;
    padding: 16px 32px;
  }
}

@media (max-width: 520px) {
  .heroActions { flex-direction: column; }
  .heroActions .btn { width: 100%; justify-content: center; }
}

/* --- 3. Rota Overlay --- */
.heroRota {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.rotaLabel {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  
  display: inline-block;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
}

.heroRotaShell {
  overflow: hidden; 
  width: 100%;
  /* Default mobile padding */
  padding-bottom: 20px; 
}

.rotaTrack {
  display: flex;
  gap: 20px;
  justify-content: center;
  touch-action: pan-y;
  cursor: grab;
  /* Smooth transition default */
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.rotaCard {
  position: relative;
  flex: 0 0 220px; /* Default Base Size (Will override for Desktop below) */
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1); 
  backdrop-filter: blur(4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, border-color 0.3s;
  user-select: none;
}

.rotaCard:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: #fff;
  z-index: 2;
}

.rotaCard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
  pointer-events: none;
}

.rotaCard:hover img { opacity: 1; }

.rotaInfo {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 15px;
  background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.rotaName { font-weight: 800; color: #fff; font-size: 16px; }
.rotaAge { font-weight: 600; color: rgba(255,255,255,0.85); font-size: 14px; }

/* --- Available Badge on Rota Cards --- */
.rotaBadge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(40, 167, 69, 0.9); /* Green */
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 5;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
}

/* Pulsing Dot */
.rotaBadge::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  70% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}


/* --- DESKTOP SPECIFIC ROTA FIXES (Cards Bigger, No Chopping) --- */
@media (min-width: 769px) {
  .heroRotaShell {
    /* Add internal breathing room so the hover "lift" doesn't hit the overflow ceiling */
    padding-top: 40px; 
    padding-bottom: 40px;
    
    /* Negative margin to pull layout back together visually if padding pushes it too far */
    margin-top: -20px;
    margin-bottom: -20px;
  }
  
  .rotaCard {
    /* Increased Size as requested */
    flex: 0 0 260px;
    width: 260px;
  }
  
  .rotaTrack {
    gap: 30px; /* More space between cards */
  }
}


/* --- Mobile Rota Overrides (Fixed Centering & Sliding) --- */
@media (max-width: 768px) {
  /* Hide Topbar */
  .homeBody .topbar { display: none !important; }

  /* Reset container padding */
  .heroRota { 
    padding: 0; 
    width: 100%;
  }
  
  /* CRITICAL: Add padding to bottom so shadows aren't chopped off */
  .heroRotaShell {
    padding-bottom: 50px; 
    overflow: hidden;
  }
  
  .rotaTrack {
    display: flex;
    justify-content: flex-start;
    gap: 0;
    padding: 0; /* Remove track padding, use card margins instead */
  }
  
  .rotaCard {
    /* 85% Width + 7.5% Margin Left + 7.5% Margin Right = 100% */
    /* This forces the card to be perfectly centered */
    flex: 0 0 85%; 
    width: 85%;
    margin-left: 7.5%;
    margin-right: 7.5%;
    
    border-radius: 22px;
    transform: none !important; /* Reset hover transforms */
    
    /* Ensure shadow is visible */
    box-shadow: 0 10px 25px rgba(0,0,0,0.5); 
  }

  .rotaCard .rotaInfo {
    padding-bottom: 25px;
    background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
  }
}

/* --- 4. Intro & Features --- */
.homeIntro {
  text-align: center;
  padding: 80px 20px 40px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.homeIntro h2 {
  font-size: clamp(28px, 5vw, 42px);
  margin-bottom: 20px;
  background: linear-gradient(90deg, #fff, #a7adbd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.introLead {
  font-size: 20px;
  line-height: 1.6;
  color: #fff;
  font-weight: 600;
  margin-bottom: 20px;
}

.introExpandable {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  opacity: 0;
}

.introExpandable.isOpen {
  max-height: 1000px; /* Large enough to fit all content */
  opacity: 1;
  margin-top: 20px;
}

.expandInner {
  padding-bottom: 10px;
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
}



/* Feature Grid */
.homeGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px 20px;
}

.featureCard {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 30px;
  border-radius: 24px;
  text-decoration: none;
  transition: transform 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.featureCard:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-8px);
  border-color: rgba(255, 47, 135, 0.5);
}

.featureIcon { font-size: 42px; margin-bottom: 18px; }
.featureCard h3 { color: #fff; margin: 0 0 12px 0; font-size: 22px; }
.featureCard p { color: rgba(255,255,255,0.65); margin: 0; font-size: 16px; line-height: 1.5; }

/* --- 5. Full Width CTA --- */
.fullWidthCTA {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  
  /* Flush with Footer Fixes */
  margin-bottom: -20px; 
  border-bottom: 0;
  border-radius: 0;
  
  padding: 80px 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctaMedia {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ctaVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.ctaOverlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0b0c10 0%, rgba(11,12,16,0.6) 100%);
  z-index: 2;
}

.ctaContent {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
  max-width: 1000px;
  width: 100%;
}

.ctaText h3 { font-size: 36px; margin: 0 0 10px 0; color: #fff; }
.ctaText p { font-size: 19px; color: rgba(255,255,255,0.8); margin: 0; }

@media (min-width: 768px) {
  .ctaContent {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding: 0 40px;
  }
}

/* Footer Override for Home */
.homeBody .pageFooterFull {
  margin-top: 0 !important;
  border-top: none !important;
  position: relative;
  z-index: 20; /* Ensure links sit above any bleed effects */
}

/* --- Hide Native Play Button on Hero Video --- */
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
  pointer-events: none;
}

/* --- Mobile Bottom Navigation (PWA Style) --- */
.mobileBottomNav {
  display: none; /* Hidden on Desktop */
}

@media (max-width: 768px) {
  /* 1. Push body content up so nav doesn't cover footer */
  body {
    padding-bottom: 80px; 
  }

  /* 2. The Navigation Bar */
  .mobileBottomNav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 9999; /* Sit on top of mostly everything */
    
    /* Dark Glass Styling */
    background: rgba(11, 12, 16, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    
    justify-content: space-around;
    align-items: center;
    
    /* iPhone Safe Area Support */
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: content-box; /* Ensures padding adds to height */
  }

  /* 3. Navigation Items */
  .navItem {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    height: 100%;
    color: #888; /* Default Grey */
    transition: all 0.3s ease;
  }

  /* Icons: Grayscale by default */
  .navIcon {
    font-size: 22px;
    margin-bottom: 4px;
    filter: grayscale(100%) opacity(0.7);
    transition: transform 0.2s ease;
  }

  .navLabel {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
  }

  /* 4. Active & Hover States (Pink) */
  .navItem.active,
  .navItem:active { /* :active is for touch press */
    color: #ff2d88;
  }
  
  .navItem.active .navIcon,
  .navItem:active .navIcon {
    filter: none; /* Restore color (or set pink fill for SVG) */
    opacity: 1;
    transform: translateY(-2px);
  }

  /* 5. Special "Call" Button Styling */
  .navItem.navCall {
    color: #ff2d88; /* Always Pink */
  }

  .navItem.navCall .navIcon {
    filter: none;
    opacity: 1;
    font-size: 24px;
  }

  /* 6. Pulsating Animation for Phone */
  .pulseIcon {
    animation: pulseCall 2s infinite ease-in-out;
  }

  @keyframes pulseCall {
    0% { transform: scale(1); text-shadow: 0 0 0 rgba(255, 45, 136, 0.4); }
    50% { transform: scale(1.15); text-shadow: 0 0 15px rgba(255, 45, 136, 0.8); }
    100% { transform: scale(1); text-shadow: 0 0 0 rgba(255, 45, 136, 0.4); }
  }
}

/* Ensure items don't squash on small iPhones */
.navItem { min-width: 0; } 
.navLabel { font-size: 9px; } 
.navIcon { font-size: 20px; margin-bottom: 3px; }

/* Mobile: Collapse Footer into Minimal Mode */
/* --- FIXED Mobile Footer --- */
@media (max-width: 768px) {
  /* 1. Ensure the footer background covers the bottom properly */
  .pageFooterFull {
    padding-bottom: 90px !important; /* Clears the fixed nav */
    padding-top: 30px !important;
    text-align: center;
    background: #0b0c10; /* Ensure it matches body color */
    border-top: 1px solid rgba(255,255,255,0.05);
  }
  
  /* 2. Hide the complex columns */
  .footerCols {
    display: none !important;
  }

  /* 3. Hide the default fine print to avoid duplicates */
  .finePrint {
    display: none !important;
  }

  /* 4. Inject the minimal mobile content cleanly */
  .pageFooterInner::before {
    content: "Privacy  ·  Terms  ·  Contact";
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
  }

  .pageFooterInner::after {
    content: "© 2026 Cheshire Elite";
    display: block;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
  }
}