/* --- VARIABILI CSS (Palette & Tipografia) --- */
:root {
    /* Colori */
    --bg-color: #F9FBFA;
    /* Sfondo chiaro (Mint/White) */
    --text-color: #1E3109;
    /* Verde scurissimo per testi */

    /* Manca il codice CTA nel tuo messaggio, ne ho messo uno 
       compatibile (Terracotta). Sostituiscilo se ne hai uno specifico. */
    --cta-color: #829C8E;
    /* Sage Green */
    --cta-text: #FFFFFF;
    /* Colore testo dentro i bottoni */

    /* Font */
    --font-display: 'Sawarabi Mincho', serif;
    /* Headers, Links, CTA, Labels */
    --font-body: 'Instrument Sans', sans-serif;
    /* Paragrafi e resto */

    /* Layout */
    --container-width: 1400px;
    --border-radius: 8px;
    /* Arrotondamento leggero */
}

html {
    scroll-behavior: smooth;
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at 50% 50%, #D7E5E1 0%, var(--bg-color) 70%);
    background-attachment: fixed;
    /* Keep it subtle and clean */
    color: var(--text-color);
    font-family: var(--font-body);
    /* Default per i paragrafi */
    line-height: 1.6;
    font-size: 18px;
    /* Leggermente più grande per leggibilità moderna */
    -webkit-font-smoothing: antialiased;
    padding-top: 80px;
    /* Compensate for fixed header */
}

/* --- TIPOGRAFIA --- */

/* Regola per tutto ciò che deve essere in Inika */
h1,
h2,
h3,
h4,
h5,
h6,
a,
label,
.btn,
nav {
    font-family: var(--font-display);
}

h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    /* Assicura che usi il verde scuro */
    /* Assicura che usi il verde scuro */
    opacity: 0.85;
    /* Leggera morbidezza (più leggero di prima) */
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    font-weight: 700;
    /* Link un po' più evidenti */
}

a:hover {
    color: var(--cta-color);
}

/* --- ELEMENTI COMUNI --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Stile Bottoni (CTA) */
.btn:hover {
    background-color: transparent;
    color: var(--cta-color);
    /* Inversione colori al passaggio mouse */
}

/* --- HEADER --- */
/* --- HEADER --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-color);
    padding: 1rem 0;
    transition: transform 0.3s ease-in-out;
    /* box-shadow removed as requested */
    min-height: 80px;
    /* Ensure height on mobile */
    display: flex;
    /* Align content */
    align-items: center;
}

header.header-hidden {
    transform: translateY(-100%);
}

/* ... (rest of the file) ... */

/* ... (rest of the file) ... */

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* Ensure full width */
}

.header-logo {
    display: block;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
    /* disable clicks when hidden */
}

.header-logo img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(30, 49, 9, 0.2);
}

.header-scrolled .header-logo {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

header nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    font-weight: 700;
    font-size: 1rem;
}

/* Hamburger (Hidden on Desktop) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    position: fixed;
    top: 25px;
    /* Center vertically relative to 80px header */
    right: 20px;
    /* Right aligned */
    left: auto;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-color);
    margin: 6px 0;
    transition: 0.4s;
}



/* Header CTA (Responsive Style) */
.header-cta img {
    display: none;
    /* Hidden on Desktop */
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {

    /* Header CTA Mobile Overrides (WhatsApp Style) */
    .header-cta {
        background-color: #25D366 !important;
        /* Force WhatsApp Green */
        color: #FFFFFF !important;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .header-cta:hover {
        background-color: #128C7E !important;
    }

    .header-cta img {
        display: inline-block;
        height: 20px;
        width: auto;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li a {
        font-size: 1.5rem;
    }

    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-7px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-7px, -6px);
    }
}

/* --- HERO SECTION --- */
#hero {
    padding: 4rem 0;
    text-align: center;
}

.hero-avatar {
    margin-bottom: 2rem;
}

.hero-avatar img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(30, 49, 9, 0.2);
    /* Subtle border matching text color */
    padding: 4px;
    /* Space between image and border */
}

#hero h1 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

#hero .subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 3rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* --- PHOTO SECTION --- */
#studio-photo {
    padding-bottom: 4rem;
}

.photo-wrapper {
    position: relative;
    border-radius: 16px;
    /* Nice border radius */
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.photo-wrapper img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.location-label {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.location-label:hover {
    transform: translateX(-50%) scale(1.05);
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--cta-color);
}

.location-label i {
    color: var(--cta-color);
    font-size: 1.1rem;
}

/* --- SERVICES SECTION --- */
#servizi {
    padding: 4rem 0;
}

#servizi h2 {
    text-align: center;
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.services-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    padding: 20px 0;
}

.service-card {
    background: #FFFFFF;
    border: 1px solid rgba(30, 49, 9, 0.1);
    border-radius: 16px;
    padding: 30px;
    width: auto;
    /* Fluid width in grid */
    max-width: none;
    /* Reset max-width */
    min-width: 0;
    /* Reset min-width */
    scroll-snap-align: start;
    text-align: left;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* First card spans 2 rows (Tall Left) */
.service-card:nth-child(1) {
    grid-row: span 2;
}

.service-icon {
    width: 80px;
    height: 80px;
    position: absolute;
    top: 20px;
    /* Aligned with title */
    right: 20px;
}

/* Specific size for the first card's icon */
.service-card:nth-child(1) .service-icon {
    width: 120px;
    height: 120px;
    top: 10px;
    right: 10px;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    padding-right: 60px;
    /* Space for icon */
    margin-top: 0;
    /* Remove top margin for alignment */
    line-height: 1.4;
}

.service-intro,
.service-full-text p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.service-intro {
    max-width: 80%
}

.service-full-text {
    display: none;
    /* Hidden by default */
    margin-bottom: 1.5rem;
    background-color: #f9f9f9;
    /* Subtle background */
    padding: 15px;
    border-radius: 8px;
}

.service-full-text.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Actions (Buttons) */
.card-actions {
    margin-top: auto;
    /* Push to bottom */
    display: flex;
    justify-content: flex-end;
    /* Align Read More to right */
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    margin: 0;
}

.read-more-btn:hover {
    color: var(--cta-color);
}

/* Section CTA */
.section-cta {
    text-align: center;
    margin-top: 3rem;
}

.btn {
    background-color: #5E7A68;
    /* Darker Sage */
    color: #FFFFFF;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s ease;
    display: inline-block;
    border: none;
    /* No border */
}

.section-cta .btn:hover {
    background-color: #4A6352;
}

.service-card .btn {
    background-color: #5E7A68;
    /* Darker Sage */
    color: #FFFFFF;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.service-card .btn:hover {
    background-color: #4A6352;
}

/* Mobile Specifics */
@media (max-width: 768px) {
    .services-wrapper {
        display: flex;
        /* Back to flex for mobile scroll */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 10px;
        /* Smaller gap */
        padding-left: 20px;
        padding-right: 20px;
        grid-template-columns: none;
        /* Reset grid */
        grid-template-rows: none;
    }

    .service-intro {
        max-width: 100%;
    }

    .service-card {
        min-width: 75vw;
        /* 75vw to peek next card */
        max-width: 75vw;
        /* Ensure consistency */
        margin-right: 0;
        flex: 0 0 auto;
        width: auto;
    }

    .service-card:nth-child(1) {
        grid-row: auto;
        /* Reset grid span */
    }

    /* Vertical Layout for Mobile Cards */
    .service-icon {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        margin-bottom: 15px;
        /* Space between icon and title */
    }

    .service-card h3 {
        padding-right: 0;
        padding-left: 0;
    }

    /* Adjust First Card Icon on Mobile */
    .service-card:nth-child(1) .service-icon {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        margin-bottom: 20px;
        width: 80px;
        height: 80px;
    }

    .service-card:nth-child(1) h3 {
        padding-left: 0;
    }
}

/* --- EXPERIENCE SECTION --- */
#esperienze {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

#esperienze h2 {
    text-align: center;
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.experience-timeline {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.experience-item {
    display: flex;
    gap: 30px;
    align-items: baseline;
}

.experience-year {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--cta-color);
    font-size: 1.2rem;
    min-width: 120px;
    text-align: right;
    flex-shrink: 0;
}

.experience-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.4;
}

.experience-content p {
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 0;
}

/* Mobile Experience */
@media (max-width: 768px) {
    .experience-item {
        flex-direction: column;
        gap: 5px;
    }

    .experience-year {
        text-align: left;
        min-width: auto;
        font-size: 1.1rem;
    }
}

/* --- MODAL (MicroModal) --- */
.modal {
    display: none;
}

.modal.is-open {
    display: block;
}

.modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal__container {
    background-color: #FFFFFF;
    padding: 40px;
    /* Increased padding */
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    border-radius: 16px;
    overflow-y: auto;
    box-sizing: border-box;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    /* More space below header */
    position: sticky;
    /* Sticky header */
    top: -40px;
    /* Negative top to match padding */
    background: #FFFFFF;
    /* Background to cover content */
    padding-top: 40px;
    /* Padding to match container */
    padding-bottom: 10px;
    margin-top: -40px;
    /* Negative margin to pull back */
    z-index: 10;
}

.modal__title {
    margin: 0;
    font-size: 1.8rem;
    /* Larger title */
    font-family: var(--font-display);
    color: var(--text-color);
    line-height: 1.2;
}

.modal__close {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal__close:hover {
    color: var(--cta-color);
}

.modal__close:before {
    content: "\2715";
}

.modal__content {
    font-size: 1rem;
    line-height: 1.8;
    /* Better readability */
    color: var(--text-color);
    font-family: var(--font-body);
}

/* Animation */
@keyframes mmfadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes mmslideIn {
    from {
        transform: translateY(15%);
    }

    to {
        transform: translateY(0);
    }
}

.micromodal-slide {
    display: none;
}

.micromodal-slide.is-open {
    display: block;
}

.micromodal-slide[aria-hidden="false"] .modal__overlay {
    animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="false"] .modal__container {
    animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide .modal__container,
.micromodal-slide .modal__overlay {
    will-change: transform;
}

/* --- FOOTER --- */
footer {
    border-top: none;
    background-color: var(--cta-color);
    color: var(--cta-text);
    padding: 3rem 0;
    margin-top: 4rem;
    font-size: 0.95rem;
    text-align: center;
}

footer p {
    color: var(--cta-text);
    opacity: 0.9;
}

footer a {
    color: var(--cta-text);
    text-decoration: underline;
}

footer a:hover {
    color: var(--cta-text);
    opacity: 0.8;
}

footer i {
    color: var(--cta-text);
    margin-right: 5px;
}

/* --- CONTACT FORM MODAL --- */
.contact-details {
    margin-bottom: 20px;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.contact-list li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-list i {
    color: var(--cta-color);
}

.modal-divider {
    border: 0;
    height: 1px;
    background: rgba(30, 49, 9, 0.1);
    margin: 20px 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-color);
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 1px solid rgba(30, 49, 9, 0.2);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: #f9f9f9;
    color: var(--text-color);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--cta-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(130, 156, 142, 0.1);
}

.contact-form .btn {
    margin-top: 10px;
    width: 100%;
}

/* --- TOAST NOTIFICATION --- */
.toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--cta-color);
    color: #FFFFFF;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    transition: transform 0.4s ease, opacity 0.4s ease;
    transform: translateY(0);
    opacity: 1;
}

.toast.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1rem;
}

/* --- COOKIE BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px;
    z-index: 2900;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s ease;
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

.cookie-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0 24px;
}

.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color);
}

.cookie-actions {
    flex-shrink: 0;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

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