/* Importazione Poppins */
/* @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap'); */

:root {
    /* Colori Professionali */
    --primary-color: #002147;
    --secondary-color: #DAA520;
    --background-light: #f4f7f9;
    --background-light-alt: #e9ecef;
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-color: #dee2e6;

    /* Font e Design */
    --font-family: 'Poppins', sans-serif;
    --border-radius: 8px;
    --box-shadow-light: 0 6px 20px rgba(0, 33, 71, 0.1);
    --box-shadow-hover: 0 10px 30px rgba(0, 33, 71, 0.15);
}

/* Base Reset */
body {
    font-family: var(--font-family);
    color: var(--text-dark);
    line-height: 1.7;
    margin: 0;
    background-color: var(--background-light);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.8em;
}

/* UTILITIES */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light-alt {
    background-color: var(--background-light-alt);
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 40px;
}

/* GRIGLIA */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    width: 100%;
}

/* ICONE */
.icon-large {
    font-size: 3em;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.ml-2 {
    margin-left: 10px;
}

/* PULSANTI */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1.05em;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 4px 8px rgba(0, 33, 71, 0.2);
}

.btn-primary:hover {
    background-color: #003366;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 33, 71, 0.3);
}

.btn-cta {
    background-color: var(--secondary-color);
    color: var(--text-light);
    box-shadow: 0 4px 10px rgba(218, 165, 32, 0.4);
}

.btn-cta:hover {
    background-color: #cc9900;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(218, 165, 32, 0.5);
}

/* Nuovo bottone Outline (Trasparente) per la Hero */
.btn-outline-light {
    background-color: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
    box-shadow: none;
}

.btn-outline-light:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.15em;
}

/* HEADER */
#header {
    background-color: var(--text-light);
    box-shadow: var(--box-shadow-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

nav ul li a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s, color 0.2s;
    font-weight: 600;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: var(--background-light-alt);
    color: var(--primary-color);
}

/* =========================
   NUOVA HERO SECTION
========================= */
.hero-full-height {
    min-height: 90vh;
    /* Più alta */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    overflow: hidden;
    /* Immagine di sfondo evocativa */
    background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Overlay sfumato scuro */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 33, 71, 0.92) 0%, rgba(0, 20, 40, 0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 20px;
}

.hero-full-height h1 {
    color: var(--text-light);
    font-size: 4.2em;
    /* Molto grande */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.highlight-gold {
    color: var(--secondary-color);
    display: inline-block;
}

.hero-full-height h2 {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 30px;
}

.slider-text {
    font-size: 1.4em;
    font-weight: 600;
    margin: 0 0 40px 0;
    height: 1.5em;
    color: var(--secondary-color);
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slider-text.fade-out {
    opacity: 0;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* FEATURES SECTION */
#why-us {
    background-color: var(--text-light);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.feature-box {
    background-color: var(--background-light);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover);
}

.feature-box h4 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.feature-box p {
    font-size: 0.95em;
    color: #555;
}

/* CATALOGO */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-item {
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover);
}

.portfolio-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.portfolio-item-image {
    width: 100%;
    height: 220px;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    color: #666;
    overflow: hidden;
    position: relative;
}

.portfolio-item-image iframe {
    width: 400%;
    height: 400%;
    transform: scale(0.25);
    transform-origin: 0 0;
    border: none;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
}

.portfolio-item-content {
    padding: 20px;
}

.portfolio-item-content h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.25em;
}

.portfolio-item-content p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.portfolio-item-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 5px 10px;
    border-radius: var(--border-radius);
    font-size: 0.8em;
    font-weight: 400;
}

/* FOOTER */
#footer {
    background-color: var(--primary-color);
    color: #b0c4de;
    padding: 60px 0 30px;
    border-top: 5px solid var(--secondary-color);
    font-size: 0.95em;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: left;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: var(--text-light);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2em;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-col p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-col i {
    color: var(--secondary-color);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.footer-col a {
    color: #b0c4de;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.social-links a {
    color: #b0c4de;
    margin-left: 15px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
    display: inline-block;
}

/* BARRA COOKIE */
.cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    color: var(--text-light);
    padding: 15px 30px;
    text-align: center;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-bar.hidden {
    display: none;
}

.cookie-bar button {
    margin-left: 20px;
    padding: 8px 18px;
    background-color: var(--secondary-color);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-light);
    cursor: pointer;
    font-weight: 600;
}

/* MODALE */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--text-light);
    margin: auto;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 700px;
    box-shadow: var(--box-shadow-hover);
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-button {
    color: var(--primary-color);
    font-size: 2em;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.modal-category {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 5px;
}

.modal-tech .tech-tag {
    margin-right: 5px;
    margin-bottom: 5px;
}

/* RESPONSIVE */
.nav-toggle {
    display: none;
    font-size: 1.8em;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
}

@media (max-width: 992px) {
    h1 {
        font-size: 3.5em;
    }

    h2 {
        font-size: 1.5em;
    }

    .hero-content {
        padding: 15px;
    }

    .btn-large {
        padding: 12px 30px;
        font-size: 1em;
    }

    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    #header {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px;
        left: 0;
        background-color: var(--text-light);
        box-shadow: var(--box-shadow-light);
    }

    .nav-links li {
        text-align: center;
        width: 100%;
        border-top: 1px solid var(--background-light);
    }

    .nav-links li a {
        display: block;
        padding: 15px 0;
    }

    .nav-links li:last-child a {
        padding: 15px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .hero-full-height h1 {
        font-size: 2.5em;
    }

    .hero-full-height h2 {
        font-size: 1.3em;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
        margin-left: 0;
    }

    .section-padding {
        padding: 60px 0;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .portfolio-item-image {
        height: 180px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .close-button {
        font-size: 1.8em;
        top: 5px;
        right: 10px;
    }

    .footer-grid {
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .social-links a {
        margin: 0 10px;
    }
}