/* =============================================
   ROTARY CLUB CUTTACK MILLENNIUM — RESPONSIVE
   ============================================= */

/* ---- Extra Large (>1400px) ---- */
@media (min-width: 1400px) {
  .container { max-width: 1350px; }
  .hero-title { font-size: 6rem; }
  .section-title { font-size: 3.2rem; }
}

/* ---- Large Tablet (900–1100px) ---- */
@media (max-width: 1100px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about-visual {
    max-width: 500px;
    margin: 0 auto;
  }
  .about-card-float {
    position: relative;
    bottom: auto; right: auto;
    margin-top: 1rem;
    max-width: 100%;
  }
  .membership-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .donations-layout {
    grid-template-columns: 1fr;
  }
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ---- Tablet (768–900px) ---- */
@media (max-width: 900px) {
  .leader-card {
    width: calc((100% - 3rem) / 3);
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- Mobile Landscape / Small Tablet (600–768px) ---- */
@media (max-width: 768px) {
  html { font-size: 15px; }

  .section { padding: 3.5rem 0; }
  .section-title { font-size: clamp(1.8rem, 6vw, 2.4rem); }
  .section-subtitle { font-size: 1rem; }

  /* Navbar */
  .navbar { background: #ffffff; }
  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 2rem;
    gap: 1.25rem;
    z-index: 999;
    box-shadow: none;
    border-left: none;
    
    /* Animation state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.98);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  .nav-link {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 1.35rem;
    color: #ffffff;
    padding: 0.5rem 1rem;
    width: auto;
    text-align: center;
    border-radius: 0;
    letter-spacing: 0.05em;
  }
  .nav-link::after {
    bottom: -2px;
  }
  .nav-toggle { display: flex; z-index: 1000; }

  /* Hero */
  .hero { padding: 7rem 1.5rem 4rem; }
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  .stat-divider { display: none; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 300px; }

  /* Leadership & Legacy */
  .leader-card { width: calc((100% - 1.5rem) / 2); }

  .legacy-toolbar {
    flex-wrap: wrap;
  }
  .legacy-search-wrapper {
    flex: 1;
    min-width: 180px;
    max-width: 100%;
  }
  .legacy-view-toggle {
    justify-content: center;
  }
  .legacy-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .legacy-table {
    min-width: 600px;
  }
  .legacy-cards-grid {
    grid-template-columns: 1fr;
  }

  /* Events */
  .meeting-info-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .events-grid { grid-template-columns: 1fr; }
  .flagship-grid { grid-template-columns: 1fr; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; }
  .project-categories { gap: 0.5rem; }
  .impact-strip { gap: 1.5rem; padding: 1.5rem; }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-tabs { gap: 0.5rem; }

  /* Achievements */
  .achievements-grid { grid-template-columns: 1fr; }

  /* News */
  .news-grid { grid-template-columns: 1fr; }

  /* Membership */
  .category-cards { flex-direction: column; }

  /* Contact */
  .form-row { grid-template-columns: 1fr; }
  .map-container { height: 300px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom .container {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* ---- Mobile Portrait (<480px) ---- */
@media (max-width: 480px) {
  html { font-size: 14px; }

  .container { padding: 0 1rem; }
  .nav-container { padding: 0 1rem; }

  .hero { padding: 6rem 1rem 3rem; }
  .hero-title { font-size: 2.6rem; }
  .hero-badge { font-size: 0.75rem; padding: 0.35rem 0.9rem; }
  .hero-description { font-size: 0.95rem; }

  .section-tag { font-size: 0.72rem; letter-spacing: 0.1em; }

  .leader-card { width: 85%; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .stat-number { font-size: 1.8rem; }
  .impact-num { font-size: 2.2rem; }

  .btn { padding: 0.75rem 1.5rem; font-size: 0.9rem; }

  .about-card-main { padding: 2rem 1.5rem; }
  .rotary-emblem { width: 120px; height: 120px; }

  .back-to-top { right: 1rem; bottom: 1rem; width: 44px; height: 44px; }

  .legacy-cards-grid { grid-template-columns: 1fr; }
}

/* ---- Very small devices (<360px) ---- */
@media (max-width: 360px) {
  .hero-title { font-size: 2.2rem; }
  .section-title { font-size: 1.75rem; }
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ---- Print styles ---- */
@media print {
  .navbar, .back-to-top, .preloader, .hero-scroll-indicator { display: none !important; }
  .hero { min-height: auto; padding: 2rem; }
  .dark-section { background: #f5f5f5 !important; color: #000 !important; }
}
