/* PROJECT: Vivora
   THEME: Lavender Haze & Cream (High-End Lifestyle)
   ROLE: Art Director & Senior Dev
*/

:root {
    /* --- PALETTE: Ethereal & Organic --- */
    --bg-color: #FDFBF7;        /* Creamy Milk Base */
    --surface-color: #FFFFFF;   /* Pure White */
    --surface-glass: rgba(255, 255, 255, 0.85); /* Glass Effect */
    --surface-accent: #F7F4F9;  /* Very Pale Lavender */
    
    --text-main: #2D1B36;       /* Deep Aubergine */
    --text-muted: #7A6C85;      /* Muted Lilac Grey */
    
    --primary: #9B72AA;         /* Soft Lavender */
    --primary-hover: #7D5A8A;   /* Deep Plum */
    --accent-gold: #C4A484;     /* Muted Gold */
    
    --border-color: #EBE4F0;    /* Soft Border */
    
    /* --- TYPOGRAPHY --- */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* --- UI CONSTANTS --- */
    --container-width: 1200px;
    --header-height: 80px;
    --radius: 16px;
    --radius-pill: 50px;
    
    /* --- SHADOWS & BLUR --- */
    --shadow-soft: 0 10px 40px rgba(45, 27, 54, 0.03);
    --shadow-hover: 0 15px 50px rgba(45, 27, 54, 0.08);
    --blur: blur(12px);
    
    --transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ================= RESET & BASE ================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.25;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; border-radius: var(--radius); }
button { font-family: var(--font-body); cursor: pointer; }

/* ================= UTILITIES ================= */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.section-pad { padding: 100px 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 4rem; }

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.8s ease-out forwards; }

/* ================= STANDARD BUTTONS (Site-wide) ================= */
.btn {
    display: inline-block; padding: 14px 34px; border-radius: var(--radius-pill);
    font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.1em; border: 1px solid transparent;
    transition: var(--transition); text-align: center;
}

.btn-primary { background-color: var(--text-main); color: #fff; }
.btn-primary:hover { background-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.full-width { width: 100%; }

/* ================= HEADER (Glassmorphism) ================= */
.main-header {
    height: var(--header-height);
    background-color: var(--surface-glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.5);
}

.header-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }

.logo-container { display: flex; align-items: center; gap: 10px; font-size: 1.6rem; font-family: var(--font-heading); color: var(--text-main); }
.logo-container i { color: var(--primary); }

.nav-links { display: flex; gap: 35px; }
.nav-links a { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; color: var(--text-muted); position: relative; }
.nav-links a.active, .nav-links a:hover { color: var(--primary); }

/* Mobile Menu Button */
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text-main); }

/* ================= HERO SECTION (CSS Art) ================= */
.hero-section {
    position: relative; height: 90vh; display: flex; align-items: center; justify-content: center;
    text-align: center; overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #FAF7FC 0%, #FDFBF7 100%);
}

.hero-pattern {
    position: absolute; width: 100%; height: 100%;
    background-image: radial-gradient(var(--primary) 1px, transparent 1px);
    background-size: 60px 60px; opacity: 0.1;
    animation: float 40s linear infinite;
}
@keyframes float { 0% { background-position: 0 0; } 100% { background-position: 60px 60px; } }

.hero-content { z-index: 2; max-width: 800px; padding: 20px; }
.hero-title { font-size: 4rem; margin-bottom: 20px; color: var(--text-main); }
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; }

/* ================= CARDS & GRID ================= */
.grid-mosaic { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.card {
    background: var(--surface-color); border-radius: var(--radius); padding: 40px;
    border: 1px solid var(--border-color); transition: var(--transition);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--primary); }

.card-img-wrap { height: 280px; overflow: hidden; border-radius: 12px; margin-bottom: 20px; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card-img-wrap img { transform: scale(1.05); }

/* ================= ACCORDION (FAQ) ================= */
.accordion { max-width: 800px; margin: 0 auto; }
.acc-item { border-bottom: 1px solid var(--border-color); margin-bottom: 10px; }
.acc-header {
    width: 100%; padding: 20px 0; background: none; border: none; text-align: left;
    font-family: var(--font-heading); font-size: 1.1rem; cursor: pointer;
    display: flex; justify-content: space-between; color: var(--text-main);
}
.acc-body {
    max-height: 0; overflow: hidden; transition: 0.4s ease; padding: 0 5px;
    color: var(--text-muted); line-height: 1.6;
}
.acc-item.active .acc-body { padding-bottom: 20px; }

/* ================= FOOTER ================= */
.main-footer {
    background-color: #F9F7FA; padding: 80px 0 40px; margin-top: 100px;
    border-top: 1px solid var(--border-color);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--primary); margin-bottom: 20px; }
.footer a, .footer p, .footer button { display: block; background:none; border:none; text-align:left; padding:0; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 10px; cursor: pointer; transition: 0.3s; }
.footer a:hover, .footer button:hover { color: var(--primary); }

/* ================= MODALS (Generic: Privacy/Terms) ================= */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(45, 27, 54, 0.4); backdrop-filter: blur(5px);
    z-index: 3000; align-items: center; justify-content: center;
}
.modal.active { display: flex; }

.modal-content {
    background: var(--surface-color); padding: 50px; border-radius: 24px;
    max-width: 600px; width: 90%; max-height: 85vh; overflow-y: auto;
    position: relative; animation: slideUp 0.3s ease-out;
}
@keyframes slideUp { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }

.close-modal-btn {
    position: absolute; top: 20px; right: 25px; background: none; border: none;
    font-size: 1.5rem; color: var(--text-muted); cursor: pointer;
}

/* ================= ROBUST COOKIE SYSTEM (FIXED & PREMIUM) ================= */

/* --- 1. Bottom Banner (Dark, High Contrast) --- */
.cookie-banner-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2D1B36; /* Dark background */
    color: #fff;
    padding: 25px 0;
    z-index: 9990; /* High priority */
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    animation: slideUpBanner 0.5s ease-out;
}

@keyframes slideUpBanner {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-content-wrapper {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.cookie-text-block { display: flex; align-items: center; gap: 20px; }

.cookie-icon-circle {
    width: 45px; height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: var(--accent-gold);
}

/* --- PREMIUM COOKIE BUTTONS --- */
.cookie-buttons-block {
    display: flex;
    gap: 15px;
}

/* Button: Accetta Tutto (Pearl White & Glow) */
.btn-cookie-fill {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0E6EF 100%);
    color: #2D1B36;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-cookie-fill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.4);
    background: #FFFFFF;
}

/* Button: Personalizza (Elegant Outline) */
.btn-cookie-outline {
    background: transparent;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.btn-cookie-outline:hover {
    border-color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}


/* --- 2. Modal Settings Overlay --- */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Darker dim */
    backdrop-filter: blur(8px);
    z-index: 9999; /* Highest priority */
    align-items: center;
    justify-content: center;
    /* display is handled by JS (flex/none) */
}

.cookie-modal-box {
    background: #fff;
    width: 90%;
    max-width: 550px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: fadeInModal 0.3s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.cookie-modal-header {
    padding: 20px 30px;
    background: var(--surface-accent);
    border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}
.cookie-modal-header h3 { margin: 0; font-size: 1.2rem; color: var(--text-main); }

.close-btn { background: none; border: none; font-size: 1.4rem; color: var(--text-muted); cursor: pointer; transition: 0.2s; }
.close-btn:hover { color: var(--primary); }

.cookie-modal-body { padding: 30px; max-height: 60vh; overflow-y: auto; }

.cookie-option-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; padding-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
}
.cookie-option-row:last-child { border-bottom: none; margin-bottom: 0; }

.cookie-option-info { display: flex; flex-direction: column; gap: 4px; }
.cookie-option-info strong { font-size: 1rem; color: var(--text-main); }

.badge-required { font-size: 0.7rem; background: #eee; padding: 2px 8px; border-radius: 4px; color: #666; display: inline-block; width: fit-content; }
.badge-optional { font-size: 0.7rem; border: 1px solid var(--primary); color: var(--primary); padding: 2px 8px; border-radius: 4px; display: inline-block; width: fit-content; }

.cookie-modal-footer {
    padding: 20px 30px;
    background: #fff;
    border-top: 1px solid var(--border-color);
}

/* Switches */
.switch-toggle { position: relative; display: inline-block; width: 48px; height: 26px; }
.switch-toggle input { opacity: 0; width: 0; height: 0; }
.slider-round { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ddd; transition: .4s; border-radius: 34px; }
.slider-round:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
input:checked + .slider-round { background-color: var(--primary); }
input:checked + .slider-round:before { transform: translateX(22px); }


/* ================= MOBILE ADAPTATION ================= */
@media (max-width: 900px) {
    .mobile-toggle { display: block; }
    .nav-links {
        display: none; position: absolute; top: var(--header-height); left: 0; width: 100%;
        background: var(--surface-color); flex-direction: column; padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-bottom: 1px solid var(--border-color);
    }
    .nav-links.active { display: flex; }
    
    .hero-title { font-size: 2.8rem; }
    .grid-mosaic, .grid-cols-3, .footer-grid { grid-template-columns: 1fr; }
    
    /* Cookie Mobile */
    .cookie-content-wrapper { flex-direction: column; text-align: center; gap: 20px; }
    .cookie-text-block { flex-direction: column; }
    .cookie-buttons-block { width: 100%; flex-direction: column; }
    .btn-cookie-fill, .btn-cookie-outline { width: 100%; padding: 14px 0; }
}