/* =========================================
   RESET DI BASE
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f6f6f6;
    color: #333;
    line-height: 1.6;
}

/* =========================================
   TIPOGRAFIA
========================================= */
h1, h2, h3 {
    font-weight: 700;
    color: #173F5F;
}

p {
    font-size: 1rem;
    color: #444;
}

a {
    text-decoration: none;
    color: #20639B;
    transition: 0.3s ease;
}

a:hover {
    color: #173F5F;
}

html {
    scroll-behavior: smooth;
}

/* =========================================
   HEADER
========================================= */
.site-header {
    background: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    margin-right: 15px;
}

.logo-text h1 {
    font-size: 1.6rem;
    margin-bottom: 0.2rem;
}

.logo-text p {
    font-size: 0.9rem;
    color: #666;
}

/* NAV */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav a {
    font-weight: 600;
    color: #173F5F;
}

.cta-nav {
    padding: 0.4rem 0.8rem;
    background: #20639B;
    color: white !important;
    border-radius: 4px;
}

.cta-nav:hover {
    background: #173F5F;
}

/* =========================================
   HERO SECTION
========================================= */
.hero {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    padding: 2rem 1rem;
    background: #ffffff;
}

.hero-content {
    max-width: 600px;
    text-align: center;
    margin-top: 1.5rem;
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.8rem 1.4rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

.btn-primary {
    background: #20639B;
    color: white;
}

.btn-primary:hover {
    background: #173F5F;
}

.btn-secondary {
    background: #e8e8e8;
    color: #173F5F;
}

.btn-secondary:hover {
    background: #dcdcdc;
}

.hero-image img {
    width: 100%;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Desktop layout */
@media (min-width: 900px) {
    .hero {
        flex-direction: row;
        justify-content: space-between;
        padding: 4rem 6rem;
    }

    .hero-content {
        text-align: left;
        max-width: 500px;
    }
}

/* =========================================
   SERVIZI
========================================= */
.services {
    padding: 4rem 2rem;
    background: #f6f6f6;
    text-align: center;
}

.services-grid {
    margin-top: 2rem;
    display: grid;
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: left;
}

.service-card h3 {
    margin-bottom: 0.8rem;
}

.service-card ul {
    margin-top: 1rem;
    padding-left: 1.2rem;
}

@media (min-width: 800px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =========================================
   PORTFOLIO
========================================= */
.portfolio {
    padding: 4rem 2rem;
    background: #ffffff;
}

.portfolio-category {
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: #20639B;
}

.portfolio-grid {
    display: grid;
    gap: 2rem;
}

.portfolio-item {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
}

.portfolio-item iframe {
    width: 100%;
    aspect-ratio: 16 / 9; /* mantiene proporzioni video */
    height: auto;
    min-height: 250px; /* garantisce altezza minima coerente */
    border-radius: 8px;
}

.portfolio-item img,
.portfolio-item video,
.portfolio-item iframe,
model-viewer {
    width: 100%;
    border-radius: 8px;
}

.small {
    margin-top: 0.5rem;
    display: inline-block;
}

@media (min-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================
   PROCESSO DI LAVORO
========================================= */
.process {
    padding: 4rem 2rem;
    background: #f6f6f6;
    text-align: center;
}

.process-steps {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.step {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step span {
    background: #20639B;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 50%;
}

@media (min-width: 700px) {
    .process-steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================
   CHI SONO
========================================= */
.about {
    padding: 4rem 2rem;
    background: #ffffff;
    text-align: center;
}

.profile-img {
    width: 180px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.about p {
    max-width: 700px;
    margin: 0 auto;
    font-family: 'EB Garamond', serif;
    font-size: 1.2rem;
    line-height: 1.7;
}

/* =========================================
   CONTATTI
========================================= */
.contacts {
    padding: 4rem 2rem;
    background: #f6f6f6;
    text-align: center;
}

.contacts p {
    margin-bottom: 0.5rem;
}

.contacts .btn-primary {
    margin-top: 1.5rem;
}

/* =========================================
   FOOTER
========================================= */
.site-footer {
    background: #173F5F;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* =========================================
   FIX HEADER MOBILE — VERSIONE SNELLA
========================================= */
@media (max-width: 768px) {

    .site-header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0.8rem; /* RIDOTTO */
        text-align: center;
    }

    .logo {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .logo img {
        height: 45px; /* RIDOTTO */
        margin-right: 8px;
    }

    .logo-text h1 {
        font-size: 1.1rem; /* RIDOTTO */
        white-space: nowrap;
    }

    .logo-text p {
        font-size: 0.75rem; /* RIDOTTO */
    }

    .main-nav ul {
        flex-wrap: nowrap; /* EVITA 2 RIGHE */
        justify-content: center;
        gap: 0.5rem; /* RIDOTTO */
        margin-top: 0.4rem; /* RIDOTTO */
    }

    .main-nav a {
        font-size: 0.8rem; /* RIDOTTO */
    }

    .cta-nav {
        padding: 0.25rem 0.6rem; /* RIDOTTO */
        font-size: 0.8rem; /* RIDOTTO */
    }
}
