/* mobile.css — adaptive layer for ≤ 768px (Alina Panova site) */

@media (max-width: 768px) {

  /* ─────────  Section padding  ───────── */
  .section { padding: 64px 0 !important; }
  .container { padding-left: 22px; padding-right: 22px; }

  /* ─────────  Hero: photo above, text below  ───────── */
  .hero { padding-top: 24px !important; padding-bottom: 56px !important; }
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .hero-grid .hero-photo { order: -1; }
  .hero-grid .hero-text { order: 2; }
  .hero-grid .hero-eyebrow-mobile {
    display: flex !important;
    order: -2;
    justify-content: flex-start;
  }
  .hero-grid .hero-eyebrow-mobile img {
    height: 41px !important;
    object-fit: fill !important;
    margin-bottom: 1px;
    transform: translateY(-1px);
  }
  .hero-grid .hero-eyebrow-desktop { display: none !important; }
  .hero-photo > div:first-child {
    /* portrait wrapper from BlobPortrait — keep compact on mobile */
    max-width: 240px !important;
    margin: 0 auto !important;
  }
  /* Contact section: stack text above buttons */
  #contact .container div[style*="grid-template-columns:1fr 1.1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .hero-photo > div[style*="position: absolute"] {
    left: 50% !important;
    transform: translateX(-50%);
    bottom: -18px !important;
    padding: 8px 14px !important;
    gap: 8px !important;
    max-width: none !important;
  }
  .hero-photo > div[style*="position: absolute"] > div:last-child > div:first-child {
    font-size: 10px !important;
    margin-bottom: 1px;
  }
  .hero-photo > div[style*="position: absolute"] > div:last-child > div:last-child {
    font-size: 12px !important;
  }
  .hero h1 { font-size: 56px !important; }
  .hero .display { text-align: left; }
  .hero-text p:nth-of-type(1) { font-size: 20px !important; }
  .hero-text p:nth-of-type(2) { font-size: 16px !important; }
  .hero .btn { font-size: 14px; padding: 14px 22px; }

  /* ─────────  Two-column sections → 1 column  ───────── */
  /* About, Contact, Education header — match the inline style we set */
  section#about .container,
  section#contact .container,
  section#education .container > div:first-child {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  section#education .container > div:first-child > p {
    justify-self: start !important;
  }
  /* About video card — center & shrink */
  section#about .container > div:nth-child(2) > div {
    width: 240px !important;
  }
  /* Stats row in about */
  section#about .container > div:first-child > div[style*="display: flex"][style*="gap: 40px"] {
    gap: 28px !important;
  }
  section#about .display {
    font-size: 32px !important;
  }

  /* ─────────  Methods grid → 1 column  ───────── */
  section#methods .container > div:nth-child(2) {
    grid-template-columns: 1fr !important;
    margin-left: 16px;
    margin-right: 16px;
  }
  /* Compact cards: smaller padding, less line-height, icon already inline with title via JSX */
  section#methods .container > div:nth-child(2) > div {
    padding: 22px 22px 22px 20px !important;
    gap: 8px !important;
  }
  section#methods .method-icon {
    font-size: 22px !important;
  }
  section#methods h3.method-title.display {
    font-size: 17px !important;
    line-height: 1.3 !important;
    padding-right: 8px;
  }
  section#methods .container > div:nth-child(2) > div > p {
    font-size: 16px !important;
    padding-right: 6px;
    line-height: 1.55 !important;
  }
  section#methods .display { font-size: 30px !important; }

  /* ─────────  Education: practice timeline → stacked  ───────── */
  section#education .container > div:last-of-type > div > div {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 18px 0 !important;
  }
  section#education .display { font-size: 30px !important; }

  /* ─────────  Reviews  ───────── */
  section#reviews .container > div[style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }
  section#reviews .display { font-size: 30px !important; }
  section#reviews p[style*="font-size: 26px"] {
    font-size: 20px !important;
  }

  /* ─────────  Horizontal scrollers: snap-center + side padding so each card
                stops in the middle between the two arrow buttons  ───────── */
  .h-scroll {
    scroll-snap-type: x mandatory;
    padding-left: calc(50% - 140px) !important;
    padding-right: calc(50% - 140px) !important;
    scroll-padding-left: 50% !important;
    scroll-padding-right: 50% !important;
  }
  .h-scroll > * {
    scroll-snap-align: center !important;
    scroll-snap-stop: always;
  }
  /* Diploma cards: pin to 280px so snap math (calc(50% - 140px)) centers correctly */
  #diplomas-scroll > .diploma-card {
    min-width: 280px !important;
    max-width: 280px !important;
    width: 280px !important;
  }
  /* Indicators on mobile */
  .h-scroll-arrow {
    width: 36px !important;
    height: 36px !important;
    right: 4px;
  }
  .h-scroll-arrow.left { left: 4px; right: auto; }
  .h-scroll-arrow svg { width: 32px !important; height: 32px !important; }
  /* Narrower, softer fade so the centered card stays clearly visible */
  .h-scroll-wrap::before,
  .h-scroll-wrap::after {
    width: 28px !important;
  }

  /* ─────────  Poem  ───────── */
  section#poem .container > div { padding: 0 4px; }
  section#poem .container [style*="font-size: clamp"] {
    font-size: 18px !important;
    line-height: 1.7;
  }

  /* ─────────  Contact: stack & allow wrap  ───────── */
  section#contact .display { font-size: 30px !important; }
  section#contact a > div:nth-child(2) > div:nth-child(2) {
    white-space: normal !important;
    word-break: break-word;
    font-size: 14px !important;
  }
  section#contact a {
    padding: 14px 18px !important;
  }
  /* Pricing subsection: stack cards */
  section#contact .pricing-grid {
    grid-template-columns: 1fr !important;
  }
  section#contact .pricing-card {
    padding: 26px 24px !important;
  }
  section#contact .pricing-card .display:last-child {
    font-size: 26px !important;
  }

  /* ─────────  Decorative SVGs: shrink so they don't overpower  ───────── */
  section svg[viewBox="0 0 600 600"] {
    width: 280px !important;
  }

  /* ─────────  Buttons & display sizes  ───────── */
  .display { font-size: 30px !important; line-height: 1.2 !important; }
  .eyebrow { font-size: 11px; }

  /* ─────────  Footer: two-line text so FAB doesn't overlap  ───────── */
  .footer-br { display: inline; }
  .footer-sep { display: none !important; }

  /* ─────────  Contact FAB: move above safe area, smaller  ───────── */
  /* (no overrides needed — already 56px circle, sits at left:24, bottom:24) */
}

/* Fine-tune for very small phones */
@media (max-width: 380px) {
  .hero h1 { font-size: 44px !important; }
  .container { padding-left: 18px; padding-right: 18px; }
  .section { padding: 52px 0 !important; }
}
