:root {
    --bg-avorio: #FAF7F0;
    --primary-petrolio: #24545A;
    --accent-oro: #C79A45;
    --secondary-salvia: #8FA58B;
    --text-grigio: #3E3E3A;
    --white: #FFFFFF;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-avorio);
    color: var(--text-grigio);
    line-height: 1.6;
}

a {
    color: var(--primary-petrolio);
    text-decoration: none;
    transition: color .3s;
}

a:hover {
    color: var(--accent-oro);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


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

header {
    background-color: var(--white);
    border-bottom: 1px solid rgba(36,84,90,.1);

    position: sticky;
    top: 0;

    z-index: 1000;

    overflow: visible;
}


/* =========================================================
   LOGHI
   ========================================================= */

.header-top {
    position: relative;

    height: 120px;

    display: flex;

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

    padding: 10px 20px;

    overflow: visible;
}


/* =========================================================
   FACEBOOK + YOUTUBE
   ========================================================= */

.logos-left {
    position: absolute;

    left: 20px;
    top: 50%;

    transform: translateY(-50%);

    display: flex;

    align-items: center;

    gap: 10px;
}

.logos-left a {
    display: block;

    width: 45px;
    height: 45px;
}

.logos-left img {
    display: block;

    width: 45px !important;
    height: 45px !important;

    max-width: 45px !important;
    max-height: 45px !important;

    object-fit: contain;
}


/* =========================================================
   LOGO AGM CENTRALE
   ========================================================= */

.logo-center {
    position: absolute;

    left: 50%;
    top: 50%;

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

.logo-center img {
    display: block;

    width: 150px;

    height: auto;

    max-width: 150px;
}


/* =========================================================
   LOGO INSIEME A DESTRA
   ========================================================= */

.logo-right {
    position: absolute;

    right: 20px;
    top: 50%;

    transform: translateY(-50%);
}

.logo-right img {
    display: block;

    width: 320px;

    height: auto;

    max-width: 320px;
}


/* =========================================================
   TITOLO CENTRALE
   ========================================================= */

.header-title {
    width: 100%;

    text-align: center;

    color: var(--primary-petrolio);

    font-size: 26px;

    font-weight: 700;

    letter-spacing: 1px;

    padding: 5px 20px 12px;
}


/* =========================================================
   MENU DESKTOP
   ========================================================= */

.nav-container {
    display: flex;

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

    padding: 10px 20px;

    overflow: visible;
}

nav {
    position: relative;

    overflow: visible;
}

nav ul {
    display: flex;

    list-style: none;

    gap: 15px;
}

nav ul li {
    list-style: none;
}

nav a {
    font-weight: 600;

    font-size: 1rem;

    text-transform: uppercase;

    letter-spacing: .5px;
}

.menu-toggle {
    display: none;

    width: 42px;
    height: 42px;

    background-color: var(--primary-petrolio);

    color: white;

    border: none;

    border-radius: 50%;

    font-size: 1.5rem;

    cursor: pointer;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    padding: 60px 0 80px;

    text-align: center;

    background: linear-gradient(
        180deg,
        var(--white) 0%,
        var(--bg-avorio) 100%
    );
}

.hero h1 {
    font-size: 3rem;

    color: var(--primary-petrolio);

    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;

    max-width: 700px;

    margin: 0 auto 30px;
}

.hero-img-container {
    max-width: 800px;

    margin: 40px auto 0;

    border-radius: 8px;

    overflow: hidden;

    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.hero-img-container img {
    width: 100%;

    height: auto;

    display: block;
}

.btn {
    display: inline-block;

    background-color: var(--primary-petrolio);

    color: var(--white);

    padding: 12px 30px;

    border-radius: 4px;

    font-weight: 600;

    transition: background .3s;
}

.btn:hover {
    background-color: var(--accent-oro);

    color: var(--white);
}


/* =========================================================
   SEZIONI
   ========================================================= */

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;

    font-size: 2rem;

    color: var(--primary-petrolio);

    margin-bottom: 40px;

    position: relative;
}

.section-title::after {
    content: '';

    display: block;

    width: 50px;
    height: 3px;

    background-color: var(--accent-oro);

    margin: 10px auto 0;
}


/* =========================================================
   EVENTO
   ========================================================= */

.next-event-box {
    background-color: var(--white);

    box-shadow: 0 4px 15px rgba(0,0,0,.05);

    border-radius: 8px;

    overflow: hidden;

    display: flex;

    flex-direction: row;

    align-items: stretch;
}

.next-event-img {
    width: 20%;

    flex-shrink: 0;
}

.next-event-img img {
    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;
}

.next-event-content {
    flex: 1;

    padding: 40px;

    border-left: 5px solid var(--accent-oro);
}


/* =========================================================
   CHI SIAMO
   ========================================================= */

/*
   Questa classe riguarda esclusivamente la disposizione
   del contenuto della pagina "Chi Siamo".
*/

.about-layout {
    display: grid;

    grid-template-columns: minmax(0, 1fr) 620px;

    gap: 40px;

    align-items: start;

    width: 100%;
}

.about-text {
    min-width: 0;
}


/* =========================================================
   FOTO TEAM - GRIGLIA 2 x 2
   ========================================================= */

.team-gallery {
    width: 620px;

    display: grid;

    grid-template-columns: 300px 300px;

    grid-template-rows: auto auto;

    gap: 15px 10px;

    justify-content: center;

    align-items: center;
}

.team-gallery img {
    width: 300px;

    height: 220px;

    object-fit: contain;

    display: block;

    margin: 0 auto;

    border-radius: 8px;

    background-color: var(--bg-avorio);
}


/* =========================================================
   FOTO SINGOLE - EVENTUALI ALTRE PAGINE
   ========================================================= */

.about-img img {
    width: 100%;

    height: auto;

    border-radius: 8px;

    box-shadow: 0 5px 15px rgba(0,0,0,.05);
}


/* =========================================================
   GRIGLIE
   ========================================================= */

.grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(300px, 1fr));

    gap: 30px;
}

.card {
    background-color: var(--white);

    padding: 30px;

    border-radius: 8px;

    box-shadow: 0 4px 10px rgba(0,0,0,.02);

    border-top: 3px solid var(--secondary-salvia);
}

.card h3 {
    color: var(--primary-petrolio);

    margin-bottom: 15px;
}


/* =========================================================
   TIMELINE
   ========================================================= */

.timeline {
    position: relative;

    max-width: 800px;

    margin: 0 auto;

    padding: 20px 0;
}

.timeline-item {
    padding: 25px;

    position: relative;

    background: var(--white);

    border-radius: 8px;

    margin-bottom: 30px;

    border-left: 3px solid var(--accent-oro);

    display: flex;

    flex-direction: column;

    gap: 15px;
}

.timeline-thumb img {
    width: 100%;

    height: 100px;

    object-fit: cover;

    border-radius: 4px;
}

.timeline-date {
    font-weight: bold;

    color: var(--accent-oro);

    font-size: 1.2rem;
}


/* =========================================================
   GALLERIA
   ========================================================= */

.gallery-card {
    background-color: var(--white);

    padding: 10px;

    border-radius: 6px;

    box-shadow: 0 4px 10px rgba(0,0,0,.03);

    transition: transform .3s;
}

.gallery-card:hover {
    transform: translateY(-5px);
}

.gallery-card img {
    width: 100%;

    height: 220px;

    object-fit: cover;

    border-radius: 4px;

    display: block;
}

.gallery-caption {
    font-size: .85rem;

    margin-top: 8px;

    color: var(--text-grigio);

    font-style: italic;
}


/* =========================================================
   TABELLE
   ========================================================= */

.table-container {
    border: 1px solid rgba(36,84,90,.1);

    border-radius: 6px;

    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;

    text-align: left;

    font-size: .95rem;

    min-width: 500px;
}


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

footer {
    background-color: var(--primary-petrolio);

    color: var(--bg-avorio);

    padding: 60px 0 30px;
}

footer a {
    color: var(--bg-avorio);

    opacity: .8;
}

footer a:hover {
    color: var(--accent-oro);

    opacity: 1;
}

.footer-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(250px, 1fr));

    gap: 40px;

    margin-bottom: 40px;
}

.archive-box {
    border: 1px solid rgba(250,247,240,.2);

    padding: 20px;

    border-radius: 6px;

    background-color: rgba(255,255,255,.05);
}

.footer-bottom {
    text-align: center;

    padding-top: 30px;

    border-top: 1px solid rgba(250,247,240,.1);

    font-size: .9rem;
}


/* =========================================================
   PAGINE INTERNE
   ========================================================= */

.page-intro {
    background: linear-gradient(
        180deg,
        var(--white) 0%,
        var(--bg-avorio) 100%
    );

    padding: 55px 0 35px;
}

.page-intro h1 {
    text-align: center;

    color: var(--primary-petrolio);

    font-size: 2.6rem;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 992px) {

    .header-top {
        height: 95px;
    }

    .logos-left {
        left: 10px;
        gap: 6px;
    }

    .logos-left a {
        width: 40px;
        height: 40px;
    }

    .logos-left img {
        width: 40px !important;
        height: 40px !important;

        max-width: 40px !important;
        max-height: 40px !important;
    }


    /* AGM CENTRALE */

    .logo-center img {
        width: 125px;
        max-width: 125px;
    }


    /* INSIEME */

    .logo-right {
        right: 10px;
    }

    .logo-right img {
        width: 210px;
        max-width: 210px;
    }


    .header-title {
        font-size: 16px;

        white-space: nowrap;

        padding: 5px 8px 9px;
    }


    /* MENU */

    .menu-toggle {
        display: flex;

        align-items: center;
        justify-content: center;
    }

    .nav-container {
        justify-content: flex-end;
    }

    nav {
        position: relative;
    }

    nav ul {
        display: block;

        position: absolute;

        right: 0;
        top: 55px;

        width: 240px;

        background: var(--white);

        padding: 20px;

        border-top: 3px solid var(--accent-oro);

        border-radius: 8px;

        box-shadow: 0 10px 25px rgba(0,0,0,.15);

        opacity: 0;

        transform: translateY(-15px);

        pointer-events: none;

        transition: .3s ease;

        z-index: 2000;
    }

    nav ul.active {
        opacity: 1;

        transform: translateY(0);

        pointer-events: auto;
    }

    nav ul li {
        margin-bottom: 15px;
    }

    nav ul li:last-child {
        margin-bottom: 0;
    }

    nav a {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
    }


    /* CHI SIAMO - TABLET */

    .about-layout {
        grid-template-columns: 1fr;
    }

    .team-gallery {
        width: 100%;

        max-width: 620px;

        margin: 0 auto;
    }
}


/* =========================================================
   SMARTPHONE
   ========================================================= */

@media (max-width: 767px) {

    .header-top {
        height: 75px;

        width: 100%;
        max-width: 100%;

        padding: 6px 8px;
    }


    /* FACEBOOK + YOUTUBE */

    .logos-left {
        left: 6px;

        gap: 4px;
    }

    .logos-left a {
        width: 30px;
        height: 30px;
    }

    .logos-left img {
        width: 30px !important;
        height: 30px !important;

        max-width: 30px !important;
        max-height: 30px !important;
    }


    /* AGM CENTRALE */

    .logo-center img {
        width: 95px;
        max-width: 95px;
    }


    /* =====================================================
       INSIEME - ADATTAMENTO SMARTPHONE
       ===================================================== */

    .logo-right {
        right: 6px;
        max-width: 32%;
    }

    .logo-right img {
        width: 100%;
        max-width: 100%;
        height: auto;
        display: block;
    }


    /* TITOLO */

    .header-title {
        font-size: 12px;

        font-weight: 700;

        letter-spacing: .4px;

        white-space: nowrap;

        padding: 4px 2px 7px;
    }


    /* =====================================================
       MENU SMARTPHONE
       ===================================================== */

    .nav-container {
        position: relative;

        width: 100%;
        max-width: 100%;

        margin: 0;

        padding: 10px;
    }

    nav {
        position: relative;

        width: 100%;

        display: flex;

        justify-content: flex-end;

        overflow: visible;
    }

    nav ul {
        display: block;

        position: fixed !important;

        top: 150px !important;

        left: 10px !important;
        right: auto !important;

        width: 240px !important;

        max-width: calc(100vw - 20px) !important;

        margin: 0 !important;

        padding: 20px !important;

        background: var(--white);

        border-top: 3px solid var(--accent-oro);

        border-radius: 8px;

        box-shadow: 0 10px 25px rgba(0,0,0,.15);

        opacity: 0;

        transform: translateY(-15px);

        pointer-events: none;

        transition:
            opacity .3s ease,
            transform .3s ease;

        z-index: 999999 !important;

        overflow: hidden;
    }

    nav ul.active {
        opacity: 1;

        transform: translateY(0);

        pointer-events: auto;
    }

    nav ul li {
        display: block;

        width: 100%;

        margin-bottom: 15px;
    }

    nav ul li:last-child {
        margin-bottom: 0;
    }

    nav ul li a {
        display: block;

        width: 100%;

        white-space: nowrap;
    }


    /* =====================================================
       CONTENUTI MOBILE
       ===================================================== */

    .about-layout {
        display: flex;

        flex-direction: column;

        gap: 30px;

        align-items: center;
    }

    .team-gallery {
        width: 100%;

        max-width: 400px;

        display: grid;

        grid-template-columns: 1fr;

        gap: 15px;

        justify-items: center;
    }

    .team-gallery img {
        width: 100%;

        height: auto;

        max-height: 400px;

        object-fit: contain;
    }


    .next-event-box {
        flex-direction: column;
    }

    .next-event-img {
        width: 100%;
    }

    .next-event-content {
        padding: 25px;
    }

    section {
        padding: 55px 0;
    }

    .page-intro h1 {
        font-size: 2.1rem;
    }
}


/* =========================================================
   ELIMINA SLASH E SEPARATORI AUTOMATICI
   ========================================================= */

nav ul,
nav ul li,
nav ul li a {
    list-style: none;
}

nav ul li::before,
nav ul li::after,
nav ul li a::before,
nav ul li a::after {
    content: none !important;

    display: none !important;
}