/* =========================
RESET
========================= */

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

/* =========================
VARIABLES
========================= */

:root{

    --azul:#24358d;
    --rojo:#d40000;
    --gris:#ececec;
    --texto:#111111;
    --blanco:#ffffff;
    --card:#ffffff;

}


/* =========================
BODY
========================= */

body{

    font-family:Lato medium, Helvetica, sans-serif;
    background:var(--gris);
    color:var(--texto);
    overflow-x:hidden;

}

/* =========================
CONTENEDOR
========================= */

.container{

    width:90%;
    max-width:1200px;
    margin:auto;

}

img{

    width:100%;
    display:block;

}

/* =========================
HEADER
========================= */

/* =========================
HEADER
========================= */

header{

    background:#1f3d8b;

    padding:15px 0;

    position:sticky;

    top:0;

    z-index:9999;

}

.nav-container{

    display:flex;

    justify-content:space-between;

    align-items:center;

    position:relative;

}

.logo img{

    width:120px;

}

/* NAV */

nav ul{

    display:flex;

    gap:30px;

    list-style:none;

}

nav a{

    color:white;

    text-decoration:none;

    font-weight:bold;

    transition:0.3s;

}

nav a:hover{

    color:#CF2E26;

    transform:translateY(-2px);

}
nav a{

    display:inline-block;

}

/* BOTÓN HAMBURGUESA */

.menu-toggle{

    display:none;

    color:white;

    font-size:38px;

    cursor:pointer;

    user-select:none;

}

/* =========================
MOBILE
========================= */

@media(max-width:900px){

    .menu-toggle{

        display:block;

    }

    nav{

        position:absolute;

        top:100%;

        left:0;

        width:100%;

        background:#1f3d8b;

        max-height:0;

        overflow:hidden;

        transition:0.4s ease;

    }

    nav.active{

        max-height:500px;

        padding:20px 0;

    }

    nav ul{

        flex-direction:column;

        align-items:center;

        gap:25px;

    }

}

/* =========================
SLIDER
========================= */

.slider{

    position:relative;
    width:100%;
    height:600px;
    overflow:hidden;

}

.slides{

    display:none;
    width:100%;
    height:100%;

}

.slides img{

    width:100%;
    height:100%;
    object-fit:cover;

}

.active{

    display:block;

}

.fade{

    animation:fade 1s;

}

@keyframes fade{

    from{opacity:.4}
    to{opacity:1}

}

.prev,
.next{

    position:absolute;
    top:50%;
    transform:translateY(-50%);
    background:rgba(255,255,255,0.4);
    border:none;
    color:white;
    font-size:35px;
    padding:10px 20px;
    cursor:pointer;
    border-radius:50%;
    transition:0.3s;

}

.prev:hover,
.next:hover{

    background:rgba(255,255,255,0.8);

}

.prev{

    left:20px;

}

.next{

    right:20px;

}

/* =========================
SECCIONES
========================= */

section{

    padding:80px 0;

}

h2{

    text-align:center;
    color:var(--rojo);
    margin-bottom:30px;
    font-size:40px;

}

/* =========================
HISTORIA
========================= */

.historia{

    text-align:center;

}

.historia h3{

    margin-bottom:20px;
    font-size:28px;

}

.historia p{

    max-width:900px;
    margin:auto;
    line-height:1.8;

}

.logos-historia{

    display:flex;
    justify-content:center;
    align-items:center;
    gap:50px;
    margin-bottom:40px;
    flex-wrap:wrap;

}

.logos-historia{

    display:flex;
    justify-content:center;
    align-items:center;

    gap:70px;

    flex-wrap:wrap;

    margin-bottom:50px;

}

/* SAFA */

.logo-safa{

    width:440px;
    height:auto;

    object-fit:contain;

}

/* COOEDUCA */

.logo-coeduca{

    width:170px;
    height:auto;

    object-fit:contain;

}
.historia{

    text-align:center;

}

.historia h2{

    margin-top:10px;

}

.historia p{

    max-width:900px;
    margin:auto;

    line-height:1.8;

}
.botones-historia{

    display:flex;
    justify-content:center;
    gap:30px;
    margin-top:40px;
    flex-wrap:wrap;

}

.botones-historia a{

    background:var(--rojo);
    color:white;
    text-decoration:none;
    padding:15px 30px;
    font-weight:bold;
    border-radius:6px;
    transition:0.3s;

}

.botones-historia a:hover{

    transform:translateY(-5px);

}

/* =========================
SERVICIOS
========================= */

.servicios{

    text-align:center;

}

.servicios-grid{

    display:grid;

    grid-template-columns:1fr 450px 1fr;

    gap:50px;

    align-items:start;

    margin-top:60px;

}

/* COLUMNAS */

.servicio-col{

    display:flex;

    flex-direction:column;

}

/* IZQUIERDA */

.servicio-izquierda{

    text-align:right;

    align-items:flex-end;

}

/* DERECHA */

.servicio-derecha{

    text-align:left;

    align-items:flex-start;

}

/* TITULOS */

.servicios h3{

    font-size:24px;

    margin-bottom:10px;

}

/* LISTAS */

.servicios ul{

    list-style:none;

    padding:0;

    margin:0 0 50px 0;

}

.servicios li{

    margin-bottom:8px;

    line-height:1.3;

    font-size:14px;

}

/* IMAGEN CENTRAL */

.servicio-imagen{

    display:flex;

    justify-content:center;

    align-items:center;

}

.servicio-imagen img{

    width:100%;

    max-width:450px;

    border-radius:10px;

}

/* RESPONSIVE */

@media(max-width:900px){

    .servicios-grid{

        grid-template-columns:1fr;

    }

    .servicio-izquierda,
    .servicio-derecha{

        text-align:center;

        align-items:center;

    }

}

/* =========================
INFORMACIÓN
========================= */

.informacion-grid{

    display:grid;
    grid-template-columns:1fr 1fr;
    gap:30px;

}

.info-pequenas{

    display:flex;
    flex-direction:column;
    gap:20px;

}

.info-grande img,
.info-pequenas img{

    border-radius:10px;
    transition:0.3s;

}

.info-grande img:hover,
.info-pequenas img:hover{

    transform:scale(1.02);

}

/* =========================
PLATAFORMAS
========================= */

.plataformas-grid{

    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:30px;
    align-items:center;

}

.plataformas-grid img{

    width:100%;
    max-width:250px;
    margin:auto;
    border-radius:10px;
    transition:0.3s;

}

.plataformas-grid img:hover{

    transform:scale(1.02);

}

.plataformas-grid a{

    display:flex;
    justify-content:center;
    align-items:center;

}

.plataformas-grid img{

    max-height:120px;
    width:auto;

}
/* =========================
CONTADORES
========================= */

.contador-section{

    position:relative;
    background:url('../img/historia.jpg') center center/cover no-repeat;
    color:white;

}

.overlay{

    position:absolute;
    inset:0;
    background:rgba(0, 0, 0, 0);

}

.contador-contenido{

    position:relative;
    z-index:2;

}

.contador-section h2{

    color:white;

}

.contador-grid{

    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:30px;
    text-align:center;
    margin-top:50px;

}

.contador{

    font-size:60px;
    margin-bottom:10px;

}

/* =========================
REDES
========================= */

.redes-grid{

    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:40px;
    align-items:center;

}

.redes-grid img{

    width:250px;
    margin:auto;
    transition:0.3s;

}

.redes-grid img:hover{

    transform:scale(1.05);

}

/* =========================
CONTACTO
========================= */

.contacto{

    text-align:center;

}

.contacto p{

    margin-bottom:20px;
    font-size:24px;

}
/* =========================
CONTACTO MODERNO
========================= */

.contacto{

    text-align:center;

}

.contact-card{

    max-width:700px;

    margin:40px auto 0;

    background:var(--card);

    border-radius:20px;

    padding:40px;

    box-shadow:0 10px 30px rgba(0,0,0,0.08);

    display:flex;

    flex-direction:column;

    gap:25px;

}

.contact-item{

    display:flex;

    align-items:center;

    gap:20px;

    font-size:22px;

    text-align:left;

    padding-bottom:20px;

    border-bottom:1px solid rgba(0,0,0,0.08);

}

.contact-item:last-child{

    border:none;
    padding-bottom:0;

}

.contact-item span{

    font-size:28px;

    color:#1f3d8b;

    min-width:40px;

}


/* MOBILE */

@media(max-width:600px){

    .contact-card{

        padding:25px;

    }

    .contact-item{

        font-size:18px;

        gap:15px;

    }

    .contact-item span{

        font-size:24px;

    }

}
/* =========================
FOOTER
========================= */

footer{

    background:var(--azul);
    color:white;
    padding:20px 0;

}

.footer-grid{

    display:flex;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:10px;

}

/* =========================
ANIMACIONES
========================= */

body.index-page section{

    opacity:0;
    transform:translateY(40px);
    transition:1s;

}

body.index-page section.show{

    opacity:1;
    transform:translateY(0);

}

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

@media(max-width:1024px){

    .slider{

        height:450px;

    }

    .servicios-grid{

        grid-template-columns:1fr;

    }

}

@media(max-width:900px){

    .informacion-grid,
    .plataformas-grid,
    .contador-grid,
    .redes-grid{

        grid-template-columns:1fr;

    }

    .slider{

        height:350px;

    }

    h2{

        font-size:32px;

    }

    .contacto p{

        font-size:20px;

    }

}

@media(max-width:768px){

    .nav-container{

        flex-direction:column;

    }

    nav ul{

        justify-content:center;

    }

    .slider{

        height:300px;

    }

    section{

        padding:60px 0;

    }

}

@media(max-width:600px){

    .logo img{

        width:100px;

    }

    nav ul{

        flex-direction:column;
        align-items:center;
        gap:12px;

    }

    .slider{

        height:220px;

    }

    .prev,
    .next{

        font-size:20px;
        padding:8px 12px;

    }

    h2{

        font-size:28px;

    }

    .historia h3{

        font-size:22px;

    }

    .contacto p{

        font-size:18px;

    }

    .redes-grid img{

        width:180px;

    }

    .contador{

        font-size:38px;

    }

    .botones-historia a{

        width:100%;
        text-align:center;

    }

}

/* =========================
SEPARADORES
========================= */

.separador{

    width:90%;
    max-width:1200px;
    margin:0 auto;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:15px;

}

.linea{

    flex:1;
    height:5px;
    background:#1f3d8b;
    border-radius:20px;

}

.ovalo{

    width:160px;
    height:40px;

    border:5px solid #1f3d8b;
    border-radius:50px;

    background:transparent;

}

/* MODO OSCURO */

@media (prefers-color-scheme: dark){

    .linea{

        background:#1f3d8b;

    }

    .ovalo{

        border-color:#1f3d8b;

    }

}

/* RESPONSIVE */

@media(max-width:600px){

    .ovalo{

        width:90px;
        height:28px;

    }

    .linea{

        height:4px;

    }

}

/* =========================
WHATSAPP FLOTANTE
========================= */

.whatsapp{

    position:fixed;

    right:25px;
    bottom:25px;

    width:70px;
    height:70px;

    z-index:9999;

    transition:0.3s;

}

.whatsapp img{

    width:100%;
    height:100%;

    object-fit:contain;

}

.whatsapp:hover{

    transform:scale(1.1);

}

/* MOBILE */

@media(max-width:600px){

    .whatsapp{

        width:60px;
        height:60px;

        right:15px;
        bottom:15px;

    }

}

/* =========================
CONTACTO + MAPA
========================= */

.contact-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:40px;

    margin-top:40px;

    align-items:stretch;

}

.contact-card{

    background:var(--card);

    border-radius:20px;

    padding:40px;

    box-shadow:0 10px 30px rgba(0,0,0,0.08);

    display:flex;

    flex-direction:column;

    justify-content:center;

    gap:25px;

}

.contact-item{

    display:flex;

    align-items:center;

    gap:20px;

    font-size:22px;

    text-align:left;

    padding-bottom:20px;

    border-bottom:1px solid rgba(0,0,0,0.08);

}

.contact-item:last-child{

    border:none;

    padding-bottom:0;

}

.contact-item span{

    font-size:28px;

    color:#1f3d8b;

    min-width:40px;

}

/* MAPA */

.mapa{

    border-radius:20px;

    overflow:hidden;

    min-height:100%;

    box-shadow:0 10px 30px rgba(0,0,0,0.08);

}

.mapa iframe{

    width:100%;

    height:100%;

    min-height:450px;

    border:none;

}



/* RESPONSIVE */

@media(max-width:900px){

    .contact-grid{

        grid-template-columns:1fr;

    }

}

@media(max-width:600px){

    .contact-card{

        padding:25px;

    }

    .contact-item{

        font-size:18px;

        gap:15px;

    }

    .contact-item span{

        font-size:24px;

    }

    .mapa iframe{

        min-height:350px;

    }

}

/* =========================
CORRECCIÓN ANCLAS MENU
========================= */

section{

    scroll-margin-top:120px;

}

/* =========================
COOEDUCA
========================= */

.coeduca{

    text-align:center;

    padding-top:40px;

}

.coeduca-logo{

    width:220px;

    margin:auto;

    margin-bottom:30px;

}

.coeduca p{

    max-width:900px;

    margin:auto;

    line-height:1.8;

    font-size:16px;

}

/* RESPONSIVE */

@media(max-width:600px){

    .coeduca-logo{

        width:160px;

    }

    .coeduca p{

        font-size:18px;

    }

}

/* =========================
PRELOADER
========================= */

#preloader{

    position:fixed;

    top:0;
    left:0;

    width:100%;
    height:100vh;

    background:#273989;

    display:flex;

    justify-content:center;
    align-items:center;

    z-index:999999;

    transition:opacity 0.8s ease,
               visibility 0.8s ease;

}

#preloader img{

    width:280px;

    animation:logoFloat 2s ease-in-out infinite;

}

/* Animación */

@keyframes logoFloat{

    0%{
        transform:translateY(0px);
        opacity:0.8;
    }

    50%{
        transform:translateY(-10px);
        opacity:1;
    }

    100%{
        transform:translateY(0px);
        opacity:0.8;
    }

}

/* Ocultar */

#preloader.hide{

    opacity:0;
    visibility:hidden;

}

/* =========================
INFORMACIÓN
========================= */

.informacion{

    padding: 80px 0;

}

.info-grid{

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;

    margin-top: 60px;

}

/* IMAGEN GRANDE */

.info-principal{

    display: flex;
    justify-content: center;
    align-items: center;

}

.info-principal img{

    width: 100%;
    max-width: 650px;

    height: auto;

    display: block;

    transition: 0.3s;

}

.info-principal img:hover{

    transform: scale(1.02);

}

/* LADO DERECHO */

.info-secundaria{

    display: flex;
    flex-direction: column;
    gap: 30px;

}

.info-secundaria img{

    width: 100%;
    max-width: 520px;

    height: auto;

    display: block;

    transition: 0.3s;

}

.info-secundaria img:hover{

    transform: scale(1.02);

}

/* RESPONSIVE */

@media (max-width: 900px){

    .info-grid{

        grid-template-columns: 1fr;

    }

    .info-principal,
    .info-secundaria{

        justify-content: center;
        align-items: center;

    }

    .info-secundaria{

        width: 100%;

    }

}
