:root {
    --primary: #0A2540;      
    --secondary: #0066CC;    
    --accent: #00D2D3;       
    --bg-body: #F4F7FA;      
    --white: #FFFFFF;
    --text-main: #333333;
    --text-muted: #666666;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 40px rgba(0,85,204,0.2);
    --radius: 16px;          
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
}


header {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    z-index: 1000;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 5%;
    box-shadow: var(--shadow-sm);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 900;
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: -0.5px;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

header.scrolled .logo-img { height: 35px; }
.logo span { color: var(--accent); }
header.scrolled .logo { color: var(--primary); }


.menu-toggle {
    display: none; cursor: pointer; font-size: 2rem;
    color: var(--white); transition: var(--transition);
    z-index: 1002;
}
header.scrolled .menu-toggle { color: var(--primary); }
header .menu-toggle.is-open { color: var(--primary); }

nav ul { display: flex; gap: 30px; list-style: none; }
nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding-bottom: 8px;
    transition: var(--transition);
}

header.scrolled nav a { color: var(--primary); }
nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 0; height: 3px;
    background: var(--accent); border-radius: 2px;
    transition: var(--transition);
}
nav a:hover::after, nav a.active::after { width: 100%; }
nav a:hover, nav a.active { color: var(--accent); }
header.scrolled nav a:hover, header.scrolled nav a.active { color: var(--secondary); }


.hero {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background: url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(10,37,64,0.75) 0%, rgba(0,210,211,0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 20px;
    animation: fadeInDown 1s ease-out;
}

.hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 4vw, 3.8rem);
    margin-bottom: 25px;
    line-height: 1.2;
    font-weight: 800;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    font-weight: 400;
    color: #F0F4F8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.btn-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: var(--primary);
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(0, 210, 211, 0.4);
}

.btn-main:hover {
    background: var(--white);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.3);
}

@keyframes softPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 210, 211, 0.7), 0 10px 25px rgba(0, 210, 211, 0.4); }
    50% { transform: scale(1.03); box-shadow: 0 0 0 15px rgba(0, 210, 211, 0), 0 15px 30px rgba(0, 210, 211, 0.5); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 210, 211, 0), 0 10px 25px rgba(0, 210, 211, 0.4); }
}
.btn-pulse {
    animation: softPulse 2.5s infinite;
}
.btn-pulse:hover {
    animation: none;
}

.custom-shape-divider-bottom {
    position: absolute; bottom: -1px; left: 0; width: 100%;
    overflow: hidden; line-height: 0;
}
.custom-shape-divider-bottom svg { display: block; width: calc(130% + 1.3px); height: 60px; }
.custom-shape-divider-bottom .shape-fill { fill: var(--primary); }


.fixed-corner-image {
    position: fixed; 
    bottom: 0;       
    left: 20px; 
    z-index: 990;    
    pointer-events: none; 
}

.fixed-corner-image img {
    width: 200px; 
    max-width: 15vw; 
    height: auto;
    display: block;
    transition: all 0.3s ease; 
}

@media (max-width: 992px) {
    .fixed-corner-image img {
        width: 140px; 
        max-width: 20vw;
    }
}

@media (max-width: 768px) {
    .fixed-corner-image {
        display: none;
    }
}

.container { max-width: 1280px; margin: 0 auto; padding: 80px 20px; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 {
    font-family: 'Montserrat', sans-serif; font-size: 2.5rem; font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    position: relative; display: inline-block; margin-bottom: 15px;
}
.section-header h2::after {
    content: ''; position: absolute; bottom: -10px; left: 50%;
    transform: translateX(-50%); width: 80px; height: 5px;
    background: var(--accent); border-radius: 5px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 35px; }

.card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: var(--transition);
    position: relative; display: flex; flex-direction: column;
    border: 1px solid rgba(0,0,0,0.02); text-decoration: none;
}
.card:hover { transform: translateY(-12px); box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 210, 211, 0.4); border-color: rgba(0, 210, 211, 0.5); }
.card-img-wrapper { position: relative; height: 220px; overflow: hidden; }
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); }
.card:hover .card-img-wrapper img { transform: scale(1.15); }
.card-img-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(10,37,64,0.9) 0%, transparent 100%);
    display: flex; align-items: flex-end; padding: 25px;
}
.card-body { padding: 30px; display: flex; flex-direction: column; flex-grow: 1; }
.card-title { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 12px; font-family: 'Montserrat', sans-serif; transition: var(--transition); }
.card:hover .card-title { color: var(--accent); }
.card-text { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 25px; flex-grow: 1; }
.btn-card {
    display: inline-flex; justify-content: center; align-items: center; gap: 8px;
    padding: 12px 20px; background: rgba(0, 102, 204, 0.05); color: var(--secondary);
    text-decoration: none; border-radius: 8px; font-weight: 600; transition: var(--transition);
}
.btn-card:hover { background: var(--secondary); color: var(--white); box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3); }

.cta-sis {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius); padding: 60px 40px; text-align: center;
    color: var(--white); position: relative; overflow: hidden;
    box-shadow: var(--shadow-lg); margin: 0 auto 80px auto; max-width: 1200px;
}
.cta-sis h2 { font-family: 'Montserrat', sans-serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 900; margin-bottom: 15px; }
.cta-sis h2 span { color: var(--accent); }
.cta-sis p { font-size: 1.1rem; margin-bottom: 30px; font-weight: 300; opacity: 0.9; }

.back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    background: var(--accent); color: var(--primary);
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transition: var(--transition); z-index: 999;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-5px); background: var(--primary); color: var(--white); }

.side-login {
    position: fixed; left: 0; top: 50%; transform: translateY(-50%);
    background: rgba(10, 37, 64, 0.8); color: var(--white); padding: 12px;
    border-radius: 0 8px 8px 0; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); z-index: 1000; opacity: 0.7;
    backdrop-filter: blur(5px);
}
.side-login:hover { opacity: 1; background: var(--primary); box-shadow: 2px 0 15px rgba(0,0,0,0.3); transform: translateY(-50%) scale(1.05); }

.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

.reveal-left { opacity: 0; transform: translateX(-60px); transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.reveal-left.active { opacity: 1; transform: translateX(0); }

.reveal-right { opacity: 0; transform: translateX(60px); transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.reveal-right.active { opacity: 1; transform: translateX(0); }

footer { background: var(--primary); color: rgba(255,255,255,0.7); padding: 80px 20px 20px; text-align: center; position: relative; }
.footer-logo { font-size: 1.5rem; color: var(--white); font-family: 'Montserrat', sans-serif; font-weight: 900; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.footer-logo img { height: 35px; width: auto; }
.footer-logo span { color: var(--accent); }
.social-links { margin-top: 25px; display: flex; justify-content: center; gap: 20px; }
.social-links a {
    color: var(--white); background: rgba(255,255,255,0.05); width: 45px; height: 45px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    text-decoration: none; transition: var(--transition); border: 1px solid rgba(255,255,255,0.1);
}
.social-links a:hover { background: var(--accent); color: var(--primary); transform: translateY(-5px); border-color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 25px; margin-top: 30px; font-size: 0.9rem; }

@media (max-width: 768px) {
    header { padding: 15px 20px; background: rgba(10,37,64,0.98); }
    header.scrolled { background: rgba(255,255,255,0.98); }
    .menu-toggle { display: block; }
    nav {
        position: fixed; 
        top: 0; 
        right: -100%; /* Hidden by default */
        width: 280px; 
        height: 100vh;
        background: var(--white); /* Default for light mode */
        box-shadow: -5px 0 20px rgba(0,0,0,0.15); /* Subtle shadow */
        padding: 90px 30px 40px; 
        transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 1001;
    }
    nav.show { right: 0; }
    nav ul { 
        flex-direction: column; 
        gap: 20px; 
    }
    /* Ensure links are always visible when mobile menu is open */
    nav.show a { 
        color: var(--primary); /* Dark text on light background */
        font-size: 1.1rem; 
        display: inline-block; 
        width: 100%; 
    }
    nav.show a::after { /* Ensure underline works with new color */
        background: var(--secondary); 
    }
    nav.show a:hover, nav.show a.active { 
        color: var(--secondary); /* Hover/active color */
    }

    /* Dark Mode for Mobile Menu */
    body.dark-mode nav {
        background: var(--bg-body); /* Use dark background for the menu */
        box-shadow: -5px 0 20px rgba(0,0,0,0.5); /* Darker shadow */
    }
    body.dark-mode nav.show a {
        color: var(--text-main); /* Light text on dark background */
    }
    body.dark-mode nav.show a::after {
        background: var(--accent); /* Accent color for underline in dark mode */
    }
    body.dark-mode nav.show a:hover, body.dark-mode nav.show a.active {
        color: var(--accent); /* Accent color for hover/active in dark mode */
    }
    .cta-sis { padding: 40px 20px; margin: 40px 20px; }

    
    .hero {
        height: auto;
        min-height: 85vh;
        padding-top: 110px; 
        padding-bottom: 80px; 
    }
    .hero-content h1 { font-size: 2rem; margin-bottom: 15px; }
    .logo { max-width: 80%; }
    .logo div { font-size: 0.8rem; line-height: 1.2; }
}


.stats-section { background: linear-gradient(to bottom, var(--primary) 0%, var(--secondary) 100%); color: var(--white); padding: 60px 20px; }
.stats-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.stat-item { padding: 20px; }
.stat-icon { font-size: 3.5rem; color: var(--accent); margin-bottom: 15px; }
.stat-number { font-size: 3.5rem; font-weight: 800; font-family: 'Montserrat', sans-serif; margin-bottom: 5px; text-shadow: 0 4px 10px rgba(0,0,0,0.2); display: inline-block; }
.stat-number.bounce { animation: bounceStat 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }

@keyframes bounceStat {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: var(--accent); }
    100% { transform: scale(1); color: var(--white); }
}

.stat-label { font-size: 1rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.9; font-weight: 500; }


.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--white); margin-bottom: 15px; border-radius: 8px; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-question { padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; color: var(--primary); transition: var(--transition); }
.faq-question:hover { background: rgba(0, 102, 204, 0.05); }
.faq-answer { padding: 0 25px; max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; color: var(--text-muted); line-height: 1.6; }
.faq-item.active .faq-answer { padding: 0 25px 20px; max-height: 500px; }
.faq-item.active .faq-question { color: var(--secondary); }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-icon { transition: transform 0.3s ease; }


.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: var(--white); border-radius: var(--radius); padding: 50px; box-shadow: var(--shadow-lg); }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.form-group label { font-weight: 600; color: var(--primary); font-size: 0.9rem; }
.form-control { padding: 12px 15px; border: 1px solid #ddd; border-radius: 8px; font-family: inherit; transition: border-color 0.3s; background: var(--bg-body); color: var(--text-main); }
.form-control:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }
textarea.form-control { resize: vertical; min-height: 120px; }

.directory-list { display: flex; flex-direction: column; gap: 25px; text-align: left; }
.dir-item { display: flex; gap: 15px; align-items: flex-start; }
.dir-icon { background: rgba(0, 210, 211, 0.1); color: var(--secondary); width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.5rem; }
.dir-info h4 { color: var(--primary); margin-bottom: 5px; font-family: 'Montserrat', sans-serif; font-size: 1.1rem; }
.dir-info p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }

@media (max-width: 1024px) {
    .contact-wrapper { grid-template-columns: 1fr; padding: 40px; gap: 50px; }
}

@media (max-width: 768px) {
    .stat-number { font-size: 2.5rem; }

    
    .container { padding: 50px 15px; }
    .section-header { margin-bottom: 40px; }
    .section-header h2 { font-size: 2rem; }

    
    .grid { grid-template-columns: 1fr; gap: 20px; }
    .card-body { padding: 20px; }
    .card-title { font-size: 1.15rem; margin-bottom: 10px; }

    
    .dash-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
    .dash-card { width: 100% !important; min-height: 190px; border-radius: 12px; }
    .dash-card-img-wrapper { height: 90px; }
    .dash-card .material-icons-round { 
        font-size: 1.8rem; padding: 10px; margin-top: -25px; border-width: 3px; 
    }
    .dash-card-body { padding: 15px 10px; }
    .dash-text { font-size: 0.85rem; line-height: 1.2; }
}


.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 37, 64, 0.8); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--white); width: 90%; max-width: 800px; max-height: 90vh;
    border-radius: var(--radius); overflow-y: auto; position: relative;
    transform: translateY(50px); transition: var(--transition); box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close {
    position: absolute; top: 20px; right: 20px; background: rgba(0,0,0,0.5); color: var(--white);
    border: none; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition); z-index: 10;
}
.modal-close:hover { background: var(--accent); color: var(--primary); transform: scale(1.1); }
#modal-img { width: 100%; height: 350px; object-fit: contain; background-color: #E9ECEF; }
.modal-body-content { padding: 40px; }
.modal-badge { display: inline-block; background: rgba(0, 102, 204, 0.1); color: var(--secondary); padding: 5px 15px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; margin-bottom: 15px; }
.modal-body-content h2 { font-family: 'Montserrat', sans-serif; color: var(--primary); margin-bottom: 20px; font-size: 2rem; line-height: 1.3; }
.modal-body-content p { color: var(--text-muted); line-height: 1.8; font-size: 1.1rem; white-space: pre-wrap; margin: 0; }
@media (max-width: 768px) { #modal-img { height: 220px; } .modal-body-content { padding: 25px; } .modal-body-content h2 { font-size: 1.5rem; } }


.analisis-dashboard { display: flex; flex-direction: column; gap: 50px; margin-top: 30px; }
.dash-category { background: transparent; padding: 0; border: none; box-shadow: none; }
.dash-category-title { 
    font-size: 1.4rem; color: var(--primary); 
    background: var(--white); padding: 15px 25px; 
    border-radius: 12px; box-shadow: var(--shadow-sm); 
    border-left: 6px solid var(--accent); display: inline-block; 
    margin-bottom: 25px; font-family: 'Montserrat', sans-serif; text-transform: uppercase;
}
.dash-group-title { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; font-family: 'Montserrat', sans-serif; background: rgba(0,0,0,0.03); padding: 10px 20px; border-radius: 8px; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; }

.dash-card {
    background: var(--white); border: none; border-radius: 16px; padding: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    text-align: center; text-decoration: none; color: var(--text-main); transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); position: relative; cursor: pointer; min-height: 240px;
    overflow: hidden; z-index: 1; border: 1px solid rgba(0,0,0,0.02);
}

.dash-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg), 0 0 25px rgba(0, 210, 211, 0.4); color: var(--primary); border-color: rgba(0, 210, 211, 0.5); }

.dash-card-img-wrapper { width: 100%; height: 130px; overflow: hidden; position: relative; }
.dash-card-img-wrapper::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(10,37,64,0.2) 0%, rgba(10,37,64,0.6) 100%);
    transition: var(--transition);
}
.dash-card:hover .dash-card-img-wrapper::after { background: rgba(0, 102, 204, 0.3); }
.dash-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); }
.dash-card:hover .dash-card-img { transform: scale(1.15); }

.dash-card-body {
    padding: 15px 20px 25px; display: flex; flex-direction: column; align-items: center; width: 100%;
    background: var(--white); z-index: 2; flex-grow: 1; justify-content: center; position: relative;
}

.dash-card .material-icons-round { 
    background: var(--white); color: var(--secondary); 
    padding: 16px; border-radius: 50%; font-size: 2.2rem; margin-top: -45px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); transition: var(--transition); 
    z-index: 3; position: relative; border: 4px solid var(--white);
}
.dash-card:hover .material-icons-round { background: var(--secondary); color: var(--white); transform: scale(1.1) rotate(5deg); border-color: var(--secondary); box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3); }

.dash-text { font-size: 1.05rem; font-weight: 700; line-height: 1.4; margin-top: 10px; color: var(--primary); transition: var(--transition); }
.dash-card:hover .dash-text { color: var(--accent); }


.dash-card::after {
    content: "arrow_forward"; font-family: 'Material Icons Round'; position: absolute; bottom: 20px; right: 20px;
    font-size: 1.2rem; color: var(--accent); background: rgba(0, 210, 211, 0.15); border-radius: 50%;
    padding: 6px; transition: var(--transition); font-weight: bold; opacity: 0; z-index: 5;
}
.dash-card:hover::after { opacity: 1; background: var(--accent); color: var(--white); transform: translateX(5px); }

@keyframes heartbeatAnim {
    0% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(1); }
    75% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.heartbeat-anim { animation: heartbeatAnim 0.6s ease-in-out; }

body.dark-mode {
    --bg-body: #0F172A;
    --white: #FFFFFF;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --primary: #38BDF8;
    --secondary: #0284C7;
    --accent: #0EA5E9;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
}
body.dark-mode header.scrolled { background: rgba(15, 23, 42, 0.95); border-bottom: 1px solid rgba(255,255,255,0.05); }
body.dark-mode .card, body.dark-mode .dash-card { background: #1E293B !important; border-color: rgba(255,255,255,0.05) !important; }
body.dark-mode .dash-card-img-wrapper::after { background: linear-gradient(to bottom, rgba(15,23,42,0.1) 0%, rgba(15,23,42,0.95) 100%); }
body.dark-mode .dash-card .material-icons-round { background: #0F172A !important; border-color: #0F172A !important; color: var(--primary) !important; }
body.dark-mode .dash-card:hover .material-icons-round { background: var(--primary) !important; color: #0F172A !important; }
body.dark-mode #modal-img { background-color: #0F172A; }
body.dark-mode .form-control, body.dark-mode input[type="text"], body.dark-mode textarea.form-control, body.dark-mode select.form-control { background: #0F172A !important; color: #F8FAFC !important; border-color: rgba(255,255,255,0.1) !important; }
body.dark-mode .form-control:focus, body.dark-mode input[type="text"]:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15) !important; }
body.dark-mode .faq-item { background: #1E293B; border: 1px solid rgba(255,255,255,0.05); }
body.dark-mode .modal-content { background: #1E293B; border: 1px solid rgba(255,255,255,0.05); }
body.dark-mode .modal-overlay { background: rgba(0, 0, 0, 0.85); }
body.dark-mode .section-header h2 { background: linear-gradient(90deg, #F8FAFC, var(--primary)) !important; -webkit-background-clip: text !important; background-clip: text !important; -webkit-text-fill-color: transparent !important; }
body.dark-mode .card-title, body.dark-mode .dash-text, body.dark-mode .modal-body-content h2, body.dark-mode .faq-question, body.dark-mode .dir-info h4, body.dark-mode .form-group label, body.dark-mode .contact-form h3, body.dark-mode .directory-list h3, body.dark-mode .dash-category-title { color: #F8FAFC !important; }
body.dark-mode .text-muted, body.dark-mode .dash-group-title, body.dark-mode .card-text, body.dark-mode .modal-body-content p { color: var(--text-muted) !important; }
body.dark-mode .modal-close { color: #F8FAFC; background: rgba(255,255,255,0.1); }
body.dark-mode .modal-close:hover { background: var(--primary); color: #0F172A; }
body.dark-mode .modal-badge { color: #E0F2FE !important; background: rgba(56, 189, 248, 0.15) !important; }
body.dark-mode header .menu-toggle.is-open { color: var(--text-main); }
body.dark-mode .btn-card { background: rgba(255,255,255,0.05) !important; color: var(--primary) !important; border: 1px solid rgba(255,255,255,0.1) !important; }
body.dark-mode .btn-card:hover { background: var(--primary) !important; color: #0F172A !important; }
body.dark-mode .btn-main { background: var(--primary) !important; color: #0F172A !important; }
body.dark-mode .btn-main:hover { background: #E0F2FE !important; }
body.dark-mode .cta-sis .btn-main { background: #0F172A !important; color: var(--primary) !important; }
body.dark-mode .cta-sis .btn-main:hover { background: #F8FAFC !important; color: #0F172A !important; }
body.dark-mode .section-header .btn-main { background: transparent !important; color: var(--primary) !important; border-color: var(--primary) !important; }
body.dark-mode .section-header .btn-main:hover { background: rgba(56, 189, 248, 0.1) !important; }
body.dark-mode .norma-card > div:first-child { background: rgba(255,255,255,0.05) !important; }
body.dark-mode .btn-portal-oficial { background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%); color: #F8FAFC !important; }
body.dark-mode .stats-section { background: linear-gradient(to bottom, #0F172A 0%, #1E293B 100%); border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); }
body.dark-mode footer { background: #0F172A; border-top: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); }
body.dark-mode .cta-sis { background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%); border: 1px solid rgba(255,255,255,0.1); color: #F8FAFC; }
body.dark-mode .hero::before { background: linear-gradient(135deg, rgba(15,23,42,0.95) 0%, rgba(2,132,199,0.4) 100%); }
body.dark-mode .custom-shape-divider-bottom .shape-fill { fill: #0F172A; }
body.dark-mode .stat-number { color: #F8FAFC; }
body.dark-mode .stat-icon { color: var(--primary); }
body.dark-mode .stat-label { color: var(--text-muted); }
body.dark-mode .hero-content h1 { color: #F8FAFC; }
body.dark-mode .hero-content p { color: #E2E8F0; }
body.dark-mode .dash-card-body { background: #1E293B; }
body.dark-mode .contact-wrapper { background: #1E293B; }
.theme-toggle-btn {
    background: transparent; color: var(--white); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; padding: 0; outline: none;
    transition: var(--transition); margin-left: 10px;
}
header.scrolled .theme-toggle-btn { color: var(--primary); }
.theme-toggle-btn:hover { color: var(--accent); transform: scale(1.15); }
header.scrolled .theme-toggle-btn:hover { color: var(--secondary); }

@media (max-width: 768px) {
    .theme-toggle-btn { color: var(--primary); font-size: 1.1rem; margin-left: 0; margin-top: 10px; justify-content: flex-start; padding-bottom: 8px; }
}


@keyframes spin { 100% { transform: rotate(360deg); } }
.loading-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-muted); width: 100%; text-align: center; }
.loading-state .material-icons-round { font-size: 3.5rem; color: var(--accent); animation: spin 1.2s linear infinite; margin-bottom: 15px; opacity: 0.8; }
.empty-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px 20px; background: rgba(0,0,0,0.015); border: 2px dashed rgba(0,0,0,0.1); border-radius: var(--radius); color: var(--text-muted); width: 100%; text-align: center; transition: var(--transition); }
.empty-state:hover { background: rgba(0,0,0,0.03); border-color: rgba(0, 102, 204, 0.2); }
.empty-state .material-icons-round { font-size: 3.5rem; color: #CBD5E1; margin-bottom: 15px; }
.empty-state h4 { color: var(--primary); font-family: 'Montserrat', sans-serif; font-size: 1.2rem; margin-bottom: 5px; }
.empty-state p { font-size: 0.95rem; max-width: 400px; margin: 0 auto; }
body.dark-mode .empty-state { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.1); }
body.dark-mode .empty-state .material-icons-round { color: #475569; }

/* ================= WHATSAPP FLOTANTE ================= */
.wa-floating-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: 'Poppins', sans-serif;
}

.wa-button {
    background-color: #25D366; /* WhatsApp green */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: wa-bounce 2.5s infinite;
}

.wa-button:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    animation: none;
}

.wa-button svg {
    width: 32px;
    height: 32px;
    fill: white;
    pointer-events: none;
}

.wa-chat-popup {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    width: 320px;
    max-width: calc(100vw - 60px);
    margin-bottom: 20px;
    overflow: hidden;
    transform: translateY(20px) scale(0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
    transform-origin: bottom right;
    display: flex;
    flex-direction: column;
}

.wa-chat-popup.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.wa-chat-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.wa-chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.wa-chat-header strong {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.wa-chat-header span {
    font-size: 0.8rem;
    opacity: 0.8;
}

.wa-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.wa-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.wa-chat-body {
    padding: 20px;
    background-color: #E5DDD5; /* Light grey chat background */
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-size: cover;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 150px;
}

.wa-message {
    background-color: #DCF8C6; /* Light green message bubble */
    padding: 10px 15px;
    border-radius: 10px;
    align-self: flex-start;
    max-width: 80%;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #1F2937;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.wa-message .wa-time {
    display: block;
    font-size: 0.7rem;
    color: rgba(0, 0, 0, 0.4);
    text-align: right;
    margin-top: 5px;
}

.wa-chat-footer {
    padding: 10px 15px;
    background-color: #f0f2f5;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease;
}

#wa-input {
    flex-grow: 1;
    border: none;
    padding: 12px 18px;
    border-radius: 22px;
    background-color: var(--white);
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    color: var(--text-main);
}

#wa-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.wa-send-btn {
    background-color: #25D366;
    color: white;
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wa-send-btn:hover {
    background-color: #1DA851;
}

@keyframes wa-bounce { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-5px); } 
}

@media (max-width: 768px) { 
    .wa-floating-container { 
        bottom: 20px; 
        right: 20px; 
    } 
    .wa-chat-popup { 
        width: calc(100vw - 40px);
        max-width: 320px;
    } 
}

/* Dark Mode for WA Chat */
body.dark-mode .wa-chat-popup { 
    background: #1E293B; 
    border-color: rgba(255,255,255,0.1); 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}
body.dark-mode .wa-chat-header { 
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
}
body.dark-mode .wa-chat-body { 
    background-color: #0F172A; 
    background-blend-mode: multiply; 
}
body.dark-mode .wa-message { 
    background: #334155; 
    color: #F8FAFC; 
}
body.dark-mode .wa-message .wa-time {
    color: rgba(255, 255, 255, 0.4);
}
body.dark-mode .wa-chat-footer { 
    background: #1E293B;
    border-top-color: rgba(255,255,255,0.1);
}

body.dark-mode #wa-input {
    background-color: #334155;
    color: #F8FAFC;
}

body.dark-mode #wa-input::placeholder {
    color: #94A3B8;
}
