/* ============================================
   MILLEIDEE WEDDING - CUSTOM STYLES
   Bootstrap 5.3 + Custom CSS
   ============================================ */

/* CSS Variables */
:root {
    --gold: #D4AF37;
    --gold-light: #F4E8C1;
    --forest: #1B2F23;
    --forest-light: #2F4F3F;
    --cream: #FAF7F2;
    --rose: #E8D5D0;
    --text: #333;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
}

/* Base */
body {
    font-family: var(--font-sans);
    background-color: var(--cream);
    color: var(--text);
    overflow-x: hidden;
}

/* Logo */
.logo-img {
    height: 60px;
    width: auto;
    transition: all 0.3s ease;
}
.hero-img {
    height: 300px;
    width: auto;
    transition: all 0.3s ease;
}
.navbar.scrolled .logo-img {
    height: 40px;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    transition: all 0.4s ease;
    background: #faf7f2c9;
}

.navbar.scrolled {
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(27, 47, 35, 0.08);
    padding: 0.5rem 0;
}

.navbar-brand {
    padding: 0;
}

.nav-link {
    color: var(--forest) !important;
    font-size: 0.85rem;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    margin-left: 1.3rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.navbar-toggler {
    border: none;
    padding: 0;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2827, 47, 35, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--cream) 0%, var(--rose) 100%);
    position: relative;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(212,175,55,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--gold);
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 300;
    letter-spacing: 8px;
    color: var(--forest);
    margin-bottom: 1.5rem;
}

.hero-title span {
    display: block;
    font-size: 0.5em;
    letter-spacing: 12px;
    margin-top: 10px;
    color: var(--gold);
}

.hero-text {
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--forest);
    margin-bottom: 2rem;
}

/* ============================================
   HERO SECTION CON VIDEO
   ============================================ */

.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding-top: 0;
}

/* Container Video */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: var(--forest);
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-video.loaded {
    opacity: 1;
}

/* Overlay scuro per leggibilità */
.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #52525226;
    z-index: 2;
}

/* Contenuto Hero */
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 20px;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--gold);
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 300;
    letter-spacing: 8px;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.hero-title span {
    display: block;
    font-size: 0.5em;
    letter-spacing: 12px;
    margin-top: 10px;
    color: var(--gold);
}

.hero-text {
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Pulsante video toggle */
.video-toggle-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.video-toggle-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.video-toggle-btn svg {
    width: 24px;
    height: 24px;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--gold);
    font-size: 1.5rem;
    z-index: 10;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Animazioni */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

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

/* Fallback mobile - immagine statica */
@media (max-width: 768px) {
    .hero-video-container {
        background: url('https://images.unsplash.com/photo-1519741497674-611481863552?w=1920&h=1080&fit=crop') center/cover no-repeat;
    }
    
    .hero-video {
        display: none;
    }
    
    .video-toggle-btn {
        display: none;
    }
}

/* Performance: riduci qualità video su schermi piccoli */
@media (max-width: 1024px) {
    .hero-video {
        filter: brightness(0.8);
    }
}

/* Ottimizzazione per dispositivi a bassa potenza */
@media (prefers-reduced-motion: reduce) {
    .hero-video {
        display: none;
    }
    
    .hero-video-container {
        background: url('https://images.unsplash.com/photo-1519741497674-611481863552?w=1920&h=1080&fit=crop') center/cover no-repeat;
    }
}

/* Buttons */
.btn-outline-custom {
    border: 1px solid var(--forest);
    color: var(--forest);
    padding: 1rem 3rem;
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-outline-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--forest);
    transition: left 0.4s ease;
    z-index: -1;
}

.btn-outline-custom:hover {
    color: var(--cream);
}

.btn-outline-custom:hover::before {
    left: 0;
}

.btn-gold {
    border: 1px solid var(--gold);
    color: var(--gold);
    background: transparent;
    padding: 1rem 3rem;
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: all 0.4s ease;
}

.btn-gold:hover {
    background: var(--gold);
    color: var(--forest);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--gold);
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Animations */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

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

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Headers */
.section-header {
    margin-bottom: 4rem;
}

.section-label {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    letter-spacing: 4px;
    color: var(--forest);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: #666;
    max-width: 600px;
    line-height: 1.8;
}

/* About Section */
.about {
    background: var(--cream);
    padding: 6rem 0;
}

.about-image {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.about-image::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px solid var(--gold);
    z-index: 2;
    pointer-events: none;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 300;
    color: var(--forest);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.about-content p {
    line-height: 2;
    margin-bottom: 1rem;
    color: #555;
}

.signature {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--gold);
    margin-top: 2rem;
}

/* Services Section */
.services {
    background: var(--forest);
    padding: 6rem 0;
}

.service-card {
    background: rgba(255,255,255,0.03);
    padding: 3rem 2.5rem;
    border: 1px solid rgba(212,175,55,0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 20px 40px rgba(27, 47, 35, 0.4);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--gold);
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    color: white;
}

.service-card p {
    line-height: 1.8;
    color: #b8c9be;
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ============================================
   E-COMMERCE SECTION
   ============================================ */

.ecommerce {
    background: linear-gradient(135deg, var(--cream) 0%, #f0e6e0 100%);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.ecommerce::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ecommerce-image {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(27, 47, 35, 0.15);
}

.ecommerce-image::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px solid var(--gold);
    z-index: 2;
    pointer-events: none;
}

.ecommerce-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.ecommerce-badge {
    position: absolute;
    top: 40px;
    right: 40px;
    background: var(--gold);
    color: var(--forest);
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    z-index: 3;
    box-shadow: 0 4px 15px rgba(212,175,55,0.3);
}

.ecommerce-content {
    padding-left: 2rem;
}

.ecommerce-subtitle {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    font-style: italic;
}

.ecommerce-features {
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.6);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transform: translateX(10px);
}

.feature-icon {
    font-size: 2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.feature-item h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--forest);
    margin-bottom: 0.25rem;
}

.feature-item p {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Pulsante E-commerce */
.btn-ecommerce {
    background: var(--forest);
    color: var(--gold);
    border: 2px solid var(--forest);
    padding: 1.2rem 3rem;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-ecommerce:hover {
    background: transparent;
    color: var(--forest);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(27, 47, 35, 0.2);
}

.btn-ecommerce svg {
    transition: transform 0.3s ease;
}

.btn-ecommerce:hover svg {
    transform: translate(3px, -3px);
}

.ecommerce-note {
    color: #888;
    font-size: 0.85rem;
}

.ecommerce-note small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive E-commerce */
@media (max-width: 991.98px) {
    .ecommerce-content {
        padding-left: 0;
        margin-top: 2rem;
    }
    
    .ecommerce-image img {
        height: 400px;
    }
    
    .ecommerce-badge {
        top: 20px;
        right: 20px;
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    .feature-item {
        padding: 0.75rem;
    }
    
    .feature-icon {
        font-size: 1.5rem;
    }
    
    .btn-ecommerce {
        width: 100%;
        justify-content: center;
    }
}

/* Portfolio Section */
.portfolio {
    background: var(--cream);
    padding: 6rem 0;
}

.portfolio-item {
    height: 500px;
    overflow: hidden;
    cursor: pointer;
}

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

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 47, 35, 0.85);
    opacity: 0;
    transition: all 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--cream);
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.portfolio-overlay p {
    color: var(--gold);
    letter-spacing: 2px;
    font-size: 0.9rem;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0);
}

/* Process Section */
.process {
    background: linear-gradient(to bottom, var(--cream) 0%, var(--rose) 100%);
    padding: 6rem 0;
}

.process-line {
    position: absolute;
    top: 60px;
    left: 12.5%;
    right: 12.5%;
    height: 1px;
    background: var(--gold);
}

.step {
    position: relative;
    z-index: 1;
    padding: 0 1rem;
}

.step-number {
    width: 60px;
    height: 60px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--gold);
    background: var(--cream);
}

.step h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    color: var(--forest);
}

.step p {
    font-size: 0.9rem;
    color: #666;
    max-width: 200px;
    margin: 0 auto;
}

/* Contact Section */
.contact {
    background: var(--forest);
    padding: 6rem 0;
}

.contact-item h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.contact-item p {
    color: #b8c9be;
    line-height: 1.8;
    margin-bottom: 0;
}

.contact-item p a {
    color:#b7c8bd;
}

.contact-form .form-control {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    border-radius: 0;
    color: white;
    padding: 1rem 0;
    font-family: var(--font-sans);
}

.contact-form .form-control:focus {
    background: transparent;
    border-color: var(--gold);
    box-shadow: none;
    color: white;
}

.contact-form .form-control::placeholder {
    color: rgba(255,255,255,0.5);
}

/* Form alert messages */
.alert {
    border-radius: 0;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold);
    border-left: 3px solid var(--gold);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border-left: 3px solid #dc3545;
}

/* Button loading state */
.btn-gold:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Footer */
footer {
    background: #0f1a14;
    color: #5c7a6a;
    font-size: 0.85rem;
}

.social-links a {
    color: #5c7a6a;
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 2px;
    font-size: 0.8rem;
}

.social-links a:hover {
    color: var(--gold);
}

/* ============================================
   COOKIE CONSENT & LEGAL PAGES
   ============================================ */

/* Legal Pages */
.legal-page {
    padding-top: 140px;
    background: var(--cream);
    min-height: 100vh;
}

.legal-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    color: var(--forest);
    margin-bottom: 0.5rem;
    text-align: center;
}

.legal-date {
    text-align: center;
    color: var(--gold);
    font-style: italic;
    margin-bottom: 3rem;
}

.legal-content {
    background: white;
    padding: 3rem;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.legal-content h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--forest);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rose);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--forest-light);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p,
.legal-content li {
    color: #555;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.legal-content a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.legal-content a:hover {
    border-bottom-color: var(--gold);
}

.legal-content table {
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.legal-content th {
    background: var(--forest);
    color: var(--gold);
    font-weight: 500;
}

.legal-content td {
    background: var(--cream);
}

/* Footer Legal Links */
.legal-links a {
    color: #5c7a6a;
    text-decoration: none;
    transition: color 0.3s;
}

.legal-links a:hover {
    color: var(--gold);
}

/* ============================================
   COOKIE BANNER
   ============================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--forest);
    color: white;
    padding: 1.5rem;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h5 {
    font-family: var(--font-serif);
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.cookie-banner-text p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #b8c9be;
    line-height: 1.6;
}

.cookie-banner-text a {
    color: var(--gold);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Cookie Buttons */
.btn-cookie {
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-cookie-accept {
    background: var(--gold);
    color: var(--forest);
}

.btn-cookie-accept:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
}

.btn-cookie-reject {
    background: transparent;
    color: #b8c9be;
    border: 1px solid #5c7a6a;
}

.btn-cookie-reject:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-cookie-settings {
    background: transparent;
    color: var(--gold);
    text-decoration: underline;
    padding: 0.75rem;
}

.btn-cookie-settings:hover {
    color: var(--gold-light);
}

/* ============================================
   COOKIE MODAL
   ============================================ */

.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 47, 35, 0.8);
    backdrop-filter: blur(5px);
}

.cookie-modal-content {
    position: relative;
    background: var(--cream);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--rose);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h4 {
    font-family: var(--font-serif);
    color: var(--forest);
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--forest);
    cursor: pointer;
    line-height: 1;
}

.cookie-modal-body {
    padding: 1.5rem;
}

.cookie-category {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border: 1px solid var(--rose);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-category h6 {
    font-family: var(--font-serif);
    color: var(--forest);
    margin-bottom: 0.25rem;
}

.cookie-category small {
    color: #888;
    font-size: 0.8rem;
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--rose);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    cursor: pointer;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 26px;
    transition: 0.3s;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: var(--gold);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   COOKIE SETTINGS BUTTON (Floating)
   ============================================ */

.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--forest);
    border: 2px solid var(--gold);
    color: var(--gold);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.cookie-settings-btn:hover {
    transform: scale(1.1);
    background: var(--gold);
    color: var(--forest);
}

/* ============================================
   NOTIFICATION
   ============================================ */

.cookie-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: var(--forest);
    color: var(--gold);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    transform: translateX(150%);
    transition: transform 0.3s ease;
}

.cookie-notification.show {
    transform: translateX(0);
}

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

@media (max-width: 991.98px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-banner-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-cookie {
        padding: 0.6rem 1rem;
        font-size: 0.75rem;
    }
    
    .legal-content {
        padding: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .cookie-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-footer .btn-cookie {
        width: 100%;
    }
    
    .cookie-settings-btn {
        bottom: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Responsive */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--cream);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 8px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .hero-img {
    height: 100px;
    width: auto;
    transition: all 0.3s ease;
}
    .nav-link {
        margin-left: 0;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--rose);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .about-image {
        height: 400px;
        margin-bottom: 2rem;
    }
    
    .portfolio-item {
        height: 400px;
    }
    
    .process-line {
        display: none !important;
    }
    
    .step {
        margin-bottom: 2rem;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 2rem;
    }
}

/* Utility */
.object-fit-cover {
    object-fit: cover;
}

.text-white-50 {
    color: rgba(255,255,255,0.5) !important;
}
/* ============================================
   WHATSAPP CHAT WIDGET - VERSIONE CORRETTA
   ============================================ */

.whatsapp-widget {
    position: fixed !important;
    bottom: 40px !important;
    right: 60px !important;
    z-index: 9997 !important;
    font-family: 'Montserrat', sans-serif;
}

/* Pulsante principale */
.whatsapp-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366 !important;
    border: none !important;
    color: white !important;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
    z-index: 9998;
}

.whatsapp-btn svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

/* Notifica badge */
.whatsapp-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: #FF4444;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wa-pulse 2s infinite;
    border: 2px solid white;
}

@keyframes wa-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Animazione shake */
.whatsapp-btn.shake {
    animation: wa-shake 0.5s ease;
}

@keyframes wa-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Popup chat - STATO BASE NASCOSTO */
.whatsapp-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    
    /* STATO INIZIALE: nascosto */
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom right;
}

/* STATO VISIBILE */
.whatsapp-popup.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) translateY(0) !important;
    pointer-events: auto !important;
}

/* Header popup */
.whatsapp-popup-header {
    background: linear-gradient(135deg, #1B2F23 0%, #2F4F3F 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #D4AF37;
    background: white;
    flex-shrink: 0;
}

.whatsapp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.whatsapp-info {
    flex: 1;
    color: white;
}

.whatsapp-info h5 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    margin: 0;
    color: #D4AF37;
    font-weight: 600;
}

.whatsapp-info p {
    font-size: 0.8rem;
    margin: 0;
    color: #b8c9be;
    display: flex;
    align-items: center;
    gap: 6px;
}

.whatsapp-info p::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #25D366;
    border-radius: 50%;
    display: inline-block;
    animation: wa-blink 2s infinite;
}

@keyframes wa-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.whatsapp-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
    margin-left: auto;
}

.whatsapp-close:hover {
    background: rgba(255,255,255,0.1);
}

/* Body popup */
.whatsapp-popup-body {
    padding: 20px;
    background: #f0f2f5;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

/* Messaggio */
.whatsapp-message {
    max-width: 85%;
    margin-bottom: 16px;
    animation: wa-messageSlide 0.3s ease;
}

@keyframes wa-messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.whatsapp-message.received {
    margin-right: auto;
}

.whatsapp-message p {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    border-top-left-radius: 2px;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.whatsapp-time {
    display: block;
    font-size: 0.7rem;
    color: #999;
    margin-top: 4px;
    text-align: right;
}

/* Quick replies */
.whatsapp-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.whatsapp-quick-btn {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 10px 16px;
    border-radius: 20px;
    text-align: left;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
}

.whatsapp-quick-btn:hover {
    background: #FAF7F2;
    border-color: #D4AF37;
    color: #1B2F23;
    transform: translateX(5px);
}

/* Footer popup */
.whatsapp-popup-footer {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.whatsapp-start-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: white !important;
    padding: 14px 24px;
    border-radius: 24px;
    text-decoration: none !important;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.whatsapp-start-chat:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

/* Tooltip sul pulsante */
.whatsapp-btn::before {
    content: 'Scrivici su WhatsApp';
    position: absolute;
    right: 70px;
    background: #1B2F23;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.whatsapp-btn:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Responsive */
@media (max-width: 767.98px) {
    .whatsapp-widget {
        bottom: 10px !important;
        right: 15px !important;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-btn svg {
        width: 26px;
        height: 26px;
    }
    
    .whatsapp-popup {
        width: calc(100vw - 30px);
        max-width: 360px;
        right: -5px;
        bottom: 65px;
    }
    
    .whatsapp-btn::before {
        display: none;
    }
}

/* Fix per conflitti con Bootstrap */
.whatsapp-btn:focus,
.whatsapp-close:focus,
.whatsapp-quick-btn:focus {
    outline: none;
    box-shadow: none;
}

.whatsapp-popup * {
    box-sizing: border-box;
}