/* ==========================================================================
   Survivor 50 - Main Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts
   -------------------------------------------------------------------------- */
@font-face {
  font-family: survivantFont;
  src: url(../fonts/survivor.woff2) format("woff2");
  font-display: swap;
}

@font-face {
  font-family: 'TT Norms Pro';
  src: url(../fonts/tt-norms-pro-regular.ttf) format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TT Norms Pro';
  src: url(../fonts/tt-norms-pro-bold.ttf) format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
  --font-survivor: "survivantFont", Arial, sans-serif;
  --font-body: "TT Norms Pro", Arial, sans-serif;
  --color-cream: #f5e6c8;
  --color-glow: #B87218;
  --color-stroke: #580202;
  
  /* Main site colors */
  --color-navy: #0d1b3e;
  --color-navy-dark: #080f22;
  --color-gray-dark: #ffffff;
  --color-gray: #f5f5f5;
  --color-white: #1a1a1a;
  --color-text: #333333;
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--color-gray-dark);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   MAIN SITE STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   Site Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--color-navy);
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 30px;
}

/* CBS Logo */
.cbs-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.cbs-eye-img {
  height: auto;
  width: clamp(80px, 7vw, 130px);
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--color-glow);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background: #ffffff;
  transition: all 0.3s ease;
}

/* --------------------------------------------------------------------------
   Hero Section - UX Best Practices
   -------------------------------------------------------------------------- */
.hero-section {
  margin-top: 56px; /* Header height */
  padding-top: 15px; /* Spacing between header and hero - matches Q&A to footer spacing */
  width: 100%;
  background: var(--color-gray-dark);
}

.hero-image {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  /* Responsive height: 50vh on desktop, with min/max constraints */
  height: clamp(300px, 50vh, 600px);
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  display: block;
  /* Cover ensures image fills container while maintaining aspect ratio */
  object-fit: cover;
  /* Center focus point - adjust if key content is elsewhere */
  object-position: center center;
  /* Smooth loading transition */
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Fallback container - hidden by default, shown on error */
.hero-fallback {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--color-gray-dark);
}

/* Show fallback when hero image fails to load */
.hero-image.hero-error img:first-child {
  display: none;
}

.hero-image.hero-error .hero-fallback {
  display: flex;
}

.hero-logo {
  max-width: 250px;
  width: 60%;
  height: auto;
}

/* --------------------------------------------------------------------------
   Section Containers
   -------------------------------------------------------------------------- */
.section-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 30px;
}

.section-title {
  font-family: var(--font-survivor);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50vw;
  max-width: 600px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-glow), transparent);
  border-radius: 2px;
}

.section-title .backplate {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--color-text);
  margin-left: 15px;
  letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about-section {
  background: var(--color-gray-dark);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.about-content {
  max-width: 900px;
}

.about-text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-text);
  margin-bottom: 20px;
}

.about-text:last-child {
  margin-bottom: 0;
}

.about-text strong {
  color: var(--color-white);
  font-weight: 700;
}

.about-text .highlight {
  color: var(--color-glow);
  font-size: 1.1em;
}

.about-text .tagline-highlight {
  color: var(--color-glow);
  font-style: italic;
  font-weight: 600;
}

.about-text.host-info {
  margin-top: 5px;
  padding-top: 0;
  border-top: none;
  font-size: 16px;
}

/* Premiere Banner */
.premiere-banner {
  margin-top: 35px;
  padding: 30px;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  border-top: 3px solid var(--color-glow);
}

.premiere-label {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-glow);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.premiere-date {
  font-family: var(--font-survivor);
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.premiere-meta {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.premiere-divider {
  margin: 0 10px;
  color: var(--color-glow);
}

.premiere-meta a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.premiere-meta a:hover {
  color: var(--color-glow);
  text-decoration: underline;
}

.premiere-details {
  margin-top: 20px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text);
  font-style: italic;
  padding-left: 15px;
  border-left: 2px solid var(--color-glow);
  opacity: 0.9;
}

.premiere-details strong {
  color: var(--color-white);
  font-style: normal;
}

.premiere-details a {
  color: var(--color-white);
  text-decoration: none;
  font-style: normal;
  font-weight: 600;
  transition: color 0.2s ease;
}

.premiere-details a:hover {
  color: var(--color-glow);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .premiere-banner {
    padding: 25px 20px;
    gap: 10px;
  }
  
  .premiere-meta {
    display: inline;
  }
  
  .premiere-divider {
    display: none;
  }
  
  .premiere-details {
    font-size: 13px;
  }
}

/* --------------------------------------------------------------------------
   Trailer Section
   -------------------------------------------------------------------------- */
.trailer-section {
  background: var(--color-gray-dark);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Video lazy load facade */
.video-facade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-facade .play-button {
  position: absolute;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.9;
}

.video-facade:hover .play-button {
  transform: scale(1.1);
  opacity: 1;
}

.video-facade.hidden {
  display: none;
}

/* --------------------------------------------------------------------------
   Contestants Section
   -------------------------------------------------------------------------- */
.contestants-section {
  background: var(--color-gray-dark);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.contestants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 25px;
}

/* Flip Card Container */
.contestant-card {
  perspective: 1000px;
  cursor: pointer;
}

.contestant-card-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.contestant-card:hover .contestant-card-inner {
  transform: scale(1.03);
}

.contestant-card.flipped .contestant-card-inner {
  transform: rotateY(180deg);
}

/* Front and Back Faces */
.contestant-front,
.contestant-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Front Face - Photo + Season Badge */
.contestant-front {
  background: var(--color-gray);
  border: 1px solid #C4620F;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contestant-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%; /* Focus on upper portion for headshots */
}

.contestant-name-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  padding: 40px 10px 12px;
  text-align: center;
}

.contestant-name-badge span {
  font-family: var(--font-body);
  font-size: clamp(11px, 2.5vw, 14px);
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
  display: block;
}

/* Tap hint icon */
.contestant-tap-hint {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  padding: 5px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.contestant-card:hover .contestant-tap-hint {
  opacity: 0.9;
  background: rgba(0, 0, 0, 0.7);
}

.contestant-tap-hint svg {
  width: 16px;
  height: 16px;
  fill: #ffffff;
}

/* Touch device styles - no hover capability */
@media (hover: none) {
  .contestant-tap-hint {
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.6);
  }
  
  .contestant-card:hover .contestant-card-inner {
    transform: none;
  }
  
  .contestant-card.flipped .contestant-card-inner {
    transform: rotateY(180deg);
  }
}

/* Back Face - Full Details */
.contestant-back {
  background: linear-gradient(145deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 15px;
  text-align: center;
  border: 1px solid #C4620F;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contestant-back-name {
  font-family: var(--font-survivor);
  font-size: clamp(18px, 4vw, 24px);
  color: #ffffff;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.contestant-back-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contestant-detail-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.contestant-detail-label {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--color-glow);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contestant-detail-value {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

/* Tap to flip hint on back */
.contestant-back-hint {
  position: absolute;
  bottom: 10px;
  font-family: var(--font-body);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Season subtitle for multi-season players */
.season-subtitle {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: linear-gradient(180deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
  padding: 25px 0;
  border-top: 1px solid rgba(184, 114, 24, 0.3);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}

.footer-logo .cbs-eye-img {
  width: clamp(60px, 6vw, 100px);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

.footer-nav a {
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 12px;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--color-glow);
}

.footer-copyright {
  max-width: 1400px;
  margin: 15px auto 0;
  padding: 15px 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-copyright p {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* ==========================================================================
   MAIN SITE RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
  .header-container {
    padding: 10px 20px;
  }

  .main-nav {
    gap: 20px;
  }

  .main-nav a {
    font-size: 12px;
  }

  .section-container {
    padding: 30px 20px;
  }

  .footer-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .footer-logo .cbs-eye-img {
    width: clamp(50px, 12vw, 80px);
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--color-navy-dark);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
  }

  .main-nav.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-section {
    margin-top: 50px;
  }

  /* Mobile hero: shorter height, focus on center */
  .hero-image {
    height: clamp(200px, 40vh, 350px);
  }

  .hero-image img {
    /* Adjust focus point for mobile if needed */
    object-position: center center;
  }

  .contestants-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
  }

  .contestant-back-name {
    font-size: 16px;
  }

  .contestant-detail-value {
    font-size: 12px;
  }

  .contestant-name-badge span {
    font-size: 10px;
  }
}

/* ==========================================================================
   Q&A MODAL (Countdown Game)
   ========================================================================== */

/* Q&A Section (replaces modal) */
.qa-section {
  position: relative;
  width: 100%;
  overflow-x: hidden;
  padding-bottom: 15px; /* Spacing between Q&A and footer - matches header to hero spacing */
}

.qa-section-content {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  height: 80vh;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
}


/* Modal close button - kept for backwards compatibility but hidden */
.qa-modal-close {
  display: none;
}

/* Q&A Section Background */
.qa-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-image: url('../images/bg-desktop.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #1a0a00;
}

.qa-section .particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Q&A Content */
.qa-content {
  position: relative;
  z-index: 10;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 30px 20px;
  overflow-x: hidden;
}


/* Q&A Header */
.qa-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  padding: 0;
  flex-shrink: 0;
}

.logo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.countdown-banner {
  position: relative;
  width: 120px;
  height: 26px;
  margin-top: 5px;
  background-image: url('../images/countdown-texture.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  box-shadow: 0 2px 2px 0 rgba(10, 5, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  text-align: center;
  font-family: var(--font-survivor);
  font-size: 16px;
  font-weight: 400;
  line-height: 110%;
  padding-bottom: 2px;
}

/* Tagline */
.tagline {
  font-family: var(--font-survivor);
  font-size: clamp(22px, 4vw, 45px);
  font-weight: 400;
  color: var(--color-cream);
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 
    0 0 17px var(--color-glow),
    3px 3px 0 #1a1a1a,
    -1px -1px 0 #1a1a1a,
    1px -1px 0 #1a1a1a,
    -1px 1px 0 #1a1a1a;
  -webkit-text-stroke-width: 2px;
  -webkit-text-stroke-color: var(--color-stroke);
  paint-order: stroke fill;
  text-align: center;
}

/* Q&A Footer */
.qa-footer {
  margin-top: auto;
  padding: 30px 20px;
  text-align: center;
}

.qa-footer p {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(245, 230, 200, 0.6);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Calendar Grid
   ========================================================================== */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: min-content;
  gap: 9px;
  width: 100%;
  padding: 20px 20px 30px;
  margin-top: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 2px solid rgba(184, 114, 24, 0.4);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* Styled scrollbar for Q&A calendar */
.calendar-grid::-webkit-scrollbar {
  width: 10px;
}

.calendar-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}

.calendar-grid::-webkit-scrollbar-thumb {
  background: var(--color-glow);
  border-radius: 5px;
}

.calendar-grid::-webkit-scrollbar-thumb:hover {
  background: #d4890f;
}

/* --------------------------------------------------------------------------
   Subtitle Tile (spans 3 columns)
   -------------------------------------------------------------------------- */
.subtitle-tile {
  grid-column: span 3;
  background: linear-gradient(135deg, rgba(88, 2, 2, 0.82) 0%, rgba(120, 20, 20, 0.78) 50%, rgba(88, 2, 2, 0.82) 100%);
  border: 3px solid var(--color-glow);
  border-radius: 12px;
  padding: 20px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 0 35px rgba(184, 114, 24, 0.4),
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.subtitle-tile span {
  font-family: var(--font-body);
  font-size: clamp(16px, 2.2vw, 26px);
  font-weight: bold;
  font-style: italic;
  color: var(--color-cream);
  text-shadow: 
    0 0 10px var(--color-glow),
    2px 2px 4px rgba(0, 0, 0, 0.8);
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   Calendar Tiles
   -------------------------------------------------------------------------- */
.calendar-tile {
  aspect-ratio: 1 / 1;
  min-height: 0;
  background: linear-gradient(145deg, rgba(88, 2, 2, 0.82) 0%, rgba(120, 20, 20, 0.78) 50%, rgba(88, 2, 2, 0.82) 100%);
  border: 2px solid var(--color-glow);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, z-index 0s;
  position: relative;
  padding: 9px 7px;
  overflow: hidden;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(184, 114, 24, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  z-index: 1;
}

.calendar-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.calendar-tile:hover {
  transform: translateY(-8px) scale(1.25);
  border-color: #FFD700;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(255, 215, 0, 0.4),
    0 0 60px rgba(184, 114, 24, 0.3);
  z-index: 100;
}

.calendar-tile:active {
  transform: translateY(-4px) scale(1.02);
}

.calendar-tile:focus {
  outline: 3px solid var(--color-glow);
  outline-offset: 2px;
}

/* Flip animation */
.calendar-tile.flipping {
  animation: tileFlip 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tileFlip {
  0% { transform: perspective(1000px) rotateY(0deg) scale(1); }
  50% { transform: perspective(1000px) rotateY(90deg) scale(0.95); }
  100% { transform: perspective(1000px) rotateY(0deg) scale(1); }
}

/* Tile content */
.tile-day {
  font-family: var(--font-survivor);
  font-size: clamp(20px, 3.5vw, 36px);
  color: var(--color-cream);
  text-shadow: 
    0 0 10px var(--color-glow),
    2px 2px 0 #1a1a1a;
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: var(--color-stroke);
  margin-bottom: 6px;
  flex-shrink: 0;
  margin-top: 0;
}

.tile-question {
  font-family: var(--font-body);
  font-size: clamp(12px, 1.4vw, 14px);
  color: rgba(245, 230, 200, 0.9);
  text-align: center;
  line-height: 1.3;
  padding: 0 4px;
  word-wrap: break-word;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Viewed indicator (checkmark) */
.tile-viewed-indicator {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--color-glow) 0%, #a85d10 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  font-weight: bold;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.calendar-tile.viewed .tile-viewed-indicator {
  opacity: 1;
  transform: scale(1);
}

/* Subtle styling change for viewed tiles */
.calendar-tile.viewed {
  border-color: rgba(184, 114, 24, 0.5);
}

.calendar-tile.viewed::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(184, 114, 24, 0.1);
  pointer-events: none;
  border-radius: 10px;
}

/* ==========================================================================
   Popover / Modal (for Q&A answers)
   ========================================================================== */
.popover {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1100;
}

.popover.show {
  display: block;
  animation: popoverIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translate(-50%, -50%);
}

@keyframes popoverIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) perspective(1000px) rotateY(-90deg) scale(0.8);
  }
  50% { opacity: 1; }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) perspective(1000px) rotateY(0deg) scale(1);
  }
}

.popover-content {
  background: linear-gradient(145deg, rgba(88, 2, 2, 0.98) 0%, rgba(60, 5, 5, 0.98) 100%);
  border: 4px solid var(--color-glow);
  border-radius: 16px;
  padding: 0;
  width: 500px;
  height: 450px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.9),
    0 0 60px rgba(184, 114, 24, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  display: flex;
  flex-direction: column;
}

.popover-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--color-glow);
  color: var(--color-cream);
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 10;
}

.popover-close:hover {
  background: var(--color-glow);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(184, 114, 24, 0.6);
}

.popover-header {
  background: linear-gradient(90deg, transparent, rgba(184, 114, 24, 0.3), transparent);
  padding: 20px 50px 15px 20px;
  border-bottom: 2px solid rgba(184, 114, 24, 0.5);
}

.popover-day {
  font-family: var(--font-survivor);
  font-size: clamp(28px, 5vw, 40px);
  color: var(--color-cream);
  text-shadow: 
    0 0 15px var(--color-glow),
    2px 2px 0 #1a1a1a;
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: var(--color-stroke);
}

.popover-body {
  padding: 25px 20px 20px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.popover-question {
  font-family: var(--font-body);
  font-size: clamp(16px, 3vw, 20px);
  font-style: italic;
  color: var(--color-cream);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  margin-bottom: 15px;
  line-height: 1.4;
  flex-shrink: 0;
}

.popover-answer-container {
  background: linear-gradient(135deg, rgba(245, 230, 200, 0.95) 0%, rgba(220, 200, 160, 0.95) 100%);
  border-radius: 10px;
  padding: 20px;
  border: 2px solid var(--color-glow);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.popover-answer {
  font-family: var(--font-body);
  font-size: clamp(15px, 2.5vw, 18px);
  font-weight: bold;
  color: var(--color-stroke);
  text-align: left;
  line-height: 1.7;
  margin: 0;
}

.answer-text {
  text-align: left;
}

/* Link in answer */
.answer-link {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.answer-link a {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-glow) 0%, #d4890f 100%);
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.25s ease;
}

.answer-link a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184, 114, 24, 0.5);
  background: linear-gradient(135deg, #d4890f 0%, var(--color-glow) 100%);
}

.answer-link a:active {
  transform: translateY(0);
}

/* Custom scrollbar for answer container */
.popover-answer-container::-webkit-scrollbar {
  width: 8px;
}

.popover-answer-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.popover-answer-container::-webkit-scrollbar-thumb {
  background: var(--color-glow);
  border-radius: 4px;
}

.popover-answer-container::-webkit-scrollbar-thumb:hover {
  background: #d4890f;
}

/* Backdrop for popover */
.popover-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.9) 100%);
  z-index: 1050;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Error message if data fails to load */
.error-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--color-cream);
  background: rgba(88, 2, 2, 0.8);
  border-radius: 10px;
  border: 2px solid var(--color-glow);
}

/* ==========================================================================
   Q&A Modal Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
  .qa-modal-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .qa-content {
    padding: 20px 20px 0;
  }

  .qa-header {
    flex-direction: column;
    gap: 12px;
  }

  .logo-stack {
    order: -1;
  }

  .logo {
    width: 48px;
  }

  .countdown-banner {
    width: 48px;
    height: 13px;
    font-size: 8px;
    margin-top: 3px;
  }

  .qa-header .logo-stack:last-child {
    display: none;
  }

  .tagline {
    font-size: clamp(19px, 6vw, 32px);
    letter-spacing: 2px;
    -webkit-text-stroke-width: 1px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .logo {
    width: 72px;
  }

  .countdown-banner {
    width: 72px;
    height: 18px;
    font-size: 11px;
  }

  .qa-header {
    gap: 16px;
  }
}

@media (min-width: 1400px) {
  /* Large screens: slightly taller hero with max constraint */
  .hero-image {
    height: clamp(400px, 55vh, 700px);
  }

  .logo {
    width: 150px;
  }

  .countdown-banner {
    width: 150px;
    height: 32px;
    font-size: 21px;
  }

  .tagline {
    font-size: 51px;
  }
}

/* Calendar Grid Responsive */
@media (max-width: 900px) {
  .calendar-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    padding: 20px 20px 30px;
  }
  
  .qa-content {
    padding: 20px 20px 20px;
  }

  .subtitle-tile {
    grid-column: span 3;
  }

  .tile-question {
    font-size: 13px;
    line-height: 1.3;
  }
}

@media (max-width: 600px) {
  .calendar-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 15px 15px 30px;
  }
  
  .qa-content {
    padding: 20px 15px 20px;
  }

  .subtitle-tile {
    grid-column: span 3;
    padding: 15px 10px;
  }

  .calendar-tile {
    padding: 9px 6px;
  }

  .tile-day {
    font-size: clamp(16px, 6vw, 24px);
  }

  .tile-question {
    font-size: 12px;
    line-height: 1.25;
    padding: 0 3px;
  }

  .tile-viewed-indicator {
    width: 16px;
    height: 16px;
    font-size: 10px;
    top: 3px;
    right: 3px;
  }

  .popover-content {
    width: 95vw;
    height: 70vh;
  }

  .popover-close {
    width: 32px;
    height: 32px;
    font-size: 20px;
    top: 8px;
    right: 8px;
  }

  .popover-header {
    padding: 15px 45px 12px 15px;
  }

  .popover-body {
    padding: 20px 15px 25px;
  }
}
