/* ============================================
   RESPONSIVE DESIGN — Android, iOS, PC
   Breakpoints: 1024px, 768px, 480px, 360px
   ============================================ */

/* Global touch & mobile fixes */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* ============================================
   TABLET — max-width: 1024px
   ============================================ */
@media (max-width: 1024px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .intro-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
  }

  .hero-title {
    font-size: clamp(2.5rem, 7vw, 5rem);
  }

  .section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
  }

  .hero-header-row {
    gap: 24px;
  }

  .hero-side-logo {
    width: 75px;
    height: 75px;
  }

  .hero-strom-logo {
    width: clamp(160px, 28vw, 240px);
    height: clamp(160px, 28vw, 240px);
  }
}

/* ============================================
   MOBILE — max-width: 768px
   ============================================ */
@media (max-width: 768px) {

  /* --- Navigation --- */
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
    z-index: 501;
  }

  .mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80vw;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: rgba(10,18,10,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 500;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 100px 36px;
    overflow-y: auto;
  }

  .mobile-menu.active {
    right: 0;
  }

  .mobile-menu .nav-link {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 8px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .mobile-menu .nav-link:hover,
  .mobile-menu .nav-link:active {
    color: var(--gold);
  }

  .navbar {
    padding: 12px 16px;
  }

  /* --- Intro Screen --- */
  .intro-screen {
    padding: 20px;
  }

  .intro-logos {
    flex-direction: row;
    gap: 24px;
    margin-bottom: 24px;
  }

  .logo-panel {
    width: 100px;
    height: 100px;
  }

  .intro-content {
    padding: 0 12px;
  }

  .intro-college {
    font-size: clamp(0.8rem, 3vw, 1.1rem);
    letter-spacing: 1px;
  }

  .intro-dept {
    font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    letter-spacing: 1.5px;
  }

  .intro-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .intro-date {
    font-size: 1.1rem;
  }

  .enter-btn {
    padding: 16px 40px;
    font-size: 0.9rem;
    margin-top: 28px;
  }

  /* Football decorations — scale down */
  .football-el-1 { width: 45px; height: 45px; }
  .football-el-2 { width: 55px; height: 55px; }
  .football-el-3 { width: 35px; height: 35px; }
  .football-el-4 { width: 40px; height: 40px; }
  .goal-post-left, .goal-post-right { height: 80px; width: 22px; }
  .flag-el { display: none; }

  /* --- Hero Section --- */
  .hero-section {
    padding: 100px 16px 60px;
    min-height: auto;
  }

  .hero-header-row {
    gap: 16px;
    flex-wrap: nowrap;
  }

  .hero-side-logo {
    width: 55px;
    height: 55px;
  }

  .hero-text-block {
    min-width: 0;
  }

  .hero-line--college {
    font-size: clamp(0.7rem, 2.5vw, 1rem);
    letter-spacing: 1px;
  }

  .hero-line--dept,
  .hero-line--league {
    font-size: clamp(0.65rem, 2vw, 0.85rem);
    letter-spacing: 1px;
  }

  .hero-line--presents {
    font-size: clamp(0.6rem, 1.5vw, 0.8rem);
    letter-spacing: 3px;
  }

  .hero-strom-logo {
    width: clamp(140px, 45vw, 200px);
    height: clamp(140px, 45vw, 200px);
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 3.5rem);
    margin-bottom: 12px;
  }

  .hero-date {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* --- Events --- */
  .events-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0;
  }

  .events-section {
    padding: 60px 16px;
  }

  .event-card {
    border-radius: 16px;
  }

  .event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }

  .event-card::after {
    display: none;
  }

  .card-inner {
    padding: 28px 20px;
  }

  .card-btn {
    min-height: 44px;
    padding: 12px 28px;
    font-size: 0.8rem;
  }

  /* --- Modal --- */
  .modal-overlay {
    padding: 16px;
    align-items: flex-start;
    padding-top: 40px;
  }

  .modal-content {
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    border-radius: 16px;
  }

  .modal-body {
    padding: 16px !important;
  }

  .modal-info-bar {
    padding: 16px;
    font-size: 1rem;
    gap: 10px;
  }

  .modal-info-bar strong {
    min-width: 75px;
  }

  .modal-country-header {
    padding: 20px 16px !important;
  }

  .modal-country-header h2 {
    font-size: 1.3rem !important;
  }

  .modal-description {
    font-size: 0.9rem;
  }

  .modal-guidelines {
    font-size: 0.9rem;
  }

  .modal-guidelines ul {
    padding-left: 20px;
  }

  .register-btn {
    min-height: 48px;
    font-size: 0.9rem !important;
  }

  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  /* --- Contact Page --- */
  .contact-cards {
    flex-direction: column;
    align-items: center;
  }

  .contact-card {
    width: 100%;
    max-width: 320px;
  }

  .contact-content {
    padding: 40px 16px 60px;
  }

  .social-icons {
    gap: 16px;
  }

  .social-icon-link {
    width: 50px;
    height: 50px;
  }

  /* --- About Page --- */
  .committee-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .member-card {
    padding: 24px 16px;
  }

  .member-name {
    font-size: 1.1rem;
  }

  /* --- Location Page --- */
  .map-container {
    height: 250px;
    border-radius: 12px;
  }

  .location-content {
    padding: 40px 16px 60px;
  }

  .location-name {
    font-size: 1rem;
  }

  .directions-btn {
    padding: 14px 32px;
    font-size: 0.8rem;
    min-height: 48px;
  }

  /* --- Footer --- */
  .site-footer,
  .page-footer {
    padding: 30px 16px;
  }

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

  /* --- Video BG performance on mobile --- */
  .page-bg-video {
    opacity: 0.12;
  }

  /* --- Intro Video --- */
  .skip-intro-btn {
    bottom: 24px;
    right: 24px;
    padding: 10px 20px;
    font-size: 0.75rem;
    min-height: 44px;
  }
}

/* ============================================
   SMALL MOBILE — max-width: 480px
   ============================================ */
@media (max-width: 480px) {

  .intro-screen {
    padding: 16px;
  }

  .intro-logos {
    gap: 16px;
    margin-bottom: 20px;
  }

  .logo-panel {
    width: 80px;
    height: 80px;
  }

  .intro-title {
    font-size: clamp(2rem, 14vw, 3rem);
  }

  .intro-college {
    font-size: 0.75rem;
  }

  .intro-dept {
    font-size: 0.65rem;
    margin-bottom: 16px;
  }

  .enter-btn {
    padding: 14px 32px;
    font-size: 0.85rem;
    margin-top: 20px;
  }

  /* Hero */
  .hero-section {
    padding: 90px 12px 50px;
  }

  .hero-header-row {
    gap: 10px;
  }

  .hero-side-logo {
    width: 42px;
    height: 42px;
  }

  .hero-line--college {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
  }

  .hero-line--dept,
  .hero-line--league {
    font-size: 0.6rem;
    letter-spacing: 0.5px;
  }

  .hero-line--presents {
    font-size: 0.55rem;
    letter-spacing: 2px;
  }

  .hero-strom-logo {
    width: 140px;
    height: 140px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-date {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  /* Events */
  .events-grid {
    gap: 16px;
  }

  .card-inner {
    padding: 22px 16px;
  }

  .card-title {
    font-size: 1rem;
  }

  .card-desc {
    font-size: 0.8rem;
  }

  .country-badge {
    font-size: 0.6rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  /* Contact */
  .contact-hero h1 {
    font-size: 2rem;
  }

  /* About hero */
  .about-hero h1,
  .location-hero h1 {
    font-size: 2rem;
  }

  /* Modal */
  .modal-overlay {
    padding: 8px;
    padding-top: 20px;
  }

  .modal-content {
    border-radius: 12px;
    max-height: 92vh;
    max-height: 92dvh;
  }

  .modal-country-header h2 {
    font-size: 1.1rem !important;
  }

  .modal-info-bar {
    padding: 14px;
    font-size: 0.9rem;
  }

  .modal-info-bar strong {
    min-width: 65px;
    font-size: 0.85rem;
  }
}

/* ============================================
   EXTRA SMALL — max-width: 360px (small Android)
   ============================================ */
@media (max-width: 360px) {
  .hero-header-row {
    gap: 8px;
  }

  .hero-side-logo {
    width: 36px;
    height: 36px;
  }

  .hero-line--college {
    font-size: 0.6rem;
  }

  .hero-line--dept,
  .hero-line--league {
    font-size: 0.55rem;
  }

  .hero-strom-logo {
    width: 120px;
    height: 120px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .intro-title {
    font-size: 2rem;
  }

  .logo-panel {
    width: 65px;
    height: 65px;
  }

  .enter-btn {
    padding: 12px 28px;
    font-size: 0.8rem;
  }

  .card-inner {
    padding: 18px 14px;
  }

  .navbar {
    padding: 10px 12px;
  }

  .nav-brand {
    font-size: 0.85rem;
  }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .intro-screen {
    padding: 12px 24px;
  }

  .intro-logos {
    margin-bottom: 12px;
  }

  .logo-panel {
    width: 60px;
    height: 60px;
  }

  .intro-content {
    padding: 0;
  }

  .intro-title {
    font-size: 2rem;
    margin-bottom: 8px;
  }

  .intro-college,
  .intro-dept {
    font-size: 0.65rem;
    margin-bottom: 4px;
  }

  .enter-btn {
    padding: 10px 32px;
    font-size: 0.8rem;
    margin-top: 12px;
  }

  .hero-section {
    padding-top: 80px;
    min-height: auto;
  }

  .hero-strom-logo {
    width: 100px;
    height: 100px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .modal-overlay {
    padding: 8px;
    padding-top: 8px;
  }

  .modal-content {
    max-height: 95vh;
    max-height: 95dvh;
  }
}

/* ============================================
   iOS SAFE AREA (notch devices)
   ============================================ */
@supports (padding: env(safe-area-inset-top)) {
  .navbar {
    padding-top: calc(12px + env(safe-area-inset-top));
  }

  .intro-screen {
    padding-top: calc(20px + env(safe-area-inset-top));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .mobile-menu {
    padding-top: calc(100px + env(safe-area-inset-top));
  }

  .site-footer,
  .page-footer {
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
  }

  .modal-overlay {
    padding-top: calc(40px + env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom);
  }

  .skip-intro-btn {
    bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

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

  .page-bg-video {
    display: none;
  }
}
