﻿/* =================== BASE =================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* ===== MENÚ ===== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #ddd;
    z-index: 1000;
}

    header nav {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 15px 30px;
        position: relative;
    }

        header nav img {
            max-width: 150px;
            margin-right: 20px;
        }

        header nav .menu-links {
            display: flex;
            gap: 30px;
        }

        header nav a {
            text-decoration: none;
            color: #333;
            font-weight: bold;
            transition: color 0.3s;
        }

            header nav a:hover {
                color: #007acc;
            }

/* ===== BOTÓN HAMBURGUESA ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
}

    .menu-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background: #333;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

/* =================== SECCIONES =================== */
section {
    padding: 120px 20px 80px;
    min-height: 100vh;
}

    section h2 {
        margin-bottom: 30px;
        text-align: center;
        font-size: 2em;
    }

/* ===== HERO ===== */
#inicio {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #f5f5f5;
}

    #inicio h1 {
        font-size: 3em;
        margin-bottom: 10px;
    }

    #inicio h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    #inicio a {
        display: inline-block;
        padding: 12px 28px;
        background: #007acc;
        color: #fff;
        text-decoration: none;
        border-radius: 6px;
        transition: background 0.3s;
    }

        #inicio a:hover {
            background: #005fa3;
        }

/* ===== PROGRAMAS ===== */
#programas {
    text-align: center;
    position: relative;
    overflow: hidden;
}

    #programas::before {
        content: "";
        position: absolute;
        top: 25%;
        left: -10%;
        width: 120%;
        height: 400px;
        background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 500' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23007acc' fill-opacity='0.10' d='M0,256C120,224,240,192,360,202.7C480,213,600,267,720,282.7C840,299,960,277,1080,250.7C1200,224,1320,192,1440,202.7V500H0Z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: 100% auto;
        pointer-events: none;
        z-index: 0;
        animation: ondaMovimiento 20s ease-in-out infinite alternate;
    }

    #programas > * {
        position: relative;
        z-index: 1;
    }

    #programas .contenedor-programas {
        display: flex;
        justify-content: center;
        gap: 40px;
        width: 100%;
    }

    #programas .programa {
        width: 300px;
        flex: 0 0 300px;
        padding: 20px;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(0,0,0,0.05);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        cursor: pointer;
        overflow: hidden;
    }

        #programas .programa:hover {
            transform: translateY(-8px);
            box-shadow: 0 14px 30px rgba(0,0,0,0.1);
        }

        #programas .programa img {
            width: 100%;
            height: 180px;
            object-fit: cover;
            border-radius: 10px;
            margin-bottom: 15px;
            transition: transform 0.4s ease;
        }

        #programas .programa:hover img {
            transform: scale(1.05);
        }

        #programas .programa h3 {
            margin-bottom: 8px;
            color: #007acc;
        }

        #programas .programa p {
            font-size: 0.95em;
        }

        #programas .programa:nth-child(1) {
            background: #9BD3CC;
        }

        #programas .programa:nth-child(2) {
            background: #FFB088;
        }

        #programas .programa:nth-child(3) {
            background: #F0E599;
        }

/* ===== CÓMO APRENDEMOS ===== */
#aprendemos {
    text-align: center;
    position: relative;
    overflow: hidden;
}

    #aprendemos::before {
        content: "";
        position: absolute;
        top: 25%;
        left: -10%;
        width: 120%;
        height: 400px;
        background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 500' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23007acc' fill-opacity='0.10' d='M0,256C120,224,240,192,360,202.7C480,213,600,267,720,282.7C840,299,960,277,1080,250.7C1200,224,1320,192,1440,202.7V500H0Z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: 100% auto;
        pointer-events: none;
        z-index: 0;
        animation: ondaMovimiento 20s ease-in-out infinite alternate;
    }

    #aprendemos > * {
        position: relative;
        z-index: 1;
    }

    #aprendemos .bloque-aprendemos {
        display: flex;
        justify-content: center;
        gap: 30px;
        margin-top: 40px;
    }

    #aprendemos .item {
        width: 280px;
        padding: 25px 20px;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(0,0,0,0.05);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

        #aprendemos .item:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 25px rgba(0,0,0,0.08);
        }

        #aprendemos .item h3 {
            font-size: 1.1em;
            margin-bottom: 12px;
            color: #007acc;
        }

        #aprendemos .item p {
            font-size: 0.95em;
            line-height: 1.5;
        }

    #aprendemos .icono {
        font-size: 32px;
        color: #007acc;
        margin-bottom: 15px;
    }

/* ===== ACORDEÓN CONTENIDOS ===== */
#contenidos {
    position: relative;
    overflow: hidden;
}

    #contenidos::before {
        content: "";
        position: absolute;
        top: 25%;
        left: -10%;
        width: 120%;
        height: 400px;
        background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 500' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23007acc' fill-opacity='0.10' d='M0,256C120,224,240,192,360,202.7C480,213,600,267,720,282.7C840,299,960,277,1080,250.7C1200,224,1320,192,1440,202.7V500H0Z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: 100% auto;
        pointer-events: none;
        z-index: 0;
        animation: ondaMovimiento 20s ease-in-out infinite alternate;
    }

    #contenidos > * {
        position: relative;
        z-index: 1;
    }

    #contenidos .acordeon {
        max-width: 800px;
        margin: 40px auto 0;
    }

    #contenidos .item-acordeon {
        margin-bottom: 15px;
    }

    #contenidos .titulo {
        width: 100%;
        padding: 15px;
        font-size: 1em;
        font-weight: bold;
        border: none;
        border-radius: 8px;
        background: #007acc;
        color: white;
        cursor: pointer;
        text-align: left;
    }

    #contenidos .contenido {
        display: none;
        padding: 15px;
        background: #f5f5f5;
        border-radius: 0 0 8px 8px;
    }

        #contenidos .contenido ul {
            padding-left: 20px;
        }

        #contenidos .contenido li {
            margin-bottom: 8px;
            font-size: 0.95em;
        }

    #contenidos strong {
        color: #007acc;
    }

/* ===== CONTACTO ===== */
#contacto {
    padding: 60px 20px;
    background: #f9f9f9;
}

    #contacto h2 {
        text-align: center;
        margin-bottom: 10px;
    }

    #contacto p {
        text-align: center;
        margin-bottom: 10px;
    }

.contacto-info {
    margin-bottom: 30px;
    text-align: center;
}

#form-whatsapp {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto 40px;
}

    #form-whatsapp input,
    #form-whatsapp select,
    #form-whatsapp textarea {
        padding: 12px;
        border-radius: 8px;
        border: 1px solid #ccc;
        font-size: 1em;
    }

    #form-whatsapp textarea {
        resize: none;
        height: 100px;
    }

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: 0.3s;
}

    .btn-whatsapp:hover {
        background: #1ebe5d;
    }

.contacto-info a {
    color: inherit;
    text-decoration: underline;
}

    .contacto-info a:hover {
        opacity: 0.7;
    }

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

    .whatsapp-float.show {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }

    .whatsapp-float:hover {
        transform: scale(1.1);
    }

.whatsapp-icon {
    width: 32px;
    height: 32px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-float.pulse {
    animation: pulse 2.5s infinite;
}

.direccion {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mapa-icono {
    margin-left: 8px;
    color: #007acc;
    font-size: 1.5rem;
    vertical-align: bottom;
    transition: transform 0.2s ease;
}

    .mapa-icono:hover {
        transform: scale(1.15);
    }

    .mapa-icono i {
        color: #007acc;
        font-size: 1.5rem;
        vertical-align: middle;
        transition: transform 0.2s ease;
    }

html {
    scroll-behavior: smooth;
}

.seccion-mapa {
    margin-top: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

body {
    background: linear-gradient(-45deg, #f8f9fa, #eef4ff, #f8f9fa, #e9f1ff);
    background-size: 400% 400%;
    animation: fondoSuave 18s ease infinite;
    line-height: 1.6;
    color: #333;
}

@keyframes fondoSuave {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ===== ONDAS ANIMADAS ===== */
@keyframes ondaMovimiento {
    0% {
        transform: translateX(0px) translateY(0px);
    }

    100% {
        transform: translateX(-40px) translateY(20px);
    }
}

/* =================== RESPONSIVE =================== */
@media (max-width: 768px) {
    header nav {
        justify-content: space-between;
    }

    .menu-toggle {
        display: flex;
    }

    header nav .menu-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 15px 0;
        display: none;
        border-bottom: 1px solid #ddd;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

        header nav .menu-links.active {
            display: flex;
            opacity: 1;
            transform: translateY(0);
        }

    #programas .contenedor-programas,
    #aprendemos .bloque-aprendemos {
        flex-direction: column;
        align-items: center;
    }

    #programas .programa,
    #aprendemos .item {
        width: 100%;
        max-width: 300px;
        margin-bottom: 20px;
    }
}
