/* --- Variables --- */
:root {
    --bg-light: #ebf0f8;
    --primary-dark: #1a2b40;
    --accent-blue: #3e5a77;
    --accent-purple: #6c63ff;
    --accent-green: #28a745;
    --text-gray: #5a677a;
    --comenius-red: #ff1a1a;
    --btn-gradient: linear-gradient(135deg, #0e2a49, #477083);
}

/* --- Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: #333;
    overflow-x: hidden;
}

/* --- NAV --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 6%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--accent-blue);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-blue);
    transition: 0.3s;
}

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

.nav-links a:hover {
    color: var(--accent-blue);
}

/* --- BOTONES --- */
.btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: 0.4s;
    background: var(--btn-gradient);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

/* --- HERO --- */
.hero {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 8%;
    background-image: linear-gradient(to right, rgba(235, 240, 248, 0.98) 35%, rgba(235, 240, 248, 0.2) 80%), url('/static/img/fondo.png');
    background-size: cover;
    background-position: center;
}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--primary-dark);
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* --- SECCIONES --- */
.section-container {
    padding: 80px 8%;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: 1s ease;
}

.section-container.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.card {
    padding: 30px;
    background: white;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: 0.5s;
}

.card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    background: #f0f4f8;
}

.card h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--primary-dark);
}

/* --- ESTADISTICAS CARRUSEL --- */
.stats-carousel {
    width: 100%;
    padding: 30px 0;
}

.stats-carousel .swiper-slide {
    display: flex;
    justify-content: center;
}

.stats-card {
    flex: 0 0 auto;
    width: 250px;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #d0d7e0;
    text-align: center;
    transition: 0.4s;
    background: white;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Clientes / Instituciones */
.clientes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.cliente-card {
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(30px);
    transition: 0.6s ease, box-shadow 0.3s ease;
}

.cliente-card i {
    font-size: 40px;
    color: var(--accent-blue);
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}

.cliente-card h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.cliente-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.cliente-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width:768px) {
    .clientes-grid {
        gap: 20px;
    }
}

/* --- FAB --- */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.fab-main {
    width: 60px;
    height: 60px;
    background: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.fab-options {
    position: absolute;
    bottom: 75px;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.fab-container.active .fab-options {
    opacity: 1;
    visibility: visible;
}

.option-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 20px;
    transition: 0.3s;
}

.option-btn:hover {
    transform: scale(1.2);
}

/* --- RESPONSIVE --- */
@media (max-width:768px) {
    .nav-links {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* --- SPLASH SCREEN (Animación agua) --- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgb(227, 230, 240);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.splash-svg {
    width: 200px;
    height: 200px;
}

.poly {
    opacity: 0;
    transform: scale(0.9);
    animation: fillReveal 2s ease forwards;
}

.poly-1 {
    fill: var(--primary-dark);
    animation-delay: 0.2s;
}

.poly-2 {
    fill: var(--accent-blue);
    animation-delay: 0.5s;
}

.poly-3 {
    fill: var(--comenius-red);
    animation-delay: 0.8s;
}

@keyframes fillReveal {
    0% {
        opacity: 0;
        clip-path: inset(100% 0 0 0);
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: scale(1);
    }
}

.splash-text {
    margin-top: 20px;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--primary-dark);
    opacity: 0;
    animation: fadeInText 1s ease forwards 1.5s;
}

@keyframes fadeInText {
    to {
        opacity: 1;
    }
}

.hide-splash {
    opacity: 0;
    visibility: hidden;
}

/* Footer */
.site-footer {
    background: var(--primary-dark);
    color: white;
    padding: 50px 8% 20px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: white;
    font-size: 1.2rem;
}

.footer-section p,
.footer-section a {
    color: #cfd8e3;
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.footer-section a:hover {
    color: var(--accent-blue);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #3e5a77;
    color: white;
    transition: 0.3s;
}

.social-icons a:hover {
    background: var(--accent-purple);
    transform: scale(1.2);
}

.footer-bottom {
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    text-align: center;
    font-size: 0.9rem;
    color: #cfd8e3;
}

/* Responsive */
@media (max-width:768px) {
    .footer-container {
        flex-direction: column;
    }
}

/* Integración personalizada */
.integracion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.integracion-card {
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(30px);
    transition: 0.6s ease, box-shadow 0.3s ease;
}

.integracion-card i {
    font-size: 40px;
    color: var(--accent-blue);
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}

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

.integracion-card p {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.4;
}

.integracion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.integracion-card.visible {
    opacity: 1;
    transform: translateY(0);
}