/* MOBILE HERO REPAIR — phone screens only; tablet 0102 and desktop untouched */
@media (max-width: 680px) {
  .portfolio-hero .hero-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 18px !important;
    width: 100% !important;
  }

  .portfolio-hero .hero-actions .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    width: min(100%, 250px) !important;
    min-height: 54px !important;
    padding: 14px 16px !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.35 !important;
    overflow: visible !important;
  }

  .portfolio-hero .hero-actions .text-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    min-height: 30px !important;
    padding: 0 0 8px !important;
    white-space: nowrap !important;
  }

  /* No arrows or icon placeholders on the first mobile screen. */
  .portfolio-hero .hero-actions .btn span,
  .portfolio-hero .hero-actions .text-link span {
    display: none !important;
    content: none !important;
  }
}


/* MOBILE ALIGNMENT REPAIR — phone only; tablet 0102 and desktop remain unchanged */
@media screen and (max-width:680px){
  .portfolio-header .wrap,
  main > .section > .wrap,
  .portfolio-hero > .wrap,
  .portfolio-footer > .wrap{
    width:calc(100% - 40px)!important;
    max-width:none!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  /* Remove the inherited desktop/tablet offset and use one shared content axis. */
  .split-layout{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:18px!important;
    width:100%!important;
    margin:0!important;
  }
  .split-layout > *{
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  .practice-intro,
  .practice-grid,
  .office-gallery,
  .office-address,
  .contact-layout,
  .contact-section .map-frame,
  .legal-note{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  /* Prevent long text, grid children and images from pushing the layout right. */
  .section,
  .section .wrap,
  .section-topline,
  .practice-intro,
  .practice-grid,
  .approach-list,
  .office-gallery,
  .contact-layout,
  .contact-details{
    min-width:0!important;
    max-width:100%!important;
  }
  .section-title,
  .section p,
  .approach-list h3,
  .approach-list p,
  .practice-grid h3,
  .practice-grid p,
  .office-address,
  .contact-details a{
    max-width:100%!important;
    overflow-wrap:anywhere;
    word-break:normal;
  }
  .office-gallery{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:10px!important;
  }
  .office-gallery figure,
  .office-gallery img{
    min-width:0!important;
    max-width:100%!important;
  }
}



/* FINAL PHONE LAYOUT — <=680px only. Tablet reference 0102 (681px+) is intentionally untouched. */
@media screen and (max-width:680px) {
  .portfolio-hero .hero-layout,
  .portfolio-hero .hero-copy {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  /* Stack the two actions; prevent labels and generated glyphs from colliding. */
  .portfolio-hero .hero-actions {
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:16px!important;
    width:100%!important;
    min-width:0!important;
  }
  .portfolio-hero .hero-actions .btn {
    display:inline-flex!important;
    flex:0 1 auto!important;
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:52px!important;
    align-items:center!important;
    justify-content:center!important;
    gap:0!important;
    padding:14px 18px!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    line-height:1.35!important;
    text-align:center!important;
  }
  .portfolio-hero .hero-actions .btn span,
  .portfolio-hero .hero-actions .text-link span,
  .portfolio-hero .hero-actions .btn::after,
  .portfolio-hero .hero-actions .text-link::after {
    display:none!important;
    content:none!important;
  }
  .portfolio-hero .hero-actions .text-link {
    display:inline-block!important;
    width:auto!important;
    max-width:100%!important;
    min-height:0!important;
    padding:0 0 7px!important;
    margin:0!important;
    white-space:normal!important;
    line-height:1.5!important;
  }

  /* Keep every mobile section on the same centered content axis. */
  .portfolio-header .wrap,
  .portfolio-hero > .wrap,
  main > .section > .wrap,
  .portfolio-footer > .wrap {
    width:calc(100% - 40px)!important;
    max-width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .portfolio-hero .hero-copy,
  .portfolio-hero .hero-description,
  .profile-content,
  .practice-intro,
  .practice-grid,
  .approach-list,
  .office-gallery,
  .contact-layout,
  .contact-details {
    min-width:0!important;
    max-width:100%!important;
  }
  .portfolio-hero .hero-description {
    width:100%!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
  }
  .portfolio-hero .hero-copy h1 {
    max-width:100%!important;
    overflow-wrap:normal!important;
  }
  .portfolio-hero .hero-photo {
    background-position:64% 28%!important;
  }
  .portfolio-hero .hero-index {
    display:none!important;
  }
}


/* PHONE TYPOGRAPHY ACCESSIBILITY — larger, readable text on phones only.
   Tablet 0102 (681px+) and desktop are unchanged. */
@media screen and (max-width:680px) {
  html { -webkit-text-size-adjust: 100%; }

  .hero-copy .eyebrow,
  .section .eyebrow,
  .section-kicker,
  .section-topline > span {
    font-size:11px!important;
    line-height:1.55!important;
    letter-spacing:.12em!important;
  }
  .portfolio-hero .hero-copy h1 {
    font-size:clamp(43px,11.2vw,52px)!important;
    line-height:1.12!important;
  }
  .portfolio-hero .hero-description {
    font-size:17px!important;
    line-height:1.7!important;
  }
  .portfolio-hero .hero-actions .btn {
    font-size:15px!important;
    line-height:1.45!important;
    min-height:56px!important;
    padding:15px 20px!important;
  }
  .portfolio-hero .hero-actions .text-link {
    font-size:15px!important;
    line-height:1.55!important;
  }
  .hero-meta,
  .hero-bottom {
    font-size:10px!important;
    line-height:1.6!important;
  }

  .section-title {
    font-size:clamp(33px,8.8vw,39px)!important;
    line-height:1.2!important;
  }
  .profile-text p,
  .practice-intro > p:last-child,
  .practice-grid article p,
  .approach-list p,
  .contact-intro > p:not(.eyebrow),
  .contact-details a,
  .contact-details p,
  .office-address {
    font-size:16px!important;
    line-height:1.7!important;
  }
  .profile-text p.lead {
    font-size:20px!important;
    line-height:1.55!important;
  }
  .practice-grid article h3,
  .approach-list h3 {
    font-size:19px!important;
    line-height:1.4!important;
  }
  .credential strong {
    font-size:16px!important;
    line-height:1.6!important;
  }
  .credential p,
  .credential a,
  .office-gallery figcaption,
  .contact-hours,
  .legal-note {
    font-size:13px!important;
    line-height:1.65!important;
  }
  .contact-intro h2 {
    font-size:clamp(37px,9.5vw,43px)!important;
    line-height:1.16!important;
  }
  .contact-phone {
    font-size:clamp(28px,7.5vw,33px)!important;
  }
  .contact-details > div > span {
    font-size:11px!important;
    line-height:1.5!important;
  }
  .portfolio-header .brand strong {
    font-size:18px!important;
  }
  .portfolio-header .brand small {
    font-size:10px!important;
  }
  .menu-toggle {
    font-size:23px!important;
  }
  .portfolio-header nav a {
    font-size:16px!important;
  }
  .portfolio-footer .wrap > span,
  .portfolio-footer a:last-child {
    font-size:13px!important;
    line-height:1.6!important;
  }
}
