/* ==========================================================================
   PROPOSTA 2: ONE-PAGE PREMIUM UI
   ========================================================================== */

:root {
    --navy: #3f7790;
    --cyan: #72b0c6;
    --green: #5cab7f;
    --light-green: rgba(141, 227, 180, 0.3);
    --purple: #b283b2;
    --blue: #77a6e3;
    --white: #ffffff;
    --bg-light: #f8fafb;
    --text-dark: #1a2a33;
    --text-mid: #5a6e7a;
    --border: #e2e8f0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:focus-visible {
    outline: none;
}

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

img,
svg,
video,
iframe {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 0 25px;
}

/* 1. Header Principale */
.main-header {
    background: var(--white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header .logo {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

.main-header .logo svg {
    width: 220px;       
    height: auto;       
    display: block;
}

.nav-minimal {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-minimal a {
    text-decoration: none;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.nav-minimal a:hover {
    color: var(--cyan);
}

.nav-minimal a.active {
    color: var(--cyan);
}

.nav-minimal .nav-actions {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

li.menu-item {
    list-style: none;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--cyan);
}

/* Utility Nav (Search, Lang, Incident) */
.utility-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--navy);
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.search-btn svg {
    vertical-align: middle;
    transition: stroke 0.2s ease;
    stroke: var(--navy);
}

.search-btn svg:hover {
    stroke: var(--cyan);
}

.separator {
    opacity: 0.4;
    font-weight: 300;
}

/* Dropdown Lingua */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: none;
    border: none;
    color: var(--navy);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.dropdown-btn:hover {
    color: var(--cyan);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 140%;
    right: 0;
    background-color: var(--white);
    min-width: 160px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    z-index: 1001;
    padding: 10px 0;
    flex-direction: column;
}

.dropdown-menu.show {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-menu a {
    color: var(--text-dark);
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: #f9fafb;
    color: var(--cyan);
}

.lang-selector {
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.arrow-down::after {
    content: "";
    border: solid var(--navy);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 2px;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* Hamburger Menu Mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 2px;
    background-color: var(--navy);
    transition: var(--transition);
}

.menu-toggle {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* --- SEARCH MODAL (Full Page) --- */
.search-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(63, 113, 137, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(5px);
}

.search-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.close-search {
    position: absolute;
    top: 40px;
    right: 40px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.close-search:hover {
    transform: rotate(90deg) scale(1.1);
    color: var(--white);
}

.search-container {
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    text-align: center;
}

.search-input-wrapper {
    position: relative;
    border-bottom: 1px solid white;
    transition: border-color 0.3s;
    display: flex;
    align-items: center;
}

.search-input-wrapper button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.search-input-wrapper:focus-within {
    border-bottom-color: white;
}

.search-container p {
    color: rgba(255, 255, 255, 0.4);
    margin-top: 20px;
    font-size: 14px;
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 300;
    padding: 20px 0;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-icon-large {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 2rem;
    opacity: 0.7;
}

/* --- INCIDENT FLEX & TOOLTIP --- */

.incident-flex {
    display: flex;
    align-items: center;
    gap: 15px;
}

.incident-flex p {
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
}

.incident-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    cursor: help;
}

.incident-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--cyan);
    /* Colore azzurro FAAC */
    transition: var(--transition);
}

.incident-icon:hover svg {
    fill: var(--white);
}

/* Stile Tooltip */
.tooltip-text {
    visibility: hidden;
    width: 300px;
    background-color: #2c5669;
    color: var(--white);
    text-align: center;
    border-radius: 4px;
    padding: 20px;
    position: absolute;
    z-index: 10;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #2c5669 transparent transparent transparent;
}

.incident-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
    z-index: 999;
}

/* 2. Hero Light */
.hero-light {
    padding: 140px 0 100px;
    background: var(--bg-light);
    background-image: url(../img/bg-trasparency.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative;
}

.hero-content .text-container {
    display: flex;
    flex-direction: column;
    justify-content: end;
    height: 200px;
}

.geometric-shape-br {
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 12%;
    /* Ampiezza della forma */
    height: 25%;
    background-color: var(--navy);

    /* Punti del triangolo in basso a destra:
       1. (100% 0%)   -> In alto a destra
       2. (100% 100%) -> In basso a destra
       3. (0% 100%)   -> In basso a sinistra (rispetto alla larghezza del div)
    */
    clip-path: polygon(100% 0, 100% 100%, 0% 100%);

    z-index: 1;
}

.geometric-shape-tl {
    position: absolute;
    top: -2px;
    left: 0;
    width: 12%;
    /* Ampiezza della forma */
    height: 35%;
    background-color: var(--navy);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    z-index: 3;
}

.eyebrow {
    color: var(--cyan);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 20px;
}

.hero-light h1 {
    font-size: 64px;
    font-weight: 200;
    line-height: 1.1;
    margin-bottom: 30px;
    color: var(--navy);
}

.hero-light p {
    font-size: 19px;
    font-weight: 300;
    color: var(--text-mid);
    max-width: 650px;
    margin-bottom: 45px;
    line-height: 1.6;
}

.hero-cta-group {
    display: flex;
    gap: 20px;
}

.cta-center {
    display: flex;
    justify-content: center;
    margin: 40px 0 0;
}

/* 3. Buttons */
.btn-primary {
    background: var(--cyan);
    color: var(--white);
    padding: 18px 40px;
    border-radius: 4px;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    width: fit-content;
}

.btn-primary:hover {
    background: var(--navy);
}

.btn-primary.small {
    padding: 10px 20px;
    font-size: 11px;
}

.btn-outline {
    border: 2px solid var(--navy);
    color: var(--navy);
    padding: 16px 40px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
    width: fit-content;
}

.btn-outline:hover {
    background: var(--navy);
    color: white;
}

.search-result-card {
    background: white;
}

.search-result-card .result-title a {
    color: var(--navy);
}

.search-result-card .result-excerpt {
    line-height: 1.75;
    min-height: 3.5em;
    margin-bottom: 0;
}

.search-highlight {
    background-color: rgba(255, 222, 0, 0.35);
    padding: 0 2px;
    border-radius: 2px;
}

/* 4. Compliance Hub (Navy) */
.hub-section {
    background: var(--navy);
}

.hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.section-title {
    font-size: 46px;
    font-weight: 200;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 10px;
}

.white {
    color: var(--white);
}

.hub-tabs,
.view-toggle {
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.15);
    padding: 5px;
    border-radius: 8px;
}

.hub-tab,
.btn-view {
    background: none;
    border: none;
    border-radius: 4px;
    color: white;
    padding: 10px 25px;
    cursor: pointer;
    opacity: 0.6;
    font-weight: 300;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-size: 20px;
}

.hub-tab.active,
.btn-view.active {
    background: var(--cyan);
    opacity: 1;
}

.btn-view svg {
    text-align: center;
}

.hub-content {
    display: none;
}

.hub-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.hub-top-bar p {
    color: var(--white);
}

.hub-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.search-simple input {
    min-width: 300px;
    padding: 12px 15px;
    background: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    outline: none;
    border-radius: 4px;
    width: 100%;
}

/* FILTRI RAFFINATI (STYLE DA IMMAGINE) */
.hub-filters-refined {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 40px;
}

.incident-filters-refined {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.f-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.f-field label {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    font-family: 'Inter', sans-serif;
}

.f-field label.dark {
    color: var(--text-mid);
}

.f-field label span {
    color: var(--cyan);
}

.f-field select {
    height: 50px;
    padding: 0 15px;
    background: #f8fafc;
    border-radius: 4px;
    border: 1px solid var(--border);
    color: #334155;
    font-size: 16px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%233f7790'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
}

.f-field input {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    background: #fafbfc;
    outline: none;
    border-radius: 4px;
    font-size: 16px;
}

.f-action {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.btn-filtra {
    background: var(--cyan);
    color: white;
    height: 50px;
    padding: 0 30px;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-filtra:hover {
    background: var(--navy);
}

.btn-link {
    color: var(--cyan);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-link:hover {
    color: var(--navy);
}

.btn-link-reset {
    background: none;
    border: none;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 6px;
    cursor: pointer;
    padding: 5px 0;
    transition: color 0.2s ease-in-out;
}

.btn-link-reset:hover {
    color: var(--cyan);
    text-decoration: underline;
}

.btn-link-reset-dark {
    background: none;
    border: none;
    color: var(--cyan);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 6px;
    cursor: pointer;
    padding: 5px 0;
    transition: color 0.2s ease-in-out;
}

.btn-link-reset-dark:hover {
    color: var(--navy);
    text-decoration: underline;
}

@media (max-width: 992px) {
    .hub-filters-refined {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
        margin-bottom: 30px;
    }

    .incident-filters-refined {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hub-filters-refined {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 20px;
        margin-bottom: 30px;
    }

    .incident-filters-refined {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    .hub-top-bar {
        display: block;
    }

    .incident-flex {
        margin-top: 20px;
        justify-content: end;
    }
}

/* ==========================================================================
   HUB AJAX RESULTS CONTAINER & ANIMATIONS
   ========================================================================== */

#hub-results-container {
    min-height: 230px;
    position: relative;
    transition: opacity 0.3s ease-in-out;
}

/* Stile per lo stato di caricamento */
#hub-results-container .loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #31627c;
    font-weight: 600;
    animation: pulseLoading 1.5s infinite ease-in-out;
}

/* Animazione fluida di comparsa (Fade-In) per le card che entrano */
.doc-list-vertical,
.header-results {
    animation: fadeInResult 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* --- KEYFRAMES ANIMAZIONI --- */

/* Effetto pulsazione morbida per il testo di caricamento (senza scatti di layout) */
@keyframes pulseLoading {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Comparsa fluida a dissolvenza con un micro-movimento verso l'alto */
@keyframes fadeInResult {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- HEADER RESULTS & TOGGLE --- */
.header-results {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
    padding-top: 15px;
}

.btn-view {
    padding: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.btn-view:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-view.active {
    background: var(--cyan);
    border-color: var(--cyan);
    color: white;
}

/* --- MODALITÀ GRIGLIA (GRID MODE) --- */
.doc-list-vertical.grid-mode {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.grid-mode .card-col-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.grid-mode .doc-card-row {
    display: flex;
    flex-direction: column;
    padding: 20px;
    height: 100%;
}

.grid-mode .doc-card-row>div:first-child {
    display: block;
    flex-grow: 1;
}

.grid-mode .card-col-main {
    border-left: none;
    padding-left: 0;
    margin-top: 20px;
}

.grid-mode .card-col-action {
    justify-content: flex-start;
    margin-top: 30px;
    height: auto;
}

.grid-mode .card-title {
    font-size: 20px;
    min-height: 50px;
}

.grid-mode .card-description {
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* RISULTATI & CARD LIST */
.results-count {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

.results-count strong {
    color: var(--cyan);
}

.doc-card-list {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    background-color: var(--white);
    padding: 25px;
    border-radius: 8px;
    position: relative;
}

.grid-mode .doc-card-list {
    display: block;
}

.card-tag {
    background: var(--cyan);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 3px;
    text-transform: uppercase;
}

.card-tag.green {
    background: var(--green) !important;
}

.card-tag.purple {
    background: var(--purple) !important;
}

.card-tag.blue {
    background: var(--blue) !important;
}

/* --- COMPLIANCE HUB: CARD LAYOUT A COLONNE --- */
.doc-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Spazio ridotto tra le righe per compattezza */
}

.doc-card-row {
    background: var(--white);
    padding: 20px;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    align-items: start;
    transition: var(--transition);
    border-radius: 4px;
}

.doc-card-row:hover {
    transform: scale(1.005);
}

.doc-card-row.fix-border {
    border-left: 6px solid var(--cyan);
}

/* Colonna 1: Meta */
.card-col-meta {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    color: var(--text-mid);
}

.card-version {
    font-size: 12px;
    color: var(--text-mid);
    font-weight: 500;
}

/* Colonna 2: Contenuto */
.card-col-main {
    margin-top: 20px;
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 5px;
    margin-top: 10px;
}

.card-title span {
    margin-bottom: 10px;
}

.card-description {
    font-size: 15px;
    line-height: 1.5em !important;
    color: #444;
    line-height: 1.8;
}

.card-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.card-attribute {
    font-size: 14px;
    color: var(--text-mid);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card-attribute strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Colonna 3: Azione */
.card-col-action {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    height: 100%;
}

.card-link-download {
    font-size: 15px;
    font-weight: 700;
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 6px;
    text-align: right;
    transition: var(--transition);
}

.card-link-download:hover {
    color: var(--navy);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .doc-card-row {
        grid-template-columns: 1fr;
        /* Torna a colonna singola su tablet */
        gap: 20px;
        padding: 20px;
    }

    .card-col-main {
        border-left: none;
        padding-left: 0;
    }

    .card-col-action {
        justify-content: flex-start;
    }
}

/* --- SOSTENIBILITÀ CON BACKGROUND FULL-LEFT --- */
.sustainability-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: stretch;
}

.sustainability-column-left {
    position: relative;
    width: 100%;
    z-index: 2;
}

.sustainability-bg-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: end;
    width: 60%;
    height: 100%;
    float: right;
    border-radius: 4px;
    background-color: rgba(63, 119, 144, 0.75);
    overflow: hidden;
}

.sustainability-section {
    position: relative;
    overflow: hidden;
    background-color: var(--white);
    padding: 100px 0;
    min-height: 700px;
    display: flex;
    align-items: center;
}

/* Overlay scuro per leggibilità (opzionale) */
.sustainability-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background-image: url('../img/sostenibilita.png');
    /* DEFAULT */
    background-size: cover;
    background-position: center;
    z-index: 0;
    pointer-events: none;
}

.sustainability-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: rgba(63, 119, 144, 0.4);
}

/* Contenitore Immagini a Sinistra */
.sustainability-bg-col {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    /* Copre metà schermo */
    height: 100%;
    background-image: url('../img/sostenibilita.png');
    background-size: cover;
    background-position: center;
    background-color: var(--navy);
    /* Colore di fallback */
    z-index: 1;
}

.bg-overlay-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    /* Nascosti di default */
    transition: opacity 0.5s ease-in-out;
    z-index: 5;
}

/* L'immagine di default (la prima) o quella attiva */
.bg-overlay-layer.active {
    opacity: 1;
}

.sustainability-section .container {
    position: relative;
    z-index: 10;
    /* Sopra le immagini */
}

.sustainability-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    padding: 0 40px;
}

/* Colonna destra dei Pillar */
.sustainability-pillars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pillar {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 4px;
    color: var(--text-dark);
    font-size: 32px;
    font-weight: 200;
    text-transform: uppercase;
    color: var(--navy);
    transition: all 0.3s ease;
}

.pillar:hover {
    transform: translateX(5px);
}

.pillar p {
    color: var(--text-dark);
    font-size: 14px;
    text-transform: none;
    font-weight: 400;
    margin-top: 15px;
}

.sustainability-info {
    color: var(--white);
    padding: 30px;
}

.sustainability-info p {
    margin-bottom: 20px;
}

.sustainability-info .section-title {
    color: var(--white);
}

.sustainability-info .links-group {
    margin-bottom: 40px;
}

.sustainability-info .links-group a {
    color: var(--white);
    border-bottom-color: var(--cyan);
    margin-right: 10px;
}

/* Responsive */
@media (min-width: 1440px) and (max-width: 1920px) {
    .sustainability-bg-container {
        width: 80%;
    }
}

@media (min-width: 1200px) and (max-width: 1439px) {
    .sustainability-bg-container {
        width: 90%;
    }
}

@media (max-width: 1199px) {
    .sustainability-bg-container {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .sustainability-bg-col {
        width: 100%;
        height: 40%;
    }

    .sustainability-section {
        padding: 20px;
    }

    .sustainability-section::before,
    .sustainability-section::after {
        width: 100%;
        height: 40%;
    }

    .sustainability-grid {
        grid-template-columns: 1fr;
        padding-top: 0px;
        width: 100%;
        gap: 40px
    }

    .sustainability-info {
        padding-top: 40px;
    }
}

@media (max-width: 768px) {
    .sustainability-grid {
        grid-template-columns: 1fr;
        padding-top: 0px;
        gap: 40px
    }

    .sustainability-section {
        padding: 20px;
    }

}

/* --- INCIDENTS SECTION --- */
#incidents-history {
    background: var(--bg-light);
}

.incidents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    transition: var(--transition);
}

.section-padding {
    padding: 80px 20px;
}

.section-padding.top-40 {
    padding-top: 40px !important;
}


.incidents-grid .card {
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.incidents-grid .card:hover {
    border-color: var(--cyan);
    transform: scale(1.02);
}

/* Incident Card — Horizontal layout */
.incident-card {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    transition: var(--transition);
}

.incident-card:hover {
    transform: scale(1.03);
}

/* Meta row: date + ticket inline */
.incident-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 5px;
}

.incident-date {
    margin-bottom: 15px;
}

.news-date {
    font-size: 0.8rem;
    color: var(--text-mid);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.incident-ticket {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-wrap: nowrap;
    color: var(--text-dark);
}

/* Title */
.incident-title.card-title {
    margin-top: 8px;
    font-weight: 700;
    line-height: 1.1;
    transition: var(--transition);
}

.incident-title.card-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.incident-card:hover a {
    color: var(--cyan);
}

.incident-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

/* Body: 1/3 specs + 2/3 resolution */
.incident-body-min {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    padding-top: 20px;
}

.incident-col-heading {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.incident-specs {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #333;
}

.resolution-text {
    font-size: 0.95rem;
    color: #555;
    text-overflow: ellipsis;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Box Testuale */
.news-content-box {
    padding: 30px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card .card-title {
    font-size: 20px;
    margin-bottom: 15px;
    line-height: 1.3;
    color: var(--navy);
}

.incident-section {
    background: var(--bg-light);
    min-height: 100vh;
}

.incident-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 20px;
}

/* Responsive */
@media (max-width: 576px) {
    .incident-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .incidents-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .form-row-3-cols,
    .form-row-4-cols {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .incidents-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row-4-cols {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 992px) {
    .incidents-grid {
        grid-template-columns: 1fr;
    }

}

/* ==========================================================================
   NEWSLETTER
   ========================================================================== */
.newsletter-section {
    background-color: var(--white);
}

.newsletter-wrapper {
    display: grid;
    grid-template-columns: 5fr 2fr;
    width: 100%;
}

.newsletter-content-col {
    padding-left: 10%;
    padding-top: 80px;
    padding-bottom: 80px;
    padding-right: 80px;
    display: flex;
    align-items: center;
}

@media (min-width: 1334px) {
    .newsletter-content-col {
        padding-left: calc((100vw - 1200px) / 2);
    }
}

.newsletter-inner {
    max-width: 800px;
    width: 100%;
    padding-right: 60px;
}

.newsletter-inner-align {
    width: 100%;
}

.newsletter-title {
    font-size: 32px;
    font-weight: 300;
    color: var(--navy);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.newsletter-subtitle {
    font-size: 15px;
    color: var(--text-mid);
    margin-bottom: 40px;
    max-width: 500px;
}

/* Layout Form */
.newsletter-custom-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.newsletter-custom-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid #e0e6ed;
    background-color: #f9fafb;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
}

.newsletter-custom-form input::placeholder {
    color: #999;
}

.btn-newsletter {
    background-color: var(--navy);
    color: var(--white);
    border: none;
    padding: 0 30px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-newsletter:hover {
    background-color: var(--cyan);
}

/* Stile Privacy Check */
.form-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.privacy-check-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.privacy-check-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--cyan);
    margin: 0;
    transition: var(--transition);
}

.privacy-check-group label {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-mid);
    white-space: nowrap;
    cursor: pointer;
}

.privacy-link {
    color: var(--navy);
    text-decoration: underline;
}

.newsletter-image-col {
    background-image: url('../img/endesignteam_Conceptual_shot_of_an_automatic_gate_entrance._I_78862688-72f7-40d3-be16-bb92b527536f_2.png');
    background-size: cover;
    background-position: center;
    min-height: 450px;
}

/* --- RESPONSIVE 992px --- */
@media (max-width: 992px) {
    .newsletter-wrapper {
        grid-template-columns: 1.5fr 1fr;
    }

    .newsletter-content-col {
        padding-left: 5%;
        padding-right: 5%;
        padding-top: 60px;
        padding-bottom: 60px;
        order: 1;
    }

    .newsletter-image-col {
        height: auto;
        order: 2;
    }

    .form-row {
        flex-direction: column;
    }

    .privacy-check-group label {
        white-space: normal;
    }

    .btn-newsletter {
        padding: 15px;
    }
}

@media (max-width: 992px) {
    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .newsletter-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-row-3,
    .form-row-3-cols,
    .form-row-4-cols,
    .filters-grid-container {
        grid-template-columns: 1fr;
    }

    .form-row-4-cols {
        gap: 20px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .btn-filtra,
    .btn-newsletter {
        width: 100%;
    }

    .btn-filtra {
        justify-content: center;
    }

    .incident-card {
        padding: 25px;
    }

    .incident-body,
    .incident-body-min {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .incident-filters-wrapper {
        margin-bottom: 30px;
    }

    .section-padding {
        padding: 40px 15px;
    }

    .hero-light h1 {
        font-size: 38px;
    }

    .hero-light p {
        font-size: 16px;
    }

    .header-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .nav-minimal {
        padding: 90px 25px 40px;
    }
}

@media (max-width: 576px) {
    .newsletter-content-col {
        padding-left: 5%;
        padding-right: 5%;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .newsletter-title {
        font-size: 28px;
    }

    .newsletter-subtitle {
        font-size: 14px;
    }

    .incident-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

/* 6. Incident Form */
.reporting-section {
    padding: 120px 0;
    background: var(--navy);
}

.form-card {
    background: var(--white);
    padding: 60px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
    max-width: 1000px;
    margin: 0 auto;
}

.form-card .subtitle {
    margin-bottom: 40px;
    color: var(--text-mid);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.form-row-3-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

.form-row-4-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

.filters-grid-container {
    display: grid;
    gap: 0px;
    align-items: start;
    width: 100%;
}

.form-row-3-cols,
.form-row-4-cols {
    width: 100%;
}

.form-row.full {
    grid-template-columns: 1fr;
}

.form-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    background: #fafbfc;
    outline: none;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    font-family: inherit;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
}

.form-footer a {
    color: var(--cyan);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 6px;
}

.wpcf7-list-item {
    margin: 0
}

.wpcf7-spinner {
    display: contents;
}

.wpcf7-response-output {
    margin-right: 0 !important;
    margin-left: 0 !important;
    background-color: var(--light-green) !important;
    border-radius: 4px !important;
    border: none !important;
    padding: 15px 20px !important;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background-color: #171f26;
    color: #9ca3af;
    padding: 60px 60px 30px;
    font-size: 0.9rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
    margin-bottom: 30px;
}

.footer-col .logo {
    display: inline-block;
    margin-bottom: 20px;
}

.footer-address {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    font-size: 13px;
    margin: 0;
}

.footer-heading {
    color: white;
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-menu-list,
.footer-menu-list li {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu-list li {
    line-height: 2.2;
    font-size: 14px;
}

.footer-menu-list li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-menu-list li a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    padding-top: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-privacy-badge .btn-footer-privacy {
    display: inline-flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 3px 8px;
    text-decoration: none;
}

.footer-privacy-badge .icon-privacy {
    width: 12px;
    height: 12px;
    fill: #5ec89b;
    margin-right: 6px;
}

.footer-privacy-badge span {
    color: #555555;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.footer-col h5 {
    color: white;
    margin-bottom: 25px;
}

.footer-col ul li {
    list-style: none;
    margin-bottom: 0px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-col p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    font-size: 13px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.footer-col a:hover {
    color: var(--cyan);
}

/* Allineamento orizzontale e stile per i widget social nel footer */
.footer-social-column .footer-social-icons {
    display: flex !important;
    gap: 15px !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Rende gli SVG dei widget nativi grandi quanto quelli del tuo vecchio layout */
.footer-social-column .footer-social-icons .widget_media_image img {
    width: 20px !important;
    height: 20px !important;
    cursor: pointer;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
}

.btn-footer-privacy {
    display: inline-flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 2px 5px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-footer-privacy:hover {
    background-color: #f9f9f9;
    border-color: #c0c0c0;
    transform: translateY(-1px);
}

.icon-privacy {
    width: 12px;
    height: 12px;
    fill: #5ec89b;
    margin-right: 5px;
}

.btn-footer-privacy span {
    color: #555555;
    font-size: 10px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 993px) {
    .close-menu-btn {
        display: none;
    }
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .hero-light h1 {
        font-size: 44px;
    }

    .sustainability-grid,
    .hub-filters-refined,
    .form-row {
        grid-template-columns: 1fr;
    }

    .hub-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .header-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }

    .nav-minimal {
        display: none;
        /* Nasconde il menu di base su mobile */
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 50%;
        height: 100vh;
        background: var(--white);
        z-index: 2000;
        padding: 100px 30px 40px;
        gap: 30px;
        align-items: flex-end;
        overflow-y: auto;
    }

    .nav-minimal.active {
        display: flex;
        animation: slideIn 0.3s ease-out;
    }

    .nav-minimal .nav-menu {
        flex-direction: column;
        gap: 20px;
        align-items: flex-end;
        padding-bottom: 20px;
    }

    .nav-minimal .nav-actions {
        display: flex;
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    .nav-minimal a {
        font-size: 18px !important;
        /* Più grande per il touch su mobile */
        width: 100%;
        padding-bottom: 15px;
    }

    .close-menu-btn {
        display: block;
        position: absolute;
        top: 25px;
        right: 25px;
        background: none;
        border: none;
        font-size: 35px;
        color: var(--navy);
        cursor: pointer;
    }

    @keyframes slideIn {
        from {
            transform: translateX(100%);
        }

        to {
            transform: translateX(0);
        }
    }

    footer {
        padding: 60px 40px 30px;
    }

    footer .container {
        padding: 0;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-cta-group {
        flex-direction: column;
        gap: 20px;
    }
    .form-card {
        padding: 40px;
    }
    .newsletter-image-col {
        min-height: 170px;
    }
    footer {
        padding: 60px 40px 30px;
    }
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }
}

@media (max-width: 585px) {
    .nav-minimal {
        width: 100%;
    }
}