/* ─── RESPONSIVE STYLES ────────────────────────────────────── */
/* ─── TABLET ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  html {
    font-size: 100%; /* 16px baseline — plenty of room on tablets, no bump needed */
  }

  .values__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── NAVBAR SWITCH TO ☰ MENU (small laptops, tablets, phones) ─
   The full menu needs about 1,100px of width once all pages are live,
   so the ☰ menu takes over at 1100px and below. */
@media (max-width: 1100px) {
  .navbar__links {
    display: none !important;
  }

  .navbar__toggle {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 200;
  }

  .navbar__toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #3a3535;
    border-radius: 2px;
  }

  .navbar__mobile {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #ffffff;
    border-top: 2px solid #e9c8c3;
    padding: 0 2rem;
    gap: 1.25rem;
    box-shadow: 0 4px 12px rgba(58, 53, 53, 0.1);
    text-align: center;
    align-items: center;
    z-index: 9999;
    list-style: none;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition:
      max-height 0.35s ease,
      opacity 0.25s ease,
      padding 0.35s ease;
  }

  .navbar__mobile.open {
    max-height: calc(100vh - 80px); /* room for all 10 pages */
    overflow-y: auto;
    opacity: 1;
    padding: 1.5rem 2rem;
    pointer-events: auto;
  }

  .navbar__mobile a {
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    color: #3a3535;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
  }

  /* Sub-pages (Hands in Motion, Partner Spotlight): smaller, not all caps */
  .navbar__mobile-sub a {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #3a3535;
  }

  /* Current page in the ☰ menu */
  .navbar__mobile a[aria-current="page"] {
    color: #c85d78;
  }
}

/* ─── MOBILE (general phones, e.g. iPhone 12/16) ──────────── */
@media (max-width: 768px) {
  html {
    font-size: 112.5%; /* 16px → ~18px equivalent, scales every rem-based size sitewide */
  }

  body {
    padding-top: 74px;
  }

  .section {
    padding: 0 0;
  }

  /* ── NAVBAR ── */
  .navbar__links {
    display: none !important;
  }

  .navbar__mobile {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #ffffff;
    border-top: 2px solid #e9c8c3;
    padding: 0 2rem;
    gap: 1.5rem;
    box-shadow: 0 4px 12px rgba(58, 53, 53, 0.1);
    text-align: center;
    align-items: center;
    z-index: 9999;
    list-style: none;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition:
      max-height 0.35s ease,
      opacity 0.25s ease,
      padding 0.35s ease;
  }

  .navbar__mobile.open {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    opacity: 1;
    padding: 1.5rem 2rem;
    pointer-events: auto;
  }

  .navbar__mobile a {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    color: #3a3535;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
  }

  .navbar {
    padding: 0.5rem 1.25rem;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .navbar__logo img {
    height: 55px;
  }

  .navbar__toggle {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 200;
  }

  .navbar__toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #3a3535;
    border-radius: 2px;
  }

  .navbar__links {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    flex: none !important;
    position: static !important;
  }

  .navbar__links.open {
    max-height: 400px !important;
    padding: 1.5rem 2rem !important;
  }

  .navbar__links.open {
    display: flex !important;
  }

  .navbar__links a {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
  }

  /* ── HERO ── */
  .hero__content {
    padding: 1rem 1.25rem;
    max-width: 100%;
  }

  .hero__mission {
    max-width: 100%;
  }

  /* ── VALUES ── */
  .values {
    padding: 0 0;
  }

  .values__grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .value-card {
    padding: 1.1rem 1.25rem;
  }

  .value-card__icon {
    font-size: 3.5rem;
  }

  .value-card__title {
    font-size: 2.1rem;
  }

  .value-card__desc {
    font-size: 1.2rem;
  }

  .values__inner {
    max-width: 100%;
    padding: 1rem 0.5rem;
  }

  /* ── ABOUT ── */
  .about__grid {
    grid-template-columns: 1fr !important;
    gap: 0;
  }

  .about__photo-wrap {
    border-radius: 12px;
    width: 100%;
  }

  .about__photo-img {
    border-radius: 12px;
    width: 100%;
  }

  .about__badge-name {
    font-size: 1.2rem;
    text-align: center;
  }

  .about__badge-role {
    font-size: 1rem;
    text-align: center;
  }

  .about__badge-desc {
    font-size: 0.75rem;
  }

  .about__badges {
    position: relative !important;
    background: none !important;
    padding: 0.75rem 0 !important;
    flex-direction: column !important;
    gap: 0.75rem;
  }

  .about__badge {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border-left: 3px solid #c8a04a;
  }

  .about__badge-name {
    font-size: 1.2rem;
  }
  .about__badge-role {
    font-size: 1rem;
  }
  .about__badge-desc {
    font-size: 0.75rem;
  }

  /* ── ABOUT GRID: MOVE "MEET THE TEAM" LABEL TO TOP ── */
  .about__grid {
    display: block !important;
    position: relative;
    padding-top: 2.5rem;
  }

  .about__photo-wrap {
    margin: 0 !important;
    padding: 0 !important;
  }

  .about__badges {
    margin: 0 !important;
  }

  .about__grid .section__label {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    text-align: center;
    margin: 0;
  }

  /* ── ABOUT CONTENT SPACING ── */
  .about__grid > div:last-child {
    margin: 0 !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem;
  }

  .section__title {
    font-size: clamp(1.75rem, 7.5vw, 2.6rem); /* fits small phones without running off the edge */
    text-align: center;
  }

  /* ── SECTION INNER ── */
  .section__inner {
    max-width: 100% !important;
    padding: 0 0.25rem;
    box-sizing: border-box;
  }

  .section__text--spaced {
    margin: 0 1rem 1.5rem 1rem;
  }

  /* ── EVENTS ── */
  #events .section__inner {
    max-width: 100% !important;
    padding: 1rem;
  }

  .events__grid {
    max-width: 100% !important;
    width: 100%;
  }

  .event-card__actions {
    flex-direction: column;
    align-items: center;
  }

  /* ─── EVENT FLYER ──────────────────────────────────────────── */
  .event-flyer__label {
    text-align: center;
  }

  .btn {
    font-size: 0.85rem;
    padding: 0.85rem 1.5rem;
    white-space: nowrap;
  }

  /* ── NEWSLETTER ── */
  #newsletter {
    padding: 1rem;
  }

  .newsletter__name {
    font-size: 1.5rem;
  }

  .newsletter__text {
    max-width: 100%;
  }

  /* ── EVENTS INTRO ── */
  .events__intro {
    white-space: normal;
  }

  /* ── FOOTER ── */
  .footer__logo {
    height: 140px;
    max-width: 300px;
  }

  /* Footer: stack the 2 columns into 1 centered column */
  .footer__top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer__brand,
  .footer__connect {
    text-align: center;
  }

  .footer__brand .footer__logo {
    margin: 0 auto 1.25rem;
  }

  .footer__brand .footer__badges,
  .footer__connect .footer__social {
    justify-content: center;
  }
}

/* ─── ABOUT PAGE (about.html) ─────────────────────────────── */

/* Tablets */
@media (max-width: 1024px) {
  .about-values__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Phones */
@media (max-width: 768px) {
  .about-hero {
    padding: 3rem 1.25rem 2.5rem;
  }

  .about-story {
    padding: 3rem 1.25rem;
  }

  .about-story__grid {
    gap: 2.5rem;
  }

  /* Phones: Heidi on top, Pam below */
  .about-story__team {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .team-card {
    width: 100%;
    max-width: 340px;
  }

  .team-card__name {
    font-size: 1.1rem;
  }

  .team-card__role {
    font-size: 0.85rem;
  }

  .about-story__text .section__title {
    text-align: left;
  }

  .about-pillars {
    padding: 3rem 1.25rem;
  }

  .about-pillars__grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .about-values {
    padding: 3rem 1.25rem;
  }

  .about-values__grid {
    grid-template-columns: 1fr;
  }

  /* Promise pills: allowed to wrap on phones */
  .about-promise__list {
    flex-wrap: wrap;
  }

  .about-promise,
  .about-cta {
    padding: 3rem 1.25rem;
  }

  .email-contact__trigger.about-cta__button {
    white-space: normal;
    font-size: 0.95rem;
    padding: 0.8rem 1.4rem;
  }
}

/* ─── EVENT PAGE (hands-in-motion.html) ──────────────────── */

/* Tablets */
@media (max-width: 1024px) {
  .event-about__grid {
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
  }

  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Phones */
@media (max-width: 768px) {
  .event-hero,
  .event-why {
    padding: 3rem 1.25rem;
  }

  .event-about,
  .event-presenters,
  .event-highlights,
  .event-gallery,
  .event-video {
    padding: 3rem 1.25rem;
  }

  .event-about__grid {
    grid-template-columns: 1fr;
  }

  .event-about__side {
    max-width: 340px;
    margin: 0 auto;
  }

  .presenters__grid,
  .highlights__grid,
  .kind-words__grid {
    grid-template-columns: 1fr;
  }

  .event-story {
    padding: 1.75rem 1.5rem;
  }

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

/* Phones: one photo per row — bigger and easier to see (Our Work + Hands in Motion) */
@media (max-width: 480px) {
  .gallery__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ─── EVENTS PAGE (events.html) ─────────────────────────── */
@media (max-width: 768px) {
  .past-event {
    padding: 3rem 1.25rem;
  }

  .past-event__card {
    grid-template-columns: 1fr;
  }

  .past-event__img {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .past-event__body {
    padding: 1.5rem;
    text-align: center;
  }
}

/* ─── HOMEPAGE TEASERS ────────────────────────────────────── */
@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .home-services,
  .home-serve,
  .home-highlight {
    padding: 3rem 1.25rem;
  }

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

  .home-highlight__quote {
    text-align: left;
  }

  .home-teaser {
    padding: 3rem 1.25rem;
  }

  .home-teaser__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .home-teaser__text {
    text-align: center;
  }

  .home-teaser__text .section__divider {
    margin: 1.25rem auto;
  }
}

/* ─── OUR WORK PAGE (our-work.html) ─────────────────────── */
@media (max-width: 1024px) and (min-width: 769px) {
  .work-entry__photos {
    grid-template-columns: repeat(4, 1fr); /* keep 4 photos in 1 row */
  }
}

@media (max-width: 768px) {
  .work-list {
    padding: 3rem 1.25rem;
  }

  .work-entry {
    padding: 1.5rem 1.25rem;
  }

  .work-entry__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .work-entry__actions .btn {
    text-align: center;
  }
}

/* ─── PARTNERSHIPS PAGE (partnerships.html) ─────────────── */
@media (max-width: 1024px) {
  .partner-ways {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .partner-intro,
  .partner-tiers {
    padding: 3rem 1.25rem;
  }

  .partner-ways,
  .tiers__grid {
    grid-template-columns: 1fr;
  }
}

/* ─── PARTNER SPOTLIGHT PAGE (partner-spotlight.html) ───── */
@media (max-width: 768px) {
  .spotlight {
    padding: 3rem 1.25rem;
  }

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

/* ─── TICKETS & DONATIONS PAGE (tickets-donate.html) ────── */
@media (max-width: 768px) {
  .td-tickets,
  .td-donate {
    padding: 3rem 1.25rem;
  }

  .td-block__actions {
    flex-direction: column;
  }
}

/* ─── PODCAST REELS PAGE (podcast-reels.html) ───────────── */
@media (max-width: 1024px) {
  .reels__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .reels {
    padding: 3rem 1.25rem;
  }

  .reels__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ─── SMALL PHONES (e.g. iPhone SE, ≤400px) ───────────────── */
@media (max-width: 400px) {
  html {
    font-size: 118.75%; /* 16px → ~19px equivalent — a touch larger for the smallest screens */
  }

  /* Big headings: keep long words (like "Programming") inside the screen */
  .section__title,
  .td-block__title {
    font-size: 1.6rem;
  }
}

/* ─── REDUCED MOTION ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
