/* Stili dedicati alla landing NIS2 (settore alimentare) */

html,
body {
    height: auto;
    min-height: 100%;
}

body {
    background: radial-gradient(1200px 600px at 20% 0%, rgba(160, 180, 255, 0.55), transparent 60%), radial-gradient(900px 500px at 85% 10%, rgba(206, 186, 255, 0.45), transparent 55%), linear-gradient(180deg, #f6f8ff 0%, #eef2ff 55%, #f7f7fb 100%);
    color: #0f172a;
    font-family: "Montserrat", sans-serif;
}

.perspective {
    min-height: 100vh;
}

.nis2-page {
    width: 100%;
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 70px;
}


/* Header fisso - regole complete e specifiche */

.header.header--nis2 {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 70px !important;
    z-index: 9000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    padding: 0 5% !important;
    background: linear-gradient(to bottom, rgba(246, 248, 255, 0.92), rgba(246, 248, 255, 0.72), rgba(246, 248, 255, 0)) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.header.header--nis2.header--has-scroll {
    background: rgba(246, 248, 255, 0.92) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
}


/* Titolo che appare oltre l'hero */

.header.header--nis2 .header--title {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: rgba(15, 23, 42, 0.85) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease !important;
    white-space: nowrap !important;
    max-width: 52vw !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.header.header--nis2.header--past-hero .header--title {
    opacity: 1 !important;
}


/* CTA: centrato a pagina in cima, poi a destra al primo scroll */

.header.header--nis2 .header--cta {
    transition: transform 0.25s ease, opacity 0.25s ease !important;
}

.header.header--nis2.header--at-top .header--cta {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin-left: 0 !important;
}

.header.header--nis2.header--has-scroll .header--cta {
    position: static !important;
    transform: none !important;
    margin-left: auto !important;
}

.header.header--nis2 .header--nav-toggle {
    margin-left: auto !important;
}

.header.header--nis2.header--has-scroll .header--nav-toggle {
    margin-left: 16px !important;
}


/* Override colori per tema chiaro */

.header.header--nis2 .header--logo {
    color: #0f172a !important;
}

.header.header--nis2 .header--logo p {
    color: #0f172a !important;
}

.header.header--nis2 .header--nav-toggle span,
.header.header--nis2 .header--nav-toggle::before,
.header.header--nis2 .header--nav-toggle::after {
    background-color: rgba(15, 23, 42, 0.75) !important;
}

.header.header--nis2 .header--cta {
    opacity: 1 !important;
    visibility: visible !important;
}


/* Hero */

.nis2-hero {
    text-align: center;
    padding: 70px 5% 38px;
    max-width: 980px;
    margin: 0 auto;
}

.nis2-support-cta {
    margin-top: 22px;
    padding: 18px 22px;
    background: linear-gradient(135deg, rgba(15, 51, 255, 0.12), rgba(109, 40, 217, 0.10));
    border: 1px solid rgba(15, 51, 255, 0.28);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(15, 51, 255, 0.15);
}

.nis2-support-cta p {
    font-size: 16px;
    line-height: 1.7;
}

.nis2-support-cta strong {
    font-size: 17px;
}

.nis2-hero h1 {
    font-size: 50px;
    font-weight: 900;
    margin: 0 0 18px;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 45%, #6d28d9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nis2-hero p {
    font-size: 18px;
    color: rgba(15, 23, 42, 0.85);
    line-height: 1.7;
    max-width: 860px;
    margin: 0 auto;
}

.nis2-hero strong {
    color: rgba(15, 23, 42, 0.98);
}

.nis2-badges {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.nis2-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 23, 42, 0.10);
    color: rgba(15, 23, 42, 0.75);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nis2-hero-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nis2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    color: rgba(15, 23, 42, 0.9);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nis2-btn--primary {
    background: #0f33ff;
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 51, 255, 0.25);
}

.nis2-btn:hover {
    transform: translateY(-2px);
}

.nis2-btn--primary:hover {
    background: #1f45ff;
    box-shadow: 0 18px 44px rgba(15, 51, 255, 0.28);
}

.nis2-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.22);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}


/* TOC */

.nis2-toc {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 5% 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.nis2-toc a {
    text-decoration: none;
    color: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nis2-toc a:hover,
.nis2-toc a:focus-visible {
    background: rgba(15, 51, 255, 0.10);
    border-color: rgba(15, 51, 255, 0.25);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.10);
    transform: translateY(-1px);
}


/* Content */

.nis2-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.nis2-section {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(245, 247, 255, 0.92));
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 20px;
    padding: 34px 34px;
    box-shadow: 0 20px 70px rgba(15, 23, 42, 0.10);
}

.nis2-section h2 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.95);
}

.nis2-section h3 {
    margin: 20px 0 10px;
    font-size: 18px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.92);
}

.nis2-section p {
    margin: 0 0 12px;
    color: rgba(15, 23, 42, 0.80);
    line-height: 1.75;
}

.nis2-section ul {
    margin: 0 0 12px;
    padding-left: 18px;
    color: rgba(15, 23, 42, 0.82);
}

.nis2-section li {
    margin: 8px 0;
}

.nis2-callout {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(15, 51, 255, 0.06);
    border: 1px solid rgba(15, 51, 255, 0.16);
}

.nis2-callout strong {
    color: rgba(15, 23, 42, 0.95);
}

.nis2-note {
    border-left: 3px solid rgba(15, 51, 255, 0.75);
}

.nis2-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 14px;
}

.nis2-card {
    background: linear-gradient(145deg, rgba(235, 240, 255, 0.85), rgba(255, 255, 255, 0.78));
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 16px;
    padding: 16px 16px;
}

.nis2-card h4 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(15, 23, 42, 0.78);
}

.nis2-card p {
    margin: 0;
    font-size: 14px;
    color: rgba(15, 23, 42, 0.78);
}


/* Timeline */

.nis2-timeline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 10px;
}

.nis2-step {
    background: linear-gradient(145deg, rgba(240, 243, 255, 0.85), rgba(255, 255, 255, 0.75));
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 16px;
    padding: 16px 16px;
}

.nis2-step .kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.nis2-step .kicker span {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 51, 255, 0.12);
    border: 1px solid rgba(15, 51, 255, 0.22);
    color: rgba(29, 78, 216, 0.90);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}


/* Stile per scadenze passate */

.nis2-step--expired {
    background: linear-gradient(145deg, rgba(255, 242, 230, 0.85), rgba(255, 250, 245, 0.75));
    border: 1px solid rgba(234, 88, 12, 0.20);
}

.nis2-step .kicker span.nis2-expired {
    background: rgba(234, 88, 12, 0.14);
    border: 1px solid rgba(234, 88, 12, 0.30);
    color: rgba(194, 65, 12, 0.95);
}

.nis2-step h4 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.92);
}

.nis2-step p {
    margin: 0;
    color: rgba(15, 23, 42, 0.78);
    font-size: 14px;
    line-height: 1.7;
}


/* Table */

.nis2-table-wrap {
    margin-top: 10px;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.10);
}

.nis2-table {
    width: 100%;
    min-width: 840px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.75);
}

.nis2-table th,
.nis2-table td {
    padding: 14px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.nis2-table th {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(15, 23, 42, 0.80);
    background: rgba(15, 51, 255, 0.06);
}

.nis2-table td {
    color: rgba(15, 23, 42, 0.78);
    font-size: 14px;
    line-height: 1.6;
}


/* FAQ */

.nis2-faq details {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    padding: 12px 14px;
    margin-top: 10px;
}

.nis2-faq summary {
    cursor: pointer;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.92);
}

.nis2-faq summary::-webkit-details-marker {
    display: none;
}

.nis2-faq p {
    margin-top: 10px;
}


/* Footer */

.nis2-footer {
    text-align: center;
    padding: 40px 5%;
    border-top: 1px solid rgba(15, 23, 42, 0.10);
    margin-top: 44px;
}

.nis2-footer a {
    color: rgba(15, 23, 42, 0.70);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.nis2-footer a:hover {
    color: #4f7dff;
}

.nis2-footer-sep {
    color: rgba(15, 23, 42, 0.35);
    margin: 0 16px;
}

.nis2-footer-copyright {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    text-align: center;
}

.nis2-footer-copyright p {
    margin: 0;
    color: rgba(15, 23, 42, 0.65);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.nis2-footer-disclaimer {
    margin-top: 12px !important;
    font-size: 11px !important;
    color: rgba(15, 23, 42, 0.50) !important;
    max-width: 700px;
    margin-left: auto !important;
    margin-right: auto !important;
    line-height: 1.6 !important;
    text-align: center !important;
}


/* Sistema di navigazione scroll laterale */

.nis2-scroll-nav {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    will-change: opacity;
}

.nis2-scroll-nav.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* Pulsante back-to-top */

.nis2-scroll-top {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, 0.88);
    color: rgba(15, 23, 42, 0.80);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.85;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nis2-scroll-top svg {
    width: 18px;
    height: 18px;
}

.nis2-scroll-top:hover {
    opacity: 1;
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}


/* Indicatore di progresso scroll */

.nis2-scroll-indicator {
    width: 3px;
    height: 80px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.12);
    position: relative;
    overflow: hidden;
}

.nis2-scroll-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, rgba(15, 51, 255, 0.85), rgba(109, 40, 217, 0.75));
    border-radius: 999px;
    transition: height 0.15s ease-out;
}


/* Link rapidi sezioni */

.nis2-scroll-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nis2-scroll-links li {
    margin: 0;
}

.nis2-scroll-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: rgba(255, 255, 255, 0.75);
    color: rgba(15, 23, 42, 0.70);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.nis2-scroll-links a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.92);
    transform: translateX(-2px);
    border-color: rgba(15, 51, 255, 0.30);
}

.nis2-scroll-links a.is-active {
    background: linear-gradient(135deg, rgba(15, 51, 255, 0.18), rgba(109, 40, 217, 0.14));
    border-color: rgba(15, 51, 255, 0.35);
    color: rgba(15, 23, 42, 0.95);
    opacity: 1;
}


/* Riferimenti normativi */

.nis2-references {
    margin-top: 32px;
}

.nis2-references details {
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    padding: 0;
    background: rgba(255, 255, 255, 0.50);
}

.nis2-references summary {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.65);
    user-select: none;
    transition: color 0.2s ease;
}

.nis2-references summary:hover {
    color: rgba(15, 23, 42, 0.85);
}

.nis2-references-content {
    padding: 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.nis2-references-intro {
    font-size: 13px;
    color: rgba(15, 23, 42, 0.65);
    margin-bottom: 16px;
    font-style: italic;
}

.nis2-references-list {
    list-style: decimal;
    padding-left: 24px;
    margin: 0;
}

.nis2-references-list li {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(15, 23, 42, 0.78);
    margin-bottom: 14px;
    scroll-margin-top: 100px;
}

.nis2-references-list li:last-child {
    margin-bottom: 0;
}

.nis2-references-list li:target {
    background: rgba(15, 51, 255, 0.08);
    padding: 8px;
    margin-left: -8px;
    border-radius: 4px;
}

.nis2-references-list a {
    color: rgba(15, 51, 255, 0.85);
    text-decoration: none;
    border-bottom: 1px solid rgba(15, 51, 255, 0.25);
    transition: all 0.2s ease;
}

.nis2-references-list a:hover {
    color: rgba(109, 40, 217, 0.90);
    border-bottom-color: rgba(109, 40, 217, 0.40);
}


/* Link riferimenti inline nel testo */

.nis2-ref-link {
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
    opacity: 0.50;
    transition: opacity 0.2s ease;
    text-decoration: none;
    vertical-align: baseline;
}

.nis2-ref-link:hover {
    opacity: 1;
}

.nis2-ref-link svg {
    fill: rgba(15, 51, 255, 0.75);
    transition: fill 0.2s ease;
}

.nis2-ref-link:hover svg {
    fill: rgba(109, 40, 217, 0.85);
}


/* Responsive */

@media (max-width: 980px) {
    .nis2-grid {
        grid-template-columns: 1fr;
    }
    .nis2-timeline {
        grid-template-columns: 1fr;
    }
    .header.header--nis2 .header--title {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .nis2-page {
        padding-top: 84px;
    }
    .nis2-hero {
        padding: 40px 5% 24px;
    }
    .nis2-hero h1 {
        font-size: 34px;
    }
    .nis2-hero p {
        font-size: 16px;
    }
    .nis2-section {
        padding: 24px 18px;
        border-radius: 16px;
    }
    /* Nascondi la navigazione scroll su mobile */
    .nis2-scroll-nav {
        display: none;
    }
}

@media (max-width: 480px) {
    .nis2-hero h1 {
        font-size: 28px;
    }
    .nis2-btn {
        width: 100%;
        max-width: 340px;
    }
}