:root {
    /* Base Original Palette from logo & screenshots */
    --brand-red: #d90429;
    --brand-teal: #00a896;
    --brand-gray: #5a5f66;
    --brand-brown: #6a5d4d;
    --brand-light-gray: #f4f4f9;

    /* Theme Variables - Default (Light Mode) */
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --text-color: #333333;
    --text-muted: #666666;
    --primary-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
    --accent-color: var(--brand-teal);
    --accent-glow: #02c3ae;
    --border-color: #eaeaea;
    --modal-overlay: rgba(0, 0, 0, 0.4);
    --modal-bg: rgba(255, 255, 255, 0.90);
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --transition: all 0.3s ease;
}

/* Dark Mode Configuration */
[data-theme="dark"] {
    --bg-color: #0d1117;
    --bg-alt: #161b22;
    --text-color: #c9d1d9;
    --text-muted: #8b949e;
    --primary-color: #0d1117;
    --glass-bg: rgba(22, 27, 34, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --border-color: #30363d;
    --modal-overlay: rgba(0, 0, 0, 0.6);
    --modal-bg: rgba(22, 27, 34, 0.95);
    --navbar-bg: rgba(13, 17, 23, 0.95);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-color: #0d1117;
        --bg-alt: #161b22;
        --text-color: #c9d1d9;
        --text-muted: #8b949e;
        --primary-color: #0d1117;
        --glass-bg: rgba(22, 27, 34, 0.85);
        --glass-border: rgba(255, 255, 255, 0.1);
        --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
        --border-color: #30363d;
        --modal-overlay: rgba(0, 0, 0, 0.6);
        --modal-bg: rgba(22, 27, 34, 0.90);
        --navbar-bg: rgba(13, 17, 23, 0.95);
    }
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--text-color); }
a { text-decoration: none; color: inherit; transition: var(--transition); }

ul.clean-list { list-style: none; }
ul.clean-list li { margin-bottom: 8px; padding-left: 15px; position: relative; color: var(--text-muted); }
ul.clean-list li::before { content: '•'; position: absolute; left: 0; color: var(--brand-teal); font-weight: bold; }

/* Theme Toggle Button */
.theme-toggle {
    position: fixed; bottom: 30px; left: 30px; background: var(--glass-bg);
    border: 1px solid var(--border-color); backdrop-filter: blur(5px); color: var(--text-color);
    width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center;
    align-items: center; font-size: 1.2rem; cursor: pointer; z-index: 1000; box-shadow: var(--glass-shadow);
    transition: var(--transition);
}
.theme-toggle:hover { transform: scale(1.1); background: var(--brand-teal); color: white; }

/* Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 80px 0; }
.text-center { text-align: center; }
.text-white { color: #fff !important; }
.text-white-muted { color: rgba(255,255,255,0.7) !important; }

.text-gradient {
    background: linear-gradient(135deg, var(--brand-red), var(--brand-teal));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.bg-alt { background-color: var(--bg-alt); }

.btn-primary, .btn-secondary {
    display: inline-block; padding: 12px 28px; border-radius: 30px; font-weight: 600;
    font-family: 'Montserrat', sans-serif; cursor: pointer; text-transform: uppercase;
    font-size: 0.9rem; transition: var(--transition);
}
.btn-primary { background: var(--brand-red); color: #fff !important; border: none; box-shadow: 0 4px 15px rgba(217, 4, 41, 0.4); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(217, 4, 41, 0.6); background: #b50323; }
.btn-secondary { background: transparent; color: white !important; border: 2px solid white; }
.btn-secondary:hover { background: white; color: black !important; transform: translateY(-3px); }
.btn-large { padding: 16px 36px; font-size: 1rem; }

.glass-panel {
    background: var(--glass-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border); border-radius: 15px; box-shadow: var(--glass-shadow);
}

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; width: 100%; padding: 25px 0; z-index: 1000; transition: var(--transition); }
.navbar.scrolled { background: var(--navbar-bg); padding: 10px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.1); backdrop-filter: blur(10px); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }

/* Logo Default (Unscrolled - over dark video) */
.logo-img { height: 100px; transition: var(--transition); filter: brightness(0) invert(1); }

/* Nav Links Default (Unscrolled) */
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-weight: 600; font-size: 0.9rem; color: #ffffff; transition: color 0.3s; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.nav-links a:not(.btn-primary):hover { color: var(--brand-red); }
.mobile-menu-btn { display: none; background: none; border: none; color: #ffffff; font-size: 1.5rem; cursor: pointer; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }

/* Navbar Scrolled State */
.navbar.scrolled .nav-links a { color: var(--text-color); text-shadow: none; }
.navbar.scrolled .mobile-menu-btn { color: var(--text-color); text-shadow: none; }
.navbar.scrolled .logo-img { height: 70px; filter: invert(1) hue-rotate(180deg) brightness(0.9); }

/* Dark Mode Overrides for Scrolled State */
[data-theme="dark"] .navbar.scrolled .logo-img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { 
    :root:not([data-theme="light"]) .navbar.scrolled .logo-img { filter: brightness(0) invert(1); } 
}

/* Mobile Nav */
.mobile-nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: var(--navbar-bg); z-index: 2000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transform: translateY(-100%); transition: transform 0.4s ease; backdrop-filter: blur(15px);
}
.mobile-nav-overlay.active { transform: translateY(0); }
.close-menu-btn { position: absolute; top: 30px; right: 30px; background: none; border: none; color: var(--text-color); font-size: 2rem; cursor: pointer; }
.mobile-nav-links { display: flex; flex-direction: column; gap: 30px; text-align: center; }
.mobile-nav-links a { font-size: 1.5rem; font-weight: 600; color: var(--text-color); }

/* Hero Section */
.hero { position: relative; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.video-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.video-container video { width: 100%; height: 100%; object-fit: cover; }
.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.8)); }
.hero-content { max-width: 900px; text-align: center; padding: 0 20px; z-index: 1; color: white; margin-top: 80px; }
.hero h1 { font-size: 3.8rem; line-height: 1.1; margin-bottom: 20px; color: white; }
.hero p { font-size: 1.3rem; color: #eee; margin-bottom: 40px; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; }

.scroll-down { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font-size: 1.5rem; color: white; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); } 40% { transform: translateY(-20px) translateX(-50%); } 60% { transform: translateY(-10px) translateX(-50%); } }

/* Section Titles */
.section-title { font-size: 2.5rem; margin-bottom: 20px; }
.section-subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 50px; }

/* About Section */
.layout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text p { font-size: 1.1rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 20px; }
.about-logo { max-width: 250px; margin-bottom: 30px; display: block; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stat-card {
    background: var(--bg-alt); padding: 30px 20px; border-radius: 15px;
    text-align: center; border: 1px solid var(--border-color); box-shadow: var(--glass-shadow);
}
.stat-card i { font-size: 2.5rem; color: var(--brand-teal); margin-bottom: 15px; }
.stat-card h3 { font-size: 1.2rem; margin-bottom: 5px; }
.stat-card p { color: var(--text-muted); font-size: 0.9rem; }

/* Services Wrapper */
.services-wrapper { display: flex; flex-wrap: wrap; justify-content: center; gap: 50px; }
.service-item { text-align: center; width: 180px; cursor: pointer; transition: transform 0.3s; }
.service-item:hover { transform: translateY(-10px); }

/* Updated Service Icons (Softer colors, Glass look) */
.service-icon {
    width: 130px; height: 130px; border-radius: 50%; margin: 0 auto 25px;
    display: flex; justify-content: center; align-items: center; font-size: 3.2rem;
    background: var(--glass-bg);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}
.service-item:hover .service-icon {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: currentColor; /* Dynamically inherits color from JS/inline style */
}
.service-item h3 { font-size: 1.1rem; text-transform: uppercase; font-weight: 700; color: var(--text-color); }

/* Modals */
.modal {
    display: none; position: fixed; z-index: 3000; left: 0; top: 0;
    width: 100%; height: 100%; overflow: hidden; background-color: var(--modal-overlay);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    opacity: 0;
}
.modal.show { display: flex; align-items: center; justify-content: center; }

/* Modal Content Transparente / Glass */
.modal-content.glass-modal {
    background: var(--modal-bg);
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    margin: auto; padding: 40px; border: 1px solid var(--glass-border); border-radius: 20px;
    width: 90%; max-width: 750px; position: relative;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    opacity: 0; transform: scale(0.9);
}
.close-modal {
    position: absolute; top: 20px; right: 25px; color: var(--text-muted);
    font-size: 28px; font-weight: bold; cursor: pointer; transition: color 0.2s;
}
.close-modal:hover { color: var(--brand-red); }

/* Modal Headers */
.modal-header { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.modal-icon-bg {
    width: 60px; height: 60px; border-radius: 12px;
    display: flex; justify-content: center; align-items: center; font-size: 1.8rem;
}
.modal-header h2 { font-size: 1.8rem; margin: 0; }
.modal-body p { line-height: 1.7; color: var(--text-muted); margin-bottom: 20px; }
.modal-body ul { list-style: none; margin-bottom: 20px; }
.modal-body ul li { margin-bottom: 15px; display: flex; gap: 12px; color: var(--text-color); align-items: flex-start;}
.modal-body ul li i { margin-top: 5px; font-size: 16px; }

/* Tables in Modals */
.container-table-wrapper { overflow-x: auto; background: var(--bg-alt); border-radius: 10px; padding: 5px;}
.container-table { width: 100%; border-collapse: collapse; text-align: left; }
.container-table th, .container-table td { padding: 15px; border-bottom: 1px solid var(--border-color); color: var(--text-color); }
.container-table th { font-weight: 600; color: var(--brand-teal); }
.container-table tbody tr:last-child td { border-bottom: none; }

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

/* Documentación */
.docs-grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 40px; }
.doc-card {
    padding: 30px; text-align: center; width: 320px;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    text-decoration: none; border-color: var(--glass-border);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.doc-card:hover { transform: translateY(-8px); border-color: var(--brand-teal); box-shadow: 0 15px 35px rgba(0,168,150,0.15); }
.doc-icon i { font-size: 3.5rem; color: var(--brand-red); margin-bottom: 20px; transition: transform 0.3s; }
.doc-card:hover .doc-icon i { transform: scale(1.1); color: var(--brand-teal); }
.doc-card h4 { font-size: 1.3rem; margin-bottom: 10px; }
.btn-text { font-weight: 700; color: var(--text-color); text-transform: uppercase; font-size: 0.85rem; transition: color 0.3s; }
.doc-card:hover .btn-text { color: var(--brand-teal); }

/* Contact CTA */
.cta-section { position: relative; background: #071018; border-top: 1px solid #1a2430; overflow: hidden; }
.cta-bg-elements { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.glow-orb { position: absolute; width: 400px; height: 400px; background: var(--brand-red); border-radius: 50%; filter: blur(120px); opacity: 0.15; top: -100px; left: -150px; }
.glow-orb.orb-2 { top: auto; bottom: -100px; left: auto; right: -150px; background: var(--brand-teal); }
.contact-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 50px; position: relative; z-index: 1; }
.contact-item { padding: 40px 20px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 15px; backdrop-filter: blur(10px); }
.contact-item i { font-size: 3rem; color: var(--brand-teal); margin-bottom: 20px; }
.contact-item h4 { font-size: 1.3rem; margin-bottom: 10px; color: white; }
.contact-item p, .contact-item a { color: rgba(255,255,255,0.7); }
.contact-item a:hover { color: var(--brand-teal); }

/* Footer */
footer { background: #03080c; padding: 60px 0 30px; text-align: center; }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.logo-img-footer { height: 90px; }
.footer-links { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: #888; font-weight: 500; }
.footer-links a:hover { color: var(--brand-red); }
.copyright { color: #555; font-size: 0.9rem; margin-top: 20px; }

/* WhatsApp Button Updated */
.whatsapp-btn {
    position: fixed; bottom: 40px; right: 40px; background-color: #25D366; color: white;
    width: 65px; height: 65px; border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 35px; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); z-index: 1000; transition: var(--transition);
}
.whatsapp-btn:hover { color: white; }

/* Continuous Pulse Animation */
.pulse-animation {
    animation: pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-tooltip {
    position: absolute; right: 85px; background: white; color: #333; padding: 8px 15px; border-radius: 20px;
    font-size: 0.95rem; font-weight: 700; opacity: 0; visibility: hidden; transition: var(--transition); white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.whatsapp-btn:hover .whatsapp-tooltip { opacity: 1; visibility: visible; right: 90px; }

/* Responsive */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .layout-grid { gap: 40px; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .layout-grid, .depositos-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.2rem; }
    .hero-buttons { flex-direction: column; }
    .section-title { font-size: 2rem; }
    .theme-toggle { bottom: 20px; left: 20px; width: 45px; height: 45px; }
    .whatsapp-btn { bottom: 20px; right: 20px; width: 55px; height: 55px; }
    .logo-img { height: 80px; }
    .navbar.scrolled .logo-img { height: 60px; }
    .about-logo { max-width: 200px; margin: 0 auto 30px auto; }
    .service-icon { width: 110px; height: 110px; font-size: 2.5rem; }
    .modal-content.glass-modal { padding: 30px 20px; }
}
