/* ================================ STICKY HEADER ================================ */

.sticky-header {
    position: sticky;
    top: 0;
    height: 71.56px;
    z-index: 1020;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sticky-header .nav-link {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.sticky-header .nav-link:hover {
    color: var(--bs-primary);
}

.sticky-header .keep-ratio-logo-set {
    max-height: 50px;
    transition: all 0.3s ease;
}


/* ================================ PLUGINS ================================ */


/*  countdown   */

.countdown-rtl {
    direction: rtl;
}

.countdown-holding span {
    color: #888;
}

.countdown-row {
    clear: both;
    width: 100%;
    padding: 0px 2px;
    text-align: center;
}

.countdown-show1 .countdown-section {
    width: 98%;
}

.countdown-show2 .countdown-section {
    width: 48%;
}

.countdown-show3 .countdown-section {
    width: 32.5%;
}

.countdown-show4 .countdown-section {
    width: 24.5%;
}

.countdown-show5 .countdown-section {
    width: 19.5%;
}

.countdown-show6 .countdown-section {
    width: 16.25%;
}

.countdown-show7 .countdown-section {
    width: 14%;
}

.countdown-section {
    display: inline-block;
    font-size: 75%;
    text-align: center;
    padding: .5rem;
}

.countdown-amount {
    font-size: 200%;
}

.countdown-period {
    display: block;
}

.countdown-descr {
    display: block;
    width: 100%;
}

.is-countdown {
    width: 200px !important;
}

.countdown-2 {
    width: 150px !important;
}

.countdown-compact-2 {
    padding-left: .75em;
    padding-right: .75em;
}


/* ================================ ANIMATIONS ================================ */

.blink {
    animation: blink 0.2s;
}

@keyframes blink {
    0% {
        background-color: white;
        opacity: 1;
    }

    50% {
        background-color: white;
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}



.blue-flash {
    animation-name: blue_flash;
    animation-duration: .5s;
    box-shadow: 0 0 40px 0 rgba(27, 95, 178, 0.45);
}

.blue-flash-hover:hover {
    animation-name: blue_flash;
    animation-duration: .5s;
}

@keyframes blue_flash {
    0% {
        -webkit-box-shadow: 0 0 40px 0 rgba(27, 95, 178, 0.45) !important;
        box-shadow: 0 0 40px 0 rgba(27, 95, 178, 0.45) !important;
    }

    50% {
        -webkit-box-shadow: 0 0 40px 0 rgba(27, 95, 178, 1) !important;
        box-shadow: 0 0 40px 0 rgba(27, 95, 178, 1) !important;
    }

    100% {
        -webkit-box-shadow: 0 0 40px 0 rgba(27, 95, 178, 0.45) !important;
        box-shadow: 0 0 40px 0 rgba(27, 95, 178, 0.45) !important;
    }
}



@keyframes jump_loop {
    0% {
        transform: translate(-50%, -50%);
    }

    12.5% {
        transform: translate(-50%, -70%);
    }

    21.25% {
        transform: translate(-50%, -45%);
    }

    25% {
        transform: translate(-50%, -50%);
    }

    100% {
        transform: translate(-50%, -50%);
    }
}

@keyframes jump {
    0% {
        transform: translate(-50%, -50%);
    }

    50% {
        transform: translate(-50%, -70%);
    }

    85% {
        transform: translate(-50%, -45%);
    }

    100% {
        transform: translate(-50%, -50%);
    }
}



.spin-360 {
    animation: spin_360 infinite 4s linear;
}

@keyframes spin_360 {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.up-hover:hover {
    transition: 0.3s;
    transform: translateY(-20px);
}

.zoom-hover {
    transition: transform .4s;
}

.zoom-hover:hover {
    transform: scale(1.1);
}



.vibrate:hover {
    animation: vibrate 0.1s linear;
}

.vibrate-hover:hover {
    animation: vibrate 0.1s linear;
}

.vibrate-hover-zoom:hover {
    animation: vibrate 0.1s linear;
    transform: scale(1.05);
}

@keyframes vibrate {
    0% {
        transform: rotate(-5deg);
    }

    12.5% {
        transform: rotate(5deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    37.5% {
        transform: rotate(5deg);
    }

    50% {
        transform: rotate(-5deg);
    }

    62.5% {
        transform: rotate(5deg);
    }

    75% {
        transform: rotate(-5deg);
    }

    87.5% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}



/*  TEST CSS    */
.bg-test-1 {
    background-color: red;
}

.bg-test-2 {
    background-color: blue;
}



/* ================================ COLORS ================================ */

.red {
    color: var(--bs-red);
}

.blue {
    color: var(--bs-blue);
}

.green {
    color: var(--bs-green);
}

.yellow {
    color: var(--bs-yellow);
}

.orange {
    color: var(--bs-orange);
}

.cyan {
    color: var(--bs-cyan);
}

.purple {
    color: var(--bs-purple);
}

.teal {
    color: var(--bs-teal);
}

.black {
    color: var(--bs-gray-dark);
}

.brown {
    color: var(--bs-brown);
}


/* ================================ LOGIN ================================ */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.3);
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.overlay>.overlay-side {
    position: relative;
    background-color: #fefefe;
    background-image: url("/assets/img/pattern-auth-overlay.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    width: 25%;
    animation-name: auth-open;
    animation-duration: 1s;
}

.overlay>.overlay-side .card-body {
    position: absolute;
}

.auth .card-body {
    width: 400px;
}

.auth-open .card {
    animation-name: auth-card-open;
    animation-duration: 1s;
}

@keyframes auth-open {
    0% {
        width: 0;
    }

    100% {
        width: 25%;
    }
}

@keyframes auth-card-open {
    0% {
        margin-left: 1000px;
    }

    100% {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    .overlay>.overlay-side .card-body {
        transform: translate(-75%, 15%);
    }

    .auth .card-body {
        min-height: 500px;
        max-height: 700px;
        width: 300px;
    }
}

@media (max-width: 768px) {
    #g-recaptcha {
        transform: scale(0.7);
        -webkit-transform: scale(0.7);
        transform-origin: 0 0;
        -webkit-transform-origin: 0 0;
    }
}

@media (min-width: 576px) {
    .overlay>.overlay-side .card-body {
        transform: translate(-50%, 50%);
    }
}

@media (min-width: 768px) {
    #cart_full_card_content {
        height: 550px;
    }

    .overlay>.overlay-side .card-body {
        transform: translate(-75%, 15%);
    }
}

@media (min-width: 1200px) {
    .overlay>.overlay-side .card-body {
        transform: translate(-75%, 25%);
    }
}

@media (min-width: 1800px) {
    .overlay>.overlay-side .card-body {
        transform: translate(-75%, 50%);
    }
}

@media (min-width: 2560px) {
    .overlay>.overlay-side .card-body {
        transform: translate(-75%, 50%);
    }
}


/* ================================ STRUCTURE ================================ */

main {
    margin: 0;
    margin-left: 5%;
    margin-right: 5%;
}

video {
    display: block;
}


/* ================================ NAV ================================ */

.search {
    background-image: url("/assets/icon/search.svg");
    background-repeat: no-repeat;
    background-size: 25px;
    background-position-y: center;
    background-position-x: 10px;
    padding-left: 40px;
    border: none;
    box-shadow: 0px 0px 8px rgba(27, 95, 178, 0.3);
}

.keep-ratio-logo-set {
    /* max-width: 120px; */
    max-height: 40px;
}

.nav-profile-img {
    line-height: 1.5;
    position: relative;
}

.nav-profile-img>span:first-child {
    height: 37.38px;
    width: 37.38px;
    overflow: hidden;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

.nav-profile-img-overlay span:first-child {
    height: 35px;
    width: 35px;
    position: absolute;
}


/* ================================ ALTRO ================================ */

.info-icon {
    font-size: 40px !important;
}

.social-icon {
    font-size: 20px !important;
}

.btn-icon {
    font-size: 20px !important;
    margin-right: 1%;
    margin-left: 1%;
}

.btn-round {
    border-radius: 50%;
    margin-right: 1%;
    margin-left: 1%;
}

.btn-theme {
    color: var(--bs-primary);
    box-shadow: 0px 0px 8px rgba(27, 95, 178, 0.3);
    margin-right: 1%;
    margin-left: 1%;
}

.btn-theme:hover {
    color: var(--bs-primary-h);
    box-shadow: 0px 0px 8px rgba(27, 95, 178, 0.3);
}

.navbar>.container-fluid {
    margin-left: 5%;
    margin-right: 5%;
}

.homepage-cover img {
    max-height: 800px !important;
    object-fit: cover;
}

.homepage-cover .cover-container {
    position: relative;
}

.course-cover .cover-image,
.homepage-cover .cover-image {
    display: block;
    margin: auto;
    width: 100%;
    min-height: calc(100vh - 71px);
}

.homepage-cover .cover-card {
    margin-top: -300px;
    opacity: 1;
}

.homepage-cover .cover-card>* {
    padding: 0;
}

.homepage-cover .card-body {
    height: auto;
    padding: 40px;
}

.homepage-cover .card-title span {
    color: var(--bs-primary);
}

.homepage-cover .card-text {
    font-size: 18px;
}

.homepage-cover .card-body .btn-primary {
    margin-top: 40px;
}

.homepage-cover .card-body .btn-primary strong {
    font-size: 1rem;
}

.card-title {
    white-space: unset !important;
}

.course-card {
    /* max-height: 560px; */
    width: 330px;
}

.stats-course-card img,
.course-card img {
    height: 240px;
}

.stats-course-card .card-body {
    position: relative;
}

.stats-course-card h4,
.stats-course-card .status {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-course-card p {
    position: relative;
    overflow: hidden;
    max-height: 40px;
}

.stats-course-card p:before {
    background: linear-gradient(transparent 30px, white);
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.course-card div.card-text {
    position: relative;
    overflow: hidden;
    max-height: 40px;
}

.course-card div.card-text>p {
    margin-bottom: 0;
}

.course-card-category {
    position: absolute;
    margin-left: -3px;
    max-height: 220px;
    overflow-x: visible;
    overflow-y: scroll;
}

.course-card-category>span {
    max-width: 125px;
    white-space: normal;
    line-height: 1.25em;
    margin-top: 10px;
    box-shadow: 0px 0px 8px rgba(27, 95, 178, 0.3);
    color: var(--bs-primary) !important;
}

.course-card-category>span:last-child {
    margin-bottom: 10px;
}

.course-card-category::-webkit-scrollbar {
    display: none;
}

.card-categories {
    max-width: 100px;
    max-height: 100px;
}

/* .course-card h3.card-title{
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.course-description {
    margin: 0 auto;
    width: 100%;
    text-align: justify;
    max-height: 60px;
    overflow: hidden;
    position: relative;
}

.course-description p {
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    padding: 0 !important;
}

.course-description:before {
    background: linear-gradient(transparent 40px, white);
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
} */


.toggle-npaa {
    max-width: 50px;
    max-height: 35px;
}


.category-card {
    width: 250px;
    height: 250px;
}

.category-card img {
    object-fit: cover;
}

.category-card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


footer {
    padding: 2vh 6vw !important;
    margin: 0;
    width: 100%;
}

.copyright:before {
    content: '\00a9'
}

.scale-image-h400 {
    max-height: 400px;
}

.course-cover {
    max-height: 350px;
    overflow: hidden;
}

.btn-noborder {
    border: none;
}


.selected-card {
    animation-name: blue_flash;
    animation-duration: .5s;
    box-shadow: 0 0 40px 0 rgba(27, 95, 178, 0.45);
}

.fixed {
    position: fixed;
}

/* ================================ RESPONSIVE NAVIGATION ================================ */

/* Desktop navigation - hide on screens smaller than 1200px */
@media (max-width: 1199.98px) {
    .navbar.d-none.d-lg-block {
        display: none !important;
    }

    .navbar.d-block.d-lg-none {
        display: block !important;
    }
}

/* Mobile navigation improvements */
@media (max-width: 1199.98px) {
    .account-settings-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1030;
        margin-bottom: 0 !important;
        padding: 0;
    }

    .account-settings-nav>* {
        margin-bottom: 0 !important;
    }

    /* Mobile hamburger menu styles */
    #toggleresponsivenav {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background-color: white !important;
        border-top: 1px solid #dee2e6 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        z-index: 1040 !important;
    }

    #toggleresponsivenav .navbar {
        background-color: white !important;
    }

    #toggleresponsivenav .nav-link {
        color: #333 !important;
    }

    #toggleresponsivenav .nav-link:hover {
        color: var(--bs-primary) !important;
    }

    #toggleresponsivenav .btn {
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

/* Tablet and medium screen adjustments */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .navbar .container .row {
        align-items: center;
    }

    .navbar .keep-ratio-logo-set {
        max-height: 35px;
    }

    /* Adjust spacing for tablet */
    .navbar .col-auto {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Small mobile screens */
@media (max-width: 576px) {
    .navbar .keep-ratio-logo-set {
        max-height: 30px;
    }

    .navbar .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

.pre-dot:before {
    content: "• ";
}

.cart-course-card img,
.cart-card img {
    height: 120px;
}

.cart-course-card .card-body {
    position: relative;
}

.cart-course-card h4,
.cart-course-card .status {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-course-card p {
    position: relative;
    overflow: hidden;
    max-height: 40px;
}

.cart-course-card p:before {
    background: linear-gradient(transparent 30px, white);
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.course-image {
    height: 150px;
    object-fit: contain;
}

.infopage-pattern {
    top: 0;
    right: 0;
    width: 45%;
    height: 45%;
    /* background-image: url("/assets/img/blue-pattern.jpg"); */
    background-color: var(--bs-primary);
    background-repeat: no-repeat;
}

.infopage-pattern2 {
    width: 300px;
    right: 0;
    height: 200px;
    /* background-image: url("/assets/img/blue-pattern.jpg"); */
    background-color: var(--bs-primary);
    background-repeat: no-repeat;
}

#carouselImg {
    background-color: white;
}

#carousel-infopage {
    background-color: white;
}

th {
    background-color: #eef2f7 !important;
    border-bottom: 0px none !important;
}

table table th {
    background-color: #f6f9fc !important;
}

.box-detail-order {
    background-color: #fcfcfc !important;
}

.bg-more-info-table {
    background-color: rgb(233, 233, 233) !important;
}

.cart-badge {
    animation-name: jump;
    animation-duration: 0.5s;
}

.img-fast-course {
    width: 100px;
    max-height: 75px;
    object-fit: cover;
    padding: 5px;
    border-radius: 2px;
    margin-right: 10px;
}

.nav-link-payment:hover {
    color: var(--bs-light);
    background-color: var(--bs-primary);
}



.jump-loop {
    animation-name: jump_loop;
    animation-iteration-count: infinite;
    animation-duration: 2s;
}

.text-justify {
    text-align: justify;
}

.right-card {
    background-color: var(--bs-primary);
    margin-right: -1.75rem;
    border-radius: .25rem;
}

.left-card {
    background-color: var(--bs-primary);
    margin-left: -1.75rem;
    border-radius: .25rem;
}

.toggle-card {
    width: fit-content;
    background-color: var(--bs-primary);
    border-radius: .25rem;
}


/* ================================ color ================================ */

.theme-color-pink {
    color: var(--bs-pink);
}

.theme-color-red {
    color: var(--bs-red);
}

.theme-color-orange {
    color: var(--bs-orange);
}

.theme-color-yellow {
    color: var(--bs-yellow);
}

.theme-color-green {
    color: var(--bs-green);
}

.theme-color-teal {
    color: var(--bs-teal);
}

.theme-color-cyan,
.theme-color-info {
    color: var(--bs-cyan);
}

.theme-color-blue {
    color: var(--bs-blue);
}

.theme-color-brown {
    color: var(--bs-brown);
}

.theme-color-primary {
    color: var(--bs-primary);
}

.theme-color-secondary {
    color: var(--bs-secondary);
}

.theme-color-success {
    color: var(--bs-success);
}

.theme-color-danger {
    color: var(--bs-danger);
}

.theme-color-warning {
    color: var(--bs-warning);
}

.theme-color-light {
    color: var(--bs-light);
}

.theme-color-dark {
    color: var(--bs-dark);
}


/* ================================ bg-color ================================ */

.theme-bg-color-pink {
    background-color: var(--bs-pink);
}

.theme-bg-color-red {
    background-color: var(--bs-red);
}

.theme-bg-color-orange {
    background-color: var(--bs-orange);
}

.theme-bg-color-yellow {
    background-color: var(--bs-yellow);
}

.theme-bg-color-green {
    background-color: var(--bs-green);
}

.theme-bg-color-teal {
    background-color: var(--bs-teal);
}

.theme-bg-color-cyan,
.theme-bg-color-info {
    background-color: var(--bs-cyan);
}

.theme-bg-color-blue {
    background-color: var(--bs-blue);
}

.theme-bg-color-brown {
    background-color: var(--bs-brown);
}

.theme-bg-color-secondary {
    background-color: var(--bs-secondary);
}

.theme-bg-color-success {
    background-color: var(--bs-success);
}

.theme-bg-color-danger {
    background-color: var(--bs-danger);
}

.theme-bg-color-warning {
    background-color: var(--bs-warning);
}

.theme-bg-color-light {
    background-color: var(--bs-light);
}

.theme-bg-color-dark {
    background-color: var(--bs-dark);
}


/* 
    video.module-8::-webkit-media-controls-timeline {
        display: none;
    }
*/

.card-overlay {
    z-index: 9999;
}

.pointer {
    cursor: pointer;
}

.correct-answer {
    background-image: linear-gradient(90deg, var(--bs-success), 1%, transparent, transparent, transparent, transparent);
}

.wrong-answer {
    background-image: linear-gradient(90deg, var(--bs-danger), 1%, transparent, transparent, transparent, transparent);
}

.module-content {
    -webkit-touch-callout: none;
    /* iOS Safari */
    -webkit-user-select: none;
    /* Safari */
    -khtml-user-select: none;
    /* Konqueror HTML */
    -moz-user-select: none;
    /* Old versions of Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}


.h-100 {
    height: 100%;
}

.w-fc {
    width: fit-content;
}

.btn-module-details {
    cursor: pointer;
}


#cart_full_card_content::-webkit-scrollbar {
    width: 6px;
    height: 8px;
}

#cart_full_card_content::-webkit-scrollbar-thumb {
    border-radius: 3px;
}

#mappaContacts>iframe {
    height: 480px;
    width: 100%;
    padding: 0;
}


.border-05 {
    border: .5px solid #dee2e6 !important
}


.card-fullscreen {
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 100000;
}

.clouds-background {
    background-image: url('../img/clouds-background.png');

    background-size: 110%;

    animation: clouds-left-right;

    animation-duration: 4s;
    animation-iteration-count: infinite;
}



@keyframes clouds-left-right {
    0% {
        background-position: center;
    }

    25% {
        background-position: left;
    }

    50% {
        background-position: center;
    }

    75% {
        background-position: right;
    }

    100% {
        background-position: center;
    }
}

.giant-text-1 {
    font-size: 128px;
}

/*  privacy cookies */

.cc_container .cc_btn,
.cc_container .cc_btn:visited {
    background-color: var(--bs-blue) !important;
    color: #fff !important;
}

.text-white-shadow {
    text-shadow: 0px 0px 4px #FFF;
}




.opacity-0 {
    opacity: 0;
}

.opacity-10 {
    opacity: 0.10;
}

.opacity-20 {
    opacity: 0.20;
}

.opacity-30 {
    opacity: 0.30;
}

.opacity-40 {
    opacity: 0.40;
}

.opacity-50 {
    opacity: 0.50;
}

.opacity-60 {
    opacity: 0.60;
}

.opacity-70 {
    opacity: 0.70;
}

.opacity-80 {
    opacity: 0.80;
}

.opacity-90 {
    opacity: 0.90;
}

.opacity-100 {
    opacity: 1;
}



.fc-license-message {
    display: none !important;
}


.btn-more-info {

    padding: 0px !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;

    color: var(--bs-primary) !important;
}


.btn-more-info:hover,
.btn-more-info:focus,
.btn-more-info:active {
    color: var(--bs-primary-h) !important;
}


.package-course-list-image {
    width: 80px;
    height: 45px;

    object-fit: contain;
}


#modules_list {
    background-color: white;
}

.btn-search {
    background-color: white;
}




#categories_list_container {
    position: relative;
}

#categories_list {
    position: relative;
    overflow: auto;
}

#categories_list::-webkit-scrollbar {
    height: 6px;
}

#categories_list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#categories_list::-webkit-scrollbar-track {
    background: transparent;
}

#categories_list_container .right-arrow {
    background-color: rgba(0, 0, 0, 0.3);
    color: black;
    position: absolute;
    top: 50%;
    width: fit-content;
    right: 0;
    transform: translateY(-50%);
    cursor: pointer;
}

#categories_list_container .right-arrow:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

#categories_list_container .right-arrow:active {
    background-color: rgba(0, 0, 0, 0.2);
}

#categories_list_container .left-arrow {
    background-color: rgba(0, 0, 0, 0.3);
    color: black;
    position: absolute;
    top: 50%;
    width: fit-content;
    left: 0;
    transform: translateY(-50%);
    cursor: pointer;
}

#categories_list_container .left-arrow:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

#categories_list_container .left-arrow:active {
    background-color: rgba(0, 0, 0, 0.2);
}

#categories_list_content {
    display: grid;
    grid-gap: 60px;
    padding: 30px;
    grid-template-columns: auto;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
}


.maxw-100 {
    max-width: 100%;
}



.sentence {
    vertical-align: middle;
    line-height: 3;
}

.sentence>.slot {
    min-height: 1.125rem;
    min-width: 40px;
    width: fit-content;
}



.category-badge {
    /* background-color: #DFDFDF; */
    /* border-width: 2px !important; */
    color: var(--bs-primary);
    line-height: 1.6;

    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s;
}


.category-badge:hover {
    color: #fff;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}


input[type='range'].satisfaction-quiz::-webkit-slider-runnable-track {
    background-image: linear-gradient(90deg, var(--bs-danger), var(--bs-yellow), var(--bs-success), var(--bs-cyan));
}



.scrollbar-y::-webkit-scrollbar {
    width: 6px;
}

.scrollbar-y::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.scrollbar-y::-webkit-scrollbar-thumb:hover {
    background: #666;
}

.scrollbar-y::-webkit-scrollbar-track {
    background: transparent;
}



.scrollbar-x {
    overflow-x: scroll;
}

.scrollbar-x::-webkit-scrollbar {
    height: 6px;
}

/* Track */
.scrollbar-x::-webkit-scrollbar-track {
    background: #f1f2f2;
    border-radius: 3px;
}

/* Handle */
.scrollbar-x::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

/* Handle on hover */
.scrollbar-x::-webkit-scrollbar-thumb:hover {
    background: #666;
}



.object-fit-cover {
    object-fit: cover
}


/* 
.avatar-buttons .btn{
    background-color: rgba(255, 255, 255, 0.6);
} */

.avatar-content {
    position: relative;
    background-color: #D5D5D5;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;

    border: 1px solid #D5D5D5;
    border-radius: 50%;

    height: 250px;
    width: 250px;


    display: flex;
    justify-content: center;
    align-items: center;

    line-height: 1;
    font-size: 200px;
    font-family: Arial, sans-serif;
    color: var(--bs-primary-h)
}

.avatar-content:before {
    content: var(--avatar-letter);
}

.avatar-content-nav {
    height: 37.38px;
    width: 37.38px;
    font-size: 20px;
}


.overflow-y-hidden {
    overflow-y: hidden !important;
}

.overflow-x-hidden {
    overflow-x: hidden !important;
}

.text-ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.fa-square-x-twitter {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-image: url('/assets/icon/square-x-twitter.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-top: 6px;
}

.card-banner {
    background-color: transparent;
}

.btn-white {
    color: #fff;
    border-color: #fff;
}

.btn-white:hover {
    color: #fff;
    border-color: #fff;
}

.mycourse {
    color: white;
}

.mycourse:hover {
    color: var(--bs-primary);
}

.bg-grey {
    background-color: #F1F1F1;
}

.textp-wbl {
    color: #1A42AE;
}

.container-homepage {
    margin: 0 auto;
    font-size: 25px;
    font-weight: 400;
    line-height: 35px;
    padding: 73px 0;
    margin-top: 43px;
    border-bottom: 2px solid #D5D1D1;
}

.image-homepage {
    max-width: 100%;
    max-height: 291px;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0px 22px 30px 0px rgba(154, 161, 171, 0.3);
}

/* ================================ HOMEPAGE MAIN CONTAINER ================================ */

.homepage-main-container {
    padding: 0 190px;
}

/* Media queries per responsività del padding homepage */
@media (max-width: 1400px) {
    .homepage-main-container {
        padding: 0 120px;
    }
}

@media (max-width: 768px) {
    .homepage-main-container {
        padding: 0 95px;
    }
}

@media (max-width: 576px) {
    .homepage-main-container {
        padding: 0 20px;
    }
}




/* ================================ HOMEPAGE RESPONSIVE ================================ */

.container-homepage {
    font-size: 25px;
    line-height: 30px;
    font-weight: 400;
    margin: 0 auto;
}

.image-homepage {
    max-width: 100%;
    max-height: 291px;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

/* Media queries per responsività */
@media (max-width: 992px) {

    .homepage-cover .card-banner .position-absolute {
        position: relative !important;
        margin-left: 20px !important;
        max-width: 90% !important;
        transform: none !important;
    }

    [style*="padding: 0 80px"] {
        padding: 0 20px !important;
    }

    .d-flex.flex-row.flex-wrap>div {
        width: 100% !important;
        min-width: unset !important;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {


    .homepage-cover .card-banner {
        margin: 20px;
    }

    .homepage-cover .card-banner .card-body {
        padding: 20px;
    }

    .homepage-cover .card-banner h1 {
        font-size: 24px !important;
    }

    .homepage-cover .card-banner h2 {
        font-size: 18px !important;
        line-height: 24px !important;
    }

    [style*="margin-top: 120px"] {
        margin-top: 60px !important;
    }

    [style*="margin-bottom: 100px"] {
        margin-bottom: 60px !important;
    }
}

/* ================================ HOMEPAGE FLEX LAYOUT ================================ */

.homepage-section-flex {
    gap: 30px;
}

.homepage-image-container {

    max-width: 463px;
}

.homepage-text-container {
    flex: 1;
    min-width: 300px;
    max-width: 549px;
}

@media (max-width: 768px) {
    .homepage-image-container {

        max-width: 463px;
        min-height: 291px;
    }
}

@media (max-width: 992px) {
    .homepage-section-flex {
        flex-direction: column !important;
        gap: 20px;
    }

    /* Always put images above text on mobile */
    .homepage-image-container {
        order: 1;
    }

    .homepage-text-container {
        order: 2;
    }
}

.dropdown button.btn:focus,
.dropdown button.btn:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* ================================ CUSTOM LOGIN BUTTON ================================ */

.custom-accedi-btn {
    background-color: #FFFFFF !important;
    border-radius: 2.4px !important;
    width: 73.98px !important;
    height: 37.98px !important;
    box-shadow: 0px 0px 8px 0px rgba(27, 95, 178, 0.3) !important;
    font-weight: 400 !important;
    font-size: 14.4px !important;
    line-height: 21.6px !important;
    color: #33D27E !important;
    border: none !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.custom-accedi-btn:hover {
    background-color: #FFFFFF !important;
    color: #33D27E !important;
    box-shadow: 0px 0px 10px 0px rgba(27, 95, 178, 0.5) !important;
}

.custom-accedi-btn:focus,
.custom-accedi-btn:active {
    background-color: #FFFFFF !important;
    color: #33D27E !important;
    box-shadow: 0px 0px 8px 0px rgba(27, 95, 178, 0.3) !important;
    border: none !important;
    outline: none !important;
}

/* ================================ END CUSTOM LOGIN BUTTON ================================ */

/* ================================ CUSTOM REGISTER BUTTON ================================ */

.custom-registrati-btn {
    background-color: #33D27E !important;
    border: 1px solid #33D27E !important;
    border-radius: 2.4px !important;
    width: 91.56px !important;
    height: 37.98px !important;
    box-shadow: 0px 2px 6px 0px rgba(114, 124, 245, 0.5) !important;
    font-weight: 400 !important;
    font-size: 14.4px !important;
    line-height: 21.6px !important;
    color: #FFFFFF !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

.custom-registrati-btn:hover {
    background-color: #33D27E !important;
    border: 1px solid #33D27E !important;
    color: #FFFFFF !important;
    box-shadow: 0px 2px 8px 0px rgba(114, 124, 245, 0.7) !important;
    text-decoration: none !important;
}

.custom-registrati-btn:focus,
.custom-registrati-btn:active {
    background-color: #33D27E !important;
    border: 1px solid #33D27E !important;
    color: #FFFFFF !important;
    box-shadow: 0px 2px 6px 0px rgba(114, 124, 245, 0.5) !important;
    outline: none !important;
    text-decoration: none !important;
}

/* ================================ END CUSTOM REGISTER BUTTON ================================ */

/* ================================ CUSTOM HAMBURGER BUTTON ================================ */

#hamburger-toggle {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50px !important;
    height: 35px !important;
}

#hamburger-toggle:focus,
#hamburger-toggle:active,
#hamburger-toggle:focus-visible {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
}

#hamburger-toggle svg {
    width: 32px;
    height: 32px;
    display: block;
}

/* ================================ END CUSTOM HAMBURGER BUTTON ================================ */


/* ================================ MOBILE HAMBURGER MENU STYLES ================================ */

.mobile-nav-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100% !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mobile-nav-item:hover {
    background-color: #BDBDBD !important;
}

.mobile-nav-item:active {
    background-color: #BDBDBD !important;
}

.mobile-nav-item .nav-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
    padding: 22.5px 83px !important;
    margin: 0 !important;
    color: #333 !important;
    font-size: 18px !important;
}

.mobile-nav-item .nav-link:hover {
    color: #333 !important;
    background-color: transparent !important;
}

/* ================================ END MOBILE HAMBURGER MENU STYLES ================================ */

#toggleresponsivenav .mobile-nav-item .nav-link {
    color: #000000 !important;
}

#toggleresponsivenav .mobile-nav-item:hover .nav-link {
    color: #000000 !important;
}

/* ================================ HOMEPAGE HERO TEXT RESPONSIVE ================================ */

.homepage-hero-text {
    max-width: 531px;
}

@media (max-width: 768px) {
    .homepage-hero-text {
        max-width: 317px;
    }
}

/* ================================ END HOMEPAGE HERO TEXT RESPONSIVE ================================ */

/* ================================ HOMEPAGE COVER HEIGHT ================================ */

.homepage-cover {
    height: 100vh !important;
}

@media (max-width: 768px) {
    .homepage-cover {
        height: 531px !important;
    }

    #carouselImg {
        height: 531px !important;
    }
}

/* ================================ FOOTER RESPONSIVE ================================ */

/* Footer padding for medium screens (767px and below) */
@media (max-width: 767px) {
    footer {
        padding: 5vh 10vw !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Footer padding for small screens (430px and below) */
@media (max-width: 430px) {
    footer {
        padding: 5vh 10vw !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Position arrow button absolutely above logos */
    footer .col-md-4:first-child {
        position: relative !important;
    }

    footer .mobile-arrow-btn {
        position: absolute !important;
        top: -60px !important;
        right: 35px !important;
        transform: translateX(50%) !important;
        z-index: 10 !important;
    }

    /* Center logos only on very small screens */
    footer .col-md-4:first-child .d-flex.justify-content-center.align-items-center.gap-3 {
        justify-content: center !important;
    }
}

@media (max-width: 767px) {

    /* Stack footer sections vertically */
    footer .row {
        flex-direction: column !important;
        gap: 20px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Logo section - center aligned with up arrow button */
    footer .col-md-4:first-child {
        order: 1;
        text-align: center !important;
        margin-bottom: 20px;
    }

    footer .col-md-4:first-child .d-flex {
        justify-content: space-between !important;
        gap: 15px !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    /* Logo group container */
    footer .col-md-4:first-child .d-flex .d-flex:first-child {
        gap: 15px !important;
    }

    /* Logo dimensions */
    footer .col-md-4:first-child img[alt="logo_footer"] {
        max-width: 173px !important;
        max-height: 106px !important;
        margin: 0 !important;
    }

    footer .col-md-4:first-child img[alt="logoeu"] {
        max-width: 111px !important;
        max-height: 114px !important;
        margin: 0 !important;
    }

    /* Show mobile arrow button on same row */
    footer .mobile-arrow-btn {
        display: block !important;
        margin: 0 !important;
        text-align: center !important;
    }

    /* Text section - center aligned and smaller font */
    footer .col-md-6 {
        order: 2;
        text-align: center !important;
        padding: 0 15px !important;
    }

    footer .col-md-6 p {
        font-size: 14px !important;
        line-height: 20px !important;
        margin: 0 !important;
    }

    /* Hide desktop arrow button on mobile */
    footer .col-md-2 {
        display: none !important;
    }

    /* Bottom section - stack vertically instead of side by side */
    footer .container .row {
        margin: 20px 0 0 0 !important;
        padding: 0 !important;
        flex-direction: column !important;
        gap: 15px !important;
        justify-content: center !important;
        align-items: center !important;
    }

    /* Bottom section container adjustments */
    footer .container {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* Social links - full width and centered */
    footer .container .col-md-6:first-child {
        order: 1;
        text-align: center !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    footer .container .col-md-6:first-child .d-flex {
        justify-content: center !important;
        gap: 15px !important;
    }

    /* Policy links - full width and centered */
    footer .container .col-md-6:nth-child(2) {
        order: 2;
        text-align: center !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    footer .container .col-md-6:nth-child(2) .d-flex {
        flex-direction: row !important;
        gap: 10px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    footer .container .col-md-6:nth-child(2) .bd-highlight {
        padding: 0 !important;
    }

    footer .container .col-md-6:nth-child(2) .border-end {
        border-right: 1px solid #6c757d !important;
        padding-right: 10px !important;
    }
}

/* ================================ FOOTER LOGO UNIFORM BEHAVIOR ================================ */

/* Ensure both footer logos resize uniformly */
footer .col-md-4:first-child .d-flex.align-items-center.gap-3>div {
    flex: 1 1 auto;
    min-width: 0;
}

footer .col-md-4:first-child .d-flex.align-items-center.gap-3>div img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* Ensure the container doesn't overflow */
footer .col-md-4:first-child .d-flex.align-items-center.gap-3 {
    overflow: hidden;
    min-width: 0;
}

/* ================================ END FOOTER LOGO UNIFORM BEHAVIOR ================================ */

/* ================================ FOOTER LOGO DIMENSIONS ================================ */

/* Logo dimensions for screens above 767px */
@media (min-width: 768px) {
    footer .col-md-4:first-child img[alt="logo_footer"] {
        max-width: 202px !important;
        max-height: 125px !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }

    footer .col-md-4:first-child img[alt="logoeu"] {
        max-width: 130px !important;
        max-height: 134px !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }
}

/* ================================ FOOTER MEDIUM SCREENS (768px to 1080px) ================================ */

@media (min-width: 768px) and (max-width: 1080px) {

    /* Logo section adjustments */
    footer .col-md-4:first-child .d-flex {
        gap: 15px !important;
    }

    /* Text section - smaller font for medium screens */
    footer .col-md-6 p {
        font-size: 16px !important;
        line-height: 22px !important;
        padding: 0 10px !important;
    }

    /* Arrow button - smaller size */
    footer .col-md-2 .btn {
        padding: 8px 12px !important;
    }

    /* Bottom section adjustments */
    footer .container {
        padding: 0 15px !important;
    }

    footer .container .row {
        margin-top: 15px !important;
    }

    /* Social links - smaller spacing */
    footer .container .col-md-6:first-child .d-flex {
        gap: 15px !important;
    }

    /* Policy links - adjust spacing */
    footer .container .col-md-6:nth-child(2) .d-flex {
        gap: 8px !important;
    }

    footer .container .col-md-6:nth-child(2) .border-end {
        padding-right: 8px !important;
    }

    footer .container .col-md-6:nth-child(2) a {
        font-size: 14px !important;
    }
}

/* ================================ MOBILE SOCIAL ICONS ================================ */

/* Social icons in mobile header - show until 430px */
@media (min-width: 430px) and (max-width: 1199.98px) {
    .mobile-social-icons {
        display: flex !important;
    }

    .social-header {
        color: white !important;
        font-size: 18px !important;
        padding: 8px !important;
        border-radius: 6px;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
    }

    .social-header:hover {
        background-color: rgba(51, 210, 126, 0.2);
        color: #33D27E !important;
        transform: translateY(-1px);
    }
}

/* Show language dropdown until 430px */
@media (max-width: 1199.98px) and (min-width: 430px) {
    .mobile-lang-dropdown {
        display: flex !important;
    }
}

/* Hide header social icons and language dropdown below 430px */
@media (max-width: 429.98px) {
    .mobile-social-icons {
        display: none !important;
    }

    .mobile-lang-dropdown {
        display: none !important;
    }
}

/* Show social icons and language selector in mobile menu below 430px */
@media (max-width: 429.98px) {
    .mobile-social-menu {
        display: block !important;
    }

    .mobile-lang-menu {
        display: block !important;
    }

    .mobile-social-menu .social-header {
        color: #333 !important;
        font-size: 20px !important;
        background-color: #f8f9fa;
        border-radius: 6px;
        padding: 8px !important;
        transition: background-color 0.2s ease;
    }

    .mobile-social-menu .social-header:hover {
        background-color: #e9ecef;
    }
}

/* Hide mobile menu social icons and language above 430px */
@media (min-width: 430px) {
    .mobile-social-menu {
        display: none !important;
    }

    .mobile-lang-menu {
        display: none !important;
    }
}

/* Ensure proper spacing for mobile social icons */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .navbar .row .col-auto.px-0 {
        display: flex;
        align-items: center;
    }

    .social-icon.social-header {
        margin-left: 4px;
        margin-right: 4px;
    }
}

/* ================================ NEW MOBILE MENU DESIGN ================================ */

.mobile-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #33D27E 0%, #1B5FB2 100%);
    z-index: 1050;
    display: flex;
    flex-direction: column;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 15px;
    color: white;
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-shrink: 0;
}

.mobile-menu-logo {
    height: 40px;
    width: auto;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.mobile-menu-close:active {
    transform: scale(0.95);
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.mobile-menu-item {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.mobile-menu-item:hover {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    padding-left: 15px;
    transform: translateX(5px);
}

.mobile-menu-item:active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(0px);
}

.mobile-menu-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-left: 4px solid white;
    padding-left: 11px;
    font-weight: 600;
}

.mobile-menu-auth {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-shrink: 0;
}

.mobile-menu-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    display: inline-block;
}

.mobile-menu-btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.mobile-menu-btn-outline:hover {
    background: white;
    color: #1B5FB2;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.mobile-menu-btn-outline:active {
    transform: translateY(0px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mobile-menu-btn-primary {
    background: white;
    color: #1B5FB2;
    border: 2px solid white;
}

.mobile-menu-btn-primary:hover {
    background: transparent;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.mobile-menu-btn-primary:active {
    transform: translateY(0px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mobile-menu-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 15px;
}

.mobile-menu-user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    flex: 1;
    padding: 10px 0;
}

.mobile-menu-user-profile:hover {
    color: white;
    text-decoration: none;
    opacity: 0.8;
}

.mobile-menu-user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-user-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    line-height: 1.2;
}

.mobile-menu-user-email {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.2;
}

.mobile-menu-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mobile-menu-logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.mobile-menu-logout-btn .logout-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1); /* Forza l'icona a essere bianca */
}

/* Compatibilità con le vecchie classi */
.mobile-menu-logout {
    padding: 8px;
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.mobile-menu-logout:hover {
    opacity: 0.8;
}

.mobile-menu-logout img {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

.mobile-menu-footer {
    margin-top: 25px;
    padding-bottom: 20px;
    flex-shrink: 0;
}

.mobile-menu-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 18px;
}

.mobile-menu-social a {
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.mobile-menu-social a:hover {
    background: rgba(51, 210, 126, 0.2);
    transform: translateY(-3px);
    color: #33D27E;
}

.mobile-menu-social a:active {
    transform: translateY(0px);
}

.mobile-menu-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 15px 0;
}

.mobile-menu-languages {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 12px 0;
}

.mobile-menu-lang {
    width: 50px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
}

.mobile-menu-lang i {
    font-size: 28px;
    color: white;
}

.mobile-menu-lang:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.mobile-menu-lang.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Override Bootstrap collapse positioning for mobile menu */
@media (max-width: 1199.98px) {
    #toggleresponsivenav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        z-index: 1050 !important;
        max-height: none !important;
        overflow: hidden !important;
    }

    #toggleresponsivenav.show {
        display: block !important;
    }
    
    /* Assicura che il menu mobile sia sempre completamente scrollabile */
    .mobile-menu-container {
        height: 100vh;
        overflow: hidden;
    }
    
    .mobile-menu-content {
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
    }
    
    /* Assicura che tutti gli elementi del footer siano visibili */
    .mobile-menu-footer {
        flex-shrink: 0;
        min-height: fit-content;
    }
}

/* Regole specifiche per schermi molto piccoli */
@media (max-width: 576px) {
    .mobile-menu-content {
        padding: 15px;
    }
    
    .mobile-menu-footer {
        margin-top: 15px;
        padding-bottom: 15px;
    }
    
    .mobile-menu-languages {
        gap: 15px;
        padding: 8px 0;
    }
    
    .mobile-menu-lang {
        width: 45px;
        height: 36px;
    }
    
    .mobile-menu-lang i {
        font-size: 24px;
    }
}

/* Regole specifiche per schermi con altezza limitata (landscape, tablet landscape, etc.) */
@media (max-height: 600px) {
    .mobile-menu-content {
        padding: 12px;
    }
    
    .mobile-menu-header {
        margin-bottom: 20px;
    }
    
    .mobile-menu-items {
        margin-bottom: 20px;
    }
    
    .mobile-menu-item {
        padding: 12px 0;
        font-size: 17px;
    }
    
    .mobile-menu-auth {
        margin-bottom: 18px;
        gap: 12px;
    }
    
    .mobile-menu-footer {
        margin-top: 18px;
        padding-bottom: 15px;
    }
    
    .mobile-menu-social {
        margin-bottom: 15px;
        gap: 18px;
    }
    
    .mobile-menu-social a {
        font-size: 22px;
        padding: 6px;
    }
    
    .mobile-menu-separator {
        margin: 12px 0;
    }
    
    .mobile-menu-languages {
        gap: 12px;
        padding: 10px 0;
    }
    
    .mobile-menu-lang {
        width: 45px;
        height: 35px;
    }
    
    .mobile-menu-lang i {
        font-size: 24px;
    }
}

/* Regole per schermi molto bassi (come alcuni telefoni in landscape) */
@media (max-height: 450px) {
    .mobile-menu-content {
        padding: 10px;
    }
    
    .mobile-menu-header {
        margin-bottom: 15px;
    }
    
    .mobile-menu-logo {
        height: 30px;
    }
    
    .mobile-menu-items {
        margin-bottom: 15px;
    }
    
    .mobile-menu-item {
        padding: 10px 0;
        font-size: 16px;
    }
    
    .mobile-menu-auth {
        margin-bottom: 15px;
        gap: 10px;
    }
    
    .mobile-menu-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .mobile-menu-footer {
        margin-top: 15px;
        padding-bottom: 12px;
    }
    
    .mobile-menu-social {
        margin-bottom: 12px;
        gap: 15px;
    }
    
    .mobile-menu-social a {
        font-size: 20px;
        padding: 5px;
    }
    
    .mobile-menu-separator {
        margin: 10px 0;
    }
    
    .mobile-menu-languages {
        gap: 12px;
        padding: 8px 0;
    }
    
    .mobile-menu-lang {
        width: 40px;
        height: 32px;
    }
    
    .mobile-menu-lang i {
        font-size: 20px;
    }
}

/* Prevent body scroll when mobile menu is open */
body.overflow-hidden {
    overflow: hidden !important;
}

/* ================================ RESPONSIVE LOGIN BUTTONS ================================ */

/* Above 430px - make login/register buttons inline */
@media (min-width: 430px) {
    .mobile-menu-auth {
        flex-direction: row !important;
        gap: 10px !important;
    }

    .mobile-menu-btn {
        flex: 1;
        font-size: 14px !important;
        padding: 10px 16px !important;
    }
}

/* ================================ FOOTER REDESIGNED ================================ */

.footer-redesigned {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem 0 1rem 0;
    margin-top: 3rem;
    position: relative;
    /* Fix per problemi di ridimensionamento */
    min-height: 200px;
    overflow: visible;
    transform: translateZ(0);
    /* Force hardware acceleration */
}

.footer-redesigned .container {
    position: relative;
    z-index: 2;
}

/* Forza il layout orizzontale per la riga principale */
.footer-redesigned .row.py-5 {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    min-height: 120px;
}

.footer-redesigned .row.py-5>.col-lg-3,
.footer-redesigned .row.py-5>.col-lg-7,
.footer-redesigned .row.py-5>.col-lg-2 {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Footer Logos Section - Sistema anti-overlap */
.footer-logos-section {
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 120px;
    overflow: hidden;
    /* Previene overflow */
    width: 100%;
}

.footer-logos-section .d-flex {
    width: 100%;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-start;
    min-height: 100%;
    gap: clamp(0.5rem, 2vw, 1.5rem) !important;
    /* Gap responsive */
    overflow: hidden;
}

.footer-logo {
    flex-shrink: 1;
    flex-grow: 0;
    min-width: 50px;
    /* Larghezza minima assoluta */
    max-width: calc(45% - 0.5rem);
    /* Mai più del 45% dello spazio disponibile */
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo img {
    max-width: 100%;
    max-height: clamp(50px, 8vh, 90px);
    /* Altezza responsive con limiti */
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}

.footer-logo img:hover {
    transform: scale(1.03);
    /* Ridotto per evitare overflow durante hover */
}

/* Footer Description - Text sempre leggibile */
.footer-eu-text {
    color: #545454;
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
    margin: 0;
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: block;
    width: 100%;
}

/* Back to Top Button Desktop */
.footer-back-to-top {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: end;
    height: 100%;
}

/* Footer Legal Section */
.footer-legal-section {
    display: flex;
    align-items: center;
    height: 100%;
}

.footer-legal-section .d-flex {
    width: 100%;
}

/* Back to Top Button - Stile unificato */
.btn-back-to-top,
.btn-back-to-top-mobile {
    border-radius: 6px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(27, 95, 178, 0.3);
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
    border: none;
    background-color: var(--bs-primary);
    color: white;
}

.btn-back-to-top:hover,
.btn-back-to-top-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(27, 95, 178, 0.4);
    background-color: var(--bs-primary);
    color: white;
}

.btn-back-to-top svg,
.btn-back-to-top-mobile svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Spacing specifico per il mobile button */
.btn-back-to-top-mobile {
    margin-left: 0 !important;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    min-height: 60px;
    position: relative;
    z-index: 1;
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Fix per visibilità footer-bottom durante ridimensionamento */
.footer-bottom {
    transition: all 0.2s ease-in-out;
    will-change: auto;
    contain: layout;
}

.footer-bottom .row {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    min-height: 60px;
}

.footer-bottom .col-md-6 {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Social Links */
.footer-social-link {
    color: #6c757d;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.7);
    line-height: 40px;
    text-align: center;
    vertical-align: middle;
}

.footer-social-link .social-icon {
    margin: 0 !important;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.footer-social-link i,
.footer-social-link svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    line-height: 1;
    text-align: center;
    margin: 0;
}

.footer-social-link:hover {
    color: var(--bs-primary);
    background: rgba(27, 95, 178, 0.1);
    transform: translateY(-2px);
}

.footer-social-link:hover .social-icon,
.footer-social-link:hover i,
.footer-social-link:hover svg {
    color: inherit;
}

/* Legal Links */
.footer-legal-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.25rem 0;
}

.footer-legal-link:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

.footer-separator {
    color: #6c757d;
    font-weight: 300;
    display: inline-block !important;
    margin: 0 8px;
}

/* Mantiene il separatore visibile anche su mobile */
@media (max-width: 767.98px) {
    .footer-separator {
        display: inline-block !important;
        margin: 0 5px;
    }
}

/* Mantiene il separatore visibile su tablet */
@media (min-width: 768px) and (max-width: 991.98px) {
    .footer-separator {
        display: inline-block !important;
        margin: 0 6px;
    }
}

/* ================================ END FOOTER SEPARATOR ALWAYS VISIBLE ================================ */

/* ================================ FOOTER RESPONSIVE ================================ */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .footer-eu-text {
        font-size: 1.1rem;
        padding: 0 1rem;
    }



    .footer-logos-section .d-flex {
        gap: clamp(1rem, 3vw, 2.5rem) !important;
    }

    .footer-logos-section {
        min-height: 130px;
    }

    .footer-logo img {
        max-height: 100px;
        /* Dimensione più generosa su schermi grandi */
    }

    .footer-back-to-top {
        min-height: 130px;
    }

    /* Forza le colonne a rimanere sulla stessa riga */
    .footer-redesigned .row.py-5>.col-lg-3,
    .footer-redesigned .row.py-5>.col-lg-7,
    .footer-redesigned .row.py-5>.col-lg-2 {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }
}

/* Medium screens (768px to 1199px) */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .footer-redesigned .row.py-5 {
        padding: 2rem 0 !important;
    }

    .footer-eu-text {
        font-size: 0.95rem;
        /* Leggermente più piccolo per dare più spazio */
        padding: 0 0.5rem;
        line-height: 1.4;
        /* Miglior line-height per leggibilità */
    }

    .footer-logos-section {
        min-height: 90px;
    }

    .footer-logos-section .d-flex {
        gap: clamp(0.75rem, 2vw, 1.5rem) !important;
    }

    .footer-logo img {
        max-height: 80px;
        /* Dimensione appropriata per tablet */
    }


    .footer-back-to-top {
        min-height: 90px;
    }

    /* Forza le colonne a rimanere sulla stessa riga anche su tablet */
    .footer-redesigned .row.py-5>.col-lg-3,
    .footer-redesigned .row.py-5>.col-lg-7,
    .footer-redesigned .row.py-5>.col-lg-2 {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }

    .footer-redesigned .row.py-5>.col-lg-3 {
        flex-basis: 25%;
        max-width: 25%;
        min-width: 200px;
        /* Larghezza minima per i loghi */
    }

    .footer-redesigned .row.py-5>.col-lg-7 {
        flex-basis: 58.333333%;
        max-width: 58.333333%;
        flex-grow: 1;
        /* Permette al testo di espandersi */
    }

    .footer-redesigned .row.py-5>.col-lg-2 {
        flex-basis: 16.666667%;
        max-width: 16.666667%;
        min-width: 100px;
        /* Larghezza minima per il bottone */
    }
}

/* Small and medium screens - Layout mobile friendly */
@media (max-width: 767.98px) {
    .footer-redesigned .row.py-5 {
        padding: 1.5rem 0 !important;
        flex-direction: column !important;
        flex-wrap: wrap !important;
        align-items: stretch;
    }

    /* Su mobile le colonne vanno in verticale ma i loghi rimangono affiancati */
    .footer-redesigned .row.py-5>.col-lg-3,
    .footer-redesigned .row.py-5>.col-lg-7,
    .footer-redesigned .row.py-5>.col-lg-2 {
        flex-basis: auto;
        max-width: 100%;
        width: 100%;
    }

    /* Loghi sempre sulla stessa linea, centrati */
    .footer-logos-section .d-flex {
        justify-content: center !important;
        gap: 2rem !important;
        margin-bottom: 1.5rem;
        flex-wrap: nowrap !important;
    }



    /* Testo EU mantiene dimensione leggibile */
    .footer-eu-text {
        font-size: 1rem !important;
        padding: 0;
        margin-bottom: 0;
        text-align: justify;
    }

    .footer-logos-section {
        min-height: 90px;
    }

    .footer-social .d-flex {
        gap: 1rem !important;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-bottom .row {
        text-align: center;
    }

    /* Mobile button styling - layout orizzontale */
    .footer-legal-section .d-flex {
        justify-content: center !important;
        align-items: center;
        flex-wrap: nowrap;
        gap: 1rem !important;
    }

    .footer-mobile-button {
        margin-left: 0 !important;
        flex-shrink: 0;
    }
}

/* Tablet and medium screen adjustments */
@media (min-width: 576px) and (max-width: 767.98px) {
    .footer-redesigned .row.py-5 {
        padding: 1.5rem 0 !important;
        flex-direction: column !important;
    }

    .footer-redesigned .row.py-5>.col-lg-3,
    .footer-redesigned .row.py-5>.col-lg-7,
    .footer-redesigned .row.py-5>.col-lg-2 {
        flex-basis: auto;
        max-width: 100%;
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Su tablet i loghi rimangono sempre affiancati e centrati */


    .footer-logos-section .d-flex {
        justify-content: center !important;
        gap: 1.5rem !important;
        flex-wrap: nowrap !important;
    }



    .footer-eu-text {
        text-align: center;
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    .footer-back-to-top {
        text-align: center;
    }
}

/* Extra small screens (up to 575px) */
@media (max-width: 575.98px) {
    /* Loghi sempre sulla stessa linea anche su schermi piccoli */

    .footer-logos-section .d-flex {
        justify-content: center !important;
        gap: clamp(0.5rem, 2vw, 1.5rem) !important;
        align-items: center;
    }

    .footer-logo img {
        max-height: 70px;
        /* Dimensione per schermi medi */
    }



    /* Testo EU sempre leggibile */
    .footer-eu-text {
        font-size: 0.95rem !important;
        line-height: 1.5;
    }

    .footer-logos-section {
        min-height: 80px;
    }

    .footer-logo img {
        max-height: 60px;
        /* Dimensione compatta per schermi piccoli */
    }

    /* Layout links legali in colonna su schermi molto piccoli */
    .footer-legal-section .d-flex {
        flex-direction: column;
        gap: 1rem !important;
        align-items: center;
        justify-content: center !important;
    }

    .footer-legal .d-flex {
        margin-bottom: 0.5rem;
        justify-content: center;
    }

    /* Mette i link privacy in una riga e il pulsante sotto, tutto centrato */
    .footer-legal {
        margin-bottom: 0.5rem;
        text-align: center;
    }

    .footer-mobile-button {
        margin-top: 0.5rem;
        align-self: center;
    }
}

/* ================================ END FOOTER RESPONSIVE ================================ */

/* Breakpoint specifico per schermi medi dove i loghi potrebbero andare sotto */
@media (min-width: 900px) and (max-width: 1199.98px) {
    .footer-redesigned .row.py-5 {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch;
    }

    .footer-redesigned .row.py-5>.col-lg-3 {
        flex: 0 0 22% !important;
        max-width: 22% !important;
        min-width: 180px !important;
    }

    .footer-redesigned .row.py-5>.col-lg-7 {
        flex: 1 1 auto !important;
        max-width: none !important;
        padding: 0 1rem;
    }

    .footer-redesigned .row.py-5>.col-lg-2 {
        flex: 0 0 15% !important;
        max-width: 15% !important;
        min-width: 80px !important;
    }

    .footer-eu-text {
        font-size: 0.9rem;
        line-height: 1.3;
    }



    .footer-logos-section .d-flex {
        gap: clamp(0.5rem, 1.5vw, 1rem) !important;
    }

    .footer-logo img {
        max-height: 50px;
        /* Dimensione minima per schermi molto piccoli */
    }
}

/* ================================ FOOTER GLOBAL FIXES ================================ */

/* Assicura che i loghi del footer non vadano mai in wrap su TUTTI gli schermi */
.footer-logos-section .d-flex {
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    box-sizing: border-box;
}

.footer-logo {
    flex-shrink: 1 !important;
    min-width: 50px !important;
    /* Larghezza minima assoluta */
    max-width: 45% !important;
    /* Mai più del 45% dello spazio disponibile */
    box-sizing: border-box;
}

/* Sistema di dimensionamento responsive per i loghi */
.footer-logo img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    box-sizing: border-box;
}

/* Forza il layout orizzontale del footer principale */
.footer-redesigned .row.py-5 {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
}

/* Su schermi desktop e tablet forza layout orizzontale */
@media (min-width: 768px) {
    .footer-redesigned .row.py-5 {
        flex-wrap: nowrap !important;
    }
}

/* Prevenire problemi di rendering durante il ridimensionamento */
@media (prefers-reduced-motion: no-preference) {
    .footer-redesigned * {
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
}

/* Fix per browser che hanno problemi con il ridimensionamento */
@media all {
    .footer-bottom {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        -moz-backface-visibility: hidden;
        -ms-backface-visibility: hidden;
    }

    .footer-redesigned {
        -webkit-transform: translateZ(0);
        -moz-transform: translateZ(0);
        -ms-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* ================================ FOOTER LOGO EMERGENCY FALLBACKS ================================ */

/* Per schermi estremamente piccoli - protezione assoluta contro overlap */
@media (max-width: 320px) {
    .footer-logo {
        max-width: 40% !important;
        min-width: 40px !important;
    }

    .footer-logo img {
        max-height: 40px !important;
    }

    .footer-logos-section .d-flex {
        gap: 0.25rem !important;
    }
}

/* Container query fallback per situazioni di spazio limitato */
@container (max-width: 400px) {
    .footer-logo {
        max-width: 42% !important;
    }

    .footer-logo img {
        max-height: 45px !important;
    }
}

/* ================================ END FOOTER LOGO EMERGENCY FALLBACKS ================================ */

/* ================================ FOOTER UNIFIED SINGLE ROW LAYOUT ================================ */

/* Footer Bottom Content - Layout unificato per una singola riga */
.footer-bottom-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    flex-wrap: wrap;
}

/* Wrapper per le sezioni del footer */
.footer-social-wrapper,
.footer-back-to-top-wrapper,
.footer-legal-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Social wrapper specifico */
.footer-social-wrapper {
    order: 1;
    justify-content: flex-start;
}

/* Back to top wrapper */
.footer-back-to-top-wrapper {
    order: 2;
    justify-content: center;
}

/* Legal wrapper */
.footer-legal-wrapper {
    order: 3;
    justify-content: flex-end;
}

/* Bottone back to top unificato */
.btn-back-to-top-unified {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
}

.btn-back-to-top-unified:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-back-to-top-unified svg {
    width: 16px;
    height: 16px;
}

/* Media queries per il layout responsivo */

/* Desktop e tablet grandi - tutto in una riga */
@media (min-width: 992px) {
    .footer-bottom-content {
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .footer-social-wrapper {
        flex: 0 0 auto;
        min-width: fit-content;
    }

    .footer-back-to-top-wrapper {
        flex: 0 0 auto;
        justify-content: center;
    }

    .footer-legal-wrapper {
        flex: 0 0 auto;
        min-width: fit-content;
    }
}

/* Tablet medio - mantiene una riga ma con spazi ridotti */
@media (min-width: 768px) and (max-width: 991.98px) {
    .footer-bottom-content {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-social-wrapper,
    .footer-back-to-top-wrapper,
    .footer-legal-wrapper {
        flex: 0 0 auto;
    }

    /* Se non c'è spazio, social e legal vanno su righe separate */
    .footer-social-wrapper {
        order: 1;
        flex-basis: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    .footer-back-to-top-wrapper {
        order: 2;
        flex-basis: auto;
    }

    .footer-legal-wrapper {
        order: 3;
        flex-basis: auto;
    }
}

/* Mobile - layout su 3 righe */
@media (max-width: 767.98px) {
    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-social-wrapper {
        order: 1;
        width: 100%;
        justify-content: center;
    }

    .footer-back-to-top-wrapper {
        order: 2;
        width: 100%;
        justify-content: center;
    }

    .footer-legal-wrapper {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Breakpoint intermedio per screen medi dove forse entra tutto in una riga */
@media (min-width: 768px) and (max-width: 991.98px) {

    /* Prova a mantenere tutto su una riga se c'è spazio */
    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-around;
    }

    .footer-social-wrapper {
        order: 1;
        flex-basis: auto;
        margin-bottom: 0;
    }
}

/* Ottimizzazione per schermi molto larghi */
@media (min-width: 1400px) {
    .footer-bottom-content {
        padding: 25px 0;
        gap: 30px;
    }
}

/* ================================ END FOOTER UNIFIED SINGLE ROW LAYOUT ================================ */

/* ================================ FOOTER BACK TO TOP BUTTONS VISIBILITY CONTROL ================================ */

/* Su large screens (≥992px): nascondi il pulsante unified e mostra solo quello desktop */
@media (min-width: 992px) {
    .footer-back-to-top-wrapper {
        display: none !important;
    }
}

/* Su small/medium screens (<992px): nascondi il pulsante desktop e mostra solo quello unified */
@media (max-width: 991.98px) {
    .footer-back-to-top {
        display: none !important;
    }
}

/* ================================ END FOOTER BACK TO TOP BUTTONS VISIBILITY CONTROL ================================ */