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

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

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
}

.main-title {
  font-size: clamp(2rem, 5vw, 3rem);
}

.sub-title {
  font-size: clamp(2rem, 3vw, 2rem);
}

.feature-band .card h3 {
  font-size: clamp(1.15rem, 2.5vw, 2.5rem);
}

.bento-title {
  font-size: clamp(1.4rem, 4vw, 2rem);
}

p {
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
}

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

@media (max-width: 1024px) {

  /* HERO */
  .hero {
    margin-bottom: 100px;
  }

  .home-page .hero.hero-slider {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    margin-bottom: 72px;
    overflow: hidden;
  }

  .home-page > .animate:first-of-type {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .home-page .hero-slider .hero-layout {
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: block;
  }

  .home-page .hero-slider .hero-text {
    position: relative;
    z-index: 2;
    height: 100%;
  }

  .home-page .hero-slider .hero-media-area {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    z-index: 0;
  }

  .home-page .hero-slider .hero-media-area::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.82) 42%, rgba(255, 255, 255, 0.34) 72%, rgba(255, 255, 255, 0.18) 100%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.36) 48%, rgba(255, 255, 255, 0.72) 100%);
  }

  .home-page .hero-slider .hero-slide-inner {
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
    box-sizing: border-box;
    padding-top: clamp(112px, 14vw, 148px);
    padding-bottom: 64px;
  }

  .home-page .hero-slider .hero-copy {
    max-width: 760px;
    margin: 0;
  }

  .home-page .hero-slider .hero-title {
    font-size: clamp(3rem, 8vw, 4.6rem);
    line-height: 1.02;
    text-wrap: balance;
  }

  .home-page .hero-slider .hero-subtitle {
    max-width: 560px;
    margin-top: 22px;
  }

  .home-page .hero-slider .hero-media-slide {
    height: 100%;
    min-height: 100%;
    padding: 0;
  }

  .home-page .hero-slider .hero-media-slide img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
  }

  .home-page .hero-slider .hero-media-slide--software img {
    width: 100%;
    height: 100%;
    margin: 0;
    padding-right: 0;
    object-fit: cover;
    object-position: center;
  }

  /* FEATURE BAND */
  .feature-band .cards {
    gap: 40px;
    flex-wrap: wrap;
  }

  .feature-band .card {
    flex: 0 0 48%;
  }

  /* ABOUT VALUES */
  .about-values-feature-grid,
  .about-values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .leone-history .history-row-media-left {
    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 img {
    height: 320px;
  }

  .leone-history .history-video-embed {
    height: 320px;
  }

  /* BENTO GRID */
  .press-grid{
    grid-template-columns: 1fr;
  }
  .bento-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .bento-right-col {
    grid-template-columns: 1fr;
  }

  .bento-item {
    min-height: 260px;
  }

  /* 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;
  }

      #breadcrumb {
    display: none !important;
  }


}

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

@media (max-width: 768px) {

  section {
    padding: 60px 0;
  }

  section.hero {
    padding: 0;
  }

  /* HERO */
  .hero {
    height: 70vh;
  }

  .home-page .hero.hero-slider {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    margin-bottom: 56px;
    overflow: hidden;
  }

  .home-page .hero-slider .hero-layout {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .home-page .hero-slider .hero-media-area::after {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.66) 44%, rgba(255, 255, 255, 0.18) 100%),
      linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.54) 58%, rgba(255, 255, 255, 0.12) 100%);
  }

  .home-page .hero-slider .hero-slide-inner {
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
    box-sizing: border-box;
    padding-top: 96px;
    padding-bottom: 72px;
  }

  .home-page .hero-slider .hero-title {
    font-size: clamp(2.35rem, 10.5vw, 3.25rem);
    line-height: 1.04;
    text-align: left;
  }

  .home-page .hero-slider .hero-title-line {
    display: block;
  }

  .home-page .hero-slider .hero-subtitle {
    margin-top: 18px;
    font-size: 1rem;
    line-height: 1.45;
  }

  .home-page .hero-slider .hero-ctas {
    margin-top: 24px;
  }

  .home-page .hero-slider .hero-media-slide {
    padding: 0;
  }

  .home-page .hero-slider .hero-media-slide img {
    max-height: none;
    object-position: center;
  }

  .hero h1 {
    line-height: 1.1;
    text-align: left;
  }

  .scroll-indicator {
    display: none;
  }

  /* FEATURE BAND */
  .feature-band {
    padding: 60px 0;
    margin-bottom: 120px;
  }

  .feature-band .cards {
    flex-direction: column;
    gap: 32px;
    padding: 0 16px;
  }

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

  /* ABOUT VALUES */
  .about-values {
    padding: 64px 0 76px;
  }

  .about-values-feature-grid,
  .about-values-grid {
    grid-template-columns: 1fr;
  }

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

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

  .main-title {
    width: 100%;
  }

  .description {
    max-width: 100%;
  }

  .leone-history .history-video-embed {
    height: 280px;
  }

  /* BENTO */
  .bento-item {
    min-height: 220px;
  }

  .bento-content {
    padding: 16px;
  }

  /* CALLOUT */
  .callout {
    padding: 40px 0;
    text-align: center;
  }

  .callout .btn {
    margin-top: 20px;
  }

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

  .gallery .swiper {
    height: 420px;
  }

  .slide-content {
    padding: 20px;
  }

  .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 label {
    position: static !important;
    transform: none !important;
    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;
  }


    #breadcrumb {
    display: none !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;
  }

  .home-page .hero-slider .hero-slide-inner {
    padding-top: 88px;
    padding-bottom: 64px;
  }

  .home-page .hero-slider .hero-title {
    font-size: clamp(2rem, 12vw, 2.7rem);
    line-height: 1.05;
  }

  .home-page .hero-slider .hero-subtitle {
    font-size: 0.96rem;
  }

  .home-page .hero-slider .hero-ctas {
    gap: 12px;
  }

  .home-page .hero-slider .hero-cta {
    min-height: 42px;
  }

  .home-page .hero-slider .hero-media-slide img {
    max-height: none;
  }

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

  .bento-title {
    font-size: 1.2rem;
  }

  .gallery .swiper {
    height: 360px;
  }

  .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 label {
    position: static !important;
    transform: none !important;
    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;
  }

  #breadcrumb {
    display: none !important;
  }


}

/* Editorial media/text sections: preserve readable proportions on smaller screens. */
@media (max-width: 1024px) {
  .leone-history .history-row {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 5vw, 2.5rem);
  }

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

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

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

@media (max-width: 768px) {
  .leone-history .history-img-col :is(img, video),
  .leone-history .history-video-embed {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) and (max-height: 760px) {
  .home-page .hero-slider .hero-slide-inner {
    padding-top: 78px;
    padding-bottom: 44px;
  }

  .home-page .hero-slider .hero-title {
    font-size: clamp(2rem, 10vw, 2.45rem);
  }

  .home-page .hero-slider .hero-subtitle {
    margin-top: 14px;
    font-size: 0.92rem;
  }

  .home-page .hero-slider .hero-ctas {
    margin-top: 18px;
  }
}

/* Consistent media sizing for all editorial image/text splits. */
.contact-hero__inner {
  grid-template-columns: minmax(300px, 13fr) minmax(300px, 7fr);
  gap: clamp(1rem, 2vw, 2rem);
}

.contact-hero__media,
.contact-hero__media img {
  min-height: 0;
  height: clamp(350px, 30vw, 430px);
}

.quality-resource-layout {
  grid-template-columns: minmax(0, 13fr) minmax(300px, 7fr);
  gap: clamp(1rem, 2vw, 2rem);
}

.quality-resource-media,
.quality-resource-media img {
  min-height: 0;
  height: clamp(320px, 30vw, 430px);
}

@media (max-width: 1024px) {
  .contact-hero__inner,
  .quality-resource-layout {
    grid-template-columns: 1fr;
  }

  .contact-hero__media,
  .contact-hero__media img,
  .quality-resource-media,
  .quality-resource-media img {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}
