/* ==========================================================================
   Responsive Styles — Sanjeev Mansotra Foundation
   Breakpoints:
     - Desktop:  > 1200px (default)
     - Laptop:   992px – 1200px
     - Tablet:   768px – 991px
     - Mobile:   < 768px
     - Small:    < 480px
   ========================================================================== */

/* Contact Us + phone inside the mobile slide-in panel — hidden on desktop */
.main-nav__mobile-actions { display: none; }

/* --- Laptop (≤ 1200px) --- */
@media (max-width: 1200px) {
  :root {
    --container-padding: 0 30px;
  }

  h1 { font-size: 60px; }
  h2 { font-size: 52px; }

  .about-content h2,
  .legacy-content h2 { font-size: 42px; }

  .hero-content {
    padding: 70px 40px 70px 0;
  }
}

/* --- Tablet (≤ 991px) --- */
@media (max-width: 991px) {
  :root {
    --container-padding: 0 24px;
    --section-padding: 70px 0;
  }

  h1 { font-size: 48px; }
  h2 { font-size: 44px; }
  h3 { font-size: 28px; }

  /* Header */
  .nav-list { gap: 24px; }
  .nav-list a { font-size: 14px; }

  /* Hero — stack vertically */
  .hero {
    background: linear-gradient(
      to bottom,
      var(--color-white) 0%,
      var(--color-white) 50%,
      var(--color-cream) 50%,
      var(--color-cream) 100%
    );
  }

  .hero .container {
    flex-direction: column;
    gap: 0;
    min-height: auto;
  }

  .hero-content {
    flex: none;
    width: 100%;
    text-align: center;
    padding: 60px 0 40px;
  }

  .hero-content p {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-content .values-strip-inner {
    justify-content: center;
  }

  .hero-image {
    position: relative;
    width: 100%;
    right: auto;
    top: auto;
    bottom: auto;
    height: 380px;
    margin-left: -24px;
    width: calc(100% + 48px);
  }

  /* Values */
  .values-strip-inner { gap: 40px; }

  /* About */
  .about .container {
    flex-direction: column;
    gap: 40px;
  }

  .about-emblem {
    flex: none;
    width: 100%;
  }

  .about-emblem img { max-width: 280px; }

  .about-content {
    text-align: center;
  }

  .about-content h2 { font-size: 38px; }

  /* Programs */
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .program-card { padding: 32px 26px 0; }

  /* Impact — switch the horizontal accordion to stacked cards */
  .impact-grid {
    flex-direction: column;
    height: auto;
    gap: 16px;
  }

  .impact-card {
    flex: none;
    width: 100%;
    height: 130px;
    transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .impact-card.is-active {
    height: 300px;
  }

  .impact-card-overlay h3 { font-size: 28px; }
  .impact-card-overlay p { max-width: 100%; }
  .impact-tagline { font-size: 20px; }

  /* Legacy */
  .legacy .container {
    flex-direction: column;
    gap: 40px;
  }

  .legacy-content {
    flex: none;
    width: 100%;
    text-align: center;
  }

  .legacy-content h2 { font-size: 38px; }

  .legacy-image {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }

  /* Footer */
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-cta { grid-column: 1 / -1; }
}

/* --- Mobile (≤ 767px) --- */
@media (max-width: 767px) {
  :root {
    --container-padding: 0 20px;
    --section-padding: 60px 0;
  }

  h1 { font-size: 38px; }
  h2 { font-size: 36px; }
  h3 { font-size: 24px; }
  h4 { font-size: 22px; }
  p { font-size: 16px; }

  /* Header */
  .site-header > .container {
    display: block;
  }

  /* The slide-in panel lives inside .site-header, so the header's stacking
     context must sit ABOVE the overlay — otherwise the overlay (a sibling of
     the header) renders on top of the panel and swallows every tap. */
  .site-header {
    z-index: 2000;
  }

  .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
  }

  .header-logo img { height: 55px; }

  .header-phone { display: none; }

  .header-contact-btn { display: none; }

  .mobile-nav-toggle {
    display: flex;
  }

  .mobile-nav-close {
    display: flex;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--color-black);
    background: none;
    border: none;
    cursor: pointer;
  }

  /* Mobile nav panel — slides in with transform (reliable across browsers)
     instead of animating a percentage `right` value. */
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--color-white);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(105%);
    transition: transform 0.35s ease;
    z-index: 2000;
    padding: 80px 30px 30px;
    border-top: none;
    overflow-y: auto;
  }

  .main-nav.active {
    transform: translateX(0);
  }

  /* Contact Us + phone shown inside the open mobile panel */
  .main-nav__mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #eee;
    width: 100%;
  }
  .main-nav__contact {
    width: 100%;
    justify-content: center;
  }
  .main-nav__phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    color: var(--color-black);
  }
  .main-nav__phone img {
    width: 16px;
    height: 16px;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
  }

  .nav-list li {
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .nav-list a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
  }

  /* Keep the "Our Focus" caret inline and vertically centred with the text
     (block display was dropping it to the top of the row). */
  .nav-item-dropdown > a {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .nav-item-dropdown > a::after {
    margin-top: 2px;   /* optical centring of the triangle against the text */
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0 0 0 16px;
    display: none;
  }

  .nav-item-dropdown.open .dropdown-menu {
    display: block;
  }

  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1999;
    display: none;
  }

  .mobile-nav-overlay.active {
    display: block;
  }

  /* Hero */
  .hero {
    background: var(--color-cream);
  }

  .hero-content {
    padding: 40px 0 30px;
	  order:2;
  }

  .hero-content p {
    font-size: 18px;
  }

  .hero-content .values-strip-inner {
    margin-top: 40px;
  }

  .hero-image {
    margin-left: -20px;
    width: calc(100% + 40px);
    height: 300px;
	  order:1;
  }

  /* Values */
  .values-strip { padding: 30px 0 40px; }

.values-strip-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  justify-content: center;
  align-items: start;
}

	.value-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}.value-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.value-label {
  font-size: 36px;
  text-align: center;
}

.value-desc {
  font-size: 15px;
  text-align: center;
}
  .value-desc-break { display: none; }

  /* About */
  .about { padding: 60px 0; }
  .about-emblem img { max-width: 200px; }
  .about-content h2 { font-size: 32px; }

  /* Programs */
  .programs h2 { margin-bottom: 30px; text-align: center;}

  .programs-grid {
    grid-template-columns: 1fr;
  }

  .program-card { padding: 30px 24px 0; }
  .program-card-text h4 { font-size: 22px; }

  /* Impact */
  .impact-philosophy { padding: 60px 0; }
  .impact-philosophy h2 { margin-bottom: 30px; }

  .impact-grid {
    gap: 14px;
  }

  .impact-card { height: 120px; }
  .impact-card.is-active { height: 280px; }
  .impact-card-overlay { padding: 26px 24px; }
  .impact-card-overlay h3 { font-size: 26px; }

  .impact-tagline { font-size: 18px; }

  /* Legacy */
  .legacy { padding: 60px 0; }
  .legacy-content h2 { font-size: 32px; }

  /* Footer */
  .footer-main {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-brand {
    text-align: center;
  }
/*
  .footer-social {
    justify-content: center;
  } */

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .footer-cta h3 { font-size: 24px; }
}

/* --- Small Mobile (≤ 480px) --- */
@media (max-width: 480px) {
  :root {
    --container-padding: 0 16px;
  }

  h1 { font-size: 32px; }
  h2 { font-size: 30px; }
  h3 { font-size: 22px; }

  .hero-image {
    height: 240px;
    margin-left: -16px;
    width: calc(100% + 32px);
  }

  .about-content h2,
  .legacy-content h2 { font-size: 28px; }

  .impact-card { height: 110px; }
  .impact-card.is-active { height: 260px; }
}

/* --- Landscape orientation adjustments --- */
@media (max-width: 991px) and (orientation: landscape) {
  .hero .container {
    flex-direction: row;
    min-height: 400px;
  }

  .hero-content {
    flex: 0 0 50%;
    text-align: left;
    padding: 60px 30px 60px 0;
  }

  .hero-image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50vw;
    height: auto;
    margin-left: 0;
  }

  .hero-content .values-strip-inner {
    justify-content: flex-start;
  }

  .impact-grid {
    flex-direction: row;
    height: 360px;
  }

  .impact-card {
    flex: 1 1 0;
    width: auto;
    height: auto;
  }

  .impact-card.is-active {
    flex-grow: 3.4;
    height: auto;
  }
}

@media (max-width: 767px) and (orientation: landscape) {
  .hero .container {
    flex-direction: row;
    min-height: 340px;
  }

  .hero-content {
    text-align: left;
    padding: 40px 20px 40px 0;
  }

  .hero-content h1 { font-size: 30px; }

  .hero-content .values-strip-inner {
    margin-top: 20px;
  }

  .hero-image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50vw;
    height: auto;
    margin-left: 0;
  }

  .values-strip-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .impact-grid {
    flex-direction: row;
    height: 300px;
  }

  .impact-card {
    flex: 1 1 0;
    width: auto;
    height: auto;
  }

  .impact-card.is-active {
    flex-grow: 3.4;
    height: auto;
  }
}
