/* --- DESIGN SYSTEM & VARIABLES --- */
:root {
    /* Palette Utente: Panna, Carta da Zucchero, Salvia, Rosa */
    --color-bg: #fdfbf7;
    /* Panna */
    --color-text-main: #4a4a4a;
    --color-text-light: #777777;

    --color-accent: #6c8ea4;
    /* Carta da Zucchero */
    --color-accent-light: #f4c2c2;
    /* Rosa */
    --color-sage: #a8c3b4;
    /* Verde Salvia */
    --color-primary-dark: #2f3542;

    /* Typography */
    --font-heading: 'Bodoni Moda', serif;
    --font-body: 'Bodoni Moda', serif;
    /* Tutto uniforme stile logo */
    --font-script: 'Sacramento', cursive;

    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Borders & Shadows */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 30px;
    --shadow-soft: 0 15px 35px -5px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 25px 50px -12px rgba(108, 142, 164, 0.25);
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 200px;
    /* Offset aumentato per header alto */
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.7;
    font-weight: 500;
    /* Bodoni è sottile, lo rendiamo più leggibile */
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary-dark);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* --- UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

.btn {
    display: inline-block;
    padding: 14px 34px;
    background-color: var(--color-accent);
    color: white;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(108, 142, 164, 0.4);
    /* Ombra bluastra */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(108, 142, 164, 0.5);
    /* Ombra bluastra più forte */
    background-color: #5a7688;
    /* Blu più scuro */
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-primary-dark);
    color: var(--color-primary-dark);
    box-shadow: none;
}

.btn-outline:hover {
    background-color: var(--color-primary-dark);
    color: white;
    box-shadow: 0 10px 25px rgba(109, 104, 117, 0.3);
}

/* --- HEADER --- */
header {
    background: #ffffff;
    /* backdrop-filter: blur(10px); Rimosso per uniformare il colore col logo */
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 220px;
    /* Molto grande come richiesto */
    width: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
    /* Piccolo effetto zoom al passaggio */
}

/* --- HAMBURGER MENU (DESKTOP) --- */
.hamburger-menu {
    position: relative;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-icon div {
    width: 35px;
    height: 3px;
    background-color: var(--color-primary-dark);
    margin: 6px 0;
    transition: 0.4s;
    border-radius: 2px;
}

/* Hover Effect on Icon */
.hamburger-menu:hover .hamburger-icon div:nth-child(2) {
    width: 25px;
    /* Effetto dinamico */
}

/* Dropdown Menu (Hidden by default) */
.nav-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 250px;
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius-sm);
    padding: 20px;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Show on Hover */
.hamburger-menu:hover .nav-dropdown {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.nav-dropdown li {
    list-style: none;
    text-align: right;
    /* Allineato a destra per eleganza */
}

/* Reset standard nav styles for dropdown */
nav ul {
    all: unset;
}

nav a {
    font-family: var(--font-heading);
    /* Bodoni Moda: Molto più elegante */
    font-size: 1.1rem;
    /* Dimensione classica raffinata */
    font-weight: 500;
    text-transform: uppercase;
    /* L'uppercase col Bodoni è super chic */
    letter-spacing: 2px;
    /* Spaziatura premium */
    color: var(--color-text-main);
    position: relative;
    padding: 0 5px;
    transition: color 0.3s;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s;
}

nav a:hover {
    color: var(--color-primary-dark);
}

nav a:hover::after {
    width: 100%;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    background-color: #f7f3f0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background-image: url(./hero_final_v2.png);
    /* Nuova immagine pastello/elegante */
    background-size: cover;
    background-position: center;
    /* v1.1 refresh */
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 1;
}

.hero-content {
    width: 50%;
    padding-left: 5%;
    z-index: 2;
    padding-right: 50px;
}

.hero h1 {
    font-size: 5.5rem;
    /* Leggermente più grande */
    margin-bottom: 25px;
    line-height: 1.1;
    color: var(--color-primary-dark);
    font-weight: 400;
    /* Marcellus è molto elegante "leggero" */
    letter-spacing: -1px;
    /* Tocco moderno */
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
    /* Leggera profondità */
}

.hero h1 span {
    /* Rimosso font script per uniformità */
    font-style: italic;
    /* Solo corsivo dello stesso font Serif */
    color: var(--color-accent);
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 40px;
    max-width: 450px;
}

/* --- INTRO / STORY --- */
.story {
    background-color: #f7f3f0;
    /* Warm beige for contrast with white header */
    position: relative;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.story-text h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.story-image {
    position: relative;
}

.story-image img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.decoration-circle {
    position: absolute;
    width: 200px;
    height: 200px;
    background-color: var(--color-sage);
    border-radius: 50%;
    z-index: -1;
    top: -40px;
    left: -40px;
    opacity: 0.5;
}

/* --- GALLERY GRID --- */
.gallery {
    background-color: var(--color-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.section-header p {
    font-family: var(--font-heading);
    font-style: italic;
    /* Corsivo ma elegante serif */
    font-size: 1.3rem;
    /* Ridotto rispetto al script gigante */
    color: var(--color-text-light);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.product-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-img {
    height: 350px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-info {
    padding: 25px;
    text-align: center;
}

.product-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.tag {
    display: inline-block;
    background-color: var(--color-sage);
    color: #4a6c56;
    padding: 6px 16px;
    border-radius: 20px;
    font-family: var(--font-heading);
    /* Uso il Serif per i tag per coerenza */
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* --- SU MISURA SECTION --- */
/* --- SU MISURA SECTION --- */
.su-misura {
    position: relative;
    background-image: url('custom_bg.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: var(--color-text-main);
    text-align: center;
    overflow: hidden;
    padding: 100px 0;
}

.su-misura-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    /* Velo chiaro elegante */
    z-index: 1;
}

.su-misura-content {
    position: relative;
    z-index: 2;
}

.su-misura h2 {
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    font-size: 3.5rem;
    /* Più grande e impattante */
    margin-bottom: 25px;
    text-shadow: none;
}

.su-misura p {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: var(--color-text-main);
    text-shadow: none;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.process-steps {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin: 50px auto 60px;
    flex-wrap: wrap;
    max-width: 1000px;
}

.step {
    flex: 1;
    min-width: 250px;
    text-align: center;
    cursor: pointer;
    /* Indica che è cliccabile */
}

.step-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.step:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
    background: white;
}

.step-icon .icon {
    width: 40px;
    height: 40px;
    color: var(--color-accent);
}

.step h3 {
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.step p {
    font-size: 1.1rem;
    color: var(--color-text-main);
    margin-bottom: 0;
}

.su-misura .btn {
    background-color: var(--color-primary-dark);
    color: white;
    font-weight: bold;
    border: 2px solid var(--color-primary-dark);
    padding: 15px 40px;
}

.su-misura .btn:hover {
    background-color: transparent;
    color: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* --- CONTACT --- */
.contact {
    background-color: #fcf9f2;
    /* Soft gentle cream */
}

.contact-container {
    background-color: white;
    border-radius: var(--radius-lg);
    padding: 60px;
    box-shadow: var(--shadow-soft);
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.contact h2 {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

input,
textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(108, 142, 164, 0.15);
    /* Modern soft glow */
}

/* --- FOOTER --- */
footer {
    background-color: var(--color-primary-dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 20px;
}

/* FOOTER SOCIAL LINKS - ROBUST */
.footer-links ul {
    list-style: none;
    display: flex;
    /* Flex per allineamento sicuro */
    flex-direction: column;
    gap: 10px;
}

.social-link {
    display: inline-block !important;
    /* Forza il blocco cliccabile */
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 5px 10px;
    /* Area di click aumentata */
    position: relative;
    z-index: 50;
    /* Z-index altissimo locale */
    transition: color 0.3s, transform 0.3s;
}

.social-link:hover {
    color: white !important;
    transform: translateX(-5px);
    /* Piccolo effetto movimento */
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }

    nav {
        display: block;
        /* Riattivato per mobile */
        position: relative;
        /* Per posizionare il dropdown */
    }

    /* Pervenuto: Aggiungere mobile menu con JS poi */

    .hero {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding-top: 40px;
    }

    .hero-bg {
        position: relative;
        width: 100%;
        height: 400px;
        clip-path: none;
        order: -1;
        margin-bottom: 30px;
    }

    .hero-content {
        width: 100%;
        padding: 0 20px;
    }

    .hero h1 {
        font-size: 2.3rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .hero p {
        margin: 0 auto 30px;
    }

    .story-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .section-padding {
        padding: var(--spacing-lg) 0;
    }

    body {
        line-height: 1.85;
        /* Migliore leggibilità su mobile */
        font-size: 1.05rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Mobile Menu Active State */
    .nav-dropdown.menu-active {
        display: flex !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
        position: absolute;
        top: 100%;
        right: 0;
        width: 200px;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        background-color: white;
        border-radius: 8px;
        flex-direction: column;
        gap: 15px;
        z-index: 10000;
        pointer-events: auto;
    }

    /* Force visibility on mobile to prevent empty sections */
    .fade-in-section {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* --- ANIMAZIONI SCROLL --- */
/* --- ANIMAZIONI SCROLL (ATTIVATE) --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.165, 0.84, 0.44, 1), transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- MODAL / LIGHTBOX --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(47, 53, 66, 0.6);
    /* Sfondo scuro elegante */
    backdrop-filter: blur(5px);
    /* Effetto sfocato moderno */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.is-open {
    display: flex;
    /* Flex per centrare */
    opacity: 1;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 800px;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Layout a due colonne */
}

.modal-overlay.is-open .modal-content {
    transform: translateY(0);
}

.modal-image {
    background-color: #f7f3f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-details,
.modal-text {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text-light);
    line-height: 1;
    z-index: 10;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .modal-content {
        grid-template-columns: 1fr;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-image {
        height: 250px;
    }

    .modal-details,
    .modal-text {
        padding: 25px;
    }
}

/* --- BUTTON DETAILS --- */
/* --- BUTTON DETAILS --- */
.btn-details {
    background-color: #f3e5f5;
    /* Velatura lilla chiaro elegante */
    border: none;
    color: var(--color-primary-dark);
    padding: 8px 20px;
    border-radius: 20px;
    /* Stessa forma dei tag */
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-weight: 600;
}

.btn-details:hover {
    background-color: #d1c4e9;
    /* Lilla leggermente più scuro al passaggio */
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.1);
}