/* =========================================================
   Responsive — Rana Ji Nasha Mukti Trust
   Desktop premium look preserved · Mobile clean stack
   ========================================================= */

/* ---------- Large tablet / small laptop ---------- */
@media (max-width: 1200px) {
  .approach-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-locations-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .main-nav .nav-list { gap: 0; }
  .main-nav a,
  .dropdown-toggle { padding: .5rem .55rem; font-size: .88rem; }
  .header-call span { display: none; }
  .brand-tag { display: none; }
}

/* ---------- Mobile nav + compact layouts ---------- */
@media (max-width: 1100px) {
  :root { --header-h: 92px; }

  .hero-grid,
  .hero-has-video .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: auto;
  }
  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + 1.5rem) 0 3rem;
  }
  .hero-has-video {
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
  }
  .hero-has-video .hero-grid { padding: 1rem 0; }
  .hero-has-video .hero-content { max-width: none; }
  .hero-video-overlay {
    background: linear-gradient(180deg, rgba(10,42,32,.8) 0%, rgba(15,61,46,.72) 50%, rgba(10,42,32,.85) 100%);
  }
  .hero-visual { max-width: 520px; }

  .cards-grid,
  .cards-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  /* Header compact */
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #F8F6F0;
  }
  .header-inner {
    width: min(100% - 1.25rem, 1280px);
    gap: .5rem;
    min-height: 64px;
  }
  .brand { gap: .5rem; flex: 1; min-width: 0; }
  .brand-logo { width: 48px; height: 48px; }
  .brand-sub,
  .brand-tag { display: none; }
  .brand-name {
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-actions { gap: .4rem; flex-shrink: 0; }
  .header-call { display: none; }
  .header-wa {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    gap: 0;
  }
  .header-wa-label { display: none; }
  .header-wa svg { width: 18px; height: 18px; }
  .menu-toggle {
    width: 42px;
    height: 42px;
    background: rgba(15,61,46,.06);
    border: 1px solid rgba(15,61,46,.12);
    border-radius: 12px;
    z-index: 1102;
  }

  /* Mobile drawer */
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    width: 100%;
    height: calc(100dvh - var(--header-h));
    background: #F8F6F0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1101;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav.is-open .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
    padding: 1rem;
    margin: 0;
  }
  .main-nav.is-open .nav-list > li {
    border-bottom: 1px solid rgba(15,61,46,.08);
  }
  .main-nav.is-open a,
  .main-nav.is-open .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: .95rem .85rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--green-deep);
    border-radius: 12px;
  }
  .main-nav.is-open a.active,
  .main-nav.is-open a:hover,
  .main-nav.is-open .dropdown-toggle.active,
  .main-nav.is-open .dropdown-toggle:hover {
    background: rgba(15,61,46,.07);
    color: var(--green-deep);
  }

  .main-nav.is-open .mobile-nav-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
    padding: 1rem;
    margin-top: auto;
    border-top: 1px solid rgba(15,61,46,.1);
  }
  .main-nav.is-open .mobile-cta-call,
  .main-nav.is-open .mobile-cta-wa {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .4rem !important;
    width: 100%;
    min-height: 48px;
    padding: .8rem !important;
    border-radius: 999px !important;
    font-size: .9rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    border: none !important;
  }
  .main-nav.is-open .mobile-cta-call {
    background: linear-gradient(135deg, var(--green-deep), var(--green-mid)) !important;
  }
  .main-nav.is-open .mobile-cta-wa { background: #25D366 !important; }

  .has-dropdown .dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    box-shadow: none;
    background: transparent;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    width: auto;
    left: auto;
    right: auto;
    top: auto;
    border: none;
    transition: max-height .35s var(--ease);
  }
  .has-dropdown.is-open .dropdown-menu {
    max-height: 3200px;
    padding: 0 .25rem .75rem;
  }
  .has-dropdown.is-open > .dropdown-toggle svg { transform: rotate(180deg); }

  .mega-menu {
    width: 100%;
    max-width: none;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(15,61,46,.1);
    padding: .75rem;
    position: static !important;
    transform: none !important;
    box-shadow: 0 8px 24px rgba(15,61,46,.08);
  }
  .mega-head { flex-direction: column; align-items: flex-start; }
  .mega-title { font-size: 1.05rem; margin: 0; }
  .mega-head-btn { display: none !important; }
  .mega-grid { grid-template-columns: 1fr; gap: .5rem; }
  .mega-item {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: .7rem;
    padding: .8rem !important;
    border-radius: 12px;
    background: var(--cream);
    border: 1px solid rgba(15,61,46,.08);
    width: 100%;
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
  }
  .mega-item:hover,
  .mega-item.active {
    background: var(--sage-soft);
    transform: none;
  }
  .mega-num {
    width: 2.25rem;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
  }
  .mega-copy { flex: 1; min-width: 0; }
  .mega-copy strong { font-size: .92rem; display: block; margin-bottom: .2rem; }
  .mega-copy small {
    display: block;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--ink-soft);
    font-weight: 400;
    white-space: normal;
  }
  .mega-arrow { display: inline-flex; align-self: center; }
  .mega-footer-link {
    justify-content: center !important;
    color: var(--green-mid) !important;
  }

  body.nav-open .site-header {
    background: #F8F6F0;
    overflow: visible;
  }
  body.nav-open .float-actions {
    visibility: hidden;
    pointer-events: none;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: -48px; right: 8px; }
}

/* ---------- Tablet / mid ---------- */
@media (max-width: 900px) {
  .split,
  .split-reverse .split-media,
  .service-split,
  .service-info-grid,
  .contact-grid,
  .two-col-text,
  .support-list,
  .director-grid {
    grid-template-columns: 1fr;
  }

  .split,
  .service-split,
  .director-grid { gap: 1.5rem; }
  .split-reverse .split-media { order: 0; }

  .director-media {
    order: -1;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
  }
  .director-frame img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }
  .director-focus { grid-template-columns: 1fr; }

  .hero .btn-group,
  .page-hero .btn-group,
  .service-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
    width: 100%;
    max-width: 22rem;
  }
  .hero .btn-group .btn,
  .page-hero .btn-group .btn,
  .service-hero-actions .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    min-height: 48px;
  }

  .page-hero { padding: calc(var(--header-h) + 1.2rem) 0 2rem; }
  .page-hero h1 {
    font-size: clamp(1.85rem, 6.5vw, 2.45rem);
    overflow-wrap: anywhere;
  }
  .page-hero .lead { font-size: 1rem; max-width: none; }

  .map-embed { min-height: 280px; }
  .map-card-top {
    flex-direction: column;
    align-items: stretch;
    gap: .9rem;
  }
  .map-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .map-card-actions .btn {
    justify-content: center;
    white-space: normal;
  }

  .gallery-grid,
  .location-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-band-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1.15rem;
  }
  .cta-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
    width: 100%;
  }
  .cta-buttons .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .footer-locations-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-card { padding: 1.4rem 1.2rem; }
  .contact-form .btn { width: 100%; justify-content: center; }
}

/* ---------- Phones ---------- */
@media (max-width: 680px) {
  :root { --header-h: 88px; }

  .container { width: min(100% - 1.35rem, var(--max)); }

  .header-topbar-inner {
    padding: .28rem 0;
    justify-content: center;
  }
  .brand-logo { width: 44px; height: 44px; }
  .brand-name { font-size: .82rem; }
  .topbar-eng { display: none; }
  .topbar-hindi { font-size: .65rem; text-align: center; }

  .cards-grid,
  .cards-grid-2,
  .approach-steps,
  .gallery-grid,
  .location-grid,
  .related-grid,
  .footer-grid,
  .service-info-grid,
  .support-list,
  .contact-grid,
  .two-col-text,
  .cta-buttons,
  .map-card-actions {
    grid-template-columns: 1fr;
  }

  .footer-brand { grid-column: auto; }
  .footer-locations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-locations-head {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 { font-size: clamp(1.7rem, 7.5vw, 2.2rem); }
  h2 { font-size: clamp(1.4rem, 5.5vw, 1.85rem); }
  h3 { font-size: clamp(1.15rem, 4vw, 1.35rem); }

  .section { padding: 2.6rem 0; }
  .section-head { margin-bottom: 1.35rem; max-width: none; }
  .prose { max-width: none; }

  .director-section { padding: 2.4rem 0; }
  .director-media { max-width: 100%; }
  .director-frame { border-radius: 16px; }
  .director-name { font-size: 1.45rem; }
  .director-role { font-size: .88rem; }
  .director-actions,
  .btn-group {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
    gap: .65rem;
  }
  .director-actions .btn,
  .btn-group .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    min-height: 48px;
  }

  .hero-lead { font-size: .98rem; }
  .hero-has-video { padding-bottom: 2rem; }
  .hero-video { object-position: center top; }

  .feature-card,
  .why-card,
  .value-card,
  .approach-step,
  .service-card-body { padding: 1.15rem; }

  .service-card-btn {
    width: 100%;
    justify-content: center;
  }

  .journey-item {
    grid-template-columns: 48px 1fr;
    gap: .75rem;
    padding: 1rem;
  }
  .journey-item .step-num {
    width: 44px;
    height: 44px;
    font-size: .95rem;
  }

  .faq-list { max-width: none; }
  .faq-item summary { padding: 1rem; font-size: .96rem; }

  .gallery-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: .4rem;
    -webkit-overflow-scrolling: touch;
  }
  .filter-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: .82rem;
  }

  .contact-form input,
  .contact-form select,
  .contact-form textarea { font-size: 16px; }

  .cta-band { padding: 2.4rem 0; }
  .cta-band h2 { font-size: 1.45rem; }

  .float-actions { right: .7rem; bottom: .7rem; }
  .float-whatsapp span,
  .float-call span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .float-whatsapp,
  .float-call {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .main-nav.is-open .mobile-nav-cta { grid-template-columns: 1fr; }
}

/* ---------- Very small phones ---------- */
@media (max-width: 380px) {
  .container { width: min(100% - 1.1rem, var(--max)); }
  .brand-name { font-size: .72rem; }
  .brand-logo { width: 38px; height: 38px; }
  .header-wa,
  .menu-toggle { width: 36px; height: 36px; }
  .footer-locations-grid,
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ---------- Desktop mega menu ---------- */
@media (min-width: 1101px) {
  .site-header { overflow: visible; }
  .mobile-nav-cta { display: none; }
  .has-dropdown:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}
