/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f7f7f7;
    color: #333;
    line-height: 1.6;
}

/* HEADER */
header {
    text-align: center;
    background: #003366;
    color: white;
    padding: 30px 20px;
}

.logo {
    width: 420px;
    margin-bottom: 15px;
}

/* SECTIONS */
section {
    width: 90%;
    max-width: 1300px;
    margin: 30px auto;
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h2 {
    text-align: left;
    margin-bottom: 25px;
    color: #003366;
    font-size: 28px;
}

/* ------- CURSOS GRID ------- */

/* Contenedor general */
.cursos {
    background: white;
}

/* Contenedor de tarjetas */
.cursos-grid {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    justify-items: center;
}

/* Tarjeta de curso - tamaño fijo */
.curso {
    width: 100%;
    max-width: 290px;
    height: 480px; /* ← Tamaño igual para todas */
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: transform 0.2s ease;
    text-align: center;

    display: flex;
    flex-direction: column;     /* Alinea todo verticalmente */
    justify-content: space-between; /* Empuja el botón hacia abajo */
}

/* Imagen */
.curso img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

/* Título */
.curso h3 {
    background: #003366;
    color: white;
    padding: 10px;
    font-size: 18px;
}

/* Descripción */
.curso p {
    padding: 15px;
    flex-grow: 1;        /* Ocupa el espacio restante */
    max-height: 140px;   /* Para evitar que se salga */
    overflow: hidden;    /* Oculta texto de más */
    text-overflow: ellipsis;
}

/* Botón WhatsApp al fondo */
.whatsapp {
    display: block;
    margin: 10px auto 20px;
    width: 85%;
    background: #25D366;
    color: white;
    padding: 10px 0;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: 0.3s;
}

.curso:hover {
    transform: scale(1.03);
}


.whatsapp:hover {
    background: #1da851;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    background: #003366;
    color: white;
}

/* ------- RESPONSIVE ------- */

/* Tablets */
@media (max-width: 1000px) {
    .cursos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Celulares */
@media (max-width: 600px) {
    .cursos-grid {
        grid-template-columns: 1fr;
    }

    .logo {
        width: 300px;
    }
}



/* BARRA SUPERIOR */
.top-bar {
    width: 100%;
    background: #001f3f; /* azul oscuro elegante */
    padding: 6px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.btn-campus {
    color: white;
    background: #0074D9; /* celeste profesional */
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: 0.3s ease;
}

.btn-campus:hover {
    background: #005fa3;
}





/* MODAL */
 /* --- MODAL --- */
        .modal {
            display: none;
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.6);
            justify-content: center;
            align-items: center;
            z-index: 999;
        }

        .modal-content {
            background: #fff;
            padding: 25px;
            width: 90%;
            max-width: 400px;
            border-radius: 10px;
            position: relative;
            animation: aparecer 0.3s ease;
        }

        @keyframes aparecer {
            from { transform: scale(0.7); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        .cerrar {
            position: absolute;
            top: 10px;
            right: 15px;
            font-size: 22px;
            cursor: pointer;
        }

        .tabs {
            display: flex;
            margin-bottom: 15px;
        }

        .tab-btn {
            flex: 1;
            padding: 10px;
            background: #ddd;
            border: none;
            cursor: pointer;
            font-weight: bold;
        }

        .tab-btn.active {
            background: #007bff;
            color: white;
        }

        .form {
            display: none;
            flex-direction: column;
        }

        .form.active {
            display: flex;
        }

        .form input {
            padding: 10px;
            margin-bottom: 12px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }

        .btn-acceder {
            background: #007bff;
            color: white;
            padding: 12px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }

        .btn-acceder:hover {
            background: #0056b3;
        }
        
        
        .logo-modal {
    text-align: center;
    margin: 0px 0;
}

.logo-modal img {
    max-width: 120px; /* Ajusta el tamaño */
    height: auto;
}
