/* ====================================
   MOBILE RESPONSIVE CSS
   All responsive breakpoints and media queries
   ==================================== */

/* Tablet/Medium Screens (960px and below) */
@media (max-width: 960px) {
  .hero-grid,
  .grid-3,
  .grid-2,
  .footer-grid,
  .sarpanch-layout {
    grid-template-columns: 1fr;
  }

  .side-ad-rail {
    display: none;
  }

  .hero-banner {
    min-height: 66vh;
    border-radius: 0 0 18px 18px;
  }

  .hero-banner-image {
    min-height: 66vh;
  }

  .hero-banner-overlay {
    align-items: center;
    padding: 1.05rem;
  }

  .hero-actions {
    gap: 0.5rem;
  }

  .hero-actions .btn,
  .map-actions .btn {
    width: 100%;
  }

  .card {
    padding: 0.9rem;
  }

  .section {
    padding: 1rem 0 1.35rem;
  }

  .map-frame {
    height: 260px;
  }

  .member-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-profile-main {
    grid-column: span 2;
  }

  .ad-slot {
    min-height: 80px;
    margin: 1.2rem 0;
  }

  .top-leaderboard {
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }
}

/* Mobile Screens (680px and below) */
@media (max-width: 680px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0;
  }

  .village-slider-head {
    flex-direction: column;
  }

  .slider-badge {
    align-self: flex-start;
  }

  .hero-banner {
    min-height: 78vh;
    border-radius: 0 0 18px 18px;
  }

  .hero-banner-image {
    min-height: 78vh;
  }

  .hero-banner-overlay {
    align-items: center;
    padding: 1.1rem;
  }

  .hero-banner-actions {
    gap: 0.5rem;
  }

  .hero-title {
    line-height: 0.98;
  }

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

  .member-profile-main {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

  .member-profile-main .member-photo-wrap {
    max-width: 140px;
    height: 140px;
  }

  .hero-banner-copy {
    max-width: 100%;
  }

  .hero-title,
  .village-name-large {
    font-size: clamp(1.8rem, 10vw, 3rem);
  }

  .hero-subtitle,
  .hero-summary {
    max-width: 100%;
  }

  .ad-slot {
    min-height: 85px;
    margin: 1.2rem 0;
    border-width: 2px;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-banner-actions .btn {
    flex: 1 1 0;
  }
}

/* Hamburger / Mobile nav styles */
.hamburger{display:none;background:transparent;border:0;padding:8px;cursor:pointer}
.hamburger .hamburger-box{display:inline-block;width:32px;height:24px;position:relative}
.hamburger .hamburger-inner{position:absolute;top:50%;left:0;width:100%;height:2px;background:#fff;transform:translateY(-50%);transition:transform .25s ease}
.hamburger .hamburger-inner::before,.hamburger .hamburger-inner::after{content:'';position:absolute;left:0;width:100%;height:2px;background:#fff;transition:transform .25s ease;}
.hamburger .hamburger-inner::before{top:-8px}
.hamburger .hamburger-inner::after{top:8px}

@media (max-width: 960px){
  .hamburger{display:inline-flex;margin-left:auto}
  .nav-links{display:none}
  .mobile-nav-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.45);z-index:9998;display:none;backdrop-filter:blur(4px)}
  .mobile-nav-overlay.open{display:block}
  .mobile-nav-panel{position:fixed;top:0;right:0;height:100%;width:86%;max-width:320px;background:#ffffff;color:#1c2c1f;z-index:9999;padding:64px 20px 24px;overflow:auto;box-shadow:-12px 0 28px rgba(20,58,33,0.18)}
  .mobile-nav-panel .nav-links{display:flex;flex-direction:column;gap:8px;width:100%}
  .mobile-nav-panel .nav-links a{display:block;padding:12px 14px;border-radius:8px;color:#1c2c1f;font-weight:500;transition:background-color 0.2s ease}
  .mobile-nav-panel .nav-links a:hover{background-color:#f4f8f5}
  .mobile-nav-panel .nav-links a[aria-current="page"]{background-color:#e9f6ee;color:#1f7a45;font-weight:700}
  .mobile-nav-panel .nav-links select{display:block;width:100%;margin-top:12px;padding:12px;border:1px solid #cfded1;border-radius:8px;color:#1c2c1f;background-color:#f4f8f5;font-size:0.95rem;cursor:pointer}
  .mobile-nav-close{position:absolute;right:16px;top:16px;background:transparent;border:0;font-size:24px;color:#5f6f62;padding:6px;cursor:pointer;line-height:1;transition:color 0.2s ease}
  .mobile-nav-close:hover{color:#1c2c1f}
  .hamburger[aria-expanded="true"] .hamburger-inner{transform:translateY(-50%) rotate(45deg)}
  .hamburger[aria-expanded="true"] .hamburger-inner::before{transform:translateY(8px) rotate(90deg)}
  .hamburger[aria-expanded="true"] .hamburger-inner::after{transform:translateY(-8px) rotate(90deg);opacity:0}
}

/* Large Desktop Screens (1319px and below - hide side ads on smaller desktops) */
@media (max-width: 1319px) {
  .side-ad-rail {
    display: none;
  }
}
