/* AssafShami.com final responsive consolidation — 2026-10-18 */
html, body { max-width:100%; overflow-x:clip; }
*, *::before, *::after { box-sizing:border-box; }
img, video, iframe, svg { max-width:100%; }

/* Allow all grid/flex children to shrink instead of creating narrow/overflowing columns. */
.hero-grid > *, .section-head > *, .compact-head > *, .about17-hero-grid > *,
.about17-editorial-grid > *, .about17-personal-grid > *, .about17-philosophy-grid > *,
.about17-role-grid > *, .about17-bridge > *, .beliefs23-hero-grid > *,
.beliefs23-intro-grid > *, .beliefs23-owner-grid > *, .owner32-hero-grid > *,
.owner32-intro-grid > *, .owner32-system-grid > *, .owner32-two-paths > *,
.testimonial-hero-grid > *, .testimonial-story > *, .written-testimonial-grid > *,
.wtp-hero-grid > *, .wtp24-relationship-head > *, .contact21-form-layout > *,
.insights22-hero-grid > *, .insights-feature-layout > *, .insight22-article-layout > *,
.insight22-article-hero-grid > *, .cta-grid > *, .footer-grid > * { min-width:0 !important; }

/* Five-step paths remain readable and can wrap gracefully. */
.owner32-path, .about17-brand-path, .bridge-path, .wtp24-path, .beliefs23-owner-path,
.relationship-path, .owner32-home-path {
  flex-wrap:wrap !important;
  row-gap:8px !important;
}

@media (max-width: 980px) {
  /* Editorial headers should not remain as squeezed side-by-side columns. */
  .section-head, .compact-head, .written-testimonials-head, .insights-balanced-head,
  .insights22-split-head, .wtp24-relationship-head {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:18px !important;
  }

  .section-head p, .compact-head p { max-width:none !important; }

  /* Major two-column narrative layouts stack before they become cramped. */
  .about17-editorial-grid, .about17-personal-grid, .about17-philosophy-grid,
  .about17-bridge, .beliefs23-intro-grid, .beliefs23-owner-grid,
  .owner32-intro-grid, .owner32-system-grid, .owner32-two-paths,
  .wtp24-relationship-head, .contact21-form-layout,
  .insights-feature-layout, .insight22-article-layout {
    grid-template-columns:minmax(0,1fr) !important;
  }

  /* Testimonials should never squeeze speaker + copy into narrow columns. */
  .testimonial-story, .testimonial-story-alt, .testimonial-story-featured,
  .homepage-featured-testimonial {
    grid-template-columns:minmax(0,1fr) !important;
  }
  .testimonial-story-alt .testimonial-story-copy { order:2 !important; }
  .testimonial-story-alt .testimonial-media { order:1 !important; }

  /* About timeline: simple left rail on tablet/phone. */
  .about17-timeline::before { left:18px !important; top:38px !important; bottom:38px !important; }
  .about17-timeline-item {
    grid-template-columns:36px minmax(0,1fr) !important;
    gap:18px !important;
    padding:24px 0 !important;
  }
  .about17-timeline-item .year {
    grid-column:2 !important; grid-row:1 !important; text-align:left !important; padding-top:0 !important;
  }
  .about17-timeline-dot { grid-column:1 !important; grid-row:1 / span 2 !important; margin:4px auto 0 !important; }
  .about17-timeline-item > div:last-child { grid-column:2 !important; min-width:0 !important; }

  .about17-role-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}

@media (max-width: 760px) {
  .wrap { width:min(var(--max), calc(100% - 28px)) !important; }
  .section { padding:62px 0 !important; }

  /* Hero: five commands remain large but fit normal phones. */
  .hero .display { font-size:clamp(42px, 13vw, 64px) !important; line-height:.94 !important; }
  .hero-line { gap:.16em !important; }
  .hero-line-consistency .hero-key { font-size:.92em !important; }

  .about17-role-grid, .written-testimonial-grid, .owner32-pillar-grid,
  .owner32-dependency-grid, .problem-grid, .proof-grid, .cards,
  .wtp-fit-grid, .contact21-not-sure-grid, .contact21-two-paths,
  .insights-topic-grid, .insights22-systems-grid, .insights22-tech-grid,
  .insights22-time-grid, .insight22-related-grid, .speaking18-talk-grid,
  .speaking18-fit-grid, .speaking18-experience-grid {
    grid-template-columns:minmax(0,1fr) !important;
  }

  /* Five-step sequences become compact stacked/wrapped chips, not a narrow line. */
  .owner32-path, .about17-brand-path, .bridge-path, .wtp24-path,
  .beliefs23-owner-path, .relationship-path, .owner32-home-path {
    justify-content:flex-start !important;
    gap:7px !important;
  }
  .owner32-path span, .about17-brand-path span, .bridge-path span,
  .wtp24-path span, .beliefs23-owner-path span, .relationship-path span,
  .owner32-home-path span { white-space:normal !important; }

  /* Prevent oversized display headings from forcing ugly one-word columns. */
  .section h2, .page-hero h1 { font-size:clamp(36px, 10.5vw, 52px) !important; overflow-wrap:normal !important; }
  .section h3 { overflow-wrap:normal !important; }
  p, li, blockquote { overflow-wrap:break-word; word-break:normal; }

  .actions { flex-wrap:wrap !important; }
  .hero .actions .btn, .testimonial-actions .btn { width:100% !important; justify-content:center !important; }

  /* Mobile forms: prevent iOS zoom and controls exceeding the viewport. */
  input, textarea, select, button { font-size:16px !important; max-width:100% !important; }
  .btn, button { min-height:44px; }
}

@media (max-width: 600px) {
  /* Keep the approved Beliefs mobile treatment: two columns + final full-width card. */
  .beliefs23-principle-rail { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px !important; }
  .beliefs23-principle-rail span:nth-child(1),
  .beliefs23-principle-rail span:nth-child(2),
  .beliefs23-principle-rail span:nth-child(3),
  .beliefs23-principle-rail span:nth-child(4),
  .beliefs23-principle-rail span:nth-child(5),
  .beliefs23-principle-rail span:nth-child(6) { grid-column:auto !important; width:100% !important; }
  .beliefs23-principle-rail span:nth-child(7) { grid-column:1 / -1 !important; width:100% !important; justify-content:center !important; }

  .testimonial-outcomes { grid-template-columns:minmax(0,1fr) !important; }
  .testimonial-hero-proof { grid-template-columns:minmax(0,1fr) !important; }
}

@media (max-width: 380px) {
  .wrap { width:min(var(--max), calc(100% - 22px)) !important; }
  .hero .display { font-size:clamp(38px, 12.5vw, 52px) !important; }
  .section h2, .page-hero h1 { font-size:clamp(33px, 10.8vw, 46px) !important; }
  .belief-interactive { grid-template-columns:42px minmax(0,1fr) 28px !important; gap:9px !important; }
}

@media (max-width: 340px) {
  .beliefs23-principle-rail { grid-template-columns:minmax(0,1fr) !important; }
  .beliefs23-principle-rail span:nth-child(7) { grid-column:auto !important; justify-content:flex-start !important; }
}


/* ==========================================================
   OWNER MODE 5-CARD FRAMEWORK
   ========================================================== */

.owner32-pillar-grid{
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:14px !important;
}

.owner32-pillar-grid > article{
  min-width:0 !important;
  height:100% !important;
}

/* Tablet: 3 cards on first row, 2 centered on second */
@media (max-width:980px) and (min-width:601px){
  .owner32-pillar-grid{
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    gap:14px !important;
  }

  .owner32-pillar-grid > article{
    grid-column:span 2 !important;
  }

  .owner32-pillar-grid > article:nth-child(4){
    grid-column:2 / span 2 !important;
  }

  .owner32-pillar-grid > article:nth-child(5){
    grid-column:4 / span 2 !important;
  }
}

/* Mobile: clear single-column progression */
@media (max-width:600px){
  .owner32-pillar-grid{
    grid-template-columns:1fr !important;
    gap:12px !important;
  }

  .owner32-pillar-grid > article{
    grid-column:auto !important;
    width:100% !important;
    min-width:0 !important;
  }
}
