/* Importing Inter Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

/* Resetting default styles */
*,
*::before,
*::after {
    margin: 0; 
    padding: 0;
    box-sizing: border-box;
}

:root {
    --site-max-width: 1350px;

    /* Colors */
    --primary-color: #fbd353;
    --text-color: #000;
    --white-color: #fff;

    /* Font & Typography */
    --body-font: "Inter", sans-serif;
    --font-size-xxl: 2.3rem;
    --font-size-xl: 1.7rem;
    --font-size-l: 1.3rem;
    --font-size-n: 1rem;
    --font-size-m: 0.9rem;

    /* Font Weight */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    --text-border-width: 10px;
}

body {
    font-family: var(--body-font);
}

/* Remove scrollbar when mobile menu active */
body.active-mobile-menu {
    overflow-y: hidden;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    display: block;
    width: 100%;
    height: auto;
}

/* --------------------- STILE BOTTONE CAMBIATO --------------------- */

.button-with-icon {
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px 18px;
    font-size: var(--font-size-n);
    font-weight: var(--font-semibold);
    background: var(--primary-color);
    transition: 0.2s ease;
    margin-bottom: 10px;
}

.button-with-icon .icon {
    margin-right: 10px; /* Spazio tra l'icona e il testo */
    width: 20px; /* Larghezza dell'icona */
    height: 20px; /* Altezza dell'icona */
    filter: invert(0);
}

.button-with-icon:hover {
    color: var(--white-color);
    background: var(--text-color);
    
}

.button-with-icon:hover .icon {
    filter: invert(1); /* Inverte il colore dell'icona all'hover */
    transition: 0.2s ease;
}

/* --------------------- STILE BOTTONE CAMBIATO --------------------- */

/* Styles for the site header */
.site-header {
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 5;
    background-color: var(--white-color);
    transition: 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* ombra header */
}

.site-header.scrolled {
    background: var(--white-color); /* HEADER BIANCO diverso dall'homepage */
}

.site-header .navbar {
    display: flex;
    align-items: center;
    margin: 0 auto;
    padding: 25px 8px 25px 20px;
    max-width: var(--site-max-width);
    /* Set maximum width */
    justify-content: space-between;
}

.navbar .logo-link {
    max-width: 170px;
}

/* Styles for the navigation menu links */
.navbar .menu-links {
    display: flex;
}

.navbar .menu-links .menu-item {
    position: relative;
    /* Position for dropdown */
    margin-right: 22px;
}

.navbar .menu-links .menu-item:last-child {
    margin-right: 0;
}

/* Create pseudo-element for menu item separator */
.navbar .menu-links .menu-item:not(.no-separator)::after {
    content: "";
    position: absolute;
    right: -12px;
    top: 50%;
    width: 4px;
    height: 50%;
    background: var(--primary-color);
    transform: translateY(-50%);
}

.navbar .menu-links .menu-item a {
    float: left;
    display: flex;
    gap: 5px;
    align-items: center;
    color: var(--text-color);
    font-size: var(--font-size-m);
    padding: 9px 12px;
}

/* Hover styles for menu items */
.navbar .menu-links .menu-item:hover {
    background: var(--primary-color);
}

.navbar .menu-links .menu-item a:hover,
.navbar .dropdown-links .dropdown-item a {
    color: var(--text-color);
}

.navbar .menu-links .menu-item a .dropdown-icon {
    font-size: var(--font-size-l);
    transition: 0.2s ease;
}

/* Rotate Dropdown arrow on hover or on active-dropdown class */
body:not(.active-mobile-menu) .navbar .menu-links .menu-item:hover a .dropdown-icon,
.navbar .menu-links .menu-item.active-dropdown a .dropdown-icon {
    transform: rotate(-180deg);
}

/* Dropdown styles */
.navbar .dropdown-links {
    position: absolute ;
    width: 100%;
    top: 100%;
    z-index: 5;
    overflow-y: auto;
    display: none;
    overflow-x: hidden;
    background: var(--primary-color);
}

/* Show dropdown on parent hover only if body 
doesn't contain active-mobile-menu class */
body:not(.active-mobile-menu) .navbar .menu-item:hover .dropdown-links {
    display: block;
}

.navbar .dropdown-links .dropdown-item a:hover {
    color: var(--white-color); 
}

/* Styles for Menu Toggler Button */
.navbar .menu-toggler {
    background: none;
    padding: 0;
    display: none;
    color: var(--text-color);
    font-size: var(--font-size-xl);
}

.site-header.scrolled .navbar .menu-toggler {
    color: var(--white-color);
}



/* ----------------------DA RIVEDERE---------------------- */


.page-title-section {
    min-height: 35vh;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    padding-bottom: 20px;
    align-items: flex-end ;
    max-width: var(--site-max-width);
}

/* Styles for the title yellow box */
.page-title-content {
    background-color: var(--primary-color);
    padding: 10px;
    font-size: var(--font-size-l);
}

/* Styles for the content within sections */
.section-content {
    margin: 0 auto;
    padding: 0 20px;
    max-width: var(--site-max-width);
}

.section-content:after {
    content: "";
    display: table;
    clear: both;
}

.project-section .section-content .section-title {
    line-height: 1.2;
    color: var(--text-color);
    font-weight: var(--font-medium);
    font-size: var(--font-size-xl);
    padding-left: 5px;
    padding-bottom: 30px;
}

.project-section .section-content .section-title b
/*.event-section .section-content .card-title b*/ {
    padding-bottom: 5px;
    font-weight: var(--font-semibold);
    border-bottom: var(--text-border-width) solid var(--primary-color);
}

.project-section .section-content .section-subtitle {
    line-height: 1.2;
    color: var(--text-color);
    font-weight: var(--font-medium);
    font-size: var(--font-size-l);
    padding-left: 5px;
    padding-bottom: 30px;
}

.content-title {
    font-size: var(--font-size-n);
    margin-bottom: 20px;

}

.content-title b {
    font-size: var(--font-size-n);
    border-bottom: 7px solid var(--primary-color)
}

.project-section .section-content .lista-partecipanti {
    line-height: 2rem;
    margin-left: 20px;
    margin-bottom: 30px;
    list-style: url("../images/list_square.svg");
}

.main-highlight {
    color: var(--primary-color);
    font-weight: var(--font-bold);
}

.card-item {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem; /* Add some spacing between the image and content */
    overflow: hidden;
}

.card-column {
    flex: 1;
}

.card-image {
    flex: 0 1 23.5%; /* This means the image will take up 35% of the container */
}

.card-list .card-item {
    display: flex;
    gap: 50px;
    margin-top: 10px;
    margin-bottom: 0;
    align-content: flex-start;}

/* Styles for columns within card items */
.card-list .card-item .card-column {
    width: calc(50% / 2);
}

.card-list .card-item .card-details {
    margin-top: 5px;
    line-height: 1.5; /* Interlinea */

}


/* CAROUSEL style */

.carousel-container {
    position: relative;
    max-width: 800px;
    margin: auto;
    overflow: hidden;
    height: auto;
    align-items: center;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: auto; /* Garantisce al carosello di adattarsi all'altezza del contenuto */  
}

.carousel-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.9s ease; /* Aggiungi una transizione di opacità */
}

.carousel-slide img {
    width: 100%;
    vertical-align: middle;
    height: auto;
}

.carousel-slide.active {
    display: block;
    opacity: 1;  
}

.carousel-control {
    position: absolute;
    top: 50%;
    width: auto;
    padding: 12px;
    margin-top: -22px;
    margin-left: 5px;
    margin-right: 5px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    user-select: none;
    cursor: pointer;
    background-color: rgba(0,0,0,0.6);
    border: none;
}

.carousel-control-next {
    right: 0;
}

.carousel-control-prev {
    left: 0;
}

.carousel-control:hover {
    background-color: rgba(0,0,0,0.8);
}


/* FASI PERCORSO style */

.phases-column {
    float: left;
    width: 33.333%;
    margin-top: 0;
    padding-right: 10px;
    padding-left: 40px;
}

.phases-row {
    margin-bottom: 50px;
}

.phases-row:after {
    content: "";
    display: table;
    clear: both;
}

.phase-text {
    line-height: 1.5rem;
    margin-bottom: 20px;
}

.first-phase, .second-phase, .third-phase, .fourth-phase, .fifth-phase, .sixth-phase, .seventh-phase, .eighth-phase {
    line-height: 1.5rem;
    margin-bottom: 5px;;
    color: var(--primary-color);
    
}

.first-phase::before {
    content: url("../images/1.svg");
    position: relative;
    left: -45px;
    top: 45px;
    display: inherit;
    width: 45px; /* Larghezza dell'icona */
    height: 45px; /* Altezza dell'icona */
}

.second-phase::before {
    content: url("../images/2.svg");
    position: relative;
    left: -45px;
    top: 45px;
    display: block;
    width: 45px; /* Larghezza dell'icona */
    height: 45px; /* Altezza dell'icona */
}

.third-phase::before {
    content: url("../images/3.svg");
    position: relative;
    left: -45px;
    top: 45px;
    display: inherit;
    width: 45px; /* Larghezza dell'icona */
    height: 45px; /* Altezza dell'icona */
}

.fourth-phase::before {
    content: url("../images/4.svg");
    position: relative;
    left: -45px;
    top: 45px;
    display: inherit;
    width: 45px; /* Larghezza dell'icona */
    height: 45px; /* Altezza dell'icona */
}

.fifth-phase::before {
    content: url("../images/5.svg");
    position: relative;
    left: -45px;
    top: 45px;
    display: inherit;
    width: 45px; /* Larghezza dell'icona */
    height: 45px; /* Altezza dell'icona */
}

.sixth-phase::before {
    content: url("../images/6.svg");
    position: relative;
    left: -45px;
    top: 45px;
    display: inherit;
    width: 45px; /* Larghezza dell'icona */
    height: 45px; /* Altezza dell'icona */
}

.seventh-phase::before {
    content: url("../images/7.svg");
    position: relative;
    left: -45px;
    top: 45px;
    display: inherit;
    width: 45px; /* Larghezza dell'icona */
    height: 45px; /* Altezza dell'icona */
}

.eighth-phase::before {
    content: url("../images/8.svg");
    position: relative;
    left: -45px;
    top: 45px;
    display: inherit;
    width: 45px; /* Larghezza dell'icona */
    height: 45px; /* Altezza dell'icona */
}


/* PRESENTAZIONE SOGGETTI style */

.presentation-text {
    line-height: 1.5rem;
    margin-bottom: 20px;
}

.winner-column {
    float: left;
    width: 33.333%;
    margin-top: 10px;
    padding-right: 50px;
    padding-left: 40px;
}

.winner-row {
    margin-bottom: 50px;
}

/* Clear floats after the columns */
.winner-row:after {
    content: "";
    display: table;
    clear: both;
}

.vincitori-text {
    line-height: 1.3rem;
    margin-top: 5px;
    margin-bottom: 20px;
}

.first-winner, .second-winner, .third-winner {
    line-height: 1.5rem;
    color: var(--primary-color);
    font-size: var(--font-size-l);
}

.first-winner::before {
    content: url("../images/first_winner.svg");
    position: relative;
    left: -35px;
    top: 0;
    display: inherit;
    width: 25px;
    height: 25px;
}

.second-winner::before {
    content: url("../images/second_winner.svg");
    position: relative;
    left: -35px;
    top: 25px;
    display: inherit;
    width: 25px;
    height: 25px;
}

.third-winner::before {
    content: url("../images/third_winner.svg");
    position: relative;
    left: -35px;
    top: 25px;
    display: inherit;
    width: 25px;
    height: 25px;
}



.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-bottom: 50px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* -------------------------------------------------------------------------*/



/* FOOTER style */
.footer {
    padding: 50px 0;
    background: var(--primary-color);
}

.footer .section-content {
    display: flex;
    gap: 80px;
    justify-content: space-between;
}

.footer .footer-column {
    flex: 1;
}

/* Styles for content titles within footer */
.footer .section-content .content-title {
    margin-bottom: 20px;
    font-weight: var(--font-bold);
    font-size: var(--font-size-n);
}

/* Styles for contact links within footer */
.footer .footer-column.contact a {
    display: flex;
    margin-top: 20px;
    word-break: break-all;
    color: var(--text-color);
    transition: 0.2s ease;
}

.footer .footer-column.contact a:hover,
.footer .footer-column .links a:hover {
    color: var(--white-color);
}

.footer .footer-column.contact a i {
    margin-right: 10px;
    font-size: var(--font-size-l);
}

.footer .footer-column:nth-child(2) {
    flex: 2;
    display: flex;
}

.footer .footer-column .inner-column {
    flex: 1;
}

.footer .inner-column.links a {
    margin-bottom: 10px;
    display: block;
    color: var(--text-color);
    transition: 0.2s ease;
}

/* Styles for sponsor list within sponsors column */
.footer .inner-column.sponsors .sponsor-list {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    /* Set grid columns */
}

.footer .inner-column.sponsors .sponsor-image {
    max-width: 130px;
    object-fit: contain;
    /* Maintain aspect ratio */
}



/* -----------------------------------------------------------------------------------*/



/* Media query for screens up to 1200px width */
@media screen and (max-width: 1200px) {
    :root {
        /* Adjustments to font size */
        --font-size-xxl: 2rem;
    }

    /* Adjustments to header navbar */
    .site-header .navbar {
        padding: 20px 8px 20px 20px;
    }

    .navbar .logo-link {
        max-width: 120px;
    }

    .navbar .menu-links .menu-item {
        margin-right: 0px;
    }

    .navbar .menu-links .menu-item:not(:last-child)::after {
        display: none;
        /* Hide separator */
    }

/* ----------------------DA RIVEDERE---------------------- */
    
    .page-title-section {
        min-height: 35vh;
        margin: 0 auto;
        padding: 0 20px;
        display: flex;
        padding-bottom: 50px;
        align-items: flex-end;
        max-width: var(--site-max-width);
    }

    /* Styles for the title yellow box */
    .page-title-content {
        background-color: var(--primary-color);
        padding: 10px;
        font-size: var(--font-size-l);
    }    
    

/* ---------------------------------------------------------*/        
}


/* Media query for screens up to 1000px width */
@media screen and (max-width: 1050px) {

    /* Adjustments to header navbar and section content */
    .site-header .navbar {
        padding: 20px 20px;
    }

    .section-content {
        padding: 0 20px;
    }

    .navbar .menu-toggler {
        display: block;
    }

    /* Styles for mobile menu */
    .navbar .menu-links {
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        height: auto;
        padding: 60px 40px;
        flex-direction: column;
        background: var(--primary-color);
        transition: top 0.3s ease;
    }

    .active-mobile-menu .navbar .menu-toggler {
        color: var(--text-color) !important;
        z-index: 99;
    }

    .active-mobile-menu .navbar .close-menu-button {
        opacity: 1;
        pointer-events: auto;
    }

    .active-mobile-menu .navbar .menu-links {
        top: 0;
    }

    .navbar .menu-links .menu-item {
        margin-bottom: 8px;
    }

    .navbar .menu-links .menu-item a {
        font-size: var(--font-size-n);
        font-weight: var(--font-semibold);
        color: var(--text-color);
    }

    .navbar .menu-links .menu-item a:hover {
        color: var(--white-color);
    }

    .navbar .dropdown-links {
        top: 0;
        display: none;
        margin-left: 15px;
        position: relative;
        flex-direction: column;
    }

    .navbar .menu-item.active-dropdown .dropdown-links {
        display: flex;
    }

    .navbar .dropdown-links .dropdown-item a {
        font-weight: var(--font-medium);
    }

    
/* ----------------------DA RIVEDERE---------------------- */
    
    .page-title-section {
        min-height: 25vh;
        padding-bottom: 5px;
    }

    .page-title-content {
        padding: 10px;
        font-size: var(--font-size-l);
    }
    
    .project-section .section-content .section-title
    /*.event-section .section-content .card-title*/ {
        margin-top: 20px;
    }
    
    .card-list .card-item {
        width: 100%;
        align-items: flex-start;
        flex-direction: column !important; /* porta le colonne da due a una sola */
    }

    .card-list .card-item .card-column {
        width: 100%;
    }
    
    .carousel-container {
        position: relative;
        overflow: hidden;
        width: 100%;
        height: 100%;
    }
    
    .phases-column {
        width: 100%;
    }
    
    .winner-column {
        width: 100%;
    }  
    
    .video-container {
        margin-bottom: 5px;
    } 
    
/* ---------------------------------------------------------*/    
    
    /* Adjustments to footer section content */
    .footer .section-content {
        gap: 40px;
        flex-direction: column;
    }

    .footer .footer-column.sponsors .sponsor-list {
        gap: 10px;
    }
}

/* Media query for screens up to 550px width */
@media screen and (max-width: 550px) {
    :root {
        /* Adjustments variables value */
        --font-size-xxl: 1.5rem;
        --text-border-width: 7px;
    }

    .site-header .navbar {
        padding: 20px 27px;
    }

    .section-content {
        padding: 0 27px;
    }

    .navbar .menu-toggler {
        color: var(--text-color);
    }

    
/* ----------------------DA RIVEDERE---------------------- */
    
    .page-title-section {
        min-height: 23vh;
        margin-left: 8px;
    }

    .page-title-content {
        font-size: var(--font-size-n);
    }

    .project-section .section-content .section-title
    /*.event-section .section-content .card-title*/ {
        line-height: 1.2;
        color: var(--text-color);
        font-weight: var(--font-medium);
        font-size: var(--font-size-l);
        padding-left: 5px;
        padding-bottom: 30px;
        margin-top: 10px;
    }

    .project-section .section-content .section-title b
    /*.event-section .section-content .card-title b*/ {
        padding-bottom: 5px;
        font-weight: var(--font-semibold);
        border-bottom: var(--text-border-width) solid var(--primary-color);
    }
    
    .project-title b {
        font-size: var(--font-size-m);
        padding-bottom: 2px;
        border-bottom: 7px solid var(--primary-color);
        line-height: 2rem;

    }  
    
    .video-container {
        margin-bottom: 10px;
    }    
/* ---------------------------------------------------------*/    
    
    
    

    .footer .footer-column:nth-child(2) {
        gap: 40px;
        flex-direction: column;
    }

    .footer .inner-column .footer-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(90px, 1fr));
    }

    .footer .footer-column.sponsors .sponsor-list {
        display: flex;
        flex-wrap: wrap;
    }
}