/*
Theme Name: UNOPA Redesign Child Theme
Theme URI: https://unopa.ro
Description: A high-performance Astra child theme for UNOPA. Fully compatible with Elementor.
Author: UNOPA IT Team
Template: astra
Version: 1.5.0
Text Domain: unopa-child
*/

:root {
    --primary: #EE3124;
    --secondary: #00AEEF;
    --accent: #F9B233;
    --ink: #1A1A1A;
    --paper: #FFFFFF;
    --zinc-50: #F9F9F9;
    --zinc-100: #F1F1F1;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

/* Offset for anchor links to prevent hiding behind sticky menu */
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id],
.unopa-article-content h1,
.unopa-article-content h2,
.unopa-article-content h3,
.unopa-article-content h4,
.unopa-article-content h5,
.unopa-article-content h6 {
    scroll-margin-top: 120px;
}

h1, h2, h3, h4, h5, h6, 
.elementor-heading-title,
.elementor-widget-heading .elementor-heading-title,
.entry-title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700;
    letter-spacing: -0.02em !important; /* Tighten up the headings */
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

/* Utilități pentru aliniere globală */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* Global Headings: Center by default for Astra */
h1:not(.elementor-heading-title):not(.unopa-hero-title):not(.unopa-custom-post-title),
h2:not(.elementor-heading-title):not(.has-text-align-left):not(.has-text-align-right),
h3:not(.elementor-heading-title):not(.has-text-align-left):not(.has-text-align-right),
h4:not(.elementor-heading-title):not(.has-text-align-left):not(.has-text-align-right),
h5:not(.elementor-heading-title):not(.has-text-align-left):not(.has-text-align-right),
h6:not(.elementor-heading-title):not(.has-text-align-left):not(.has-text-align-right) {
    text-align: center;
}

/* Force Elementor widget alignments to work by inheriting from Elementor wrapper */
.elementor-widget-container .elementor-heading-title,
.elementor-widget-heading .elementor-heading-title { 
    text-align: inherit !important; 
}

/* Keep custom hero and article content left-aligned */
.hero-text-container h1,
.unopa-hero-title,
.unopa-hiv-title,
.unopa-hiv-desc,
.unopa-hiv-left-text,
.unopa-custom-post-title,
.unopa-archive-title,
.unopa-archive-title a,
.unopa-news-title,
.unopa-news-title a,
.unopa-projects-title,
.unopa-projects-title a,
.unopa-article-content h1,
.unopa-article-content h2,
.unopa-article-content h3,
.unopa-article-content h4,
.unopa-article-content h5,
.unopa-article-content h6 {
    text-align: left !important;
}

/* Reset pentru titlurile din tema părinte Astra */
.entry-title, 
.entry-content h1, 
.entry-content h2, 
.entry-content h3 {
    letter-spacing: -0.01em !important;
    text-transform: uppercase !important;
    word-break: normal !important;
}

/* Fix for lists in UNOPA Custom Widgets - Extra Padding and Visibility Reset */
.unopa-article-content ul,
.unopa-widget-text-area ul,
.unopa-post-content ul,
.entry-content ul {
    list-style-type: disc !important;
    list-style-position: outside !important;
    padding-left: 4rem !important; /* Extremely high to ensure visibility */
    margin-top: 1.5rem !important;
    margin-bottom: 2rem !important;
    display: block !important;
    overflow: visible !important;
}

.unopa-article-content ol,
.unopa-widget-text-area ol,
.unopa-post-content ol,
.entry-content ol {
    list-style-type: decimal !important;
    list-style-position: outside !important;
    padding-left: 4rem !important; /* Extremely high to ensure visibility */
    margin-top: 1.5rem !important;
    margin-bottom: 2rem !important;
    display: block !important;
    overflow: visible !important;
}

.unopa-article-content li,
.unopa-widget-text-area li,
.unopa-post-content li,
.entry-content li {
    display: list-item !important;
    list-style: inherit !important;
    margin-bottom: 0.75rem !important;
    padding-left: 0.5rem !important;
    visibility: visible !important;
}

/* Ensure markers themselves are styled and visible */
li::marker {
    color: var(--primary) !important;
    font-size: 1.1em !important;
}

/* Container padding for widget content area to ensure markers don't clip */
.unopa-widget-text-area,
.unopa-article-content {
    width: 100% !important;
    max-width: none !important;
}

/* Category links button look */
.unopa-post-categories a {
    text-decoration: none !important;
    display: inline-block;
    transition: all 0.3s ease;
}
.unopa-post-categories a:hover {
    color: #fff !important;
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.tracking-tighter { letter-spacing: -0.02em !important; }
.tracking-tight { letter-spacing: -0.01em !important; }
.tracking-normal { letter-spacing: 0em !important; }
.tracking-wide { letter-spacing: 0.025em !important; }
.tracking-widest { letter-spacing: 0.05em !important; }

/* Aggressive reset for distorted/stretched headings and text */
h1, h2, h3, h4, h5, h6, 
.entry-title, 
.elementor-heading-title,
.page-title,
.site-main .page-header h1,
.unopa-custom-post-title,
.ast-archive-post h2,
.elementor-post__title,
.elementor-post__title a {
    word-spacing: normal !important;
    letter-spacing: -0.01em !important;
    display: block !important;
}

/* Specific fix for Editor */
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper .wp-block-post-title,
.editor-styles-wrapper .editor-post-title__input,
.wp-block-post-title,
.editor-post-title__input {
    letter-spacing: normal !important;
    word-break: normal !important;
    word-spacing: normal !important;
    text-align: left !important;
    text-align-last: left !important;
    text-justify: auto !important;
    text-transform: none !important;
    font-size: 2.5rem !important;
}
.unopa-post-content:not(.elementor) {
    line-height: 1.6;
    font-size: 1.125rem;
}

.unopa-post-content:not(.elementor) h1 { font-size: 2.5rem; margin-bottom: 1.5rem; margin-top: 2rem; }
.unopa-post-content:not(.elementor) h2 { font-size: 2rem; margin-bottom: 1.25rem; margin-top: 1.75rem; }
.unopa-post-content:not(.elementor) h3 { font-size: 1.75rem; margin-bottom: 1rem; margin-top: 1.5rem; }
.unopa-post-content:not(.elementor) h4 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.unopa-post-content:not(.elementor) h5 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.unopa-post-content:not(.elementor) h6 { font-size: 1.1rem; margin-bottom: 0.5rem; }

.unopa-post-content p { 
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important; 
    line-height: 1.6 !important;
}
.unopa-post-content a { color: var(--primary); text-decoration: underline; }

/* Sincronizare margini și spațiere corectă (implicit Enters) pentru paragrafe și titluri în widget-urile de format articol UNOPA */
.unopa-article-content p,
.unopa-widget-text-area p {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.6 !important;
}

/* Prevenirea colapsării paragrafelor goale generate la apăsarea tastei Enter */
.unopa-article-content p:empty,
.unopa-widget-text-area p:empty {
    min-height: 1rem !important;
    display: block !important;
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
}

.unopa-article-content h1,
.unopa-widget-text-area h1 {
    font-size: 2.5rem !important;
    margin-top: 2rem !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.2 !important;
}

.unopa-article-content h2,
.unopa-widget-text-area h2 {
    font-size: 2rem !important;
    margin-top: 3.25rem !important; /* spațiu generos înainte */
    margin-bottom: 1rem !important; /* spațiu mai compact după */
    line-height: 1.3 !important;
}

.unopa-article-content h3,
.unopa-widget-text-area h3 {
    font-size: 1.75rem !important;
    margin-top: 2.75rem !important; /* spațiu generos înainte */
    margin-bottom: 0.85rem !important; /* spațiu mai compact după */
    line-height: 1.4 !important;
}

.unopa-article-content h4,
.unopa-widget-text-area h4 {
    font-size: 1.5rem !important;
    margin-top: 2.25rem !important; /* spațiu generos înainte */
    margin-bottom: 0.75rem !important; /* spațiu mai compact după */
}

.unopa-article-content h5,
.unopa-widget-text-area h5 {
    font-size: 1.25rem !important;
    margin-top: 2rem !important; /* spațiu generos înainte */
    margin-bottom: 0.65rem !important; /* spațiu mai compact după */
}

.unopa-article-content h6,
.unopa-widget-text-area h6 {
    font-size: 1.1rem !important;
    margin-top: 1.75rem !important; /* spațiu generos înainte */
    margin-bottom: 0.5rem !important; /* spațiu mai compact după */
}

/* Modul Galerie Personalizat */
.unopa-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

@media (min-width: 768px) {
    .unopa-gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .unopa-gallery-grid { grid-template-columns: repeat(5, 1fr); }
}

.unopa-gallery-item {
    width: 150px;
    height: 150px;
    background: white;
    border: 1px solid var(--zinc-100);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: all 0.3s ease;
}

.unopa-gallery-item:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transform: translateY(-4px);
}

/* High Contrast Mode */
.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

.high-contrast body {
    background-color: #000 !important;
    color: #fff !important;
}

.high-contrast header, 
.high-contrast footer, 
.high-contrast section, 
.high-contrast div, 
.high-contrast main {
    background-color: #000 !important;
    border-color: #fff !important;
    color: #fff !important;
}

.high-contrast a, 
.high-contrast button {
    color: #ff0 !important;
    text-decoration: underline !important;
}

.high-contrast .bg-primary, 
.high-contrast .text-primary {
    background-color: #ff0 !important;
    color: #000 !important;
}

.high-contrast img {
    filter: grayscale(100%) contrast(150%) !important;
}

/* 
 * ACCESSIBILITY & WCAG 2.1 AA ENHANCEMENTS 
 */

/* Hide Astra native scroll to top */
.ast-scroll-to-top,
#ast-scroll-top {
    display: none !important;
}

/* Line Clamp support */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ensure images fill containers properly */
.object-cover {
    object-fit: cover !important;
}

/* Fix for Hero and Boxes images on mobile */
.w-full.h-full.object-cover {
    min-width: 100%;
    min-height: 100%;
}

/* Skip to Content Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    z-index: 99999;
    transition: top 0.3s;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.1em;
}

.skip-link:focus {
    top: 0;
    outline: none;
}

/* Visible Focus States for Keyboard Navigation */
:focus-visible {
    outline: 3px solid var(--primary) !important;
    outline-offset: 4px !important;
}

/* Screen Reader Only Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-size: 0.875rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* 
 * UNOPA RESPONSIVE TYPOGRAPHY TUNING (TITLE & TOC)
 */
.unopa-toc-container {
    transition: all 0.3s ease;
}

/* Ensure the TOC title 'Cuprins Articol' is beautifully sized and has absolutely NO large header margins */
.unopa-toc-container h3,
.unopa-toc-toggle h3,
.unopa-toc-container p,
.unopa-toc-container p.text-zinc-400,
.unopa-toc-container .text-zinc-400,
.unopa-toc-container .unopa-toc-toggle h3,
.unopa-toc-title {
    font-size: 19px !important; /* Elegant, larger and more prominent on desktop and laptop viewports */
    line-height: 1.4 !important; /* Perfect balanced line-height */
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    font-weight: 700 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #8e8e93 !important; /* Elegant accessible slate gray */
    text-align: left !important;
    display: inline-block !important;
}

@media (max-width: 1024px) {
    .unopa-toc-container h3,
    .unopa-toc-toggle h3,
    .unopa-toc-container p,
    .unopa-toc-container p.text-zinc-400,
    .unopa-toc-container .text-zinc-400,
    .unopa-toc-container .unopa-toc-toggle h3,
    .unopa-toc-title {
        font-size: 16px !important; /* Perfect for smaller laptop screen sizes and tablets */
    }
}

/* Clean, proportional styling for TOC links */
.unopa-toc-container ul li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.unopa-toc-container ul li a {
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
    color: #2c2c2e !important;
    text-decoration: none !important;
    display: inline-block !important;
    padding: 6px 0 !important; /* Comfortable gap and tap area for links */
    transition: color 0.2s ease;
}

.unopa-toc-container ul li a:hover {
    color: var(--primary, #ca1616) !important;
}

@media (max-width: 767px) {
    /* Main article / page title forced to 48px with 1.2em line height on Mobile */
    .unopa-custom-post-title,
    h1.unopa-custom-post-title {
        font-size: 40px !important; /* Slightly more balanced on smaller screens */
        line-height: 1.15 !important;
        letter-spacing: -0.02em !important;
    }

    /* "Cuprins Articol" container packing on Mobile */
    .unopa-toc-container {
        padding: 16px !important;
        margin-bottom: 24px !important;
    }

    .unopa-toc-container h3,
    .unopa-toc-toggle h3,
    .unopa-toc-container p,
    .unopa-toc-container p.text-zinc-400,
    .unopa-toc-container .text-zinc-400,
    .unopa-toc-container .unopa-toc-toggle h3,
    .unopa-toc-title {
        font-size: 13px !important; /* Extremely elegant and readable on small viewports */
        line-height: 1.5 !important; /* Perfect generous line-height to guarantee NO vertical overlap ever */
        letter-spacing: 0.12em !important;
    }

    /* Keep the links neat, small, and comfortable to tap with responsive line height */
    .unopa-toc-container ul li a {
        font-size: 13px !important; /* Smaller text on Mobile for longer subtitle rows */
        line-height: 1.4 !important; /* Well-proportioned line spacing for wrapped links */
        padding: 5px 0 !important;  /* Elegant distance between list item lines */
    }
}

/* Fix for Rights Grid and Carousel Widgets */
.unopa-rights-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 2rem !important;
    width: 100% !important;
}

.unopa-right-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    text-decoration: none !important;
    outline: none !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    /* Default responsive fallback widths without !important so Elementor can override them */
    width: calc(100% / 4 - (2rem * 3 / 4));
}

@media (max-width: 1024px) {
    .unopa-right-item {
        width: calc(100% / 3 - (2rem * 2 / 3)) !important;
        min-width: calc(100% / 3 - (2rem * 2 / 3)) !important;
        max-width: calc(100% / 3 - (2rem * 2 / 3)) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (max-width: 767px) {
    .unopa-right-item {
        width: calc(50% - 0.75rem) !important;
        min-width: calc(50% - 0.75rem) !important;
        max-width: calc(50% - 0.75rem) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Ensure rights boxes always render beautifully and robustly */
.unopa-right-box {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #ffffff !important;
    border: 1px solid #f1f1f1 !important;
    border-radius: 1rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    flex-shrink: 0 !important;
    /* Default fallback sizes without !important so Elementor can override them */
    width: 5rem;
    height: 5rem;
    margin-bottom: 1.5rem;
}

.unopa-right-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #52525b; /* zinc-600 */
    line-height: 1.625;
    margin: 0;
    padding: 0 0.5rem;
    transition: color 0.2s ease;
}

/* Carousel Track & Slides Fix for Mobile & Desktop */
.unopa-rights-carousel-track > div {
    flex: 0 0 20% !important;
    width: 20% !important;
    max-width: 20% !important;
    box-sizing: border-box !important;
}

@media (max-width: 1024px) {
    .unopa-rights-carousel-track > div {
        flex: 0 0 33.333% !important;
        width: 33.333% !important;
        max-width: 33.333% !important;
    }
}

@media (max-width: 767px) {
    .unopa-rights-carousel-track > div {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
    }
}

@media (max-width: 767px) {
    .unopa-rights-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 1.25rem !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
    }
    
    .unopa-right-box {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 4.5rem !important;
        height: 4.5rem !important;
        min-width: 4.5rem !important;
        min-height: 4.5rem !important;
        max-width: 4.5rem !important;
        max-height: 4.5rem !important;
        margin-bottom: 0.75rem !important;
        border-radius: 0.75rem !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .unopa-right-icon {
        display: block !important;
        width: 1.75rem !important;
        height: 1.75rem !important;
        min-width: 1.75rem !important;
        min-height: 1.75rem !important;
        max-width: 1.75rem !important;
        max-height: 1.75rem !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .unopa-right-title {
        display: block !important;
        line-height: 1.4;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Carousel adjustments on mobile */
    .unopa-rights-carousel-wrapper {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
}

/* ==========================================================================
   Footer Typography Fix & Spacing (Leading / Line-Height Protection)
   ========================================================================== */
.unopa-footer-heading {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    margin-top: 0 !important;
    margin-bottom: 1.25rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: left !important;
    word-break: normal !important;
    white-space: normal !important;
    display: block !important;
    width: 100% !important;
}

footer .unopa-footer-nav,
footer .menu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left !important;
}

footer .unopa-footer-nav li,
footer .menu li {
    list-style: none !important;
    margin: 0 0 0.5rem 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
    text-align: left !important;
}

footer .unopa-footer-nav li a,
footer .menu li a {
    display: inline-block !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    color: inherit;
    transition: color 0.2s ease;
    text-align: left !important;
}

footer .unopa-footer-nav li a:hover,
footer .menu li a:hover {
    color: #ffffff !important;
}

/* Contact List Icons & Spacing */
footer .unopa-footer-contact li {
    margin-bottom: 0.75rem !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

/* Social Media Circle Buttons in Footer */
footer a[title*="Facebook"],
footer a[title*="YouTube"],
footer a[title*="Instagram"],
footer span[title*="YouTube"],
footer span[title*="Instagram"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 3rem !important;
    height: 3rem !important;
    min-width: 3rem !important;
    min-height: 3rem !important;
    border-radius: 9999px !important;
    flex-shrink: 0 !important;
}

footer a[title*="Facebook"] svg,
footer a[title*="YouTube"] svg,
footer a[title*="Instagram"] svg,
footer span[title*="YouTube"] svg,
footer span[title*="Instagram"] svg {
    width: 1.5rem !important;
    height: 1.5rem !important;
    stroke: #ffffff !important;
    fill: none !important;
    display: block !important;
}

/* Contact List Icons */
footer ul li i[data-lucide],
footer ul li svg.lucide {
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem !important;
    min-height: 1rem !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

/* ==========================================================================
   Cookie Consent Popup & Settings Modal
   ========================================================================== */
#unopa-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

#unopa-cookie-banner.cookie-hidden {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
}

#unopa-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

#unopa-cookie-modal.modal-hidden {
    opacity: 0;
    pointer-events: none;
}

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

input:checked + .cookie-slider {
    background-color: #ef4444; /* UNOPA primary red */
}

input:disabled + .cookie-slider {
    background-color: #10b981; /* Green locked for necessary cookies */
    cursor: not-allowed;
    opacity: 0.8;
}

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

/* ==========================================================================
   Header & Navigation Critical CSS (Prevents FOUC on all page loads)
   ========================================================================== */
#main-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 100 !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid #f4f4f5 !important;
    box-sizing: border-box !important;
}

#main-header .max-w-7xl {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 80rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0.75rem 1.5rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

#main-header nav.desktop-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1.5rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

#main-header nav.desktop-nav ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 1.5rem !important;
}

#main-header nav.desktop-nav ul li {
    display: inline-flex !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#main-header nav.desktop-nav ul li a {
    display: inline-block !important;
    color: #52525b !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    letter-spacing: 0.04em !important;
    font-size: 13.5px !important;
    transition: color 0.2s ease !important;
    white-space: nowrap !important;
}

#main-header nav.desktop-nav ul li a:hover,
#main-header nav.desktop-nav ul li.current-menu-item > a,
#main-header nav.desktop-nav ul li.current_page_item > a {
    color: #ef4444 !important;
}

/* UNOPA Ce este HIV & Mituri widget alignment */
.unopa-hiv-media-col {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.unopa-hiv-title,
.unopa-hiv-desc,
.unopa-hiv-left-text {
    text-align: left !important;
}

@media (max-width: 1023px) {
    #main-header nav.desktop-nav {
        display: none !important;
    }
    .mobile-toggle-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

@media (min-width: 1024px) {
    #mobile-menu {
        display: none !important;
    }
    .mobile-toggle-btn {
        display: none !important;
    }
}





