/* ================================================================
   SVSD — Responsive Stylesheet (Clean Structural Implementation)
   ================================================================ */

/* ── Tablet (≤ 960px) ── */
@media (max-width: 960px) {
  .editorial { grid-template-columns: 1fr; gap: 2rem; }
  .editorial-img img { max-height: 380px; }

  .timings-layout { grid-template-columns: 1fr; gap: 2.5rem; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .visit-layout { grid-template-columns: 1fr; }
  .visit-map iframe { height: 300px; }

  .footer-body { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-id { grid-column: span 2; }

  .info-strip-grid { grid-template-columns: repeat(2, 1fr); }

  .header-meta { display: none; }
}

/* ── Mobile Navigation & Layout (≤ 768px) ── */
@media (max-width: 768px) {
  /* Top bar hidden on mobile */
  .top-bar { display: none; }

  /* Header at top */
  .header-inner { gap: 0.8rem; }
  .logo-wrap { width: 56px; height: 56px; }
  .site-name-te { font-size: 1.05rem; }
  .site-name-en { font-size: 0.78rem; }
  .site-name-chinna { font-size: 0.78rem; }

  /* Sticky Navigation Bar */
  .main-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--maroon);
    width: 100%;
    box-shadow: 0 2px 10px rgba(58, 8, 16, 0.45);
  }

  .nav-wrap {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }

  /* Mobile bar row inside sticky nav */
  .nav-mobile-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 52px;
    padding: 0 0.85rem;
    background: var(--maroon);
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-mobile-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--cream);
    overflow: hidden;
  }
  .nav-mobile-brand:hover,
  .nav-mobile-brand:focus {
    text-decoration: none;
  }

  .nav-mobile-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    object-fit: cover;
    flex-shrink: 0;
    display: block;
  }

  .nav-mobile-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .nav-mobile-te {
    font-family: 'Noto Serif Telugu', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cream);
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .nav-mobile-sub {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 0.78rem;
    color: var(--gold-lt);
    line-height: 1.15;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(247, 242, 232, 0.28);
    color: var(--cream);
    padding: 0.42rem 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06rem;
    text-transform: uppercase;
    flex-shrink: 0;
  }
  .nav-toggle:hover,
  .nav-toggle:focus {
    background: rgba(0, 0, 0, 0.38);
    border-color: var(--gold-lt);
  }

  .nav-toggle-icon {
    font-size: 1.15rem;
    line-height: 1;
  }

  /* Dropdown Nav List */
  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #3c070e;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    max-height: 80vh;
    overflow-y: auto;
  }
  .nav-list.is-open {
    display: flex;
  }
  .nav-list li {
    width: 100%;
    display: block;
  }
  .nav-list li a {
    display: block;
    width: 100%;
    height: auto;
    padding: 0.88rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.06rem;
    font-size: 0.84rem;
    color: rgba(247, 242, 232, 0.92);
    box-sizing: border-box;
  }
  .nav-list li a:hover,
  .nav-list li a:focus {
    background: rgba(0, 0, 0, 0.35);
    color: var(--cream);
  }
  .nav-list li a.active {
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--gold-lt);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: var(--cream);
    font-weight: 700;
  }

  /* Hero Section */
  .hero {
    min-height: 380px;
    padding: 3rem 1.25rem 2.6rem;
  }
  .hero-photo {
    object-position: center 22%;
    opacity: 0.32;
  }
  .hero-veil {
    background: linear-gradient(
      to bottom,
      rgba(35, 4, 7, 0.72) 0%,
      rgba(45, 6, 12, 0.82) 50%,
      rgba(20, 2, 4, 0.95) 100%
    );
  }
  .hero-body {
    padding: 0;
    max-width: 100%;
  }
  .hero-name-te {
    font-size: clamp(1.22rem, 5vw, 1.6rem);
    margin-bottom: 0.3rem;
    line-height: 1.35;
  }
  .hero-name-en {
    font-size: clamp(0.92rem, 3.8vw, 1.15rem);
    margin-bottom: 0.25rem;
    line-height: 1.3;
  }
  .hero-chinna {
    font-size: 0.92rem;
    margin-bottom: 0.85rem;
  }
  .hero-line {
    margin: 0 auto 0.9rem;
  }
  .hero-intro {
    font-size: 0.86rem;
    line-height: 1.75;
    margin-bottom: 1.4rem;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  /* Editorial & Images */
  .editorial-img img {
    max-height: 340px;
    object-fit: contain;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .g-item {
    aspect-ratio: 3 / 4;
  }

  /* Sections */
  .section { padding: 2.2rem 0; }
  .section-head { margin-bottom: 1.5rem; }

  /* Info strip */
  .info-strip-grid { grid-template-columns: 1fr 1fr; }
  .info-strip-item { padding: 0.75rem 0.8rem; }

  /* Seva list */
  .seva-entry { grid-template-columns: 1fr; gap: 0.25rem; }

  /* Trustees */
  .advisors-row { flex-direction: column; gap: 1rem; }
  .trustees-tbl thead { display: none; }
  .trustees-tbl tbody tr { display: block; padding: 0.5rem 0; }
  .trustees-tbl td { display: block; padding: 0.12rem 0.5rem; border: none; }
  .trustees-tbl td:first-child { width: auto; text-align: left; color: var(--text-lt); }

  /* Timings table */
  .timing-table td { padding: 0.5rem 0.5rem; font-size: 0.82rem; }
  .timing-table td:first-child { width: 76px; font-size: 0.78rem; }

  /* Footer */
  .footer-body { grid-template-columns: 1fr; gap: 2rem; }
  .footer-id { grid-column: span 1; }
  .footer-bottom-inner { justify-content: center; text-align: center; }

  /* Visit */
  .info-dl li { flex-direction: column; gap: 0.1rem; }
  .info-lbl { width: auto; }

  /* Page banner */
  .page-banner { padding: 1.8rem 0; }
  .page-banner h1 { font-size: 1.5rem; }
}

/* ── Small Mobile (≤ 420px) ── */
@media (max-width: 420px) {
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    width: 100%;
  }
  .hero-cta .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .info-strip-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
}
