﻿*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #100E12;
    --surface: #fff;
    --accent: #20B8CD;
    --text: black;
    --muted: black;
    --border: rgba(255,255,255,0.08);
    --max-w: 680px;
    --pad-x: 24px;
    --zadea-dark-orange: #f39200;
    --aifibra-orange: #FE5906;
    --zadea-light-orange: #c85206;
    --zadea-grey: #575656;
    --fibercloud-blue: #007cc4;
    --ondaline-lightblue: #10a7e0;
    --ondaline-lightblue-var: #0c7299;
    --footer-dark-grey: #27282C;
    --ricoh-red: #D0142C;
    --dwservice-blue: #3b5089;
    --cambium-blue: #003a70;
    --odoo-readypartner: #21B799;
}


html {
    scroll-behavior: smooth;
    width:100% !important;
    overflow-x:hidden;
}

body {
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.color-aifibra-orange {
    color: var(--aifibra-orange);
}

.btn-aifibra-orange {
    background-color: var(--aifibra-orange) !important;
    color: #fff;
}

/* ─── CONTENITORE CENTRATO ─────────────────────────────── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

/* ─── TIPOGRAFIA ───────────────────────────────────────── */
h1 {
    font-size: clamp(3.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

p {
    color: var(--muted);
}

/* ─── NAVBAR ───────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px var(--pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(16, 14, 18, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.nav-cta {
    background: var(--text);
    color: var(--bg);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 100px;
    text-decoration: none;
    transition: opacity 0.2s;
}

    .nav-cta:hover {
        opacity: 0.85;
    }

/* ─── SEZIONI: SPAZIATURA BASE ─────────────────────────── */
section {
    padding: 120px 0;
}

    section .eyebrow {
        font-size: 0.8rem;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--aifibra-orange);
        margin-bottom: 16px;
    }

    section h2 {
        margin-bottom: 16px;
    }

    section > .container > p {
        margin: 0 auto 40px;
    }

/* ─── 1. HERO ──────────────────────────────────────────── */
/*
      Lo sfondo fisso è il trucco principale.
      Sostituisci url('hero-bg.jpg') con la tua immagine.
      Su mobile iOS rimuovi background-attachment: fixed (non supportato).
    */

body {
    background-image: url('/img/aifibra-hero-img.png');
    background-size: auto;
    overflow-x: hidden;
    min-height: 100vh;
    max-width: 100% !important;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;

    
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* background: radial-gradient(ellipse at 50% 0%, #2a1040 0%, var(--bg) 70%); */
}

.hero-card {
    padding-top: 2em;
    padding-bottom: 2em;
    border-radius: 2em;
    margin-left: 2em;
    margin-right: 2em;
    color: inherit;
    background: rgba(232, 236, 241, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

    #hero h1 {
        margin-bottom: 20px;
    }

    #hero p {
        font-size: 1.125rem;
        margin: 0 auto 40px;
    }

.hero-img {
    width: 100%;
    max-width: 560px;
    border-radius: 16px;
    margin: 60px auto 0;
    display: block;
    border: 1px solid var(--border);
}

/* ─── 2. FEATURE LIST (scroll con screenshot) ──────────── */
#features {
    background: var(--surface);
}

    #features .feature-list {
        display: flex;
        flex-direction: column;
        gap: 80px;
        margin-top: 64px;
        text-align: left;
    }

.feature-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
    /* Alterna immagine sinistra / destra */
    .feature-item:nth-child(even) .feature-item__img {
        order: 2;
    }

    .feature-item:nth-child(even) .feature-item__text {
        order: 1;
    }

.feature-item__img img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.feature-item__text h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature-item__text p {
    max-width: 360px;
}

/* ─── 3. SEZIONE TESTO LARGO (statement) ──────────────── */
/*
      Sezione con sfondo fisso diverso — crea l'effetto "cambio scena"
    */
#statement {
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* ← SECONDO SFONDO FISSO */
    /* Fallback senza immagine: */
    /* background: var(--bg); */
}

    #statement h2 {
        font-size: clamp(2rem, 5vw, 4rem);
    }

    #statement p {
        font-size: 1.2rem;
        margin: 0 auto;
    }

/* ─── 4. GRIGLIA CAPABILITIES ──────────────────────────── */
#features-home, #features-business {
    background: #fff;
}

.cap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 48px;
}

.cap-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: left;
}

.cap-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.cap-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text);
}

.cap-card p {
    font-size: 0.875rem;
    max-width: none;
}

.miniature {
    border-radius: 1em;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

/* ─── 5. SEZIONE SHORTCUT / HIGHLIGHT ─────────────────── */
#shortcut {
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* ← TERZO SFONDO FISSO */
}

.shortcut-keys {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.key {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.key-plus {
    color: var(--muted);
    font-size: 1.2rem;
}

/* ─── 6. DOWNLOAD / CTA FINALE ─────────────────────────── */
#download {
    background: var(--surface);
}

    #download h2 {
        margin-bottom: 12px;
    }

    #download p {
        margin: 0 auto 40px;
    }

.btn-primary {
    display: inline-block;
    background: var(--text);
    color: var(--bg);
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 100px;
    text-decoration: none;
    transition: opacity 0.2s;
}

    .btn-primary:hover {
        opacity: 0.85;
    }

.btn-secondary {
    display: inline-block;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    padding: 14px 32px;
    border-radius: 100px;
    text-decoration: none;
    margin-left: 12px;
    transition: background 0.2s;
}

    .btn-secondary:hover {
        background: rgba(255,255,255,0.06);
    }

.download-note {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 16px;
}

.btn {
    border-radius: 1rem !important;
}

/* ─── FOOTER ───────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 32px var(--pad-x);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--muted);
}

    footer a {
        color: var(--muted);
        text-decoration: none;
    }

        footer a:hover {
            color: var(--text);
        }

.footer-links {
    display: flex;
    gap: 24px;
}


.card {
    padding: 16px;
    background-color: #fff;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
    border-radius: 2em;
    border: 2px solid var(--aifibra-orange) !important;
    text-align: center;
}

.card-visible {
    height: 100%;
}

/* Pannello che andrà sopra */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--aifibra-orange); /* Colore di sfondo per coprire il testo sotto */
    color: #fff !important;
    padding: 16px;
    box-sizing: border-box;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    text-decoration: none;
    z-index: 99;
}

/* Al passaggio del mouse, lo riportiamo alla posizione originale (0) */
.card:hover .card-overlay {
    transform: translateY(0);
}

.desktop-hide {
    display: none !important;
}

.mobile-hide {
    display: block !important;
}


/* ─── MOBILE ───────────────────────────────────────────── */
@media (max-width: 768px) {

    body {
        background-image: none;
    }

    .desktop-hide {
        display: block !important;
    }

    .mobile-hide {
        display: none !important;
    }

    .hero-card-mobile {
        background-image: url("/img/aifibra-hero-img.png");
    }

    .mobile-hero {

    }

    /* Disabilita fixed su iOS (non funziona) */
    #hero, #statement, #shortcut {
        background-attachment: scroll;
    }

    .feature-item {
        grid-template-columns: 1fr;
        gap: 24px;
    }

        .feature-item:nth-child(even) .feature-item__img {
            order: 0;
        }

        .feature-item:nth-child(even) .feature-item__text {
            order: 0;
        }

    section {
        padding: 80px 0;
    }

    footer {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .mobile-font-sm {
        font-size: .8rem;
    }
}