/* =====================================================
   RESPONSIVE SYSTEM – non tocca il desktop
   vale solo sotto i breakpoint
===================================================== */

/* --------------------------
   FONT FLUIDI (globali)
-------------------------- */

.hero h1 {
  font-size: var(--fs-h1);
}

.main-title {
  font-size: var(--fs-h1);
}

.sub-title {
  font-size: var(--fs-h2);
}

.feature-band .card h3 {
  font-size: var(--fs-h3);
}

/* =====================================================
   TABLET ≤ 1024px
===================================================== */

@media (max-width: 1024px) {
  /* HERO */
  .hero {
    margin-bottom: 0;
  }

  /* FEATURE BAND */
  .feature-band {
    padding: var(--site-section-gap) 0 var(--site-section-gap-compact);
    margin-bottom: 0;
  }

  .feature-band .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .feature-band .card-band {
    min-height: 100%;
  }


  /* HISTORY */
  .leone-history .history-row {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .leone-history .row-bottom {
    flex-direction: column-reverse;
  }

  .leone-history .history-text-col,
  .leone-history .history-img-col {
    width: 100%;
  }

  .leone-history .content-wrapper {
    padding: 40px 24px;
  }

  .leone-history .history-img-col :is(img, video) {
    height: 320px;
  }

  .home-final-cta__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .home-final-cta__visual {
    min-height: 320px;
    height: 320px;
  }

  .home-final-cta__content {
    padding: 0;
  }

  /* GALLERY */
  .gallery .gallery-top {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .gallery .gallery-controls {
    position: static;
    transform: none;
    justify-content: flex-start;
  }

  .form-panel, .form-panel-1{
    padding: 0;
    margin: 0;
  }


}

/* =====================================================
   MOBILE ≤ 768px
===================================================== */

@media (max-width: 768px) {
  section.hero {
    padding: 0;
  }

  .feature-band {
    padding: var(--site-section-gap) 0 var(--site-section-gap-compact);
  }

  .feature-band__header {
    margin-bottom: 24px;
  }

  .feature-band__title {
    font-size: clamp(1.95rem, 8vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: 0;
  }

  .feature-band .cards {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0;
  }

  .feature-band .card-band {
    padding: 1.25rem;
    flex: 1 1 100%;
  }

  .feature-band .card-icon {
    height: 150px;
    margin-bottom: 18px;
  }

  .feature-band .card-title {
    font-size: 1.45rem;
    margin-bottom: 0.7rem;
  }

  .feature-band .card-desc {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .feature-band .card-band .card-link {
    padding-top: 1rem;
  }

  .hero-slider .hero-copy {
    max-width: 100%;
    margin-block: 0;
    padding-top: 80px;
  }

  .hero-slider .hero-title {
    font-size: var(--fs-h1);
  }

  .hero-slider .hero-subtitle {
    max-width: 100%;
  }

  .hero h1 {
    line-height: var(--lh-h1);
    text-align: left;
  }

  .hero .hero-content h1,
  .quality-hero h1,
  .instructions-hero h1,
  .mad-lab-hero h1 {
    max-width: min(100%, 10ch);
    font-size: var(--fs-h1);
  }

  .hero .hero-content :is(p, .lead, .contact-hero-lead),
  .quality-hero p,
  .instructions-hero p,
  .mad-lab-hero p {
    width: min(100%, 31ch);
    max-width: 31ch;
  }

  /* HISTORY */
  .leone-history {
    margin-bottom: 0;
  }

  .leone-history .content-wrapper {
    padding: 24px 16px;
  }

  .home-final-cta__content {
    padding: 0;
  }

  .home-final-cta__visual {
    min-height: 260px;
    height: 260px;
  }

  .home-final-cta .section-title,
  .home-final-cta .section-desc {
    max-width: 100%;
  }

  .main-title {
    width: 100%;
  }

  .description {
    max-width: 100%;
  }

  /* GALLERY */
  .gallery {
    margin-bottom: 0;
  }

  .gallery .swiper {
    height: 420px;
  }

  .slide-content {
    padding: 1.25rem;
  }

  .slide-content h3 {
    max-width: 20ch;
    font-size: 1.2rem;
  }

  .btn-slide {
    padding: 0;
  }

  .form-panel, .form-panel-1, .consenso-block, .custom-select{
    padding: 0;
    margin: 0;
    width: 100%;
  }

    .form-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-auto-flow: row !important;
  }

  .form-grid > * {
    grid-column: 1 / -1 !important;   /* forza ogni item a occupare tutta la riga */
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    position: static !important;
  }

    .form-field {
    position: relative;
    display: flex;
    flex-direction: column;
  }

  .form-field > input:not([type="radio"]):not([type="checkbox"]) + label,
  .form-field > select + label,
  .form-field > .radio-input-container + label {
    position: static !important;
    transform: none !important;
    order: -1;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #214ecd;
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    padding-top: 12px !important;
    height: auto !important;
  }


  .contact-cards {
    flex-direction: column;
    gap: 24px;
    padding: 0 16px;
  }

  .contact-card {
    flex: 1 1 100%;
  }

  .contact-card .card-image {
    height: 320px;
  }

  .contact-card h3 {
    font-size: 1.5rem;
    top: 22%;
  }


}

/* =====================================================
   SMALL MOBILE ≤ 480px
===================================================== */

@media (max-width: 480px) {

  .container {
    padding: 0 14px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .feature-band__title {
    font-size: 1.7rem;
  }

  .feature-band .card-icon {
    height: 150px;
  }

  .feature-band .card-title {
    font-size: 1.25rem;
  }

  .btn,
  .btn-slide {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .gallery .btn-slide {
    width: fit-content;
    min-height: 48px;
    padding: 12px 0;
    align-items: center;
  }

  .gallery .swiper {
    height: 360px;
  }

  .gallery .slide-content {
    padding: 1rem;
  }

  .gallery .slide-content h3 {
    font-size: 1.05rem;
    max-width: 18ch;
  }

}

@media (max-width: 768px) {
  #breadcrumb {
    margin-top: 72px;
    padding-inline: 16px;
  }

  #breadcrumb nav {
    padding-block: 12px;
  }

  #breadcrumb .breadcrumb-list {
    row-gap: 5px;
  }

  #breadcrumb .breadcrumb-list li {
    font-size: 0.75rem;
  }

  #breadcrumb .breadcrumb-list li::after {
    margin-inline: 7px;
  }

  #breadcrumb[hidden] {
    display: none !important;
  }
}

/* =====================================================
   MOBILE EXPERIENCE
   Shared final overrides for touch-first layouts.
===================================================== */
@media (max-width: 768px) {
  :root {
    --container: 100%;
    --page-gutter: 16px;
    --header-height: 72px;
  }

  html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + 12px);
    scrollbar-gutter: auto;
  }

  body {
    min-width: 0;
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    -webkit-tap-highlight-color: transparent;
  }

  a,
  button,
  input,
  select,
  textarea {
    touch-action: manipulation;
  }

  .container,
  .standard-container {
    width: 100%;
    max-width: none;
    padding-inline: var(--page-gutter);
  }

  main {
    width: 100%;
    overflow: clip;
  }

  h1,
  .hero h1,
  .main-title {
    font-size: var(--fs-h1);
    line-height: var(--lh-h1);
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  h2,
  .section-title,
  .section-title-cards,
  .sub-title {
    font-size: var(--fs-h2);
    line-height: var(--lh-h2);
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  h3 {
    font-size: var(--fs-h3);
    line-height: var(--lh-h3);
  }

  p,
  .description,
  .section-desc {
    line-height: 1.6;
  }

  .hero {
    margin-bottom: 0;
  }

  .hero-content,
  .hero-slider .hero-slide-inner,
  .hero-slider .hero-copy {
    width: 100%;
    max-width: none;
    padding-inline: var(--page-gutter);
  }

  .hero-slider .hero-copy {
    padding-top: 40px;
  }

  .hero p,
  .hero-slider .hero-subtitle {
    line-height: 1.55;
    max-width: 36ch;
  }

  .hero-ctas,
  .catalogo-download-band__actions,
  .contact-form__footer {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .btn,
  .hero-cta,
  button:not(.swiper-button-prev):not(.swiper-button-next),
  input[type="submit"] {
    min-height: 44px;
  }

  .hero-ctas .hero-cta,
  .catalogo-download-band__actions .btn,
  .contact-form__footer .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .feature-band .cards,
  .info-panels,
  .cards-grid-2,
  .contact-cards,
  .prod-grid,
  .product-grid,
  .quality-resource-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .info-panel,
  .notice-panel,
  .contact-panel,
  .product-card,
  .prod-card {
    min-width: 0;
  }

  .history-row,
  .leone-history .history-row {
    gap: 0;
  }

  .leone-history .content-wrapper,
  .leone-history .content-wrapper-1,
  .history-text-col .content-wrapper {
    padding: 2rem 0;
  }

  .leone-history .history-img-col :is(img, video),
  .leone-history .history-section-video,
  .history-img-col img,
  .history-img-col video {
    width: 100%;
    height: auto;
    min-height: 260px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  /* Video della storia (16:9) intero su telefono: nel riquadro 4:3 con «cover» si tagliavano i lati (23/10/2026) */
  .leone-history .history-img-col video.history-section-video,
  .history-img-col video {
    aspect-ratio: 16 / 9;
    min-height: 0;
    object-fit: contain;
  }

  input,
  select,
  textarea,
  .custom-select__control,
  .search-input {
    width: 100%;
    min-height: 48px;
    font-size: var(--fs-body);
  }

  textarea {
    min-height: 132px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    min-width: 20px;
    width: 20px;
    min-height: 20px;
    height: 20px;
    flex: 0 0 20px;
  }

  .checkbox-container,
  .radio-option,
  .form-label-inline {
    min-height: 44px;
    align-items: center;
  }

  .form-row,
  .form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
  }

  .form-panel,
  .form-panel-1,
  .contact-panel,
  .consenso-block {
    width: 100%;
    padding-inline: 0;
  }

  .section-newslist > .custom-select,
  .section-newslist > .select-material,
  .select-material,
  .custom-select {
    width: 100%;
    margin-left: 0;
  }

  .video-modal,
  .ts-modal {
    padding: 12px;
    align-items: center;
  }

  .video-modal-content,
  .ts-modal-content {
    width: 100%;
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }

  #breadcrumb {
    margin-top: var(--header-height);
    padding-inline: var(--page-gutter);
    overflow: hidden;
  }

  #breadcrumb nav {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  #breadcrumb nav::-webkit-scrollbar {
    display: none;
  }

  #breadcrumb .breadcrumb-list {
    width: max-content;
    min-width: 100%;
    flex-wrap: nowrap;
  }

  #breadcrumb .breadcrumb-list li {
    white-space: nowrap;
  }

  table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .tabs,
  .tab-list,
  .product-subnav__inner,
  .catalog-filters {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .tabs::-webkit-scrollbar,
  .tab-list::-webkit-scrollbar,
  .product-subnav__inner::-webkit-scrollbar,
  .catalog-filters::-webkit-scrollbar {
    display: none;
  }

  footer,
  #footer-include {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (max-width: 380px) {
  :root {
    --page-gutter: 14px;
  }

  h1,
  .hero h1,
  .main-title {
    font-size: var(--fs-h1);
  }

  h2,
  .section-title,
  .section-title-cards,
  .sub-title {
    font-size: var(--fs-h2);
  }
}

@media (hover: none) and (pointer: coarse) {
  .card:hover,
  .prod-card:hover,
  .product-card:hover,
  .video-card:hover,
  .video-hub-card:hover,
  .group-card:hover,
  .home-product-card:hover {
    transform: none;
  }
}
