:root {
    --primary-color: #1a3a6b;
    --primary-light: #2a5a9b;
    --primary-dark: #0f2248;
    --secondary-color: #00a3e0;
    
    /* Colores por área */
    --whatsapp-color: #25D366;
    --whatsapp-dark: #128C7E;
    --email-color: #4A90D9;
    --email-consultorias: #2E86C1;
    --email-atencion: #5DADE2;
    --email-capacitaciones: #F39C12;
    --email-gerencia: #8E44AD;
    --email-tecnologia: #1ABC9C;
    --website-color: #2C3E50;
    
    /* Redes Sociales */
    --facebook-color: #1877F2;
    --instagram-color: #E4405F;
    --tiktok-color: #000000;
    --youtube-color: #FF0000;
    
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-color: #f0f4f8;
    --card-bg: rgba(255, 255, 255, 0.97);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.2);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== ANIMACIÓN DE FONDO ===== */
.background-animation {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    overflow: hidden;
    z-index: 0;
}

.waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@keyframes move-forever {
    0% { transform: translate3d(-90px, 0, 0); }
    100% { transform: translate3d(85px, 0, 0); }
}

.parallax > use {
    animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.parallax > use:nth-child(1) {
    fill: rgba(26, 58, 107, 0.6);
    animation-delay: -2s;
    animation-duration: 7s;
}
.parallax > use:nth-child(2) {
    fill: rgba(26, 58, 107, 0.4);
    animation-delay: -3s;
    animation-duration: 10s;
}
.parallax > use:nth-child(3) {
    fill: rgba(26, 58, 107, 0.2);
    animation-delay: -4s;
    animation-duration: 13s;
}
.parallax > use:nth-child(4) {
    fill: var(--primary-color);
    animation-delay: -5s;
    animation-duration: 20s;
}

/* ===== WRAPPER Y CONTAINER ===== */
.wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    position: relative;
    padding: 20px;
    z-index: 1;
}

.container {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 35px 30px 25px;
    text-align: center;
    max-width: 620px;
    width: 100%;
    position: relative;
    max-height: 95vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeIn 0.6s ease-out;
}

/* Scroll personalizado */
.container::-webkit-scrollbar {
    width: 4px;
}
.container::-webkit-scrollbar-track {
    background: transparent;
}
.container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== LOGO ===== */
.logo img {
    max-width: 250px;
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    animation: slideIn 0.8s ease-in-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

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

.logo img {
    opacity: 1 !important;
    animation: slideIn 1s ease-in-out !important;
}

/* Forzar que la animación se ejecute correctamente */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Asegurar que el contenedor del logo no oculte la imagen */
.logo {
    display: block;
    position: relative;
    z-index: 2;
}

/* Eliminar cualquier opacidad heredada de .animate en el logo */
.logo .animate {
    opacity: 1 !important;
}

/* ===== BINARY ANIMATION ===== */
.binary-animation-inside {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.binary-animation-inside span {
    position: absolute;
    font-size: 40px;
    color: var(--primary-color);
    animation: fall linear infinite;
    opacity: 0.08;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

@keyframes fall {
    0% {
        top: -10%;
        opacity: 0.8;
    }
    100% {
        top: 110%;
        opacity: 0;
    }
}

/* ===== MENSAJE DE BIENVENIDA ===== */
.welcome-message {
    font-size: 15px;
    margin-bottom: 22px;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

/* ===== ICONOS DE REDES SOCIALES (ARRIBA) ===== */
.icon-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-bottom: 28px;
}

.icon {
    width: 52px;
    height: 52px;
    color: #fff;
    border-radius: 50%;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    position: relative;
}

.icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    filter: blur(6px);
    z-index: -1;
    transition: var(--transition);
}

.icon:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.icon:hover::after {
    opacity: 0.6;
    transform: scale(1.1);
}

/* Colores específicos para cada red social */
.icon.facebook {
    background: linear-gradient(135deg, #1877F2, #0D65D9);
}
.icon.instagram {
    background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF);
}
.icon.tiktok {
    background: linear-gradient(135deg, #000000, #25F4EE, #FE2C55);
}
.icon.youtube {
    background: linear-gradient(135deg, #FF0000, #CC0000);
}

/* ===== GRID DE BOTONES ===== */
.buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0 18px;
}

.grid-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
    min-height: 85px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.grid-btn i {
    font-size: 26px;
    margin-bottom: 6px;
    transition: var(--transition);
}

.grid-btn span {
    font-size: 12.5px;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.2px;
}

/* Efecto hover en botones */
.grid-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

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

/* Efecto de brillo al pasar el mouse */
.grid-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
    transform: scale(0.5);
}

.grid-btn:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* ===== COLORES POR ÁREA ===== */

/* WhatsApp - Atención al Cliente */
.grid-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

/* WhatsApp - Gerencia General */
.grid-btn.whatsapp.gerencia {
    background: linear-gradient(135deg, #34B7F1, #128C7E);
}

/* WhatsApp - Dirección de Tecnología */
.grid-btn.whatsapp.tecnologia {
    background: linear-gradient(135deg, #25D366, #075E54);
}

/* Correos - Consultorías */
.grid-btn.email.consultorias {
    background: linear-gradient(135deg, #2E86C1, #1A5276);
}

/* Correos - Atención al Cliente */
.grid-btn.email.atencion {
    background: linear-gradient(135deg, #5DADE2, #2E86C1);
}

/* Correos - Capacitaciones */
.grid-btn.email.capacitaciones {
    background: linear-gradient(135deg, #F39C12, #D68910);
}

/* Correos - Gerencia / Convenios */
.grid-btn.email.gerencia {
    background: linear-gradient(135deg, #8E44AD, #6C3483);
}

/* Correos - Tecnología / Soporte */
.grid-btn.email.tecnologia {
    background: linear-gradient(135deg, #1ABC9C, #148F77);
}

/* Sitio Web */
.grid-btn.website {
    background: linear-gradient(135deg, #2C3E50, #1A252F);
}

/* ===== BOTÓN ESPECIAL: OCUPA 2 COLUMNAS ===== */
.grid-btn.full-width {
    grid-column: 1 / -1;
    min-height: 60px;
    flex-direction: row;
    gap: 12px;
}

.grid-btn.full-width i {
    font-size: 22px;
    margin-bottom: 0;
}

/* ===== RESPONSIVE ===== */

/* Tablets y móviles grandes */
@media (max-width: 768px) {
    .container {
        padding: 25px 18px 20px;
        max-height: 92vh;
    }

    .logo img {
        max-width: 170px;
    }

    .buttons-grid {
        gap: 10px;
    }

    .grid-btn {
        min-height: 75px;
        padding: 14px 10px;
    }

    .grid-btn i {
        font-size: 22px;
    }

    .grid-btn span {
        font-size: 11.5px;
    }

    .icon {
        width: 46px;
        height: 46px;
        font-size: 19px;
    }

    .welcome-message {
        font-size: 14px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .container {
        padding: 20px 14px 18px;
        border-radius: 12px;
        max-height: 90vh;
    }

    .logo img {
        max-width: 140px;
    }

    .buttons-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .grid-btn {
        min-height: 65px;
        padding: 12px 10px;
        flex-direction: row;
        gap: 14px;
        border-radius: 12px;
    }

    .grid-btn i {
        font-size: 20px;
        margin-bottom: 0;
        width: 30px;
    }

    .grid-btn span {
        font-size: 12px;
        text-align: left;
    }

    .grid-btn.full-width {
        flex-direction: row;
    }

    .icon-row {
        gap: 10px;
    }

    .icon {
        width: 42px;
        height: 42px;
        font-size: 17px;
    }

    .welcome-message {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .footer {
        font-size: 10px;
        margin-top: 16px;
    }

    .binary-animation-inside span {
        font-size: 25px;
    }
}

/* ===== FOOTER ===== */
.footer {
    font-size: 11px;
    margin-top: 20px;
    color: var(--text-light);
    font-weight: 300;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 18px;
}

/* ===== ANIMACIONES ===== */
.animate {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Retrasos para animaciones escalonadas */
.animate:nth-child(1) { animation-delay: 0.1s; }
.animate:nth-child(2) { animation-delay: 0.2s; }
.animate:nth-child(3) { animation-delay: 0.3s; }
.animate:nth-child(4) { animation-delay: 0.4s; }
.animate:nth-child(5) { animation-delay: 0.5s; }
.animate:nth-child(6) { animation-delay: 0.6s; }
