@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

html {
    scroll-behavior: smooth;
}

:root {
    --marine: #0178a7;
    --sand: #f2e8cf;
    --dark: #1e1e1e;
}

/* Gradient globale */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    overflow-x: hidden;
    color: #333;
}

/* Navbar principale */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 2rem;
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, padding 0.4s ease;
}

.navbar.scrolled {
    background: #1c1c2e; /* tinta unita */
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

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

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background: #a46bff;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links a:hover {
    color: #a46bff;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hamburger mobile */
.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: white;
    position: fixed;
    top: 1.2rem;
    right: 1.5rem;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.menu-toggle.active {
    transform: rotate(90deg); /* piccola animazione del toggle */
}

/* Overlay mobile */
.mobile-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 38%;
    height: 100vh;
    background: #1c1c2e; /* tinta unita */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s ease-in-out;
    z-index: 999;
    padding-top: 0;
    overflow: hidden;
}

/* Stato aperto */
.mobile-overlay.open {
    right: 0;
}

/* Link mobile con animazione */
.mobile-overlay a {
    color: #fff;
    font-size: 1.1rem;
    margin: 0;
    padding: 1rem 0;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    width: 90%;
    text-align: center;
    opacity: 0;
    transform: translateX(30px);
    animation: slideIn 0.4s forwards;
}

.mobile-overlay a:last-child {
    border-bottom: none;
}

/* Animazione staggered: ogni link apparirà con delay */
.mobile-overlay.open a:nth-child(1) { animation-delay: 0.1s; }
.mobile-overlay.open a:nth-child(2) { animation-delay: 0.2s; }
.mobile-overlay.open a:nth-child(3) { animation-delay: 0.3s; }
.mobile-overlay.open a:nth-child(4) { animation-delay: 0.4s; }
.mobile-overlay.open a:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .navbar {
        padding: 2.5rem 1.5rem; /* più spazio verticale per il toggle */
    }

    .navbar.scrolled {
        padding: 2.2rem 1.5rem; /* più alto rispetto al precedente 1.8rem */
        transition: padding 0.4s ease, background 0.5s ease, box-shadow 0.5s ease;
    }
}

@media (max-width: 576px) {
    .mobile-overlay {
        width: 60%; /* più largo su schermi piccoli */
    }
    .mobile-overlay a { font-size: 1rem; padding: 0.8rem 0; }
}

/* Hero Portfolio */
.hero-portfolio {
    position: relative;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    min-height: 80vh; /* Altezza minima pari a tutta la finestra */
    padding: 50px 20px; /* padding ridotto se usi min-height */
    overflow: hidden;
    display: flex;
    align-items: center; /* centra verticalmente il contenuto */
}

.hero-portfolio .container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-portfolio .hero-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-portfolio .hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-portfolio .hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 500px;
    line-height: 1.5;
}

.hero-portfolio .btn {
    background: #fff;
    color: #2575fc;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-portfolio .btn:hover {
    background: #2575fc;
    color: #fff;
    transform: translateY(-3px);
}

.hero-portfolio .hero-image .profile-frame {
    width: 250px;
    height: 250px;
    border: 5px solid #fff;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.hero-portfolio .hero-image .profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-portfolio .hero-image .profile-frame:hover {
    transform: scale(1.05) rotate(-2deg);
}


/* Responsive Hero */
@media (max-width: 992px) {
    .hero-portfolio .hero-content { flex-direction: column; text-align: center; }
    .hero-portfolio .hero-image .profile-frame { width: 200px; height: 200px; margin: 0 auto 30px; }
}

@media (max-width: 576px) {
    .hero-portfolio .hero-text h1 { font-size: 2rem; }
    .hero-portfolio .btn { padding: 10px 25px; }
}

/* ================== */
/* About Portfolio     */
/* ================== */
.about-portfolio {
    background: #fff;
    padding: 100px 20px;
    font-family: 'Inter', sans-serif; /* moderno e leggibile */
    color: #333;
}

.about-portfolio .section-header {
    text-align: center;
    margin-bottom: 60px;
}

.about-portfolio .section-header h2 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.about-portfolio .section-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* Layout contenuti */
.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: flex-start;
    justify-content: center;
}

/* Testo principale */
.about-text {
    flex: 1 1 100%;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .section-header h2 {
        font-size: 2rem;
    }
    .about-text {
        font-size: 1rem;
    }
}

/* ============================ */
/* CSS ONDE DECORATIVE COMPLETO */
/* ============================ */

/* ===================== */
/* Onde full width comuni */
/* ===================== */
.hero-wave svg,
.wave-above-about svg,
.wave-below-about svg,
.next-wave svg {
    display: block;
    width: 100%; /* FIX: evita distacchi e shift */
    height: 100px;
}

/* ===================== */
/* Onda Hero in basso */
/* ===================== */
.hero-wave {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-wave svg path {
    fill: #fff;
}

/* ===================== */
/* Onda sopra About */
/* ===================== */
.wave-above-about {
    position: relative;
    margin-top: -1px; /* perfetta unione */
}

.wave-above-about svg path {
    fill: #fff;
}

/* ===================== */
/* Onda sotto About */
/* ===================== */
.wave-below-about {
    position: relative;
    margin-bottom: -1px; /* si aggancia alla sezione dopo */
}

/* Ribalta solo il path, NON l'intero SVG */
.wave-below-about svg path {
    fill: #fff;
    transform: scaleY(-1);
    transform-origin: center;
}

/* ===================== */
/* Onde tra altre sezioni */
/* ===================== */
.next-wave {
    position: relative;
}

.next-wave svg path {
    fill: #fff;
}

/* ===================== */
/* Responsive generico per tutte le onde */
/* ===================== */
@media (max-width: 1200px) {
    .hero-wave svg,
    .wave-above-about svg,
    .wave-below-about svg,
    .next-wave svg {
        height: 80px;
    }
}

@media (max-width: 576px) {
    .hero-wave svg,
    .wave-above-about svg,
    .wave-below-about svg,
    .next-wave svg {
        height: 60px;
    }
}

/* Responsive About */
@media (max-width: 992px) {
    .about-portfolio .about-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .about-portfolio .section-header h2 { font-size: 2rem; }
    .about-portfolio .section-header p,
    .about-portfolio .about-text {
        font-size: 1rem;
    }
}



/* ============================ */
/* Timeline Alternata Moderna  */
/* ============================ */

.timeline-section {
    padding: 120px 20px;
    color: #fff;
    font-family: "Inter", sans-serif;
}

.timeline-section h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 80px;
    font-weight: 800;
}

/* Contenitore centrale */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* Linea centrale */
.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
}

/* ============================ */
/* Timeline item base */
/* ============================ */

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    box-sizing: border-box;

    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s ease;
}

/* Quando appare */
.timeline-item.show {
    opacity: 1;
    transform: translateY(0);
}

/* Punto centrale */
.timeline-item::before {
    content: "";
    position: absolute;
    top: 25px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.4);
    box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* CARD contenuto */
.timeline-item .content {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
    padding: 25px 30px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: transform 0.3s ease;
}

.timeline-item .content:hover {
    transform: translateY(-6px);
}

/* ============================ */
/* ALTERNANZA DESTRA / SINISTRA */
/* ============================ */

.timeline-item.left {
    left: 0;
    text-align: left;
}

.timeline-item.left::before {
    right: -9px;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-item.right::before {
    left: -9px;
}

/* Testi */
.timeline-item h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.timeline-item p {
    line-height: 1.7;
}

/* ============================ */
/* RESPONSIVE */
/* ============================ */

@media (max-width: 768px) {

    .timeline::before {
        left: 10px;
        transform: none;
    }

    .timeline-item {
        width: 100%;
        padding-left: 40px;
    }

    .timeline-item.left,
    .timeline-item.right {
        left: 0;
    }

    .timeline-item::before {
        left: 0;
    }
}


.study-text-section {
    padding: 120px 20px;
    font-family: 'Inter', sans-serif;
    color: #fff;
    position: relative;
}

.study-text-section .section-header {
    text-align: center;
    margin-bottom: 70px;
}

.study-text-section .section-header h2 {
    font-size: 3rem;
    font-weight: 800;
    background: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.study-text-section .section-header p {
    color: #ccc;
    max-width: 700px;
    margin: 10px auto 0;
}

/* Layout principale: due colonne su desktop */
.study-content {
    display: flex;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: flex-start;
}

.study-main {
    flex: 2;
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.study-highlight {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease 0.2s;
}

.study-highlight blockquote {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-left: 4px solid #a46bff;
    padding: 25px 20px;
    font-style: italic;
    border-radius: 12px;
    color: #f0f0ff;
}

/* Classe animata quando visibile */
.study-text-section.show .study-main,
.study-text-section.show .study-highlight {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .study-content {
        flex-direction: column;
    }

    .study-highlight {
        margin-top: 30px;
    }
}

.projects-section {
    padding: 120px 20px;
    font-family: 'Inter', sans-serif;
    color: #fff;
    position: relative;
}

.projects-section .section-header {
    text-align: center;
    margin-bottom: 70px;
}

.projects-section .section-header h2 {
    font-size: 3rem;
    font-weight: 800;
    background: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.projects-section .section-header p {
    color: #ccc;
    max-width: 700px;
    margin: 10px auto 0;
}

/* Layout principale: due colonne su desktop */
.projects-content {
    display: flex;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: flex-start;
}

.projects-main {
    flex: 2;
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.projects-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease 0.2s;
}

/* Immagine */
.projects-image img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 12px 25px rgba(0,0,0,0.4);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.projects-image img:hover {
    transform: scale(1.03);
}

/* Box evidenza / citazione */
.projects-highlight blockquote {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-left: 4px solid #a46bff;
    padding: 20px 15px;
    font-style: italic;
    border-radius: 12px;
    color: #f0f0ff;
}

/* Animazione */
.projects-section.show .projects-main,
.projects-section.show .projects-side {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .projects-content {
        flex-direction: column;
    }

    .projects-side {
        margin-top: 30px;
    }
}


.documents-section {
    background: #f5f5f5; /* sfondo chiaro */
    padding: 80px 20px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    color: #333;
}

.documents-section .section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.documents-section .section-header p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #555;
}

.documents-content .btn-docs {
    display: inline-block;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.documents-content .btn-docs:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .documents-section .section-header h2 {
        font-size: 2rem;
    }
    .documents-section .section-header p {
        font-size: 1rem;
    }
    .documents-content .btn-docs {
        padding: 12px 25px;
        font-size: 1rem;
    }
}


/* ================= */
/* Footer moderno     */
/* ================= */
.footer {
    background: #f5f5f5; /* sfondo bianco */
    color: #333;
    padding: 80px 20px 40px 20px;
    font-family: 'Inter', sans-serif;
    position: relative;
}

.footer a {
    color: #6a11cb; /* link gradient-like */
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #2575fc;
}

/* Layout principali colonne */
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo h3 {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-logo p {
    font-size: 0.95rem;
    color: #555;
}

/* Contatti */
.footer-contact h4,
.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-contact p {
    margin: 6px 0;
    font-size: 0.95rem;
    color: #555;
}

/* Social icons */
.footer-social .social-icons {
    display: flex;
    gap: 15px;
}

.footer-social .social-icons a img {
    width: 26px;
    height: 26px;
    filter: invert(0.1) sepia(0.9) saturate(5) hue-rotate(260deg); /* colori coerenti */
    transition: transform 0.3s ease, filter 0.3s ease;
}

.footer-social .social-icons a:hover img {
    transform: scale(1.2);
    filter: invert(0) sepia(0.8) saturate(2) hue-rotate(270deg);
}

/* Footer bottom */
.footer-bottom {
    text-align: center;
    margin-top: 50px;
    font-size: 0.85rem;
    color: #888;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 20px;
}

/* =================== */
/* Responsive          */
/* =================== */
@media (max-width: 992px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .footer-social .social-icons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .footer-logo h3 {
        font-size: 1.6rem;
    }

    .footer-contact p,
    .footer-logo p,
    .footer-social h4 {
        font-size: 0.9rem;
    }

    .footer-social .social-icons a img {
        width: 22px;
        height: 22px;
    }
}





#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background-color: #fff;
    color: #00303f;
    padding: 1rem 2rem;
    font-size: 1rem;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 480px;
    width: calc(100% - 40px);
    opacity: 0;
    gap: 1rem;
    z-index: 9999;
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: auto;
}

#cookie-banner p {
    margin: 0;
    font-weight: 500;
    flex: 1;
    color: #00303f;
}

#cookie-banner a {
    color: #0077cc;
    text-decoration: underline;
}

#cookie-banner button {
    background-color: #0077cc;
    border: none;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

#cookie-banner button:hover {
    background-color: #005fa3;
}

/* Classe per far comparire il banner con fade-in + slide-up */
#cookie-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.privacy-consent {
    display: block;
    font-size: 0.9rem;
    margin: 1rem 0;
    color: #00303f;
}

.privacy-consent input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.privacy-consent a {
    color: white;
    text-decoration: underline;
}

