/*
 * AYU Foundation Child Theme — ayu-responsive.css
 * Breakpoint fixes not co-located with their own component file.
 * Ported unchanged from the approved prototype's responsive.css.
 */

/* AYU Foundation — Breakpoint overrides not co-located with their component */

/* Desktop nav / mobile nav toggle switch */
@media (max-width: 1024px) {
  .primary-nav { display: none; }
  .header-ctas .btn--outline { display: none; } /* keep header compact: Donate stays, secondary moves into menu */
  .nav-toggle { display: flex; }
  .mobile-menu { display: block; }
}
@media (min-width: 1025px) {
  .mobile-menu { display: none !important; }
}

@media (max-width: 480px) {
  .header-inner { gap: var(--space-sm); }
  .header-ctas .btn--donate { padding-inline: var(--space-sm); font-size: var(--fs-body-sm); }
  .brand img { height: 34px; }
}

/* Below 400px, header-inner (logo + compact Donate pill + hamburger) is tight enough
   that the "Now" in the Donate button must drop to keep the hamburger on-screen —
   confirmed via iframe viewport testing at 360px (see QA_CHECKLIST.md). */
@media (max-width: 400px) {
  .header-inner { gap: var(--space-xs); }
  .donate-suffix { display: none; }
  .header-ctas .btn--donate { padding-inline: var(--space-sm); }
}

/* Container padding tightens slightly on very small screens handled by clamp() already; extra safety: */
@media (max-width: 360px) {
  :root { --container-pad: 1rem; }
}

/* Prevent horizontal scroll from any absolutely positioned decoration */
body { overflow-x: hidden; }

/* =========================================================
   Mission section — mobile composition fix
   ========================================================= */

@media (max-width: 767px) {

  .mission__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    position: relative;
  }

  /* Restore portrait composition on mobile */
  .mission__photo {
    width: min(100%, 420px);
    max-width: 420px;

    /* source image is approximately 4:5 */
    aspect-ratio: 4 / 5 !important;

    height: auto !important;
    min-height: 0 !important;

    margin: 0 auto !important;
    transform: none !important;

    overflow: hidden;
    border-radius: 28px;

    box-shadow:
      0 20px 44px rgba(63, 43, 112, 0.14);
  }

  .mission__photo img {
    display: block;

    width: 100%;
    height: 100% !important;

    object-fit: cover;
    object-position: 50% 50%;

    border-radius: inherit;
  }

  /* Remove excessive space before mission copy */
  .mission__grid > div:last-child {
    margin: 0 !important;
    padding: 0 !important;
  }

  .mission .eyebrow {
    margin-top: 0 !important;
  }

  /*
   The HTML has inline top/left/width/transform values,
   therefore !important is required to reposition the ribbon on mobile.
  */
  .mission__ribbon {
    width: 34% !important;
    max-width: 145px;

    top: 47% !important;
    left: 58% !important;

    height: auto !important;
    transform: rotate(8deg) !important;

    opacity: 0.9;
    pointer-events: none;
  }
}


/* Smaller phones */
@media (max-width: 420px) {

  .mission__grid {
    gap: 28px;
  }

  .mission__photo {
    width: 100%;
    max-width: 380px;
    border-radius: 24px;
  }

  .mission__ribbon {
    width: 38% !important;
    left: 54% !important;
  }
}
