:root {
    --primary: #15803d;
    --primary-light: #22c55e;
    --primary-dark: #166534;
    --primary-gradient: linear-gradient(135deg, #15803d 0%, #16a34a 50%, #22c55e 100%);
    --wood-accent: #b45309;
    --wood-light: #d97706;
    --dark: #0f172a;
    --dark-surface: #1e293b;
    --dark-border: #334155;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 25px rgba(34, 197, 94, 0.35);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

strong, b {
    font-weight: 700;
    color: var(--dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navbar */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(21, 128, 61, 0.3);
}

.brand-logo span.highlight {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-link {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    padding: 6px 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.2s ease;
}

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

.header-cta-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--dark) !important;
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-phone {
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-phone:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 80px 0 90px;
    background: radial-gradient(circle at 10% 20%, rgba(34, 197, 94, 0.08) 0%, rgba(255, 255, 255, 0) 50%),
                radial-gradient(circle at 90% 80%, rgba(217, 119, 6, 0.05) 0%, rgba(255, 255, 255, 0) 40%);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ecfdf5;
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #a7f3d0;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 46px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1.2px;
    color: var(--dark);
    margin-bottom: 20px;
}

.hero-title span.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, #16a34a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-top: 30px;
    border-top: 1px solid var(--card-border);
}

.stat-item h4 {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-item p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Quote Form Card */
.quote-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--card-border);
    position: relative;
}

.quote-card-header {
    margin-bottom: 24px;
}

.quote-card-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 6px;
}

.quote-card-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-family: inherit;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.privacy-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.privacy-check input {
    margin-top: 3px;
}

/* Section Common */
.section {
    padding: 80px 0;
}

.section-light {
    background: #f8fafc;
}

.section-dark {
    background: var(--dark);
    color: white;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 50px;
}

.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 10px;
}

.section-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.6px;
    margin-bottom: 14px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

/* Grid Cards (Features, Services, Pallet Types) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #ecfdf5;
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Pallet Types Cards */
.pallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.pallet-card {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.2s ease;
}

.pallet-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.pallet-card-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #fef3c7;
    color: #92400e;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: 12px;
}

.pallet-card h4 {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 6px;
}

.pallet-spec {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.pallet-card p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Geographic Hubs (Regions & Provinces Cards) */
.geo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.geo-card {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 15px;
    color: var(--dark);
    transition: all 0.2s ease;
}

.geo-card:hover {
    border-color: var(--primary);
    background: #f0fdf4;
    color: var(--primary-dark);
    transform: translateX(3px);
}

.geo-count {
    font-size: 12px;
    background: #f1f5f9;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
}

/* Communes Search & Filter Bar */
.communes-search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    color: var(--text-muted);
}

.search-input-wrapper input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    color: var(--dark);
    background: transparent;
}

.search-input-wrapper input::placeholder {
    color: #94a3b8;
}

.search-count-badge {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: var(--radius-full);
}

.search-count-badge strong {
    color: var(--primary-dark);
}

.no-results-msg {
    text-align: center;
    padding: 36px 20px;
    background: white;
    border: 1px dashed var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 16px;
}

/* Communes List Grid */
.communes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.commune-pill {
    background: white;
    border: 1px solid var(--card-border);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.15s ease;
}

.commune-pill:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Breadcrumbs */
.breadcrumbs-bar {
    background: white;
    border-bottom: 1px solid var(--card-border);
    padding: 14px 0;
    font-size: 13px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-muted);
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--dark);
    font-weight: 600;
}

.breadcrumb-separator {
    color: #94a3b8;
}

/* Local Hub Hero (Region/Province/Commune) */
.page-hero {
    background: linear-gradient(180deg, #f0fdf4 0%, var(--light-bg) 100%);
    padding: 50px 0 60px;
    border-bottom: 1px solid var(--card-border);
}

.page-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.page-hero h1 {
    font-size: 38px;
    font-weight: 900;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 16px;
    letter-spacing: -0.8px;
}

.page-hero p.lead {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.65;
}

.hero-subtext {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 20px;
}

/* FAQ Accordion */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: #cbd5e1;
}

.faq-question {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--dark);
    user-select: none;
}

.faq-question .faq-icon {
    font-size: 18px;
    color: var(--primary);
    transition: transform 0.25s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-bottom: 20px;
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 70px 0 30px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    color: white;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 14px;
}

.footer-brand p {
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 320px;
}

.footer-column h4 {
    color: white;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #94a3b8;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--dark-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

/* Alert Notification */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Guide Selling Section & Steps */
.guide-banner {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin-bottom: 32px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--dark);
}

.guide-banner strong {
    color: var(--primary-dark);
}

.steps-heading {
    margin-bottom: 22px;
}

.steps-heading h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.4px;
}

.steps-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 36px;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #86efac;
}

.step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.25);
}

.step-body h4 {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 6px;
}

.step-body p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-muted);
}

.guide-cta {
    text-align: center;
    margin-top: 12px;
}

/* Services Checklist Grid (Commune Page) */
.services-checklist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.services-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.services-checklist li {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid var(--card-border);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--dark);
    transition: all 0.2s ease;
}

.services-checklist li:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.services-checklist .check-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ecfdf5;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-grid,
    .page-hero-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .hero-title {
        font-size: 34px;
    }
    .section-title {
        font-size: 26px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .services-checklist-grid {
        grid-template-columns: 1fr;
    }
    .communes-search-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ==========================================================================
   Editorial & Integrated Text-Image Components
   ========================================================================== */
.article-with-media {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: center;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 24px 0 32px;
    box-shadow: var(--shadow-sm);
}

.article-text {
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
}

.article-text p {
    margin: 0;
}

.article-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 340px;
}

.article-media picture,
.article-media img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 230px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.9);
    transition: transform 0.25s ease;
}

.article-media:hover img {
    transform: scale(1.02);
}

.media-caption {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
    line-height: 1.4;
    font-style: italic;
}

/* Image integrated with checklist in commune page */
.checklist-media-wrap {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
    margin-top: 20px;
}

.compact-img-card {
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--card-border);
    background: white;
    position: relative;
    max-width: 320px;
}

.compact-img-card picture,
.compact-img-card img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.compact-img-card:hover img {
    transform: scale(1.02);
}

.compact-img-badge {
    padding: 8px 12px;
    background: #f8fafc;
    border-top: 1px solid var(--card-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .article-with-media,
    .checklist-media-wrap {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .article-media,
    .compact-img-card {
        max-width: 100%;
    }
    .article-media img,
    .compact-img-card img {
        max-height: 280px;
    }
}

/* Cookie Consent Modal & Overlay */
.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.cookie-overlay.hidden {
    display: none !important;
}

.cookie-modal {
    background: white;
    width: 90%;
    max-width: 650px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-overlay.show .cookie-modal {
    transform: translateY(0) scale(1);
}

.cookie-modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--card-border);
}

.cookie-modal-header h4 {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
}

.cookie-modal-header p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.cookie-preferences {
    padding: 10px 30px;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--card-border);
    gap: 20px;
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option-info {
    flex: 1;
}

.cookie-option-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.cookie-option-desc {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Custom Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

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

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 34px;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.cookie-toggle input:checked + .toggle-label {
    background-color: var(--primary);
}

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

.cookie-toggle input:disabled + .toggle-label {
    background-color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-modal-actions {
    padding: 20px 30px;
    border-top: 1px solid var(--card-border);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    background: var(--light-bg);
}

.cookie-modal-actions-right {
    display: flex;
    gap: 12px;
}

.cookie-modal-actions .btn {
    font-size: 14px;
    padding: 10px 20px;
}

.cookie-modal-footer {
    text-align: center;
    padding: 14px;
    border-top: 1px solid var(--card-border);
    font-size: 13px;
}

@media (max-width: 600px) {
    .cookie-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-modal-actions-right {
        flex-direction: column;
    }
    .cookie-option {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-toggle {
        align-self: flex-end;
        margin-top: -30px;
    }
}

/* Testo visibile solo agli screen reader / agenti */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
