/* =========================================
   1. VARIABILI E RESET GLOBALE
   ========================================= */
:root {
    --bg-dark: #050505;
    --accent-1: #38bdf8;
    /* Azzurro tech */
    --accent-2: #818cf8;
    /* Indaco */
    --accent-3: #c084fc;
    /* Viola chiaro */
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
}

body.no-scroll {
    overflow: hidden;
    /* Blocca lo scroll quando il popup è aperto */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* =========================================
   2. BACKGROUND, GLOW E UTILITIES (GLASS)
   ========================================= */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Bagliori di Sfondo (Riempiono il vuoto visivo) */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

.glow-top-left {
    top: -200px;
    left: -200px;
    background: var(--accent-2);
}

.glow-bottom-right {
    bottom: -200px;
    right: -200px;
    background: var(--accent-1);
}

.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gradient-text {
    background: linear-gradient(to right, var(--accent-1), var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================================
   3. ANIMAZIONI (SCROLL E FLOATING)
   ========================================= */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.9s cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-in-up {
    transform: translateY(60px);
}

.fade-in-left {
    transform: translateX(-60px);
}

.fade-in-right {
    transform: translateX(60px);
}

.zoom-in {
    transform: scale(0.85);
}

.show-animate {
    opacity: 1;
    transform: translate(0) scale(1);
}

.floating {
    animation: float 6s ease-in-out infinite;
}
/* =========================================
   Stili per la nuova foto profilo
   ========================================= */
.profile-photo-container {
    width: 100%;
    max-width: 400px; /* Puoi regolare la grandezza massima qui */
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    /* Aggiunge un bordo luminoso e un'ombra in stile con il resto del sito */
    border: 2px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    background: rgba(15, 23, 42, 0.6);
}

.profile-photo {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Assicura che la foto non si deformi */
    border-radius: inherit; /* Eredita gli angoli arrotondati del contenitore */
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* =========================================
   4. NAVBAR (Effetto Logo Centrato)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: 0.3s;
}

.nav-container {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 40px;
}

/* Logo di default a sinistra */
.logo { 
    position: absolute; 
    left: 0; 
    /* Scegli uno tra: 'Pinyon Script', 'Great Vibes', 'Alex Brush' */
    font-family: 'Pinyon Script', cursive; 
    font-size: 2.2rem; /* Leggermente più grande perché i corsivi sono sottili */
    font-weight: 400; 
    color: var(--text-main);
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1); 
    z-index: 10;
    white-space: nowrap; /* Evita che il nome vada a capo */
}

/* Effetto quando scorri */
.navbar.scrolled .logo { 
    left: 50%; 
    transform: translateX(-50%); 
    font-size: 2.8rem;
    background: linear-gradient(to right, var(--accent-1), var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

/* Container link a destra */
.nav-links-wrapper {
    margin-left: auto;
    display: flex;
    align-items: center;
    transition: all 0.4s ease;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--accent-1);
}

/* Hamburger a destra (mobile) */
.hamburger {
    margin-left: auto;
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    transition: 0.4s ease;
    z-index: 10;
}

.hamburger span {
    width: 30px;
    height: 2px;
    background: white;
    transition: 0.3s;
}

/* STATO SCROLLED (Logo slitta al centro, menu scompare) */
.navbar.scrolled {
    padding: 1.2rem 0;
    background: rgba(5, 5, 5, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}


.navbar.scrolled .nav-links-wrapper,
.navbar.scrolled .hamburger {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; 
}

/* Hamburger Menu (Nascosto su Desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.hamburger span {
    width: 30px;
    height: 2px;
    background: white;
    transition: 0.3s;
}

/* =========================================
   5. BOTTONI GLOBALI
   ========================================= */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background: #fff;
    color: #000;
}

.btn-glow {
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    color: white;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.7);
    transform: scale(1.05);
}

/* =========================================
   6. HERO SECTION & TYPEWRITER
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 4rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -1.5px;
}

.typewriter-container {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    height: 50px;
}

.blink-cursor {
    font-weight: 300;
    font-size: 2.5rem;
    color: var(--accent-1);
    animation: blink 0.8s step-end infinite;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Hero Immagine / Fake Editor 3D */
.hero-visual {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.glow-backdrop {
    position: absolute;
    width: 250px;
    height: 250px;
    background: var(--accent-1);
    filter: blur(100px);
    opacity: 0.25;
    border-radius: 50%;
    z-index: 0;
}

.glass-editor {
    width: 100%;
    max-width: 450px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.editor-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1rem;
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.editor-body {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #e2e8f0;
}

.keyword {
    color: #c678dd;
}

.string {
    color: #98c379;
}

/* =========================================
   7. SEZIONI GLOBALI (Padding & Titoli)
   ========================================= */
.services-section,
.timeline-section,
.skills-section,
.portfolio,
.contact {
    padding: 6rem 0;
    overflow: hidden;
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: -1px;
}

/* =========================================
   8. SERVIZI (3 Colonne)
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2.5rem;
    border-radius: 20px;
    text-align: left;
    transition: 0.3s;
    border-top: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-top-color: var(--accent-1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* =========================================
   9. TIMELINE A ZIG-ZAG
   ========================================= */
.timeline-center {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Linea Centrale */
.timeline-center::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent-1), var(--accent-3));
    transform: translateX(-50%);
    border-radius: 3px;
}

.timeline-item {
    width: 50%;
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Card a Sinistra */
.timeline-item.left {
    left: 0;
    padding-right: 50px;
    text-align: right;
}

.timeline-item.left .timeline-dot {
    position: absolute;
    right: -11px;
    top: 20px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 4px solid var(--accent-1);
    box-shadow: 0 0 10px var(--accent-1);
    z-index: 2;
}

/* Card a Destra */
.timeline-item.right {
    left: 50%;
    padding-left: 50px;
    text-align: left;
}

.timeline-item.right .timeline-dot {
    position: absolute;
    left: -11px;
    top: 20px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 4px solid var(--accent-2);
    box-shadow: 0 0 10px var(--accent-2);
    z-index: 2;
}

/* Contenuto Timeline */
.timeline-content {
    padding: 2rem;
    border-radius: 16px;
    display: inline-block;
    width: 100%;
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: scale(1.02);
}

.timeline-year {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-1);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-item.right .timeline-year {
    color: var(--accent-2);
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.timeline-content p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* =========================================
   10. TECH STACK (PILLOLE MONOCHROME)
   ========================================= */
.skills-bento {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
}

.skill-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.8rem;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: default;
}

.skill-pill img {
    width: 28px;
    height: 28px;
    /* Rende le icone bianche/grigie di base */
    filter: grayscale(100%) brightness(200%);
    transition: all 0.4s ease;
}

.skill-pill span {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Effetto Colore all'Hover */
.skill-pill:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-1);
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.15);
}

.skill-pill:hover img {
    /* Ritorna ai colori originali al passaggio del mouse */
    filter: grayscale(0%) brightness(100%);
    transform: rotate(5deg) scale(1.1);
}

/* =========================================
   11. PORTFOLIO & CARD
   ========================================= */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.portfolio-card {
    border-radius: 20px;
    overflow: hidden;
    transition: 0.4s;
    cursor: pointer;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(56, 189, 248, 0.5);
}

.card-img {
    height: 220px;
    width: 100%;
    transition: 0.5s;
}

.portfolio-card:hover .card-img {
    transform: scale(1.05);
}

.card-info {
    padding: 2rem;
    position: relative;
    background: inherit;
}

.project-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-1);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.card-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-info p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.btn-text {
    color: var(--accent-1);
    font-weight: 600;
    display: inline-block;
    transition: 0.3s;
}

.portfolio-card:hover .btn-text {
    color: var(--accent-3);
    transform: translateX(5px);
}

/* Nasconde i progetti extra */
.project-hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Quando attivato dal JS */
.project-visible {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

.show-more-container {
    text-align: center;
    margin-top: 4rem;
}

#load-more-btn {
    min-width: 250px;
    transition: all 0.3s ease;
}

/* Rimpicciolisce il tasto o lo nasconde quando non serve più */
.btn-hidden {
    display: none;
}

/* =========================================
   12. POPUP MODAL (DETTAGLIO PROGETTO)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    position: relative;
    transform: scale(0.9);
    transition: 0.4s;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-modal:hover {
    background: var(--accent-3);
}

.modal-image {
    height: 300px;
    width: 100%;
    background-position: center;
    background-size: cover;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
}

.modal-content {
    padding: 2.5rem;
}

.modal-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.modal-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.tech-badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-1);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* =========================================
   13. NUOVI CONTATTI (Box Split + Floating Labels)
   ========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    padding: 4rem;
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.contact-info {
    text-align: left;
}

.info-details {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.info-item .icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-1);
    border-radius: 50%;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.info-item div {
    line-height: 1.5;
    font-size: 1.05rem;
}

.info-item strong {
    color: white;
    font-size: 1.1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 1.6rem 1.2rem 0.6rem 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-family: inherit;
    font-size: 1.05rem;
    transition: all 0.3s;
    resize: vertical;
}

.input-group label {
    position: absolute;
    left: 1.2rem;
    top: 1.1rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-group input:focus~label,
.input-group input:not(:placeholder-shown)~label,
.input-group textarea:focus~label,
.input-group textarea:not(:placeholder-shown)~label {
    top: 0.4rem;
    font-size: 0.75rem;
    color: var(--accent-1);
    font-weight: 600;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-1);
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-top: 1rem;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-status {
    min-height: 1.25rem;
    margin-top: 0.35rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.form-status.is-loading {
    color: var(--accent-1);
}

.form-status.is-success {
    color: #6ee7b7;
}

.form-status.is-error {
    color: #fca5a5;
}

.honeypot-field {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* =========================================
   14. FOOTER
   ========================================= */
footer {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-links a,
.policy-links a {
    color: var(--text-muted);
    transition: color 0.25s ease, text-decoration-color 0.25s ease;
}

.social-links a:hover,
.policy-links a:hover {
    color: var(--accent-1);
}

.policy-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-bottom: 0.5rem;
}

.policy-links a {
    font-size: 0.95rem;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 0.2rem;
}

/* =========================================
   15. COOKIE BANNER
   ========================================= */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 20px;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
    z-index: 1500;
    pointer-events: none;
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner__content {
    width: min(760px, 100%);
    border-radius: 18px;
    padding: 1rem 1.2rem;
    background: rgba(5, 5, 5, 0.88);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    pointer-events: auto;
}

.cookie-banner__content p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.cookie-banner__content a {
    color: var(--accent-1);
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-shrink: 0;
}

.cookie-btn {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cookie-btn:hover {
    transform: translateY(-1px);
}

.cookie-btn--accent {
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    color: #fff;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
}

.cookie-btn--muted {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
}

.cookie-btn--muted:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-main);
}

.cookie-banner.is-hiding .cookie-banner__content {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* =========================================
   16. MEDIA QUERIES (RESPONSIVE)
   ========================================= */

/* Tablet & Laptop Piccoli */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-text p {
        margin-inline: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .typewriter-container {
        font-size: 1.8rem;
    }

    /* Adatta il nuovo box contatti */
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 3rem 2rem;
    }
}

/* Dispositivi Mobile */
@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.8rem;
    }

    /* Gestione logo posizione statica/assoluta per mobile */
    .nav-container {
        justify-content: space-between;
    }

    .logo {
        position: relative;
    }

    .navbar.scrolled .logo {
        position: absolute;
    }

    /* Animazione logo limitata */

    .hamburger {
        display: flex;
    }

    /* Nuovo wrapper menu per mobile */
    .nav-links-wrapper {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem 0;
        clip-path: circle(0% at 100% 0);
        transition: clip-path 0.5s ease-in-out;
    }

    .nav-links-wrapper.active {
        clip-path: circle(150% at 100% 0);
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
    }

    .timeline-center::before {
        left: 20px;
        transform: none;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 60px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .timeline-item .timeline-dot {
        left: 9px !important;
        right: auto !important;
    }

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

    /* Adatta il nuovo box contatti */
    .contact-wrapper {
        padding: 2.5rem 1.5rem;
        gap: 2.5rem;
    }

    .close-view-btn {
        position: relative;
        left: auto;
        margin-bottom: 2rem;
    }

    .modal-image {
        height: 200px;
    }

    .modal-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .policy-links {
        gap: 0.85rem;
    }

    .cookie-banner {
        bottom: 12px;
        padding: 0 0.75rem;
    }

    .cookie-banner__content {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.95rem;
    }

    .cookie-banner__actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }
}

/* =========================================
   SCHERMATA EXPLORER (TUTTI I PROGETTI)
   ========================================= */
.fullscreen-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    z-index: 2000;
    /* Deve stare sopra a tutto, tranne il popup dettagli */
    overflow-y: auto;
    padding: 4rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.fullscreen-view.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.view-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.close-view-btn {
    position: absolute;
    left: 0;
    top: 0;
}

/* Filtri */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-1);
    color: #000;
    border-color: var(--accent-1);
}

/* Aggiustamento per Mobile */
@media (max-width: 768px) {
    .close-view-btn {
        position: relative;
        left: auto;
        margin-bottom: 2rem;
    }
}
