@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;900&family=Poppins:wght@300;400;500&display=swap');

:root {
  --bg: #0a0a0f;
  --card: #1a1a28;
  --card2: #12121e;
  --accent: #6c63ff;
  --accent2: #ff6584;
  --accent3: #43e97b;
  --gold: #ffd700;
  --text: #f0f0f8;
  --muted: #9090aa;
  --border: rgba(108,99,255,0.2);
  --font-head: 'Montserrat', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--accent3); border-radius: 4px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 900;
}
.nav-logo span { color: var(--accent3); }

.nav-right a {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.nav-right a:hover { color: var(--accent3); }

/* ===== HERO ===== */
.cricket-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 40px 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(67,233,123,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(108,99,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent3);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(52px, 10vw, 120px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 24px;
  letter-spacing: 2px;
}

.hero-title span {
  background: linear-gradient(90deg, var(--accent3), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.85;
}

.cricket-ball {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e63946, #9b1d1d);
  bottom: 60px;
  right: 80px;
  box-shadow: 0 0 40px rgba(230,57,70,0.4);
  animation: ballFloat 4s ease-in-out infinite;
  z-index: 1;
}

.ball-seam {
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg);
}

@keyframes ballFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* ===== TRAITS ===== */
.traits-section {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
  padding: 0 60px 80px;
  max-width: 1300px;
  margin: 0 auto;
}

.trait-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.trait-card.visible { opacity: 1; transform: translateY(0); }

.trait-card:hover {
  border-color: var(--accent3);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(67,233,123,0.12);
}

.trait-icon { font-size: 3rem; margin-bottom: 16px; }

.trait-card h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent3);
  margin-bottom: 12px;
}

.trait-card p { font-size: 0.95rem; color: var(--muted); line-height: 1.8; }

/* ===== SECTION TITLE ===== */
.section-title {
  font-family: var(--font-head);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 60px;
  text-align: center;
}

.section-title span {
  background: linear-gradient(90deg, var(--accent3), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== TIMELINE ===== */
.timeline-section {
  padding: 80px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline { position: relative; }

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent3), var(--accent), transparent);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 48px);
  margin-bottom: 60px;
  position: relative;
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.7s ease;
}

.timeline-item.right {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 48px);
  transform: translateX(40px);
}

.timeline-item.visible { opacity: 1; transform: translateX(0); }

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent3);
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 20px rgba(67,233,123,0.6);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 20px rgba(67,233,123,0.6); }
  50% { box-shadow: 0 0 35px rgba(67,233,123,1); }
}

.timeline-year {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(28px);
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent3);
  white-space: nowrap;
}

.timeline-item.right .timeline-year {
  transform: translateX(calc(-100% - 28px));
}

/* ── BIGGER CARD ── */
.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 500px;   /* was 420px — now bigger */
  transition: all 0.3s;
}

.timeline-card:hover {
  border-color: var(--accent3);
  box-shadow: 0 8px 32px rgba(67,233,123,0.1);
}

.timeline-card h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.timeline-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.8; }
.timeline-card strong { color: var(--text); }

/* ===== MEDIA ROW ===== */
.media-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  width: 100%;
}

.media-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Caption — ALWAYS visible, proper styling, NO black box ── */
.media-caption {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  padding: 6px 4px 2px;
  background: transparent;   /* NO black background */
  margin-top: 4px;
  line-height: 1.4;
}

/* ===== IMAGES ===== */
.media-box img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #000;
}

.media-box img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 30px rgba(67,233,123,0.2);
}

/* ===== VIDEO BOX ===== */
.video-box {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 12px;
  overflow: visible;       /* let caption sit outside */
  background: transparent;
}

/* ===== CUSTOM VIDEO CONTAINER ===== */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--accent3);
  background: rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* When video is loaded, show it properly */
.video-container.video-ready {
  background: transparent;
}

/* Default video styling */
.custom-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
}

/* Show video only when loaded and ready */
.custom-video.loaded {
  display: block;
}

/* ── JPPL VIDEO - 4:3 (Match the image ratio) with zoom ── */
.jppl-video {
  aspect-ratio: 4 / 3;
}

.jppl-video .custom-video {
  object-fit: cover;
  object-position: center;
  scale: 1.15;
}

/* ── NASHIK VIDEO - 1:1 (Square) centered, crop all 4 sides equally ── */
.nashik-video {
  aspect-ratio: 1 / 1;
}

.nashik-video .custom-video {
  object-fit: cover;
  object-position: center;
  scale: 1.25;
}

/* ── SHEGAO VIDEO - 1:1 (Square) centered, crop all 4 sides equally ── */
.shegao-video {
  aspect-ratio: 1 / 1;
}

.shegao-video .custom-video {
  object-fit: cover;
  object-position: center;
  scale: 1;
}

/* ===== VIDEO OVERLAY (CONTROLS) ===== */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  border-radius: 12px;
  pointer-events: none;
  transition: background 0.3s ease;
  z-index: 10;
}

.video-overlay.controls-show {
  background: rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}

.video-container:hover .video-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.video-overlay:hover {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.4) !important;
}

/* ===== VIDEO CONTROLS ===== */
.video-controls {
  display: flex;
  gap: 8px;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.video-controls.controls-visible {
  opacity: 1;
}

.video-container:hover .video-controls {
  opacity: 1;
}

/* ── Control Buttons ── */
.control-btn {
  background: transparent;
  border: 1px solid rgba(108, 99, 255, 0.4);
  color: var(--accent3);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.control-btn:hover {
  background: rgba(108, 99, 255, 0.2);
  border-color: var(--accent3);
  box-shadow: 0 0 12px rgba(108, 99, 255, 0.3);
  transform: scale(1.1);
}

.control-btn:active {
  transform: scale(0.95);
}

.control-icon {
  display: inline-block;
  line-height: 1;
}

/* ===== YOUTUBE BOX ===== */
.youtube-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* YouTube Responsive Wrapper */
.youtube-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--accent3);
  background: #000;
}

.youtube-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Video element — same sizing as images */
.timeline-video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--accent3);
  cursor: zoom-in;
  background: #000;
}

/* Hide ALL browser-native controls */
.timeline-video::-webkit-media-controls,
.timeline-video::-webkit-media-controls-enclosure,
.timeline-video::-webkit-media-controls-panel { display: none !important; }

/* ===== IMAGE LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 99999;
  inset: 0;
  background: rgba(0,0,0,0.97);
  backdrop-filter: blur(15px);
  justify-content: center;
  align-items: center;
}

.lightbox.active { display: flex; }

.lightbox-content-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.lightbox-content-wrapper img {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 0 60px rgba(0,0,0,0.9);
  border: 1px solid rgba(67,233,123,0.3);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 36px;
  color: #fff;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  z-index: 100001;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover { color: var(--accent3); }

/* ===== BADGE STYLES ===== */
.highlight-card { border-color: var(--gold) !important; box-shadow: 0 0 30px rgba(255,215,0,0.15); }
.motm-card { border-color: var(--gold) !important; box-shadow: 0 0 30px rgba(255,215,0,0.15); }
.comeback-card { border-color: var(--accent2) !important; box-shadow: 0 0 30px rgba(255,101,132,0.15); }

.winner-badge, .motm-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--gold), #ffaa00);
  color: #0a0a0f;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 5px 14px;
  border-radius: 30px;
  margin-bottom: 10px;
}

.runner-badge {
  display: inline-block;
  background: linear-gradient(90deg, #c0c0c0, #a0a0a0);
  color: #0a0a0f;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 5px 14px;
  border-radius: 30px;
  margin-bottom: 10px;
}

.comeback-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent2), #ff3366);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 5px 14px;
  border-radius: 30px;
  margin-bottom: 10px;
}

.timeline-quote {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--accent2);
  border-left: 3px solid var(--accent2);
  padding-left: 14px;
  margin-top: 14px;
  line-height: 1.6;
}

.motm-card .timeline-quote { color: var(--gold); border-left-color: var(--gold); }

/* ===== DOT VARIANTS ===== */
.dot-gold { background: var(--gold) !important; box-shadow: 0 0 20px rgba(255,215,0,0.7) !important; }
.dot-silver { background: #c0c0c0 !important; box-shadow: 0 0 20px rgba(192,192,192,0.7) !important; }
.dot-fire { background: var(--accent2) !important; box-shadow: 0 0 20px rgba(255,101,132,0.7) !important; }

/* ===== AOS ANIMATION ===== */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-aos].visible { opacity: 1; transform: translateY(0); }

/* ===== FOOTER ===== */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 28px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer a { color: var(--accent3); }
.footer a:hover { color: var(--text); }

/* ===== RESPONSIVE — TABLET ===== */
@media (max-width: 1000px) {
  .timeline-section { max-width: 100%; padding: 80px 30px; }
  .timeline-card { max-width: 460px; }
}

/* ===== RESPONSIVE — MOBILE ===== */
@media (max-width: 768px) {
  .cricket-hero { padding: 80px 20px 50px; }
  .hero-title { font-size: clamp(36px, 9vw, 64px); }
  .hero-sub { font-size: 1rem; }
  .cricket-ball { width: 55px; height: 55px; right: 20px; bottom: 30px; }

  .traits-section {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 14px 40px;
  }

  /* COMPACT mobile trait cards — reduce vertical bulk dramatically */
  .trait-card {
    padding: 16px 12px;
    border-radius: 14px;
  }

  .trait-icon { font-size: 1.8rem; margin-bottom: 8px; }

  .trait-card h3 {
    font-size: 0.88rem;
    margin-bottom: 6px;
  }

  .trait-card p { font-size: 0.75rem; line-height: 1.5; }

  .timeline-section { padding: 60px 16px; }
  .section-title { font-size: clamp(28px, 7vw, 48px); margin-bottom: 40px; }

  .timeline::before { left: 18px; }

  .timeline-item,
  .timeline-item.right {
    justify-content: flex-start;
    padding: 0 0 0 46px;
    transform: translateX(-20px);
  }

  .timeline-dot { left: 18px; }
  .timeline-year { left: 18px; transform: translateX(26px); }
  .timeline-item.right .timeline-year { transform: translateX(26px); }

  .timeline-card {
    max-width: 100%;
    padding: 20px 16px;
  }

  /* Stack media on mobile */
  .media-row { flex-direction: column; gap: 14px; }

  .media-box img,
  .timeline-video,
  .youtube-wrapper,
  .video-container {
    aspect-ratio: 16 / 9;
  }

  /* JPPL VIDEO on Mobile - Keep 4:3 ratio with zoom */
  .jppl-video {
    aspect-ratio: 4 / 3;
  }

  .jppl-video .custom-video {
    object-fit: cover;
    object-position: center;
    scale: 1.15;
  }

  /* NASHIK VIDEO on Mobile - 1:1 (Square) centered, fill with zoom ── */
  .nashik-video {
    aspect-ratio: 1 / 1;
  }

  .nashik-video .custom-video {
    object-fit: cover;
    object-position: center;
    scale: 1.25;
  }

  /* SHEGAO VIDEO on Mobile - 1:1 (Square) centered ── */
  .shegao-video {
    aspect-ratio: 1 / 1;
  }

  .shegao-video .custom-video {
    object-fit: cover;
    object-position: center;
    scale: 1;
  }

  /* Mobile: Always show controls */
  .video-controls {
    opacity: 1 !important;
  }

  .video-overlay {
    background: rgba(0, 0, 0, 0.2) !important;
    pointer-events: auto;
  }

  .video-overlay:hover {
    background: rgba(0, 0, 0, 0.2) !important;
  }

  .video-overlay .video-controls {
    padding: 8px 10px;
  }

  .control-btn {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .footer { flex-direction: column; gap: 10px; text-align: center; padding: 24px 20px; }
}

@media (max-width: 480px) {
  /* Keep 2-column layout for trait cards even on small phones */
  .traits-section {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 10px 30px;
  }
  .trait-card { padding: 12px 10px; }
  .trait-icon { font-size: 1.5rem; margin-bottom: 6px; }
  .trait-card h3 { font-size: 0.8rem; }
  .trait-card p { font-size: 0.7rem; }
  .hero-title { font-size: 34px; }
  .timeline-card { padding: 18px 14px; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   VIDEO RESPONSIVE HANDLING & FIXES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ===== TASK 2: FULLSCREEN FIX ===== */
.video-container:fullscreen,
.video-container:-webkit-full-screen {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-container:fullscreen .custom-video,
.video-container:-webkit-full-screen .custom-video {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  scale: 1;
}

/* ===== TASK 1: MOBILE TOUCH FIX ===== */
@media (hover: none) {
  .trait-card:hover, .timeline-card:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: var(--border) !important;
  }
  .video-overlay {
    pointer-events: auto !important;
  }
  a, button, .control-btn {
    touch-action: manipulation;
  }
}