/* Tannlege Forland: considered mobile layout.
   This layer does not alter desktop or existing patient-facing wording. */
@media (max-width: 680px) {
  /* Keep one consistent typographic rhythm across pages. */
  body { font-size: 16px; line-height: 1.6; }
  main h1,main h2,main h3 { text-wrap: pretty; }
  .section { padding-top: 47px; padding-bottom: 47px; }
  .section + .section { margin-top: 0; }
  .hero { padding-top: 30px; padding-bottom: 32px; }
  .hero h1, .hero h1 em { font-size: clamp(35px, 8.8vw, 43px); line-height: 1.12; }
  .hero-sub { font-size: 17px; line-height: 1.5; }
  .hero-actions { margin-top: 20px; gap: 12px 20px; }
  .hero-bottom { margin-top: 23px; }
  .pagehero { padding: 38px 0 40px; }
  .pagehero h1 { font-size: clamp(34px, 8vw, 43px); line-height: 1.16; }
  .pagehero .page-intro { font-size: 16px; line-height: 1.55; }
  .about-copy h2, .contact-home h2, .section-heading-sm h2,
  .team-text h2, .contact-detail-grid h2 { font-size: clamp(28px, 6.8vw, 34px); line-height: 1.2; }
  .about-copy p, .about-copy .lead, .team-text p,
  .contact-home p, .contact-detail-grid p { font-size:16px; line-height:1.62; }
  .team-peek { gap: 12px; }
  .team-peek-photo { border-radius: 18px; }
  .team-peek-name { font-size: 14px; line-height: 1.34; }
  .team-peek-role { font-size: 13px; }
  
  /* Treatment heading: title first, short help + price link on a single second row. */
  .service-section .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 14px;
    margin-bottom: 22px;
  }
  .service-section .section-head > div:first-child {
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
    margin: 0;
  }
  .service-section .section-head h2 {
    font-size: clamp(28px, 6.9vw, 34px);
    line-height: 1.17;
    margin: 0;
    letter-spacing: -0.025em;
  }
  .service-section .section-head .service-instruction {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    margin: 0;
    max-width: 33ch;
    font-size: 14px;
    line-height: 1.48;
    color: #41637b;
  }
  .service-section .section-head .service-price-link {
    grid-column: 2;
    grid-row: 2;
    min-height: 44px;
    align-self: center;
    padding: 9px 16px;
    white-space: nowrap;
    font-size: 15px;
    border-radius: 13px;
  }
  
  /* Nine treatments: eight equal, calm tiles; ninth spans the row by design.
     The images remain rounded and the entire tile stays the touch target. */
  .service-section .service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
  }
  .service-section .service-grid .service-card {
    box-sizing: border-box;
    width: 100%;
    height: 146px;
    min-height: 0;
    padding: 16px 10px 15px;
    border-radius: 23px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    box-shadow: none;
  }
  .service-section .service-grid .service-card-top {
    box-sizing: border-box;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    min-height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    margin: 0;
  }
  .service-section .service-grid .service-card-top img {
    width: 37px;
    height: 37px;
    max-width: 37px;
    max-height: 37px;
    object-fit: contain;
  }
  .service-section .service-grid .service-card-copy {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    margin: 0;
    display: block;
    text-align: center;
  }
  .service-section .service-grid .service-card h3 {
    font-size: 16px;
    line-height: 1.27;
    font-weight: 700;
    letter-spacing: -0.016em;
    margin: 0;
    overflow-wrap: normal;
    hyphens: auto;
  }
  .service-section .service-grid .service-card-description { display: none !important; }
  .service-section .service-grid .service-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    height: 94px;
    min-height: 0;
    flex-direction: row;
    gap: 18px;
    padding: 12px 20px;
    text-align: left;
  }
  .service-section .service-grid .service-card:last-child:nth-child(odd) .service-card-copy {
    width: auto;
    flex: 0 1 auto;
    text-align: left;
  }
  .service-section .service-grid .service-card:last-child:nth-child(odd) h3 { text-align: left; }
  .service-section .service-grid .service-card:active {
    background: #eaf5fd;
    border-color: #9dc8e4;
    transform: none;
  }
  .service-section .service-foot { padding-top: 20px; }
  .service-section .service-foot p {
    font-size: 14px;
    line-height: 1.6;
    color: #3e5f76;
    max-width: 45ch;
  }
  
  /* Mobile popups: visible header and actions, no cramped margins. */
  .service-dialog { width: calc(100vw - 24px); max-height: min(88dvh, 740px); border-radius: 20px; }
  .service-dialog-inner { padding: 24px 20px; }
  .service-dialog-title-row { gap: 12px; }
  .service-dialog .service-dialog-title-row h2 { font-size: clamp(23px, 5.5vw, 29px); line-height: 1.18; }
  .service-dialog .service-dialog-copy { font-size: 16px; line-height: 1.62; }
  .service-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }
  .service-dialog-actions .button { min-height: 46px; }
  
  /* Price list: reliable two-column alignment, readable amounts, controlled wrap. */
  .prices-section .price-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 39%);
    gap: 12px;
    align-items: start;
    padding: 14px 0;
    font-size: 15px;
  }
  .prices-section .price-row span {
    min-width: 0;
    max-width: none;
    font-size: 15px;
    line-height: 1.48;
    overflow-wrap: break-word;
  }
  .prices-section .price-row strong {
    min-width: 0;
    max-width: none;
    text-align: right;
    justify-self: stretch;
    font-size: 15px;
    line-height: 1.42;
    font-weight: 700;
    overflow-wrap: normal;
  }
  .price-category h2 { line-height: 1.26; }
  .price-intro p,.price-notes p { font-size: 16px; line-height: 1.6; }
  .price-aside nav { margin-bottom: 3px; }
  .price-aside nav a { font-size: 14px; min-height: 44px; }
  
  /* Footer has a clear hierarchy and sufficient space for phone/email addresses. */
  .footer-grid { gap: 26px 17px; }
  .footer-grid h3 { font-size: 16px; }
  .footer-grid a, .footer-grid p { font-size: 15px; }
  .footer-bottom { padding: 18px 0 24px; line-height: 1.55; }
}

@media (max-width: 355px) {
  :root { --gutter: 16px; }
  .service-section .service-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .service-section .service-grid .service-card {
    height: 136px;
    padding: 12px 7px;
    border-radius: 19px;
    gap: 9px;
  }
  .service-section .service-grid .service-card-top { flex-basis: 52px; width: 52px; height: 52px; min-height: 52px; }
  .service-section .service-grid .service-card-top img { width: 34px; height: 34px; max-width: 34px; max-height: 34px; }
  .service-section .service-grid .service-card h3 { font-size: 15px; line-height: 1.26; }
  .service-section .service-grid .service-card:last-child:nth-child(odd) {
    height: 88px; padding: 11px 18px; gap: 14px;
  }
  .service-section .section-head .service-price-link { padding-inline: 12px; font-size: 14px; }
  .service-section .section-head .service-instruction { font-size: 13.5px; }
  .prices-section .price-row { grid-template-columns: minmax(0,1fr) minmax(0,41%); gap: 9px; }
}

@media (min-width: 681px) and (max-width: 950px) {
  /* Tablet: three balanced rows of three, instead of an orphaned last tile. */
  .service-section .service-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
  .service-section .service-grid .service-card {
    min-height: 175px;
    padding: 16px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 13px;
  }
  .service-section .service-grid .service-card-copy { width: 100%; text-align: center; align-items: center; flex: 0 0 auto; }
  .service-section .service-grid .service-card h3 { font-size: 17px; }
}
