
header {
    position: sticky;
    top: 0;
    z-index: 10;

    height: 90px;
    background-color: var(--light-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container{
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 20px;

    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;

    position: relative;
}

@media (max-width: 1300px){
    .header-container{
        max-width: 1250px;
    }
}

.logo{
    position: absolute;
    left: 20px;
    top: 30px;
    width: 200px;
    z-index: 100;

    background-color: var(--light-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);

    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px;

}
.logo a{
    text-decoration: none;
}

.logo img{
    display: block;
    max-width: 100%;
    height: auto;
    aspect-ratio: auto;
}

@media (max-width: 870px) {

    .header-container{
        justify-content: space-between;
    }
    .logo{
        position: static;
        left: 0px;
        top: 0px;
        width: 90px;
        z-index: 100;
        box-shadow: unset;

    }
}

/*HAMBURGER MENU*/

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1100;
}

.hamburger .bar {
    width: 30px;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

@media (max-width: 870px) {

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 90px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 90px);
        z-index: 1100;

        background-color: var(--light-color);
        backdrop-filter: blur(10px);

        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: clamp(1.2rem, 5vh, 2.5rem);

        transition: 0.4s ease-in-out;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }

    /* Classe JS */
    .nav-menu.active {
        right: 0;
    }

    .nav-menu a{
        font-size: 1.5rem;
    }

    .custom-dropdown{
        font-size: 1.2rem;
    }

    .btn-cta {
        width: 80%;
        text-align: center;
        padding: 15px;
        font-size: 1.1rem;
    }

    /* ANIMAZIONE HAMBURGER (Diventa una X) */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--primary-color);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--primary-color);
    }
}

/*FINE HAMBURGER MENU*/


nav{

    display: flex;
    align-items: center;
    gap: 30px;
}

nav a{
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 400;
}

/*MENU DROPDOWN CAMBIO LINGUA*/
.custom-dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-family: var(--text-font), sans-serif;
    font-size: 0.8rem;
}


.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background-color: var(--light-color);
    transition: all 0.3s ease;
}

.dropdown-trigger:hover {
    background-color: #f9f9f9;
    border-color: #bbb;
}

/* Immagini bandiere */
.custom-dropdown img {
    width: 20px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.arrow {
    font-size: 0.7rem;
    color: #666;
}

/* Menu a tendina nascosto */
.dropdown-options {
    position: absolute;
    top: 120%;
    left: 0;
    width: 140px;
    background-color: var(--light-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    list-style: none;
    padding: 5px 0;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* QUANDO APERTO (Classe aggiunta via JS) */
.custom-dropdown.open .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-options li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #333;
    transition: background 0.2s;
}

.dropdown-options li:hover {
    background-color: #f0f0f0;
}
/*FINE MENU DROPDOWN CAMBIO LINGUA*/


.btn-cta {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-cta:hover {
    background-color: var(--primary-color-hover);
}

/*MAIN*/
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1300px){
    .content-wrapper{
        max-width: 800px;
    }
}

/*CAROSELLI*/
.carousel-section {
    display: flex;
    padding: 30px 35px;
    margin: 3em auto;
    align-items: center;
    justify-content: center;
}

.wrapper {
    width: 100%;
    position: relative;
}


.wrapper i {
    top: 50%;
    height: 50px;
    width: 50px;
    cursor: pointer;
    font-size: 1.25rem;
    position: absolute;
    text-align: center;
    line-height: 50px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 3px 6px rgba(0,0,0,0.23);
    transform: translateY(-50%);
    transition: transform 0.1s linear;
    z-index: 4;
}

.wrapper i:active {
    transform: translateY(-50%) scale(0.85);
}

.wrapper i:first-child {
    left: -22px;
}

.wrapper i:last-child {
    right: -22px;
}

.wrapper .carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% / 3) - 12px); /* 3 Card su Desktop */
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Nasconde scrollbar su Firefox */
}

/* Nasconde scrollbar su ChromeSafari*/
.carousel::-webkit-scrollbar {
    display: none;
}

.carousel.no-transition {
    scroll-behavior: auto;
}

.carousel.dragging {
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.carousel.dragging .card {
    cursor: grabbing;
    user-select: none;
}

.carousel :where(.card, .img){
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel .card {
    scroll-snap-align: start;
    aspect-ratio: 4/3;
    list-style: none;
    cursor: pointer;
    padding-bottom: 5px;
    padding-right: 5px;

    flex-direction: column;
    border-radius: 5%;
}

.card .img {
    width: 100%;
    height: 100%;
    border-radius: 5%;
}

.card .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 5%;
    box-shadow: 4px 4px 5px rgba(0,0,0,0.6);
}


/* Responsive */
@media screen and (max-width: 900px) {
    .wrapper .carousel {
        grid-auto-columns: calc((100% / 2) - 9px); /* 2 Card su Tablet */
    }
}

@media screen and (max-width: 600px) {
    .wrapper .carousel {
        grid-auto-columns: 100%; /* 1 Card su Smartphone */
    }
}
/* FINE CAROSELLI*/




/* --- FOOTER STYLES --- */
.site-footer {
    background-color: #1a1a2e;
    color: #d1d1e0;
    padding-top: 60px;
    font-size: 0.95rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

/* Colonne */
.footer-col {
    flex: 1;
    min-width: 250px;
}

/* Tipografia Footer */
.footer-logo {
    font-family: var(--text-font), serif;
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.footer-col h4 {
    font-family: var(--text-font), serif;
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #404080;
    display: inline-block;
    padding-bottom: 5px;
}

.footer-desc {
    line-height: 1.6;
    margin-bottom: 20px;
    color: #b3b3cc;
}

/* Link e Liste */
.footer-links, .contact-list {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #d1d1e0;
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

/* Lista Contatti con Icone */
.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-list a {
    color: #d1d1e0;
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
}
.contact-list a:hover {
    color: #fff;
    padding-left: 5px;
}

.contact-list i {
    color: #fff;
    font-size: 1.2rem;
    margin-top: 2px;
}

/* Icone Social */
.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    transition: transform 0.3s, color 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: #a3a3c2;
}

/* Barra Inferiore (Copyright) */
.footer-bottom {
    background-color: #11111f;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    font-size: 0.8rem;
    color: #888;
}

.footer-bottom a {
    color: #888;
    text-decoration: none;
    margin: 0 5px;
}

.footer-bottom a:hover {
    color: #fff;
}

.credits{
    font-size: 0.7rem;
}

/* RESPONSIVE FOOTER */
@media (max-width: 870px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .contact-list li {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-col h4 {
        border-bottom: none;
        text-decoration: underline;
        text-underline-offset: 5px;
        text-decoration-color: var(--primary-color-hover);
    }
}


/* --- PAGINA 404 NOT FOUND --- */
.error-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    background-color: #f9f9f9;
    padding: 60px 20px;
    text-align: center;
}

.error-container {
    max-width: 600px;
    background-color: white;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.error-icon {
    font-size: 5rem;
    color: #a3a3c2;
    display: block;
    margin-bottom: 10px;
}

.error-code {
    font-size: 6rem;
    line-height: 1;
    margin-bottom: 10px;
}

.error-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.error-desc {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 40px;
}

.error-btn {
    align-items: center;
    gap: 8px;
}

/* Mobile */
@media (max-width: 870px) {
    .error-container {
        padding: 30px 20px;
    }
    .error-code {
        font-size: 4.5rem;
    }
    .error-title {
        font-size: 1.5rem;
    }
    .error-icon {
        font-size: 4rem;
    }
}