/* Configurazione scorrimento fluido */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Evita che la navbar copra i titoli quando clicchi sul menu */
}

:root {
    --primary: #94b9b9;      /* Il tuo verde-azzurro ufficiale dal biglietto da visita */
    --primary-dark: #7a9c9c; /* Verde-azzurro più scuro per l'effetto al passaggio del mouse */
    --accent: #fdfaf7;       /* Il tuo crema chiaro e rilassante per lo sfondo */
    --text: #333333;         /* Antracite scuro professionale per la lettura */
    --white: #ffffff;
    --glass: rgba(253, 250, 247, 0.92); /* Navbar coordinata con lo sfondo crema */
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text);
    background-color: var(--accent); /* Ritorna il crema come colore base */
    line-height: 1.8;
}

h1, h2, h3, h4, .navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* 🌟 EFFETTO SFUMATURA DINAMICA PER LO SFONDO DELLE SEZIONI (Seta -> Crema) */
.dynamic-gradient {
    background: linear-gradient(180deg, var(--white) 0%, var(--accent) 50%, var(--white) 100%);
}

/* Animazioni allo Scroll (Reveal) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.9s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar trasparente sfocata coordinata */
.navbar {
    background: var(--glass) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

/* 🌟 ANIMAZIONE VOCI NAVBAR (LINEA VERDE-AZZURRA IN HOVER) */
.navbar-nav .nav-link {
    color: var(--text) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 2px;
    left: 16px;
    background-color: var(--primary); /* Linea verde-azzurra */
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
}

.navbar-nav .nav-link:hover::after {
    width: calc(100% - 32px);
}

.text-primary-custom { color: var(--primary); }
.bg-soft { background-color: rgba(148, 185, 185, 0.08); } /* Delicato richiamo verde-azzurro */
.rounded-custom { border-radius: 24px; }
.italic-serif { font-style: italic; }

/* Hero Section */
.hero-section {
    padding: 100px 0;
    min-height: 70vh;
    position: relative;
}

.hero-section .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-section .carousel-item img {
    object-position: center center;
}

.hero-overlay {
    background: linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.35) 100%);
    z-index: 2;
}

.shadow-text { 
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5); 
}

/* Gestione immagini affiancate (Chi Sono) */
.img-profile-row { 
    height: 250px; 
}

.img-carmen-align { 
    object-position: center top; 
}

/* Galleria Studio */
.gallery-grid .gallery-item {
    height: 260px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-grid .gallery-item img { 
    transition: transform 0.6s ease; 
}

.gallery-grid .gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12) !important;
}

.gallery-grid .gallery-item:hover img { 
    transform: scale(1.06); 
}

/* 🌟 SCHEDE RECENSIONI (Sfondo Bianco con animazione verde-azzurra) */
.testimonial-card {
    background-color: var(--white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02) !important;
}

.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 26px rgba(148, 185, 185, 0.15) !important;
}

.testimonial-card .stars i {
    font-size: 0.95rem;
    margin-right: 2px;
}

/* Mappa */
.map-container { 
    border: 1px solid rgba(0,0,0,0.04); 
}

.map-container iframe { 
    display: block; 
}

/* Pulsanti */
.btn-psico {
    background-color: var(--primary);
    color: white;
    border-radius: 50px;
    padding: 12px 36px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-psico:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(148, 185, 185, 0.3);
}

.btn-outline-primary-custom {
    color: var(--primary);
    border: 2px solid var(--primary);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-primary-custom:hover {
    background-color: var(--primary);
    color: white;
}

.btn-whatsapp {
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    transition: 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #128c7e;
    color: white;
}

.service-card {
    border: none;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: var(--white);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.06) !important;
}

.experience-badge {
    position: absolute;
    bottom: -15px;
    right: -15px;
    background-color: var(--primary);
    color: white;
    padding: 12px 22px;
    border-radius: 12px;
    text-align: center;
    z-index: 10;
}

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* --- PULSANTE TORNA IN ALTO --- */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    background-color: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
}

#backToTop.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

#backToTop:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 15px rgba(148, 185, 185, 0.4) !important;
}

/* 💻 REGOLE EXTRA PER COMPUTER */
@media (min-width: 992px) {
    .hero-section { 
        padding: 160px 0; 
        height: 85vh; 
    }
    .hero-section .carousel-item:nth-child(3) img {
        object-position: top center; 
    }
    .img-profile-row {
        height: 290px;
    }
}

/* 📱 REGOLE EXTRA PER SMARTPHONE */
@media (max-width: 576px) {
    #backToTop { 
        bottom: 20px; 
        right: 20px; 
        width: 40px; 
        height: 40px; 
        font-size: 1.3rem; 
    }
}