:root {
    /* Color Palette - Updated to Deep Institutional Green #004300 */
    --primary-color: #004300;
    --primary-color-dark: #002b00;
    --primary-gradient: linear-gradient(135deg, #004300 0%, #002b00 100%);
    --secondary-color: #006400;
    --accent-color: #2e7d32;
    --bg-color: #ffffff;
    --bg-light: #ffffff;
    --text-main: #1a202c;
    --text-muted: #4a5568;
    --white: #ffffff;

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing & Layout */
    --container-width: 1280px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.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;
}

/* Redesigned Sections: Novedades, Eventos, Trámites */
.news-events-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    .news-events-grid {
        grid-template-columns: 1fr;
    }
}

.column-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 25px;
    letter-spacing: 0.05em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-card-promo {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    color: var(--white);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    background-size: cover;
    background-position: center;
}

.news-card-promo:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.news-card-promo .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 67, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
    z-index: 1;
}

.news-card-promo .content {
    position: relative;
    z-index: 2;
}

.news-card-promo h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.news-card-promo p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.event-card-modern {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.event-image {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 20px;
}

.event-card-modern h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.event-meta {
    list-style: none;
    margin-top: auto;
}

.event-meta li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: flex;
    gap: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Procedures (Trámites) Styles */
.procedures-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .procedures-grid {
        grid-template-columns: 1fr;
    }
}

.procedure-item {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-left: 6px solid var(--primary-color);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.procedure-item:hover {
    transform: translateX(10px);
    background: #f0f7f0;
    box-shadow: var(--shadow-md);
}

.procedure-icon {
    font-size: 1.5rem;
    margin-right: 20px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f0;
    border-radius: 10px;
    color: var(--primary-color);
}

.procedure-item span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Header & Navigation Refinement */
/* Header & Navigation Refinement - Clean White Aesthetic */
.main-header {
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    width: 100%;
    max-width: 100%;
    padding: 0 40px;
    margin: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    background: #fff;
    border-radius: 8px;
    padding: 4px 6px;
}

.logo-copy {
    display: flex;
    flex-direction: column;
    gap: 0;
    color: var(--primary-color);
}

.logo-copy strong {
    font-size: 1.2rem;
    line-height: 1;
    letter-spacing: 0.05em;
    font-weight: 800;
}

.logo-copy small {
    color: var(--text-muted);
    font-size: 0.7rem;
    max-width: 180px;
    line-height: 1.2;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: center;
}

.main-nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    padding: 12px 6px;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

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

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 480px;
    max-height: 85vh;
    overflow: visible;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 8px;
    border-top: 3px solid var(--primary-color);
    padding: 10px 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown:hover>.dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: var(--text-main);
    padding: 15px 25px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    white-space: normal;
    word-break: break-word;
}

.dropdown-content a::after {
    display: none;
    /* remove hover line */
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Sub-dropdown */
.sub-dropdown {
    position: relative;
    overflow: visible;
    display: block;
}

.sub-dropdown>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.sub-dropdown-content {
    display: none;
    position: absolute;
    left: 100%;
    top: -10px;
    background-color: var(--white);
    min-width: 450px;
    max-height: 80vh;
    overflow: visible;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sub-dropdown:hover>.sub-dropdown-content {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.sub-dropdown-content a {
    color: var(--text-main);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    white-space: normal;
    word-break: break-word;
}

.sub-dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

/* Slider Backgrounds */
.slide-bg-1 {
    background-image: url('https://images.unsplash.com/photo-1577416416829-d4368c3b914a?auto=format&fit=crop&q=80&w=1920');
    background-size: cover;
    background-position: center;
}

.slide-bg-2 {
    background-image: url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&q=80&w=1920');
    background-size: cover;
    background-position: center;
}

/* Mobile Toggle - Fix color for white header */
.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-toggle.menu-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.menu-active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.menu-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation Overhaul */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        max-height: 80vh;
        overflow-y: auto;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .main-nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .main-nav a {
        display: block;
        padding: 15px 0;
        width: 100%;
        color: var(--text-main);
    }

    .dropdown-content,
    .sub-dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background-color: #f9f9f9;
        min-width: 100%;
        max-height: none;
        overflow: visible;
    }

    .dropdown.mobile-active>.dropdown-content,
    .sub-dropdown.mobile-active>.sub-dropdown-content {
        display: block;
    }

    .dropdown .dropbtn::after {
        content: ' \25be';
        float: right;
    }
}

/* Media query for extra-large screens (1200px+) */
@media (min-width: 1200px) {
    .main-header .container {
        padding: 0 60px;
    }

    .main-nav ul {
        gap: 50px;
    }

    .main-nav a {
        padding: 15px 8px;
        font-size: 1rem;
    }
}

/* Media query for medium screens (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .main-header .container {
        padding: 0 20px;
        height: 60px;
    }

    .logo-img {
        height: 35px;
        padding: 2px 3px;
    }

    .main-nav ul {
        gap: 15px;
    }

    .main-nav a {
        font-size: 0.8rem;
        padding: 8px 4px;
        letter-spacing: 0.01em;
    }

    .dropdown-content {
        min-width: 200px;
        font-size: 0.85rem;
    }

    .sub-dropdown-content {
        min-width: 180px;
        font-size: 0.85rem;
    }

    .dropdown-content a,
    .sub-dropdown-content a {
        padding: 10px 15px;
    }
}

/* Media query for 19" monitors (1024px - 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
    .main-header .container {
        padding: 0 25px;
        height: 60px;
    }

    .logo-img {
        height: 38px;
        padding: 2px 3px;
    }

    .logo-copy strong {
        font-size: 1rem;
    }

    .main-nav ul {
        gap: 18px;
    }

    .main-nav a {
        font-size: 0.87rem;
        padding: 10px 6px;
        letter-spacing: 0.02em;
    }

    .dropdown-content {
        min-width: 230px;
        font-size: 0.88rem;
    }

    .sub-dropdown-content {
        min-width: 210px;
        font-size: 0.88rem;
    }

    .dropdown-content a {
        padding: 11px 18px;
    }

    .sub-dropdown-content a {
        padding: 11px 18px;
    }
}

/* Media query for larger screens (1367px+) */
@media (min-width: 1367px) {
    .main-header .container {
        padding: 0 35px;
        height: 70px;
    }

    .main-nav ul {
        gap: 30px;
    }

    .main-nav a {
        font-size: 0.92rem;
        padding: 12px 6px;
    }

    .dropdown-content {
        min-width: 250px;
    }

    .sub-dropdown-content {
        min-width: 220px;
    }
}

/* Floating Social Bar - Hidden on mobile by default, handled in media queries */
/* Rediseño de Redes Sociales Flotantes - Menú Expandible */
.floating-social {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column-reverse;
    gap: 15px;
    align-items: center;
}

.social-toggle-btn {
    width: 50px;
    height: 50px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

.social-toggle-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: transform 0.4s ease;
}

.social-links-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

/* Estado Expandido */
.floating-social:hover .social-links-wrapper,
.floating-social.active .social-links-wrapper {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.floating-social:hover .social-toggle-btn {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.floating-social:hover .social-toggle-btn svg {
    transform: scale(1.15);
}

.floating-social a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-social a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.floating-social a:hover {
    transform: scale(1.2) translateX(-5px);
    color: var(--white);
}

.floating-social a.social-fb:hover { background: #1877F2; box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4); }
.floating-social a.social-x:hover { background: #000000; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); }
.floating-social a.social-yt:hover { background: #FF0000; box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4); }
.floating-social a.social-ig:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); box-shadow: 0 4px 15px rgba(225, 48, 108, 0.4); }
.floating-social a.social-li:hover { background: #0077B5; box-shadow: 0 4px 15px rgba(0, 119, 181, 0.4); }
.floating-social a.social-th:hover { background: #000000; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); }
.floating-social a.social-tk:hover { background: #000000; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); }

/* Hero Slider Styles */
.hero-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background-color: #000;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 67, 0, 0.85) 0%, rgba(0, 67, 0, 0.4) 50%, transparent 100%);
}

.slide-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    padding: 0 50px;
    color: var(--white);
}

.slide-content h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--white);
    width: 30px;
    border-radius: 10px;
}

/* Quick Access Circular Icons */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    padding: 40px 0;
}

.quick-access-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 28px 16px 22px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    cursor: pointer;
}

.quick-access-item:hover {
    background: var(--primary-color);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.quick-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-sm);
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.quick-access-item:hover .quick-icon-wrapper {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.quick-access-item span {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
    transition: var(--transition);
}

.quick-access-item:hover span {
    color: var(--white);
}

/* Footer Reorganization */
.main-footer {
    background-color: #f8fafc;
    color: var(--text-main);
    padding: 80px 0 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(0, 67, 0, 0.2);
}

.btn-primary:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 67, 0, 0.3);
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.transparency-cards-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.transparency-card {
    display: block;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    transition: var(--transition);
    border: none;
    max-width: 260px;
}

.transparency-card:hover {
    transform: scale(1.05);
}

.transparency-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.trans-btn {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.trans-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.portal-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
    gap: 34px;
    align-items: start;
    background-color: #f0f7f4;
    /* Soft green background for hero area */
    padding: 20px;
    border-radius: 30px;
}

.portal-hero-main {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 249, 255, 0.98) 100%);
    border: 1px solid rgba(30, 64, 175, 0.1);
    border-radius: 24px;
    padding: 42px;
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.08);
}

.hero-kicker,
.panel-kicker,
.quick-access-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-kicker {
    color: var(--primary-color-dark);
    margin-bottom: 16px;
}

.portal-hero-main h1 {
    font-size: clamp(2.4rem, 4vw, 4.2rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
    color: #10213e;
    max-width: 10ch;
    margin-bottom: 20px;
}

.portal-hero-main p {
    font-size: 1.08rem;
    color: var(--text-muted);
    max-width: 60ch;
    margin-bottom: 28px;
}

.hero-highlights {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hero-highlight {
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    border: 1px solid rgba(30, 64, 175, 0.08);
    border-radius: 18px;
    padding: 18px;
    min-height: 132px;
}

.hero-highlight strong {
    display: block;
    margin-bottom: 10px;
    color: #10213e;
    font-size: 0.98rem;
}

.hero-highlight span {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.portal-hero-panel {
    display: grid;
    gap: 18px;
}

.portal-panel-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.panel-kicker {
    color: #8a6a21;
    margin-bottom: 14px;
}

.relevant-list {
    list-style: none;
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.relevant-list li {
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.relevant-list li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.relevant-meta {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.relevant-list a {
    color: #10213e;
    font-weight: 600;
    line-height: 1.45;
}

.relevant-list a:hover,
.panel-link:hover {
    color: var(--primary-color);
}

.panel-link {
    font-weight: 700;
    color: var(--primary-color-dark);
}

.contact-points {
    display: grid;
    gap: 16px;
    margin: 0 0 18px;
}

.contact-points div {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.contact-points div:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.contact-points dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 4px;
}

.contact-points dd {
    margin: 0;
    color: #10213e;
    font-weight: 600;
    line-height: 1.4;
}

.quick-access-section {
    background: linear-gradient(180deg, #f0f4fb 0%, #ffffff 100%);
    padding: 22px 0 70px;
}

.portal-heading {
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
}

.portal-heading p {
    margin: 0;
    max-width: 680px;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.quick-access-card {
    background: var(--white);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(30, 64, 175, 0.09);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 198px;
}

.quick-access-card strong {
    font-size: 1.15rem;
    color: #10213e;
    line-height: 1.25;
}

.quick-access-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.quick-access-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.1);
    border-color: rgba(30, 64, 175, 0.2);
}

.quick-access-primary {
    background: linear-gradient(145deg, #173f94 0%, #244fb2 58%, #5e8be2 100%);
    color: var(--white);
}

.quick-access-primary strong,
.quick-access-primary p,
.quick-access-primary .quick-access-tag {
    color: var(--white);
}

.quick-access-tag {
    color: #8a6a21;
}

.hero-image {
    flex: 1;
    position: relative;
}

.hero-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition);
}

.hero-image:hover img {
    transform: perspective(1000px) rotateY(0deg);
}

/* Services */
.services {
    background-color: var(--white);
}

.section-heading {
    text-align: center;
    margin-bottom: 50px;
}

.section-heading h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-heading p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 500;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    border-top-color: var(--secondary-color);
}

.service-card .icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.card-link {
    font-weight: 600;
    color: var(--secondary-color);
    display: inline-flex;
    align-items: center;
}

.card-link:hover {
    color: var(--primary-color);
    margin-left: 5px;
}

/* News Section */
.news .section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    text-align: left;
}

.news .section-heading h2 {
    margin-bottom: 0;
}

.view-all {
    color: var(--primary-color);
    font-weight: 600;
}

.view-all:hover {
    text-decoration: underline;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.news-card img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.news-content {
    padding: 25px;
}

.news-content .date {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.3;
}

.news-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* News Ticker */
.news-ticker {
    background: #f0f7f0;
    color: var(--primary-color);
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Below header */
    font-size: 0.9rem;
    font-weight: 600;
}

.ticker-content {
    white-space: nowrap;
    animation: ticker 25s linear infinite;
    display: inline-block;
    padding-left: 100%;
    /* Start outside on the right of the visible area */
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Statistics Counter */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.stat-card {
    text-align: center;
}

.stat-card .stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    display: inline-block;
}

.stat-card .stat-suffix {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
}

.stat-card p {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 10px;
}

/* Social Impact Modules */
.alerts-section,
.calendar-section,
.multimedia-section,
.map-modules-section,
.library-section,
.newsletter-section,
.transparency {
    background-color: var(--white);
}

.alerts-layout,
.kids-layout,
.map-layout,
.newsletter-shell {
    display: grid;
    gap: 30px;
}

.alerts-layout {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    align-items: stretch;
}

.alert-stage {
    background: linear-gradient(135deg, #f7fbff 0%, #eef4ff 100%);
    border: 1px solid #d8e3ff;
    border-radius: var(--border-radius);
    padding: 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.alert-slide {
    display: none;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    align-items: center;
}

.alert-slide.active {
    display: grid;
}

.alert-person-mark {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 2px;
    box-shadow: var(--shadow-md);
}

.alert-person-mark.amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.alert-person-mark.alba {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}

.alert-person-mark.search {
    background: linear-gradient(135deg, #1e40af 0%, #0f172a 100%);
}

.alert-tag,
.story-label,
.library-type,
.newsletter-kicker,
.schedule-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.alert-tag {
    padding: 6px 12px;
    margin-bottom: 12px;
}

.alert-tag.amber {
    background-color: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.alert-tag.alba {
    background-color: rgba(236, 72, 153, 0.14);
    color: #be185d;
}

.alert-tag.search {
    background-color: rgba(30, 64, 175, 0.12);
    color: var(--primary-color);
}

.alert-copy h3,
.kids-featured-card h3,
.schedule-card h3,
.media-copy h3,
.story-card h3,
.directory-card h3,
.library-card h3,
.map-panel h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.alert-copy p,
.kids-featured-card p,
.schedule-card p,
.media-copy p,
.story-card p,
.directory-card p,
.library-card p,
.map-panel p {
    color: var(--text-muted);
}

.alert-copy,
.media-copy,
.story-card,
.directory-card,
.library-card,
.map-panel,
.kids-featured-card,
.kid-card,
.schedule-card,
.alert-support-panel {
    color: var(--text-main);
}

.alert-meta {
    list-style: none;
    margin-top: 16px;
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 600;
}

.alert-meta strong {
    color: var(--text-main);
}

.alert-nav {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background-color: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-size: 1.35rem;
}

.alert-support-panel,
.kids-featured-card,
.schedule-card,
.media-card,
.story-card,
.map-panel,
.directory-card,
.library-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.alert-support-panel {
    padding: 28px;
    border-top: 4px solid var(--secondary-color);
}

.alert-support-panel h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.alert-support-panel p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.support-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
}

.support-card strong {
    color: var(--primary-color);
}

.support-card span {
    color: var(--text-muted);
    font-weight: 600;
}

.calendar-toolbar,
.municipality-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.map-explorer {
    display: grid;
    gap: 20px;
}

.map-visual-card {
    padding: 24px;
    border-radius: 28px;
    border: 1px solid #dbeafe;
    background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
    box-shadow: var(--shadow-md);
}

.map-visual-header {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.map-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    background-color: rgba(30, 64, 175, 0.1);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.map-visual-header p {
    margin: 0;
    color: var(--text-muted);
}

.aguascalientes-map {
    position: relative;
    min-height: 0;
    aspect-ratio: 612 / 546.93;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 45%),
        linear-gradient(180deg, rgba(219, 234, 254, 0.68) 0%, rgba(239, 246, 255, 0.98) 100%);
}

.aguascalientes-map-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.municipality-control {
    cursor: pointer;
}

.municipality-btn:focus-visible {
    outline: none;
}

.municipality-btn:focus-visible {
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.18);
}

.municipality-hotspot {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    min-height: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.municipality-hotspot::before {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ffffff;
    border: 4px solid rgba(30, 64, 175, 0.9);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.municipality-hotspot span {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 9px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.48);
    color: var(--text-main);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

.municipality-hotspot:hover::before,
.municipality-hotspot:focus-visible::before,
.municipality-hotspot.active::before {
    transform: scale(1.16);
    background: rgba(30, 64, 175, 0.16);
    border-color: #0f3aa9;
}

.municipality-hotspot:focus-visible {
    outline: none;
}

.municipality-hotspot:focus-visible span,
.municipality-hotspot.active span {
    border-color: rgba(30, 64, 175, 0.55);
    color: #0f3aa9;
}

.municipality-hotspot-calvillo {
    left: 27%;
    top: 70%;
}

.municipality-hotspot-jesus {
    left: 51%;
    top: 52%;
}

.municipality-hotspot-aguascalientes {
    left: 56%;
    top: 66%;
}

.municipality-hotspot-rincon {
    left: 58%;
    top: 28%;
}

.municipality-hotspot-pabellon {
    left: 57%;
    top: 42%;
}

body.high-contrast .municipality-hotspot::before {
    border-color: #ffff00;
}

body.high-contrast .municipality-hotspot:hover::before,
body.high-contrast .municipality-hotspot:focus-visible::before,
body.high-contrast .municipality-hotspot.active::before {
    background: rgba(255, 255, 0, 0.25);
}

@media (max-width: 900px) {
    .municipality-hotspot span {
        font-size: 0.68rem;
    }
}

@media (max-width: 640px) {
    .municipality-hotspot::before {
        width: 15px;
        height: 15px;
        border-width: 3px;
    }

    .municipality-hotspot span {
        top: calc(100% + 6px);
        padding: 4px 7px;
        font-size: 0.62rem;
    }
}

.calendar-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.calendar-kpi {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid #dbeafe;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.calendar-kpi-label,
.event-summary-label,
.event-detail-label {
    display: block;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #334155;
    font-weight: 700;
    margin-bottom: 8px;
}

.calendar-kpi-value {
    display: block;
    font-size: 2rem;
    line-height: 1;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.calendar-kpi small {
    color: var(--text-muted);
    font-weight: 500;
}

.calendar-filter,
.municipality-btn {
    border: 1px solid #cbd5e1;
    background-color: var(--white);
    color: var(--text-main);
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.calendar-filter.active,
.municipality-btn.active,
.calendar-filter:hover,
.municipality-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.schedule-grid,
.kids-cards,
.media-grid,
.story-grid,
.directory-grid,
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.schedule-card,
.story-card,
.directory-card,
.library-card,
.kid-card {
    padding: 26px;
}

.schedule-card {
    border: 1px solid #e2e8f0;
    position: relative;
}

.event-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.event-status.status-open {
    background-color: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.event-status.status-warning {
    background-color: rgba(245, 158, 11, 0.18);
    color: #92400e;
}

.event-status.status-full {
    background-color: rgba(220, 38, 38, 0.14);
    color: #991b1b;
}

.schedule-card.is-hidden {
    display: none;
}

.schedule-date,
.newsletter-kicker,
.library-type,
.story-label {
    padding: 6px 12px;
    margin-bottom: 14px;
    background-color: rgba(30, 64, 175, 0.1);
    color: var(--primary-color);
}

.schedule-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 18px 0 22px;
    font-weight: 600;
}

.schedule-capacity {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    font-weight: 600;
}

.schedule-capacity strong,
.schedule-close-date {
    color: var(--text-main);
}

.schedule-card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.schedule-close-date {
    font-size: 0.88rem;
    font-weight: 600;
}

.event-admin-section {
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
}

.admin-dashboard {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.admin-privacy-card {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 28px;
    border-left: 5px solid var(--primary-color);
}

.admin-privacy-card h3 {
    color: var(--primary-color);
    margin: 10px 0 12px;
}

.admin-privacy-card p {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 18px;
}

.admin-privacy-list {
    list-style: none;
    display: grid;
    gap: 10px;
    color: var(--text-main);
    font-weight: 600;
}

.admin-privacy-list li {
    position: relative;
    padding-left: 18px;
}

.admin-privacy-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--secondary-color);
}

.admin-auth-section {
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
}

.admin-login-layout,
.admin-dashboard-shell {
    display: grid;
    gap: 24px;
}

.admin-login-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
    align-items: stretch;
}

.admin-login-panel,
.admin-dashboard-main,
.admin-dashboard-sidebar {
    display: grid;
    gap: 18px;
}

.admin-login-panel {
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 28px;
    border: 1px solid #dbeafe;
}

.admin-login-header h2,
.admin-dashboard-topbar h1 {
    color: var(--primary-color);
    margin: 10px 0 10px;
}

.admin-login-header p,
.admin-dashboard-topbar p,
.admin-demo-note span {
    color: var(--text-muted);
}

.admin-login-form {
    display: grid;
    gap: 18px;
}

.admin-login-form input {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid #94a3b8;
    background-color: var(--white);
    color: var(--text-main);
    font-size: 1rem;
}

.admin-login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.16);
}

.admin-login-actions,
.admin-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.admin-login-message {
    min-height: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.admin-login-message.is-error {
    color: #b91c1c;
}

.admin-demo-note {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
    border: 1px solid #dbeafe;
}

.admin-demo-note strong {
    color: var(--primary-color);
}

.admin-dashboard-section {
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.admin-dashboard-topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    margin-bottom: 26px;
}

.admin-user-chip {
    padding: 10px 14px;
    border-radius: 999px;
    background-color: rgba(30, 64, 175, 0.1);
    color: var(--primary-color);
    font-weight: 700;
}

.admin-dashboard-kpis {
    margin-bottom: 24px;
}

.admin-dashboard-shell {
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: start;
}

.admin-timeline {
    display: grid;
    gap: 14px;
}

.admin-timeline-item {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background-color: #fcfdff;
}

.admin-timeline-item strong {
    color: var(--primary-color);
}

.admin-timeline-item span {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.admin-sidebar,
.admin-main-panel {
    display: grid;
    gap: 18px;
}

.admin-sidebar-card,
.admin-summary-card,
.admin-panel-card,
.admin-current-event,
.admin-event-button,
.admin-notice {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.admin-sidebar-card {
    padding: 24px;
    border-top: 4px solid var(--primary-color);
}

.admin-sidebar-kicker,
.admin-panel-meta,
.admin-summary-label,
.admin-record-meta,
.admin-empty-state {
    color: var(--text-muted);
    font-weight: 600;
}

.admin-sidebar-card h3,
.admin-panel-header h3,
.admin-current-event h3,
.admin-record-name {
    color: var(--primary-color);
}

.admin-sidebar-card p,
.admin-current-event p,
.admin-record-email {
    color: var(--text-muted);
}

.admin-event-list {
    display: grid;
    gap: 12px;
}

.admin-event-button {
    border: 1px solid #dbeafe;
    padding: 18px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.admin-event-button.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.admin-event-button-title {
    display: block;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 8px;
}

.admin-event-button-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.admin-summary-card {
    padding: 18px;
    border: 1px solid #e2e8f0;
}

.admin-summary-value {
    display: block;
    font-size: 1.9rem;
    color: var(--primary-color);
    line-height: 1;
    margin: 10px 0 8px;
}

.admin-summary-card small {
    color: var(--text-muted);
    font-weight: 500;
}

.admin-current-event {
    padding: 22px;
    border-left: 5px solid var(--secondary-color);
}

.admin-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-panel-card {
    padding: 22px;
}

.admin-panel-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.admin-records-list {
    display: grid;
    gap: 14px;
}

.admin-record-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    background-color: #fcfdff;
}

.admin-record-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.admin-record-name {
    font-weight: 700;
    margin-bottom: 4px;
}

.admin-record-email {
    font-size: 0.95rem;
}

.admin-record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 0.88rem;
    margin-top: 10px;
}

.admin-status-badge,
.admin-source-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-status-badge.pending {
    background-color: rgba(245, 158, 11, 0.16);
    color: #92400e;
}

.admin-status-badge.confirmed {
    background-color: rgba(22, 163, 74, 0.14);
    color: #166534;
}

.admin-status-badge.cancelled {
    background-color: rgba(220, 38, 38, 0.12);
    color: #991b1b;
}

.admin-status-badge.waitlist {
    background-color: rgba(30, 64, 175, 0.12);
    color: var(--primary-color);
}

.admin-source-badge {
    background-color: rgba(15, 23, 42, 0.08);
    color: #334155;
}

.admin-source-badge.source-web {
    background-color: rgba(37, 99, 235, 0.13);
    color: #1e3a8a;
}

.admin-record-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.admin-record-actions button {
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
}

.admin-action-confirm {
    background-color: rgba(22, 163, 74, 0.14);
    color: #166534;
}

.admin-action-release,
.admin-action-promote {
    background-color: rgba(30, 64, 175, 0.1);
    color: var(--primary-color);
}

.admin-record-actions button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.admin-empty-state {
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.7);
}

.admin-notice {
    padding: 18px 20px;
    border-left: 4px solid var(--primary-color);
    color: #334155;
    font-weight: 500;
}

.reports-panel-card {
    margin-bottom: 1.5rem;
}

.reports-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.reports-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.reports-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.reports-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
    gap: 1.5rem;
    align-items: start;
}

.reports-table-card,
.reports-side-column {
    min-width: 0;
}

.reports-side-column {
    display: grid;
    gap: 1.5rem;
}

.reports-table-wrapper {
    overflow-x: auto;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.96rem;
}

.reports-table th,
.reports-table td {
    padding: 0.9rem 0.8rem;
    border-bottom: 1px solid rgba(14, 34, 61, 0.1);
    text-align: left;
    vertical-align: top;
}

.reports-table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.reports-table tbody tr:hover {
    background: rgba(127, 180, 240, 0.08);
}

.report-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.report-badge.confirmed {
    background: rgba(39, 174, 96, 0.14);
    color: #1f7a45;
}

.report-badge.pending {
    background: rgba(243, 156, 18, 0.16);
    color: #9f6209;
}

.report-badge.waitlist {
    background: rgba(192, 57, 43, 0.14);
    color: #9b2f22;
}

.reports-breakdown {
    display: grid;
    gap: 0.9rem;
}

.reports-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(127, 180, 240, 0.08), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(14, 34, 61, 0.08);
}

.reports-breakdown-item strong {
    font-size: 1rem;
    color: var(--primary-color);
}

.reports-empty {
    padding: 1rem 0;
    color: var(--text-muted);
}

@media (max-width: 980px) {
    .reports-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .reports-header-row {
        flex-direction: column;
    }

    .reports-actions {
        width: 100%;
    }

    .reports-actions .btn {
        width: 100%;
    }

    .media-modal-dialog {
        padding: 22px 18px;
    }

    .media-modal-header h3 {
        font-size: 1.5rem;
    }

    .media-modal-placeholder {
        min-height: 240px;
        padding: 24px;
    }
}

.kids-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: stretch;
}

.kids-featured-card {
    padding: 32px;
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
    border: 1px solid #fed7aa;
}

.kids-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background-color: #f97316;
    color: var(--white);
    font-weight: 700;
    margin-bottom: 16px;
}

.kids-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.kid-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.kid-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background-color: rgba(30, 64, 175, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 18px;
}

.media-card {
    overflow: hidden;
}

.media-thumb {
    min-height: 180px;
    background: linear-gradient(135deg, #1e40af 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
}

.media-thumb.sign-language {
    background: linear-gradient(135deg, #0ea5e9 0%, #1d4ed8 100%);
}

.media-thumb.podcast {
    background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
}

.media-copy {
    padding: 24px;
}

.media-open-trigger {
    border: none;
    background: transparent;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.media-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3100;
}

.media-modal.active {
    display: flex;
}

.media-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.68);
}

.media-modal-dialog {
    position: relative;
    width: min(860px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.28);
    padding: 28px;
    z-index: 1;
}

.media-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--bg-light);
    color: var(--primary-color);
    font-size: 1.1rem;
    cursor: pointer;
}

.media-modal-header {
    margin-bottom: 20px;
    padding-right: 44px;
}

.media-modal-kicker {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(30, 64, 175, 0.1);
    color: var(--primary-color);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.media-modal-header h3 {
    color: var(--primary-color);
    font-size: 1.9rem;
    margin-bottom: 8px;
}

.media-modal-header p {
    color: var(--text-muted);
    font-weight: 600;
}

.media-modal-player {
    min-height: 280px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    display: grid;
    place-items: center;
}

.media-modal-player iframe,
.media-modal-player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
    background: #000;
}

.media-modal-placeholder {
    width: 100%;
    min-height: 320px;
    padding: 32px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--white);
}

.media-modal-placeholder strong {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.media-modal-placeholder p {
    max-width: 540px;
    color: rgba(255, 255, 255, 0.86);
}

.media-modal-note {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid #dbeafe;
    color: var(--text-muted);
    font-weight: 500;
}

.story-card {
    border-top: 4px solid var(--secondary-color);
}

.map-layout {
    grid-template-columns: minmax(320px, 1.2fr) minmax(280px, 0.95fr);
    align-items: start;
}

.map-panel {
    padding: 30px;
    border-left: 5px solid var(--primary-color);
}

.directory-card {
    text-align: center;
}

.directory-avatar {
    width: 78px;
    height: 78px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
}

.directory-card a {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
    margin: 10px 0 6px;
}

.directory-card span {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.newsletter-shell {
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr);
    padding: 36px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    align-items: center;
}

.newsletter-shell h2 {
    color: var(--primary-color);
    margin: 10px 0 12px;
}

.newsletter-shell p {
    color: var(--text-muted);
    font-weight: 500;
}

.newsletter-form {
    display: grid;
    gap: 12px;
}

.newsletter-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid #cbd5e1;
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.newsletter-message {
    min-height: 24px;
    font-size: 0.92rem;
    color: var(--primary-color);
    font-weight: 600;
}

.event-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.event-modal.active {
    display: flex;
}

.event-modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.58);
}

.event-modal-dialog {
    position: relative;
    width: min(980px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background-color: var(--white);
    border-radius: 22px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
    padding: 32px;
    z-index: 1;
}

.event-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-light);
    color: var(--primary-color);
    font-size: 1.1rem;
    cursor: pointer;
}

.event-modal-header {
    margin-bottom: 24px;
    padding-right: 44px;
}

.event-modal-kicker {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background-color: rgba(30, 64, 175, 0.1);
    color: var(--primary-color);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.event-modal-header h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 8px;
}

.event-modal-header p {
    color: #334155;
    font-weight: 600;
}

.event-modal-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
}

.event-modal-summary {
    display: grid;
    gap: 14px;
    align-content: start;
}

.event-summary-card {
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid #dbeafe;
    border-radius: var(--border-radius);
    padding: 18px;
}

.event-summary-card strong {
    color: var(--primary-color);
    font-size: 1.05rem;
}

.event-summary-card {
    color: var(--text-main);
}

.event-modal-content {
    display: grid;
    gap: 22px;
}

.event-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.event-detail-grid>div {
    background-color: var(--bg-light);
    border-radius: var(--border-radius-sm);
    padding: 16px;
}

.event-detail-grid p {
    color: var(--text-main);
    font-weight: 600;
}

.event-registration-form {
    display: grid;
    gap: 18px;
}

.event-registration-form label {
    color: #334155;
    font-weight: 700;
}

.event-registration-form input,
.event-registration-form select {
    color: var(--text-main);
    border: 2px solid #94a3b8;
    background-color: var(--white);
    min-height: 54px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 1rem;
    line-height: 1.4;
}

.event-attendance-display {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid #94a3b8;
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
    color: var(--primary-color);
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.event-attendance-select {
    display: none;
}

.event-attendance-select.is-visible {
    display: block;
}

.event-attendance-display.is-hidden {
    display: none;
}

.event-registration-form input::placeholder {
    color: #64748b;
    opacity: 1;
}

.event-registration-form input:focus,
.event-registration-form select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.16);
}

.event-registration-form .checkbox label {
    color: #475569;
    font-weight: 600;
}

.event-registration-form .checkbox input[type="checkbox"] {
    border: 2px solid #64748b;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 6px;
}

.event-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.event-followup-link {
    display: none;
}

.event-followup-link.visible {
    display: inline-flex;
}

.event-confirmation-message {
    min-height: 28px;
    padding: 12px 14px;
    border-radius: var(--border-radius-sm);
    background-color: #f8fafc;
    color: var(--text-main);
    font-weight: 600;
}

.event-confirmation-message.is-success {
    background-color: #ecfdf5;
    color: #166534;
}

.event-confirmation-message.is-warning {
    background-color: #fff7ed;
    color: #9a3412;
}

/* FAQ Accordion */
.faq-section {
    background-color: var(--white);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.faq-item summary {
    font-weight: 600;
    font-size: 1.1rem;
    padding: 20px;
    cursor: pointer;
    list-style: none;
    /* Hide default arrow */
    position: relative;
    color: var(--text-main);
    outline: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.faq-item[open] summary::after {
    content: '-';
    color: var(--primary-color);
}

.faq-content {
    padding: 0 20px 20px 20px;
    color: var(--text-muted);
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
    padding-top: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Chatbot */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
}

.scroll-top-btn {
    position: fixed;
    right: 24px;
    bottom: 110px;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 25px rgba(0, 67, 0, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    padding: 0;
}

.scroll-top-btn img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
    transition: var(--transition);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 18px 28px rgba(30, 64, 175, 0.3);
}

.scroll-top-btn:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 3px;
}

.chatbot-toggle-btn {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.chatbot-toggle-btn:hover {
    transform: scale(1.1);
    background-color: var(--primary-color-dark);
}

.chatbot-toggle-btn:hover .comi-mascot {
    animation: comiHello 0.8s ease-in-out infinite;
}

.comi-mascot {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: transform 0.3s ease;
    transform-origin: center bottom;
    display: block;
}

.comi-greeting {
    animation: comiGreeting 1.5s ease-in-out 2 !important;
}

/* Animación suave de saludo con movimiento horizontal y vertical */
@keyframes comiHello {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    25% {
        transform: translateY(-8px) rotate(-20deg) scale(1.05);
    }

    50% {
        transform: translateY(-12px) rotate(25deg) scale(1.08);
    }

    75% {
        transform: translateY(-8px) rotate(-15deg) scale(1.05);
    }
}

/* Animación de bienvenida cuando se abre el chat */
@keyframes comiGreeting {
    0% {
        transform: scale(1) rotate(0deg) translateX(0);
    }

    10% {
        transform: scale(1.1) rotate(-30deg) translateX(-5px);
    }

    30% {
        transform: scale(1.15) rotate(35deg) translateX(8px);
    }

    50% {
        transform: scale(1.1) rotate(-25deg) translateX(-5px);
    }

    70% {
        transform: scale(1.05) rotate(20deg) translateX(3px);
    }

    100% {
        transform: scale(1) rotate(0deg) translateX(0);
    }
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff3b30;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid white;
    z-index: 2;
}

.chatbot-window {
    display: none;
    /* Hidden by default */
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 320px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    flex-direction: column;
    z-index: 1001;
    border: 1px solid #e0e0e0;
}

.chatbot-window.active {
    display: flex;
    animation: chatPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes chatPop {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header button {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
}

.chatbot-messages {
    padding: 15px;
    min-height: 200px;
    max-height: 320px;
    overflow-y: auto;
    background-color: #f5f7f9;
    display: flex;
    flex-direction: column;
}

.message {
    padding: 10px 15px;
    border-radius: 15px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    max-width: 85%;
    line-height: 1.4;
}

.bot-message {
    background-color: #e9ecef;
    color: var(--text-main);
    border-bottom-left-radius: 5px;
}

.user-message {
    background-color: var(--secondary-color);
    color: var(--white);
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.chat-option-btn {
    background-color: var(--white);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.chat-option-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.chatbot-footer {
    padding: 12px 15px 15px;
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.chatbot-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.chatbot-form input {
    min-width: 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-main);
    background-color: var(--white);
}

.chatbot-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.chatbot-form button {
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.chatbot-form button:hover {
    background: var(--primary-color-dark);
}

.chatbot-helper {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .scroll-top-btn {
        right: 16px;
        bottom: 96px;
        width: 48px;
        height: 48px;
    }
}

.chatbot-link {
    color: var(--primary-color);
    font-weight: 700;
}

.chatbot-link:hover {
    color: var(--primary-color-dark);
}

.chatbot-list {
    margin: 8px 0 0 18px;
}

.chatbot-list li {
    margin-bottom: 4px;
}

/* Footer - REMOVED DUPLICATE - See footer styles at line ~462 */

.footer-links h4,
.footer-contact h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    position: relative;
    transition: var(--transition);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-links a:hover::before {
    opacity: 1;
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    font-weight: 500;
}

.footer-contact p strong {
    display: block;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 4px;
}

.footer-contact a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

.footer-bottom {
    background-color: #f8fafc;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
}

.footer-bottom p {
    color: var(--text-muted);
    margin: 8px 0;
    font-weight: 500;
}

.footer-tagline {
    font-weight: 600;
    color: var(--secondary-color) !important;
    font-style: italic;
}

/* Accesibility Widget */
.accessibility-widget {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color-dark);
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 0 8px 8px 0;
    z-index: 2000;
    box-shadow: var(--shadow-md);
}

.accessibility-widget button {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    margin: 5px 0;
    cursor: pointer;
    transition: var(--transition);
}

.accessibility-widget button:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

body.high-contrast {
    --bg-color: #000000;
    --bg-light: #0f0f0f;
    --text-main: #ffff00;
    --text-muted: #f5f5a5;
    --primary-color: #ffff00;
    --primary-color-dark: #c2b800;
    --secondary-color: #00ffff;
    --accent-color: #00ffff;
    --white: #121212;
}

body.high-contrast .main-header,
body.high-contrast .news-ticker,
body.high-contrast .main-footer,
body.high-contrast .footer-bottom,
body.high-contrast .chatbot-header,
body.high-contrast .stats-section {
    border-color: #ffff00;
}

body.high-contrast .service-card,
body.high-contrast .news-card,
body.high-contrast .faq-item,
body.high-contrast .alert-stage,
body.high-contrast .alert-support-panel,
body.high-contrast .schedule-card,
body.high-contrast .kid-card,
body.high-contrast .kids-featured-card,
body.high-contrast .media-card,
body.high-contrast .story-card,
body.high-contrast .map-visual-card,
body.high-contrast .aguascalientes-map,
body.high-contrast .map-panel,
body.high-contrast .directory-card,
body.high-contrast .library-card,
body.high-contrast .newsletter-shell,
body.high-contrast .chatbot-window,
body.high-contrast .support-card {
    border: 1px solid #ffff00;
}

body.high-contrast .footer-brand p,
body.high-contrast .footer-links a,
body.high-contrast .footer-contact p,
body.high-contrast .footer-bottom p,
body.high-contrast .view-all,
body.high-contrast .card-link {
    color: #ffff00;
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 20px;
    padding: 5px 15px;
}

.header-search input {
    border: none;
    background: transparent;
    outline: none;
    padding: 5px;
    font-size: 0.9rem;
    color: var(--text-main);
    width: 150px;
}

.header-search button {
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 50%;
}

.search-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.search-icon-img {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
}

.btn-queja {
    background-color: #e74c3c;
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    border: 2px solid #e74c3c;
}

.btn-queja:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    transform: scale(1.05);
    color: var(--white);
}

.lang-switcher select {
    background-color: var(--white);
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    outline: none;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #fcfcfc;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-btn img {
    width: 35px;
    height: 35px;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Slider */
.slider-container {
    padding: 0;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

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

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    text-align: center;
    width: 100%;
    max-width: 800px;
    z-index: 2;
}

.slide-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #f8f9fa;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.slide-content .hero-buttons {
    justify-content: center;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 15px;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--primary-color);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    color: var(--primary-color);
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ffffff 0%, #eef4ff 100%);
    border-radius: 16px;
    border: 1px solid rgba(30, 64, 175, 0.12);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(127, 180, 240, 0.2), rgba(255, 255, 255, 0));
    opacity: 0.9;
}

.social-links a svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}

.social-links a:hover {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: transparent;
    box-shadow: 0 14px 24px rgba(30, 64, 175, 0.22);
    transform: translateY(-4px) scale(1.03);
}

/* Search Results Dropdown */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 5000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 60px 20px;
    color: var(--white);
}

.search-overlay.active {
    display: block;
    opacity: 1;
}

.search-overlay-container {
    max-width: 900px;
    margin: 0 auto;
}

.search-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.search-overlay-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
}

.search-overlay-input-wrap {
    position: relative;
    margin-bottom: 40px;
}

.search-overlay-input {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 2px solid var(--secondary-color);
    color: var(--white);
    font-size: 2.5rem;
    padding: 10px 0;
    outline: none;
    font-weight: 300;
}

.search-overlay-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-overlay-results {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 20px;
}

.search-overlay-results::-webkit-scrollbar {
    width: 6px;
}

.search-overlay-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.search-category {
    margin-bottom: 30px;
}

.search-category h4 {
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-item {
    display: block;
    padding: 15px;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.12);
    /* Much brighter non-hover background */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Clearer border */
    margin-bottom: 12px;
    transition: var(--transition);
    text-decoration: none;
    color: var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(8px);
}

.result-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 6px;
    color: #ffffff;
}

.result-description {
    font-size: 0.95rem;
    opacity: 0.95;
    /* Removed the 0.7 blur/fade for maximum crispness */
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.search-result-item mark {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0 2px;
    border-radius: 2px;
}

.search-no-results {
    text-align: center;
    padding: 40px;
    opacity: 0.6;
}

.search-no-results p {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

/* (Third duplicate search CSS using light theme removed) */

.search-no-results small {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Breadcrumbs */
.breadcrumbs {
    background-color: var(--bg-light);
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumbs nav ol {
    display: flex;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumbs li::after {
    content: '/';
    color: var(--text-muted);
    margin-left: 8px;
}

.breadcrumbs li:last-child::after {
    content: '';
    margin-left: 0;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.breadcrumbs a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.breadcrumbs span.current {
    color: var(--text-muted);
    font-weight: 500;
}

/* Contact Form Styles */
.breadcrumbs {
    background-color: var(--bg-light);
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumbs nav ol {
    display: flex;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--primary-color);
    transition: var(--transition);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--text-muted);
}

.contact-section h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 50px;
    margin-top: 50px;
}

.contact-form-wrapper {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.contact-form label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--white);
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.contact-form input.error,
.contact-form textarea.error,
.contact-form select.error {
    border-color: #dc3545;
}

.contact-form input.error:focus,
.contact-form textarea.error:focus,
.contact-form select.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-error {
    color: #dc3545;
    font-size: 0.85rem;
    font-weight: 500;
}

.form-group.checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin: 15px 0;
}

.form-group.checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
}

.form-group.checkbox label {
    margin: 0;
    font-weight: 400;
    font-size: 0.95rem;
    cursor: pointer;
}

.form-group.checkbox a {
    color: var(--primary-color);
    text-decoration: underline;
}

.char-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    align-self: flex-end;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.05rem;
    min-width: 200px;
}

.form-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.success-icon {
    width: 60px;
    height: 60px;
    background-color: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}

.success-message h3 {
    color: #155724;
    margin: 0;
    font-size: 1.5rem;
}

.success-message p {
    color: #155724;
    margin: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* Contact Info Sidebar */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background-color: var(--bg-light);
    padding: 25px;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--secondary-color);
}

.info-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.info-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

.info-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.info-card a:hover {
    text-decoration: underline;
}

/* Map Section */
.map-section {
    margin-top: 50px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.map-section iframe {
    display: block;
}

/* Responsive Contact Form */
@media (max-width: 900px) {

    .portal-hero-grid,
    .hero-highlights,
    .quick-access-grid {
        grid-template-columns: 1fr;
    }

    .portal-hero-main {
        padding: 32px;
    }

    .portal-hero-main h1 {
        max-width: none;
    }

    .portal-heading {
        flex-direction: column;
        align-items: start;
    }

    .news .section-heading {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .alerts-layout,
    .admin-login-layout,
    .admin-dashboard-shell,
    .admin-dashboard-topbar,
    .admin-dashboard,
    .admin-columns,
    .kids-layout,
    .map-layout,
    .newsletter-shell,
    .event-modal-grid {
        grid-template-columns: 1fr;
    }

    .alert-slide {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .event-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-topbar {
        align-items: start;
    }

}

@media (max-width: 640px) {

    .map-visual-card,
    .map-panel {
        padding: 20px;
    }

    /* Extra small screens header optimization */
    .main-header .container {
        padding: 10px 15px;
    }

    .logo-img {
        height: 35px;
        padding: 2px 3px;
    }

    .main-nav ul {
        gap: 12px;
    }

    .main-nav a {
        font-size: 0.8rem;
        padding: 8px 4px;
        letter-spacing: 0.01em;
    }

    .dropbtn {
        font-size: 0.8rem;
    }

    .dropdown-content,
    .sub-dropdown-content {
        min-width: 180px;
        font-size: 0.85rem;
    }

    .dropdown-content a,
    .sub-dropdown-content a {
        padding: 10px 15px;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        padding: 12px 20px;
        height: auto;
        min-height: 80px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .logo-copy small {
        max-width: 170px;
        display: none;
        /* Hide subtitle on small screens to save space */
    }

    .header-actions {
        margin-left: auto;
    }

    .mobile-menu-toggle {
        display: flex;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        z-index: 1002;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100% !important;
        max-width: 100vw;
        background-color: var(--white);
        box-shadow: var(--shadow-md);
        transform: translateY(-150%);
        transition: var(--transition);
        z-index: 1001;
        /* Explicitly above all content */
        overflow-y: auto;
        max-height: calc(100vh - 80px);
        opacity: 0;
        visibility: hidden;
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 40px 20px;
        gap: 20px;
        text-align: center;
        width: 100%;
    }

    .main-nav a {
        color: var(--text-main) !important;
        font-size: 1.1rem;
        display: block;
        padding: 10px;
    }

    .main-nav .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: #f1f5f9;
        display: block;
        width: 100%;
        margin-top: 10px;
    }

    .main-nav .dropdown-content a {
        font-size: 0.95rem;
        padding: 8px 15px;
    }

    .accessibility-widget {
        top: auto;
        bottom: 100px;
        left: 10px;
        flex-direction: row;
        border-radius: 8px;
        padding: 5px;
        transform: none;
        box-shadow: var(--shadow-lg);
    }

    .accessibility-widget button {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

    .floating-social {
        display: none;
        /* Already in footer */
    }

    .portal-hero-main,
    .portal-panel-card,
    .quick-access-card {
        padding: 22px;
    }

    .portal-hero-main h1 {
        font-size: 2.25rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-access-section {
        padding-top: 12px;
    }

    /* Search responsive */
    #search-results {
        min-width: 90vw;
        left: 0;
        right: auto;
    }

    /* Contact form responsive */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-form-wrapper {
        padding: 25px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-section h1 {
        font-size: 2rem;
    }

    .contact-info {
        position: sticky;
        top: 100px;
    }

    /* Footer responsive */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }

    .alert-stage {
        grid-template-columns: 1fr;
    }


    @media (max-width: 560px) {
        .logo {
            width: 100%;
        }

        .header-actions {
            width: calc(100% - 56px);
            justify-content: flex-end;
        }

        .header-search {
            min-width: 0;
            flex: 1;
        }

        .header-search input {
            width: 100%;
        }

        .portal-hero-main h1 {
            font-size: 2rem;
        }
    }

    .alert-nav {
        width: 100%;
        border-radius: var(--border-radius-sm);
    }

    .news-grid,
    .schedule-grid,
    .kids-cards,
    .media-grid,
    .story-grid,
    .directory-grid,
    .library-grid {
        grid-template-columns: 1fr;
    }

    .schedule-meta {
        flex-direction: column;
    }

    .newsletter-shell {
        padding: 24px;
    }

    .admin-login-panel,
    .admin-privacy-card {
        padding: 22px;
    }

    .schedule-card-footer,
    .event-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .event-modal-dialog {
        padding: 22px;
    }

    .event-modal-header h3 {
        font-size: 1.6rem;
    }
}

/* Kids Microsite Enhanced Styles */
.kids-zone {
    background: linear-gradient(180deg, #f8fafc 0%, #f0f7f4 100%);
    border-top: 1px solid rgba(45, 122, 77, 0.1);
}

.kids-main-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.kids-microsite-board {
    max-width: 1000px;
    margin: 40px auto 0;
    padding: 30px;
    background: var(--white);
    border-radius: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    border: 1px solid #e2e8f0;
}

.kids-intro-character {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding-left: 20px;
}

.character-circle {
    width: 70px;
    height: 70px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: var(--shadow-md);
    animation: wave 2s infinite ease-in-out;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(15deg);
    }
}

.character-bubble {
    background: #f1f8f5;
    padding: 15px 25px;
    border-radius: 20px 20px 20px 0;
    position: relative;
    border: 1px solid rgba(45, 122, 77, 0.1);
}

.kids-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.kids-action-card {
    padding: 30px;
    border-radius: 30px;
    background: var(--white);
    border: 2px solid #f1f5f9;
    transition: var(--transition);
    text-align: center;
    position: relative;
}

.kids-action-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
}

.kids-action-card.edu {
    border-bottom: 6px solid #4a90e2;
}

.kids-action-card.home {
    border-bottom: 6px solid #f5a623;
}

.kids-action-card.safety {
    border-bottom: 6px solid #e02020;
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.kids-action-card h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.4rem;
}

.kids-action-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.kids-btn-help {
    background: #f1f5f9;
    color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
}

.kids-action-card:hover .kids-btn-help {
    background: var(--secondary-color);
    color: var(--white);
}

.kids-final-cta {
    background: var(--primary-color);
    padding: 40px;
    border-radius: 30px;
    color: var(--white);
    text-align: center;
}

.kids-final-cta h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.kids-final-cta p {
    opacity: 0.9;
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-kids-green {
    background: var(--secondary-color);
    color: var(--white);
    font-size: 1.1rem;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    font-weight: 800;
}

.btn-kids-green:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

.btn-kids-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 15px 40px;
    text-decoration: none;
    display: inline-block;
}

.btn-kids-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESOLUCIONES PAGES — Shared styles (recomendaciones, expediente, cautelares…)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hero */
.res-hero {
    position: relative;
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 0 50px;
    overflow: hidden;
}

.res-hero-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(ellipse at 80% 50%, rgba(56, 180, 74, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 10% 80%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.res-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.res-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.res-breadcrumb a:hover {
    color: var(--white);
}

.res-breadcrumb strong {
    color: var(--white);
}

.res-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.res-hero-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    display: block;
}

.res-hero-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.res-hero-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 60ch;
    line-height: 1.6;
    margin-bottom: 24px;
}

.res-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.res-chip {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Toolbar de búsqueda */
.res-toolbar-section {
    background: var(--bg-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    padding: 24px 0;
}

.res-toolbar {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.res-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 260px;
    max-width: 500px;
    background: var(--white);
    border: 1.5px solid rgba(0, 72, 81, 0.2);
    border-radius: 50px;
    padding: 0 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.res-search-wrap:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 72, 81, 0.12);
}

.res-search-icon {
    font-size: 1rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.res-search-input {
    border: none;
    outline: none;
    background: transparent;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    flex: 1;
    font-family: var(--font-family);
}

.res-clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 4px 6px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.res-clear-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-main);
}

.res-count-label {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

.res-admin-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(0, 72, 81, 0.05);
    border: 1px solid rgba(0, 72, 81, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-top: 14px;
    line-height: 1.5;
}

.res-admin-note code {
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

/* Sección de contenido */
.res-content-section {
    padding: 40px 0 60px;
}

/* Loader */
.res-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 0;
    color: var(--text-muted);
}

.res-loader[hidden] {
    display: none;
}

.res-loader-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(0, 72, 81, 0.15);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: resSpinner 0.8s linear infinite;
}

@keyframes resSpinner {
    to {
        transform: rotate(360deg);
    }
}

/* Acordeón por año */
.res-year-block {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.res-year-block:hover,
.res-year-block.is-open {
    box-shadow: var(--shadow-md);
}

.res-year-header {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    font-family: var(--font-family);
    transition: background 0.2s;
}

.res-year-header:hover {
    background: var(--bg-light);
}

.res-year-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.res-year-icon {
    font-size: 1.5rem;
}

.res-year-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color-dark);
}

.res-year-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.res-year-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.res-year-chevron {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.res-year-block.is-open .res-year-chevron {
    transform: rotate(180deg);
}

.res-year-body {
    display: none;
    padding: 0 24px 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Ocultar el body cuando no está abierto (se controla con JS via is-open en el bloque padre) */
.res-year-block:not(.is-open) .res-year-body {
    display: none;
}

/* Tarjetas de documento */
.res-doc-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: start;
    background: var(--bg-light);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: var(--border-radius-sm);
    padding: 20px 22px;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.res-doc-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 72, 81, 0.2);
    transform: translateY(-2px);
}

.res-doc-card--consolidated {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 72, 81, 0.04) 0%, var(--bg-light) 100%);
}

.res-doc-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: var(--border-radius-sm);
    background: rgba(0, 72, 81, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.res-doc-icon {
    font-size: 1.6rem;
}

.res-doc-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-color);
}

.res-doc-body {
    min-width: 0;
}

.res-doc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.res-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-vigente {
    background: rgba(56, 180, 74, 0.12);
    color: #1a7a29;
    border: 1px solid rgba(56, 180, 74, 0.3);
}

.badge-historica {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.res-badge--consolidated {
    background: rgba(0, 72, 81, 0.12);
    color: var(--primary-color-dark);
    border: 1px solid rgba(0, 72, 81, 0.25);
}

.res-doc-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 6px;
}

.res-doc-subject {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 10px;
}

.res-doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.res-meta-chip {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    padding: 3px 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.res-id-chip {
    background: rgba(0, 72, 81, 0.07);
    color: var(--primary-color-dark);
}

.res-doc-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.res-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    cursor: pointer;
    border: none;
    font-family: var(--font-family);
}

.res-btn--primary {
    background: var(--primary-color);
    color: var(--white);
}

.res-btn--primary:hover {
    background: var(--primary-color-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 72, 81, 0.3);
}

.res-btn--secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 1.5px solid rgba(0, 72, 81, 0.25);
}

.res-btn--secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

/* Estado vacío */
.res-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.res-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.res-empty h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

/* Notice */
.res-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 24px;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    line-height: 1.6;
}

.res-notice--info {
    background: rgba(0, 72, 81, 0.06);
    border: 1px solid rgba(0, 72, 81, 0.15);
    color: var(--text-main);
}

.res-notice--info>span:first-child {
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* CTA section */
.res-cta-section {
    background: var(--bg-light);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.res-cta-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 36px 40px;
    display: flex;
    align-items: center;
    gap: 28px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.res-cta-icon {
    font-size: 2.8rem;
    flex-shrink: 0;
}

.res-cta-body {
    flex: 1;
    min-width: 240px;
}

.res-cta-body h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.res-cta-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.res-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Highlight en búsqueda */
mark {
    background: rgba(56, 180, 74, 0.25);
    color: inherit;
    border-radius: 2px;
    padding: 0 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AVISO DE PRIVACIDAD PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.privacy-wrap {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    align-items: start;
    padding: 60px 0;
}

.privacy-toc {
    position: sticky;
    top: 90px;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.privacy-toc h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 16px;
}

.privacy-toc ol {
    list-style: none;
    counter-reset: toc;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.privacy-toc ol li {
    counter-increment: toc;
}

.privacy-toc ol li a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    line-height: 1.35;
}

.privacy-toc ol li a::before {
    content: counter(toc) ".";
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

.privacy-toc ol li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.privacy-content {
    min-width: 0;
}

.privacy-section {
    margin-bottom: 48px;
    scroll-margin-top: 90px;
}

.privacy-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 72, 81, 0.12);
}

.privacy-section p {
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.75;
    margin-bottom: 14px;
}

.privacy-section ul,
.privacy-section ol {
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.75;
    padding-left: 24px;
    margin-bottom: 14px;
}

.privacy-section li {
    margin-bottom: 6px;
}

.privacy-section strong {
    color: var(--text-main);
}

.privacy-info-box {
    background: rgba(0, 72, 81, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    padding: 20px 24px;
    margin-top: 10px;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.privacy-info-box strong {
    display: block;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-color-dark);
    margin-bottom: 8px;
}

.privacy-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 180, 74, 0.1);
    border: 1px solid rgba(56, 180, 74, 0.25);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a7a29;
    margin-bottom: 32px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DIRECTORIO INSTITUCIONAL PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.dir-hero {
    background: linear-gradient(135deg, var(--primary-color-dark) 0%, var(--primary-color) 65%, #005f6d 100%);
    color: var(--white);
    padding: 56px 0 48px;
    position: relative;
    overflow: hidden;
}

.dir-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(ellipse at 90% 30%, rgba(56, 180, 74, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

.dir-hero-content {
    position: relative;
    z-index: 1;
}

.dir-hero-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.dir-hero-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.82);
    max-width: 58ch;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Filtros */
.dir-filter-bar {
    background: var(--bg-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 20px 0;
}

.dir-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dir-filter-btn {
    background: var(--white);
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    color: var(--text-main);
    transition: var(--transition);
}

.dir-filter-btn:hover,
.dir-filter-btn.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Grid de cards */
.dir-grid-section {
    padding: 50px 0 80px;
}

.dir-area-block {
    margin-bottom: 52px;
}

.dir-area-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dir-area-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 72, 81, 0.15);
}

.dir-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.dir-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dir-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: rgba(0, 72, 81, 0.2);
}

.dir-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dir-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 72, 81, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.dir-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.dir-card-role {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.dir-card-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
}

.dir-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dir-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.dir-info-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.dir-info-row a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.dir-info-row a:hover {
    color: var(--primary-color-dark);
}

.dir-demo-badge {
    display: inline-block;
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: #92400e;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 6px;
}

/* Responsive para resoluciones */
@media (max-width: 768px) {
    .res-doc-card {
        grid-template-columns: 1fr;
    }

    .res-doc-actions {
        flex-direction: row;
    }

    .res-cta-card {
        flex-direction: column;
        text-align: center;
    }

    .res-cta-actions {
        justify-content: center;
    }

    .privacy-wrap {
        grid-template-columns: 1fr;
    }

    .privacy-toc {
        position: static;
    }

    .dir-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Preloader styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    width: 280px;
    height: auto;
}

.anim-pulse {
    animation: preloader-pulse 1.5s infinite ease-in-out;
}

@keyframes preloader-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* Slider de Servicios */
.services-marquee-wrapper {
    overflow: hidden;
    width: 100%;
}

.services-grid.is-slider {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    gap: 30px;
    animation: slider-marquee 30s linear infinite;
    backface-visibility: hidden;
    will-change: transform;
}

.services-grid.is-slider:hover {
    animation-play-state: paused;
}

.services-grid.is-slider .service-card {
    flex: 0 0 350px;
    margin-bottom: 0;
}

@keyframes slider-marquee {
    to {
        transform: translateX(calc(-50% - 15px));
    }
}

@media (max-width: 768px) {
    .services-grid.is-slider .service-card {
        flex: 0 0 280px;
    }
}

/* =============================================
   Language Switcher — Dropdown (Rediseño)
   ============================================= */
.lang-switcher.dropdown-custom {
    position: relative;
    display: inline-block;
}

.lang-btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    height: 34px;
    padding: 0 10px;
    gap: 6px;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.lang-btn-main:hover {
    background: rgba(255, 255, 255, 0.15);
}

#current-lang-flag {
    line-height: 1;
}

.caret {
    font-size: 0.7rem;
    opacity: 0.8;
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background: #004d40;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1000;
    flex-direction: column;
    min-width: 140px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-switcher.dropdown-custom:hover .lang-dropdown-content,
.lang-switcher.dropdown-custom:focus-within .lang-dropdown-content {
    display: flex;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    width: 100%;
    height: 38px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    transition: background 0.2s ease;
    color: rgba(255, 255, 255, 0.9);
    padding: 0 16px;
    gap: 12px;
    justify-content: flex-start;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

@media (max-width: 768px) {
    .lang-switcher.dropdown-custom {
        margin-right: 10px;
    }
}


/* =============================================
   Google Translate Custom
   ============================================= */
.google-translate-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: 38px;
    /* Forzar misma altura que el buscador */
}

/* El botón interior de Google */
.goog-te-gadget-simple {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

/* Ocultar el icono de Google ("G" image) interno y el separador lateral "|" */
.goog-te-gadget-simple img {
    display: none !important;
}

.goog-te-gadget-simple span[style*="border-left"] {
    display: none !important;
}

/* Contenedor del texto ("Seleccionar idioma ▼") */
.goog-te-gadget-simple .goog-te-menu-value {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    gap: 6px !important;
    color: rgb(0, 0, 0) !important;
}

.goog-te-gadget-simple .goog-te-menu-value span,
.goog-te-gadget-simple * {
    color: rgb(0, 0, 0) !important;
    font-family: 'Inter', sans-serif !important;
}

.goog-te-gadget-simple .goog-te-menu-value span {
    font-size: 0.9rem !important;
    line-height: normal !important;
}

/* Boton para regresar a español original */
.reset-lang-btn {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    padding: 6px 12px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.reset-lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

body {
    top: 0 !important;
    /* Prevent Google from shifting body down */
}

/* Ocultar barra original en top */
.goog-te-banner-frame {
    display: none !important;
}

/* Ocultar globos de tooltip y bugs visuales de Google Translate en la página inferior */
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

/* Enlace a Portal Administrador */
.admin-link {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: underline !important;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    margin-left: 5px;
}

.admin-link:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Directorio Institucional Styles */
.directory-section {
    margin-bottom: 80px;
}

.directory-header {
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 10px;
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.staff-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 20px;
    align-items: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.staff-img {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    background: #f0f4f8;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.staff-card:hover .staff-img {
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

.staff-info {
    flex: 1;
}

.staff-name {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 4px;
}

.staff-role {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: block;
}

.staff-ext {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.staff-ext strong {
    color: var(--primary-color);
}

.staff-card.leader {
    grid-column: 1 / -1;
    padding: 30px;
}

.team-separator {
    grid-column: 1 / -1;
    text-align: center;
    margin: 30px 0 10px;
    padding-top: 20px;
    border-top: 2px solid rgba(0, 67, 0, 0.08);
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.staff-card.leader .staff-img {
    width: 140px;
    height: 140px;
    border-radius: 16px;
}

.staff-card.leader .staff-name {
    font-size: 1.5rem;
}

@media (max-width: 640px) {
    .staff-card {
        flex-direction: column;
        text-align: center;
    }

    .staff-card.leader {
        flex-direction: column;
    }
}

/* Directory Navigation Buttons */
.directory-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 60px;
    padding: 25px;
    background: #f1f5f9;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dir-nav-btn {
    padding: 12px 22px;
    background: var(--white);
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dir-nav-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.dir-nav-btn:active {
    transform: translateY(0);
}

/* Orientación Jurídica - Situations */
.btn-situ {
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.btn-situ:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
    border-color: var(--primary-color) !important;
}

.btn-situ.active {
    background-color: #f0f7f0 !important;
    border-color: var(--primary-color) !important;
    box-shadow: inset 0 0 0 2px var(--primary-color) !important;
}

.situ-detail-panel {
    animation: slideUpFade 0.5s ease-out forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.situ-detail-panel ul li {
    margin-bottom: 8px;
    position: relative;
}

.situ-detail-panel ul li::marker {
    color: var(--primary-color);
    font-weight: bold;
}