/* ===== DESIGN SYSTEM ===== */
:root {
  --blue-900: #023e8a;
  --blue-700: #0077b6;
  --blue-400: #00b4d8;
  --blue-100: #caf0f8;
  --blue-50:  #e8f4fd;
  --white:    #ffffff;
  --gray-50:  #f0f8ff;
  --gray-100: #e8eef4;
  --gray-800: #0a1628;
  --gray-600: #374151;
  --gray-500: #555555;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 8px;
  --radius-pill: 50px;
  --shadow: 0 4px 20px rgba(0,119,182,0.12);
  --shadow-lg: 0 8px 40px rgba(0,119,182,0.18);
  --transition: 0.2s ease;
  --max-w: 1200px;
  --gold:   #d4a017;
  --silver: #888888;
  --bronze: #a0522d;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--gray-800); background: var(--white); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 900; line-height: 1.15; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; line-height: 1.2; }
h3 { font-size: 1.15rem; font-weight: 700; }
.label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--blue-400); }
.subtitle { font-size: 1.05rem; color: var(--gray-500); margin-top: 0.5rem; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { margin-top: 0.4rem; }

/* ===== LAYOUT ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 4rem 0; }
section.alt { background: var(--gray-50); }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.7rem 1.5rem; border-radius: var(--radius-pill); font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: transform var(--transition), box-shadow var(--transition); border: none; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--blue-700); color: var(--white); }
.btn-primary:hover { background: var(--blue-900); }
.btn-outline { background: transparent; color: var(--blue-700); border: 2px solid var(--blue-700); }
.btn-outline:hover { background: var(--blue-700); color: var(--white); }
.btn-white { background: var(--white); color: var(--blue-700); }
.btn-white:hover { background: var(--blue-50); }
.btn-white-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.7); }
.btn-white-outline:hover { background: rgba(255,255,255,0.15); }

/* ===== NAVBAR ===== */
.navbar { position: sticky; top: 0; z-index: 100; background: var(--white); box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.navbar .container { display: flex; align-items: center; gap: 2rem; height: 68px; }
.navbar-brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 800; font-size: 1.1rem; color: var(--blue-700); }
.navbar-logo { width: 40px; height: 40px; background: linear-gradient(135deg, var(--blue-700), var(--blue-400)); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.navbar-nav { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.navbar-nav a { padding: 0.4rem 0.85rem; border-radius: var(--radius-pill); font-size: 0.9rem; font-weight: 600; color: var(--gray-600); transition: background var(--transition), color var(--transition); }
.navbar-nav a:hover, .navbar-nav a.active { background: var(--blue-50); color: var(--blue-700); }
.navbar-nav .btn-nav-cta { background: var(--blue-700); color: var(--white); padding: 0.4rem 1.1rem; }
.navbar-nav .btn-nav-cta:hover { background: var(--blue-900); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 0.5rem; margin-left: auto; background: none; border: none; }
.hamburger span { width: 24px; height: 2px; background: var(--blue-700); border-radius: 2px; transition: all 0.3s; display: block; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: none; background: var(--white); border-top: 1px solid var(--gray-100); padding: 1rem 1.5rem; flex-direction: column; gap: 0.25rem; }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 0.6rem 0.75rem; border-radius: var(--radius); font-weight: 600; color: var(--gray-600); }
.mobile-menu a:hover { background: var(--blue-50); color: var(--blue-700); }
.mobile-menu .btn-nav-cta { background: var(--blue-700); color: var(--white); text-align: center; margin-top: 0.5rem; }

/* ===== HERO ===== */
.hero { background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 60%, var(--blue-400) 100%); padding: 5rem 0; color: var(--white); position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.15; }
.hero .container { position: relative; display: grid; grid-template-columns: 1fr; gap: 2rem; }
.hero-label { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.15); padding: 0.35rem 1rem; border-radius: var(--radius-pill); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero h1 span { color: var(--blue-100); }
.hero .subtitle { color: rgba(255,255,255,0.85); font-size: 1.1rem; margin-bottom: 2rem; max-width: 520px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ===== STATS BAR ===== */
.stats-bar { background: var(--blue-900); padding: 1.5rem 0; }
.stats-bar .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.stat-number { font-size: 1.8rem; font-weight: 900; color: var(--blue-400); }
.stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(202,240,248,0.7); margin-top: 0.2rem; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-image { background: linear-gradient(135deg, var(--blue-100), var(--blue-50)); border-radius: 16px; height: 320px; display: flex; align-items: center; justify-content: center; font-size: 5rem; }
.about-text .label { display: block; margin-bottom: 0.5rem; }
.about-text h2 { margin-bottom: 1rem; }
.about-text p { color: var(--gray-500); margin-bottom: 1rem; }
.about-text .btn { margin-top: 0.5rem; }

/* ===== ATHLETE CARDS ===== */
.athletes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.athlete-card { background: var(--white); border-radius: 12px; padding: 1.5rem; text-align: center; box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition); border: 1px solid var(--gray-100); }
.athlete-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.athlete-avatar { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-700), var(--blue-400)); margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 2rem; overflow: hidden; }
.athlete-avatar img { width: 100%; height: 100%; object-fit: cover; }
.athlete-name { font-weight: 800; color: var(--gray-800); margin-bottom: 0.25rem; }
.athlete-meta { font-size: 0.82rem; color: var(--blue-700); font-weight: 600; }
.athlete-medals { margin-top: 0.75rem; display: flex; justify-content: center; gap: 0.5rem; }
.medal-badge { font-size: 0.75rem; background: var(--blue-50); color: var(--blue-700); padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); font-weight: 700; }

/* ===== RESULTS TABLE ===== */
.filter-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.filter-tab { padding: 0.4rem 1.1rem; border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 700; cursor: pointer; border: 2px solid var(--blue-100); color: var(--blue-700); background: var(--white); transition: all var(--transition); }
.filter-tab.active, .filter-tab:hover { background: var(--blue-700); color: var(--white); border-color: var(--blue-700); }
.results-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.results-table th { background: var(--blue-900); color: var(--white); padding: 0.75rem 1rem; text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.results-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--gray-100); }
.results-table tr:hover td { background: var(--blue-50); }
.results-table tr[data-hidden] { display: none; }
.place-gold { color: var(--gold); font-weight: 900; font-size: 1.1rem; }
.place-silver { color: var(--silver); font-weight: 900; font-size: 1.1rem; }
.place-bronze { color: var(--bronze); font-weight: 900; font-size: 1.1rem; }

/* ===== GALLERY ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.gallery-item { border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 4/3; background: var(--blue-100); position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-overlay { position: absolute; inset: 0; background: rgba(2,62,138,0.5); opacity: 0; transition: opacity var(--transition); display: flex; align-items: center; justify-content: center; }
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay svg { color: white; width: 2rem; height: 2rem; }

/* ===== LIGHTBOX ===== */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(2,30,80,0.95); z-index: 1000; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.5); object-fit: contain; }
.lightbox-close { position: fixed; top: 1.5rem; right: 1.5rem; background: rgba(255,255,255,0.15); border: none; color: white; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; }
.lightbox-prev, .lightbox-next { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); border: none; color: white; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* ===== CONTACT FORM ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--gray-800); margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.75rem 1rem; border: 2px solid var(--gray-100); border-radius: var(--radius); font-family: var(--font); font-size: 0.95rem; color: var(--gray-800); background: var(--white); transition: border-color var(--transition), box-shadow var(--transition); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(0,180,216,0.15); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-info h3 { margin-bottom: 1.5rem; }
.contact-info-item { display: flex; gap: 1rem; margin-bottom: 1.25rem; align-items: flex-start; }
.contact-info-icon { width: 40px; height: 40px; background: var(--blue-50); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.contact-info-text strong { display: block; font-size: 0.85rem; margin-bottom: 0.15rem; }
.contact-info-text span { font-size: 0.9rem; color: var(--gray-500); }
.status-banner { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-weight: 600; }
.status-banner.success { background: #d1fae5; color: #065f46; }
.status-banner.error { background: #fee2e2; color: #991b1b; }
.honeypot { display: none !important; }

/* ===== PARTNERS ===== */
.partners-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.5rem; }
.partner-card { background: var(--white); border: 2px solid var(--gray-100); border-radius: var(--radius); padding: 1.5rem; display: flex; align-items: center; justify-content: center; min-height: 100px; transition: border-color var(--transition), box-shadow var(--transition); }
.partner-card:hover { border-color: var(--blue-400); box-shadow: var(--shadow); }
.partner-card img { max-height: 60px; width: auto; filter: grayscale(100%); transition: filter var(--transition); }
.partner-card:hover img { filter: none; }
.partner-placeholder { color: var(--gray-500); font-weight: 700; font-size: 0.9rem; text-align: center; }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero { background: linear-gradient(135deg, var(--blue-900), var(--blue-700)); padding: 3rem 0; color: var(--white); }
.page-hero .label { color: var(--blue-100); margin-bottom: 0.5rem; display: block; }
.page-hero h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); }

/* ===== FOOTER ===== */
footer { background: var(--gray-800); color: rgba(255,255,255,0.75); }
.footer-main { padding: 3rem 0; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.footer-brand .navbar-brand { color: var(--white); margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.88rem; line-height: 1.6; max-width: 280px; }
.footer-links h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.footer-links ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.88rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--blue-400); }
.social-links { display: flex; gap: 0.75rem; margin-top: 1rem; }
.social-link { width: 36px; height: 36px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; transition: background var(--transition); }
.social-link:hover { background: var(--blue-700); }
.footer-bar { border-top: 1px solid rgba(255,255,255,0.1); padding: 1rem 0; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .hamburger { display: flex; }
  .hero .container { text-align: center; }
  .hero .subtitle { margin: 0 auto 2rem; }
  .hero-actions { justify-content: center; }
  .stats-bar .container { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-image { height: 200px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-bar { flex-direction: column; gap: 0.5rem; text-align: center; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .athletes-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== FOCUS VISIBLE (keyboard nav) ===== */
:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 2px;
}
.btn:focus-visible,
.filter-tab:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 2px;
}
.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  outline: 3px solid rgba(255,255,255,0.8);
  outline-offset: 2px;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
