/* Adattamento di tutte le pagine: stessa struttura, dimensioni fluide. */
:root { scroll-padding-top: 88px; }
*, *::before, *::after { box-sizing: border-box; }
.music-thesis-inner > *, .h-grid > *, .social-sales-grid > *,
.pr-inner > *, .bio-unified > *, .music-hero > * { min-width: 0; }
.footer-links, .contact-links { flex-wrap: wrap; justify-content: center; }
.form-expanded.show { max-height: none !important; }
.social-acc-item.active .social-acc-panel { max-height: none; }
/* Clip only the animated scene, without changing its sticky scrolling. */
.approach-editorial { overflow-x: clip; }
.approach-fusion-demo { width: 100%; margin-inline: 0; }
/* Minimum columns previously overflowed intermediate desktop/tablet widths. */
@media (min-width: 769px) {
  .music-thesis-section .music-thesis-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 80px);
  }
  body .music-format-board.music-record-stack .music-record-card:nth-of-type(n) h3 {
    font-size: clamp(28px, 3.1vw, 46px) !important;
  }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .music-thesis-section .music-thesis-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .music-thesis-section .music-thesis-copy { order: 0; align-items: center; text-align: center; }
  .music-thesis-section .music-thesis-copy h2,
  .music-thesis-section .music-thesis-copy p,
  .music-thesis-section .music-thesis-copy .section-label { margin-inline: auto; text-align: center; align-self: center; }
  .music-thesis-section .music-format-board { order: 1; min-height: 480px; }
  .music-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
/* Keep the player and its close button inside both portrait and landscape screens. */
body .lightbox { padding: 64px 16px 20px; }
body .lightbox-inner { width: 100% !important; max-width: min(960px, calc((100svh - 200px) * 16 / 9)) !important; }
body .lightbox-inner.vertical { max-width: min(380px, calc((100svh - 200px) * 9 / 16)) !important; }
.lightbox-caption { max-height: 96px; overflow-y: auto; }
.lightbox-close { min-width: 44px; min-height: 44px; top: -52px; }
@media (max-width: 768px) {
  .nav-links { visibility: hidden; }
  .nav-bar.menu-open .nav-links { visibility: visible; max-height: calc(100svh - 88px); overflow-y: auto; }
  .nav-toggle { min-width: 44px; min-height: 44px; flex-shrink: 0; }
  .nav-logo { min-width: 0; }
  .hero-actions { width: 100%; max-width: 390px; flex-direction: row; flex-wrap: nowrap; gap: 8px; margin-top: 14px; }
  .hero-actions .hero-contact-btn { flex: 1 1 0; min-width: 0; width: auto; min-height: 38px; padding: 8px; font-size: clamp(9px, 2.45vw, 10px); line-height: 1.25; letter-spacing: .2px; white-space: normal; }
  .hero-actions .hero-contact-btn:last-child { flex-grow: 1.25; }
  .hero-type { padding-inline: 20px; }
  body .problem-card-title .nowrap,
  body .approach-editorial-head .section-title span,
  body .bento-title, body .problem-h1, body .problem-h2,
  body .cat-section .section-title, body .pr-title, body .pr-title span,
  body .bio-section .section-title,
  body .music-thesis-copy h2 .music-title-mobile,
  body .music-thesis-copy h2 .music-title-mobile > span,
  body .music-series-section-quiet .music-series-head h2,
  body .music-series-section-quiet .music-series-head h2 span,
  body .drone-perspective-title, body .drone-perspective-title span, body .drone-portfolio-title, body .drone-portfolio-title span,
  body .horizontal-hero .horizontal-copy h1,
  body .horizontal-hero .horizontal-copy h1 span,
  body .event-point-section .h-title.event-point-title, body .event-point-section .h-title.event-point-title span,
  body #portfolio-eventi .h-title, body #portfolio-eventi .h-title span {
    white-space: normal !important; text-wrap: balance !important; max-width: 100%;
  }
  body .music-thesis-section .music-thesis-inner { grid-template-columns: minmax(0, 1fr); }
  body .music-format-board.music-record-stack .music-record-card:nth-of-type(n) h3 { font-size: clamp(28px, 8.5vw, 40px) !important; }
  body.horizontal-video-page .horizontal-hero { height: auto !important; min-height: 440px !important; max-height: none !important; padding-top: 110px !important; padding-bottom: 48px !important; }
  body .horizontal-hero .horizontal-copy h1 { line-height: 1.03 !important; }
  .ev-tile .ev-meta { left: 12px; right: 12px; bottom: 12px; }
  .ev-tile .ev-meta h3 { font-size: clamp(16px, 4.5vw, 24px); overflow-wrap: anywhere; }
  .social-acc-trigger { min-width: 0; }
  .social-acc-title { overflow-wrap: anywhere; }
  .form-bar-text { min-width: 0; }
  .form-bar { gap: 12px; }
  .form-bar-icon { flex-shrink: 0; }
  .form-expanded input, .form-expanded textarea, .form-expanded select { min-width: 0; max-width: 100%; font-size: 16px !important; }
  .footer { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important; }
}
@media (max-width: 360px) {
  .cat-grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); }
  .cat-card .cat-name { font-size: 21px; }
  .problem-card-title { font-size: 26px; line-height: 1.05; }
}
/* Short landscape screens need natural section heights, without text being cropped. */
@media (max-height: 600px) and (max-width: 1100px) {
  .hero { min-height: 520px; }
  .problem-panel { position: relative; top: auto; min-height: auto; }
  .approach-fusion-stage { min-height: 560px; }
}

@media (min-width: 981px) and (max-width: 1100px) {
  .social-hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  .social-hero-copy h1 { font-size: clamp(42px, 5.5vw, 60px) !important; }
}

@media (min-width: 1101px) {
  .social-hero-copy h1 { font-size: clamp(52px, 7vw, 104px); }
}
@media (max-width: 768px) {
  body:has(.form-expanded.show) .whatsapp-float { visibility: hidden; pointer-events: none; }
}
@media (max-height: 600px) and (min-width: 769px) and (max-width: 1100px) {
  .approach-fusion-demo { height: auto; }
  .approach-fusion-stage { position: relative; top: auto; height: auto; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .approach-fusion-card { position: relative; top: auto; left: auto; width: 100%; height: auto; min-height: 400px; padding: 28px; transform: none !important; opacity: 1 !important; filter: none !important; }
  .approach-fusion-card h3 { font-size: 36px; }
  .approach-fusion-result { display: none; }
}
