/* Fabbro24Ore v4.53 — desktop layout, shared by every page template. */
.phone-label-desktop { display: none; }

@media (min-width: 64rem) {
  :root {
    --content: 108rem;
    --max: 108rem;
    --desktop-gutter: clamp(1.5rem, 3vw, 4rem);
    --desktop-gap: clamp(1.25rem, 2vw, 2rem);
  }

  /* Use the viewport consistently, with a readable upper limit. */
  .container,
  .section-shell,
  .app-header__inner,
  .site-footer__inner,
  .footer-legal,
  .hero-app {
    width: min(calc(100% - var(--desktop-gutter) * 2), var(--content));
  }

  .phone-label-mobile { display: none; }
  .phone-label-desktop { display: inline; white-space: nowrap; }
  a[href^="tel:"] { font-variant-numeric: tabular-nums; }
  :is(.button, .ui-button, .call) {
    max-width: 100%;
    min-width: 0;
    height: auto;
    line-height: 1.3;
    white-space: normal;
    text-align: center;
  }
  :is(.button, .ui-button) > svg { flex-shrink: 0; }
  :is(.button, .ui-button) > span { min-width: 0; }

  /* Grid children must be allowed to shrink before their text wraps. */
  :is(.hero__grid, .section-heading, .section__heading--row,
      .action-mosaic, .services-mosaic, .guides-mosaic, .process-card,
      .coverage-panel, .mosaic, .steps, .decision-grid, .price-grid,
      .coverage-grid, .prepare-grid, .lead-panel, .cta-banner,
      .content-grid, .guide-grid, .related-grid, .brand-grid,
      .info-table, .answer-meta, .answer-card, .answer-card__facts,
      .cost-layout, .faq-layout, .footer-grid, .form-row,
      .brand-mosaic, .case-card, .case-timeline) > * {
    min-width: 0;
  }
  :is(h1, h2, h3, .card, .action-card, .service-tile, .guide-card,
      .step, .fact, .info-table, .answer-meta, .area-card, .related) {
    overflow-wrap: anywhere;
  }
  :is(h1, h2, h3) { line-height: 1.08; }
  :is(.card, .service-tile, .guide-card, .action-card) {
    height: auto;
    max-height: none;
  }
  .eyebrow::before { flex-shrink: 0; }
  .hero__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: clamp(2rem, 4vw, 4.5rem);
  }
  .hero h1 { font-size: clamp(2.625rem, 4.2vw, 5.5rem); }
  .hero__copy .lead, .hero .lead { max-width: 48rem; }
  .hero__grid:has(.hero__visual) { min-height: 0; }
  .hero__visual {
    height: clamp(29rem, 36vw, 39rem);
    min-height: 0;
  }
  .hero__visual .hero__mascot {
    left: 50%;
    right: auto;
    bottom: 0;
    width: 95%;
    height: 95%;
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    object-position: center bottom;
    transform: translateX(-50%);
  }
  .hero__media {
    position: relative;
    min-height: 0;
    height: clamp(22rem, 36vw, 36rem);
  }
  .hero__media > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .hero__media > img[src*="mascotte"] { object-fit: contain; }
  .case-hero .hero__media { height: auto; aspect-ratio: 1200 / 630; }
  .prepare-visual .prepare-visual__mascot {
    left: 50%;
    right: auto;
    bottom: 0;
    width: 92%;
    height: 92%;
    max-width: 92%;
    max-height: 92%;
    object-fit: contain;
    object-position: center bottom;
    transform: translateX(-50%);
  }
  .hero__actions, .cta-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
  }
  .hero__actions > *, .cta-banner__actions > * { max-width: 100%; }
  .section__heading { max-width: 64rem; }
  .section__heading--row {
    max-width: none;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: var(--desktop-gap);
  }
  .section h2 { font-size: clamp(2.1rem, 3.1vw, 3.7rem); }
  .page-toc, .filter-bar, .problem-nav {
    flex-wrap: wrap;
    overflow: visible;
  }
  .page-toc a, .filter-btn, .problem-nav a {
    max-width: 100%;
    white-space: normal;
  }

  /* Home: remove the old 54rem cap plus the extra 36% right padding. */
  .hero-app { min-height: 0; }
  .hero-app__content {
    width: 100%;
    max-width: none;
    min-height: 0;
    padding: clamp(3rem, 5vw, 5.5rem);
  }
  .hero-app h1 {
    max-width: 20ch;
    font-size: clamp(3.25rem, 5vw, 5.5rem);
    line-height: 1.04;
  }
  .hero-app__lead { max-width: 48rem; }
  .hero-app__actions {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: .85rem;
  }
  .quick-problems { max-width: none; }
  .quick-problems__scroll { max-width: 100%; }
  .section-shell { padding-top: clamp(5rem, 6vw, 7.5rem); }
  .section-shell--tight { padding-top: 3.5rem; }
  .section-heading {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: var(--desktop-gap);
  }
  .section-heading h2 {
    max-width: 22ch;
    font-size: clamp(2.625rem, 3.25vw, 3.75rem);
    line-height: 1.08;
  }
  .action-mosaic {
    min-height: 0;
    grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: var(--desktop-gap);
  }
  .action-card {
    min-height: 22rem;
    padding: clamp(1.5rem, 2.2vw, 2.5rem);
    gap: 1.5rem;
  }
  .action-card--emergency { grid-row: auto; }
  .action-card__time strong { line-height: .95; }
  .action-card strong { overflow-wrap: anywhere; }
  .action-card__button { align-self: flex-start; }
  .services-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(15rem, auto);
    gap: var(--desktop-gap);
  }
  .service-tile--wide, .service-tile--tall {
    grid-column: auto;
    grid-row: auto;
    min-height: 15rem;
  }
  .service-tile h3 {
    font-size: clamp(1.625rem, 2vw, 2.25rem);
    line-height: 1.12;
  }
  .service-tile p, .guide-card p { font-size: .95rem; }
  .guides-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--desktop-gap);
  }
  .guides-mosaic .guide-card { min-height: 17rem; }
  .guides-mosaic .guide-card h3 {
    max-width: none;
    font-size: clamp(1.625rem, 2vw, 2.3rem);
    line-height: 1.12;
  }
  .process-card {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: var(--desktop-gap);
  }
  .process-card__heading {
    min-height: 24rem;
    max-height: none;
    padding: clamp(1.5rem, 2.5vw, 3rem);
  }
  .process-card__heading h2 {
    max-width: none;
    font-size: clamp(2rem, 3vw, 3.75rem);
    line-height: 1.12;
  }
  .process-card__heading:not(.is-condensed) :is(.eyebrow, p) {
    max-height: none;
    overflow: visible;
  }
  .process-card__heading.is-condensed {
    min-height: 8rem;
    max-height: none;
    height: auto;
  }
  .process-card__heading.is-condensed .process-title-line {
    white-space: normal;
  }
  .process-card__heading.is-condensed h2 {
    font-size: clamp(1.35rem, 1.8vw, 2rem);
    line-height: 1.15;
  }
  .coverage-panel {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: var(--desktop-gap);
  }
  .coverage-panel__copy h2 { max-width: 20ch; line-height: 1.08; }
  .brand-scroll {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
    overflow: visible;
    scroll-snap-type: none;
  }
  .brand-tile { min-width: 0; }

  /* Local pages: four narrow step columns were clipping their copy. */
  .answer-card {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: var(--desktop-gap);
  }
  .answer-card__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps:has(.step__badge) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps .step:has(.step__badge) {
    grid-template-columns: 3.4rem minmax(0, 1fr) !important;
  }
  .step h3 { line-height: 1.2; }
  .price-grid:has(.price-intro) {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  }
  .price-intro h2 { font-size: clamp(2rem, 2.5vw, 3rem); }
  .price-table-wrap { min-width: 0; }
  .price-table { min-width: 0; table-layout: fixed; }
  .price-table th, .price-table td { overflow-wrap: anywhere; }
  .coverage-grid, .prepare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--desktop-gap);
  }
  .lead-panel {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: var(--desktop-gap);
  }
  .cta-banner {
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    gap: var(--desktop-gap);
  }
  .cta-banner__actions { justify-content: flex-end; }
  .service-card h3 { max-width: none; line-height: 1.15; }
  .service-card--image .service-card__content { max-width: 60%; }
  .service-card--image img { width: 38%; right: 0; bottom: 0; }

  /* Fixed mosaic rows must grow with brand descriptions. */
  .brand-mosaic { grid-auto-rows: minmax(4.15rem, auto); }
  .brand-mosaic .brand-card { min-height: 15rem; }
  .brand-mosaic .brand-card--square { min-height: 30rem; }

  /* Align the footer with the same gutters, without a 100vw overflow. */
  .footer-disclosure {
    width: min(calc(100% - var(--desktop-gutter) * 2), var(--content));
    max-width: none;
    margin-inline: auto;
    padding-inline: 0;
  }
  .site-footer__inner .footer-disclosure {
    width: 100%;
    margin-inline: 0;
    padding-inline: 0;
  }
}

@media (min-width: 64rem) and (max-width: 79.99rem) {
  .action-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-card--emergency { grid-row: span 2; }
  .action-card { min-height: 15rem; }
  .services-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-scroll { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mosaic .service-card { grid-column: auto; grid-row: auto; }
  .mosaic .service-card--image .service-card__content { max-width: none; }
  .mosaic .service-card--image { padding-bottom: 14rem; }
  .mosaic .service-card--image img { width: 12rem; max-height: 13rem; object-fit: contain; }
  .mosaic .service-card--primary { min-height: 0; }
}
