/* ==================================================
   RESPONSIVE
   Breakpoint coerenti con Bootstrap 5

   XL / navbar collapsed : < 1200px
   Tablet               : < 992px
   Mobile               : < 768px
   Small mobile         : < 576px
================================================== */


/* ==================================================
   DESKTOP COMPATTO / LARGE TABLET
   0 - 1199.98px
================================================== */

@media (max-width: 1199.98px) {

    :root {
        --section-padding: 100px;
        --navbar-offset: 82px;
    }

    html {
        font-size: 15px;
    }


    /* --------------------------------------------------
       NAVBAR
    -------------------------------------------------- */
    .navbar {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    .navbar-logo {
        width: 110px;
    }
    .navbar.scrolled .navbar-logo {
        width: 62px;
    }
    .navbar-toggler {
        padding: 0.35rem;
    }
    .navbar-toggler-icon {
        transition: filter 0.25s ease;
    }
    .navbar.scrolled .navbar-toggler-icon {
        filter: none;
    }
    .navbar-collapse {
        margin-top: 14px;
        padding: 18px 22px;
        background-color: #ffffff;
        border-radius: 16px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
    }
    .navbar-nav {
        width: 100%;
    }
    .nav-item {
        width: 100%;
        padding: 0.65rem 0;
    }
    .nav-link {
        color: var(--primary-color) !important;
        font-size: 16px;
        line-height: 1.2;
    }
    ul.dropdown-menu {
        margin-top: 10px;
    }


    /* --------------------------------------------------
       HERO
    -------------------------------------------------- */
    .home-hero {
        min-height: 780px;
    }
    .home-hero__content {
        max-width: 590px;
    }


    /* --------------------------------------------------
       CHI SIAMO
    -------------------------------------------------- */
    .chisiamo-grid {
        gap: 1.5rem;
    }
    .text-chisiamo-item {
        min-height: 68px;
        padding: 14px 18px;
        font-size: 14px;
    }
    .chisiamo-line {
        width: 1.5rem;
    }


    /* --------------------------------------------------
       FONDATORI
    -------------------------------------------------- */
    .fondatori-grid {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(300px, 1.1fr)
            minmax(0, 1fr);
        gap: 35px;
    }
    .fondatore-logo {
        max-width: 160px;
    }


    /* --------------------------------------------------
       CONTATTI
    -------------------------------------------------- */
    .bg-section-contact {
        width: calc(100% - 48px);
        padding: 70px 48px;
    }

}


/* ==================================================
   TABLET
   0 - 991.98px
================================================== */

@media (max-width: 991.98px) {

    :root {
        --section-padding: 80px;
        --navbar-offset: 78px;
    }


    /* --------------------------------------------------
       TYPOGRAPHY
    -------------------------------------------------- */
    .title-section {
        font-size: clamp(38px, 5.5vw, 46px);
    }
    .subtitle-section {
        font-size: 24px;
    }
    .text-md {
        font-size: 26px;
    }


    /* --------------------------------------------------
       HERO
    -------------------------------------------------- */
    .home-hero {
        min-height: 720px;
        background-position: 62% bottom;
    }
    .home-hero .container-fluid {
        padding-left: 32px !important;
        padding-right: 32px !important;
    }
    .home-hero__content {
        max-width: 560px;
    }
    .home-hero__title {
        font-size: 48px;
    }


    /* --------------------------------------------------
       CHI SIAMO
    -------------------------------------------------- */
    .chisiamo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        margin-top: 2.5rem;
    }
    .text-chisiamo-item {
        min-height: 72px;
        font-size: 15px;
    }
    .chisiamo-line {
        display: none;
    }


    /* --------------------------------------------------
       FONDATORI
    -------------------------------------------------- */
    .fondatori-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 44px;
    }
    .fondatori-center {
        grid-column: 1 / -1;
        grid-row: 1;
    }
    .fondatori-column--left {
        grid-column: 1;
    }
    .fondatori-column--right {
        grid-column: 2;
    }
    .fondatori-symbol {
        width: min(100%, 350px);
    }
    .fondatore-item--baccini {
        max-width: 560px;
        margin-top: 45px;
        margin-bottom: 15px;
    }


    /* --------------------------------------------------
       MISSION
    -------------------------------------------------- */
    #mission .col-md-5,
    #mission .col-md-6 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
    #mission .col-md-6 {
        margin-top: 42px;
    }
    #mission .col-md-6 img {
        display: block;
        width: 100%;
    }


    /* --------------------------------------------------
       PROGETTI
    -------------------------------------------------- */
    #progetti [data-scale-group] > .col-md-4 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    #progetti .box-white {
        min-height: 0;
    }


    /* --------------------------------------------------
       CONTATTI
    -------------------------------------------------- */
    #contatti .col-md-5,
    #contatti .col-md-6 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
    #contatti .col-md-6 {
        margin-top: 48px;
    }
    .bg-section-contact {
        width: calc(100% - 40px);
        padding: 64px 40px;
    }
    .contact-form-title {
        font-size: 21px;
        line-height: 1.2;
    }
}


/* ==================================================
   MOBILE
   0 - 767.98px
================================================== */

@media (max-width: 767.98px) {
    :root {
        --section-padding: 64px;
        --navbar-offset: 70px;
    }
    html {
        font-size: 17px;
    }
    body {
        line-height: 1.55;
    }


    /* --------------------------------------------------
       TYPOGRAPHY
    -------------------------------------------------- */
    h1 {
        font-size: 3rem;
    }
    h2 {
        font-size: 2.5rem;
    }
    .text-xl {
        font-size: 2.3rem;
    }
    .text-lg {
        font-size: 1.9rem;
    }
    .text-md {
        font-size: 23px;
        line-height: 1.25;
    }
    .title-section {
        font-size: clamp(34px, 10vw, 40px);
        line-height: 1.05;
    }
    .subtitle-section {
        font-size: 21px;
    }


    /* --------------------------------------------------
       NAVBAR
    -------------------------------------------------- */
    .navbar {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    .navbar .container-fluid {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    .navbar-logo {
        width: 95px;
    }
    .navbar.scrolled {
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
    }

    .navbar.scrolled .navbar-logo {
        width: 58px;
    }
    .navbar-collapse {
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        margin-top: 10px;
        padding: 16px 20px;
        border-radius: 14px;
    }
    .nav-item {
        padding: 0.7rem 0;
    }


    /* --------------------------------------------------
       HERO
    -------------------------------------------------- */
    .home-hero {
        min-height: 100svh;
        padding-top: 100px;
        padding-bottom: 64px;
        border-radius: 0 0 32px 32px;
        background-position: 64% center;
    }
    .home-hero .container-fluid {
        padding-left: 22px !important;
        padding-right: 22px !important;
    }
    .home-hero__content {
        max-width: 100%;
    }
    .home-hero__title {
        margin-bottom: 24px;
        font-size: clamp(38px, 11vw, 46px);
        line-height: 1.02;
    }
    .home-hero__text {
        max-width: 470px;
        font-size: 15px;
        line-height: 1.5;
    }


    /* --------------------------------------------------
       CHI SIAMO
    -------------------------------------------------- */
    #chi-siamo .row.pb-4 {
        padding-bottom: 0 !important;
    }
    .chisiamo-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 2rem !important;
    }
    .chisiamo-item {
        width: 100%;
    }
    .text-chisiamo-item {
        min-height: 64px;
        padding: 13px 20px;
        font-size: 14px;
    }


    /* --------------------------------------------------
       FONDATORI
    -------------------------------------------------- */
    .fondatori-section {
        padding-top: 64px;
        padding-bottom: 64px;
    }
    .fondatori-section > .container-fluid {
        margin-top: 28px !important;
        padding-top: 0 !important;
        padding-left: 22px !important;
        padding-right: 22px !important;
    }
    .fondatori-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .fondatori-center {
        order: 1;
        width: 100%;
        margin-bottom: 0;
    }
    .fondatori-column--left {
        order: 2;
        width: 100%;
    }
    .fondatori-column--right {
        order: 3;
        width: 100%;
    }
    .fondatori-column {
        padding-top: 0;
    }
    .fondatore-item {
        width: 100%;
        padding: 28px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    }
    .fondatori-divider {
        display: none;
    }

    .fondatore-logo {
        max-width: 155px;
        height: 34px;
        margin-bottom: 14px;
    }

    .fondatori-symbol {
        width: min(78vw, 310px);
    }
    .fondatore-item--baccini {
        width: 100%;
        max-width: none;
        margin-top: 36px;
        margin-bottom: 0;
        padding-top: 28px;
        padding-bottom: 28px;
        align-items: flex-start;
        text-align: left;
    }
    .fondatore-item--baccini .fondatore-logo {
        margin-left: 0;
        margin-right: 0;
    }
    .fondatore-item--baccini p {
        text-align: left;
    }
    .fondatori-column--right .fondatore-item:last-child {
        border-bottom: 0;
    }


    /* --------------------------------------------------
       MISSION
    -------------------------------------------------- */
    #mission .mb-5 {
        margin-bottom: 2rem !important;
    }
    #mission .title-section.pb-5 {
        padding-bottom: 2rem !important;
    }
    #mission .col-md-6 {
        margin-top: 32px;
    }


    /* --------------------------------------------------
       PROGETTI
    -------------------------------------------------- */
    #progetti .row.mt-5 {
        margin-top: 2rem !important;
    }
    .box-white {
        padding: 24px;
        border-radius: 20px;
    }
    .icon-box img {
        height: 48px;
    }
    .title-box {
        font-size: 22px;
        line-height: 1.2;
    }


    /* --------------------------------------------------
       CONTATTI
    -------------------------------------------------- */
    .contact-section {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
    .bg-section-contact {
        width: calc(100% - 24px);
        padding: 48px 24px;
        border-radius: 20px;
    }
    #contatti .col-md-6 {
        margin-top: 42px;
    }
    .contact-form-title {
        font-size: 20px;
        line-height: 1.2;
    }
    .quantica-contact-form {
        margin-top: 20px;
    }
    .contact-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .contact-field--full {
        grid-column: auto;
    }
    .quantica-contact-form input[type="text"],
    .quantica-contact-form input[type="email"],
    .quantica-contact-form input[type="tel"],
    .quantica-contact-form textarea {
        padding: 12px 15px;
        font-size: 16px;
    }
    .quantica-contact-form textarea {
        height: 130px;
    }
    .contact-form-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
        margin-top: 14px;
    }
    .contact-submit {
        align-self: flex-end;
    }


    /* --------------------------------------------------
       FOOTER
    -------------------------------------------------- */
    #footer {
        padding: 30px 0 24px;
    }
    #footer .row.pb-4 {
        padding-bottom: 1.5rem !important;
    }

}


/* ==================================================
   SMALL MOBILE
   0 - 575.98px
================================================== */

@media (max-width: 575.98px) {

    :root {
        --section-padding: 56px;
    }


    /* --------------------------------------------------
       TYPOGRAPHY
    -------------------------------------------------- */
    .title-section {
        font-size: 34px;
    }


    /* --------------------------------------------------
       HERO
    -------------------------------------------------- */
    .home-hero {
        min-height: max(650px, 100svh);
        padding-top: 90px;
        padding-bottom: 52px;
        background-position: 66% center;
    }
    .home-hero__title {
        font-size: clamp(35px, 10.5vw, 41px);
    }
    .home-hero__text {
        font-size: 17px;
        line-height: 1.48;
    }


    /* --------------------------------------------------
       CHI SIAMO
    -------------------------------------------------- */
    .text-chisiamo-item {
        min-height: 60px;
        padding: 12px 18px;
    }


    /* --------------------------------------------------
       FONDATORI
    -------------------------------------------------- */
    .fondatori-symbol {
        width: min(76vw, 280px);
    }
    .fondatore-item p {
        font-size: 17px;
    }


    /* --------------------------------------------------
       CONTATTI
    -------------------------------------------------- */
    .bg-section-contact {
        width: calc(100% - 16px);
        padding: 40px 18px;
        border-radius: 18px;
    }
    #contatti .title-section br {
        display: none;
    }


    /* --------------------------------------------------
       FOOTER
    -------------------------------------------------- */
    #footer .col-5 {
        margin-top: 16px;
    }
    .footer-copyright {
        text-align: left;
        font-size: 13px;
    }

}


/* ==================================================
   TABLET PORTRAIT / LANDSCAPE ONLY
   768 - 991.98px
================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
    .home-hero__title {
        font-size: 46px;
    }
    .home-hero__text {
        max-width: 520px;
    }
    .bg-section-contact {
        max-width: calc(100% - 32px);    }

}

/* MacBook / laptop con altezza ridotta */
@media (min-width: 992px) and (max-height: 850px) {

    .home-hero {
        min-height: 650px;
    }

}

/* ==================================================
   DESKTOP UTILITIES
================================================== */
@media (min-width: 992px) {
    .w-lg-50 {
        width: 50%;
    }
    .w-lg-75 {
        width: 75%;
    }
}


/* ==================================================
   ACCESSIBILITY
   REDUCED MOTION
================================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}