body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #007bff;
    color: #fff;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 200px;
    height: 106px;
    margin-left: 20px;
}

nav ul {
    list-style: none;
    display: flex;
    margin-right: 20px;
    text-align: inherit;
}

nav ul li {
    margin-left: 20px;
    text-align: inherit;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
}

.banner {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 39%; /* Ajusta según la proporción de tus banners */
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.banner-controls button {
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1.5em;
    cursor: pointer;
}

.content {
    width: 76%;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.content h2 {
    color: #007bff;
}

.content-img {
    width: 400px;
    height: 400px;
    float: right;
    margin-left: 20px;
}

.content ul {
    list-style: disc;
    margin-left: 20px;
}

form label {
    display: block;
    margin-bottom: 5px;
}

form input, form textarea {
    width: 100%;
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho */
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

form button {
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

footer {
    background-color: #3399FF;
    color: #FFFFFF;
    text-align: center;
    padding: 20px 10px; /* Ajusta el padding para el espaciado interno */
    margin: 0 auto; /* Centra el footer horizontalmente */
    display: flex; /* Cambiado de 'compact' a 'flex' */
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

footer > * {
    margin: 10px; /* Espacio entre los elementos del pie de página */
}

.social-icons img {
    width: 40px;
    height: 40px;
}

.back-to-top {
    display: flex;
    justify-content: right;
    align-items: right;
    width: 40px;
    height: 40px;
    background-color: #007bff;
    border-radius: 50%;
    right: inherit;
}

/* Media Queries para Responsive Design */

/* Para tablets (ancho máximo 768px) */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
    }

    .logo {
        margin-left: 0;
        margin-bottom: 10px;
    }

    nav ul {
        margin-right: 0;
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin-left: 0;
        margin-top: 10px;
    }

    .content {
        width: auto;
		height: auto;
    }

    .content-img {
        float: none;
        width: 100%;
        height: auto;
        margin-left: 0;
    }
}

/* Para móviles (ancho máximo 480px) */
@media (max-width: 480px) {
    header {
        padding: 5px 0;
    }

    nav ul li a {
        font-size: 1em;
    }

    .banner-controls button {
        padding: 8px 15px;
        font-size: 1.2em;
    }

    footer {
        flex-direction: column;
    }

    footer > * {
        margin: 5px;
    }

    .social-icons img {
        width: 30px;
        height: 30px;
    }

    form input, form textarea {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Estilos para el menú hamburguesa */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-toggle {
    display: none; /* Oculto por defecto */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle-icon {
    width: 30px;
    height: 3px;
    background-color: #fff;
    position: relative;
    display: block;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    width: 30px;
    height: 3px;
    background-color: #fff;
    position: absolute;
}

.nav-toggle-icon::before {
    top: -8px;
}

.nav-toggle-icon::after {
    top: 8px;
}

.nav-links {
    list-style: none;
    display: flex;
    margin-right: 20px;
}

.nav-links li {
    margin-left: 20px;
}

nav-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
}

/* Media Query para pantallas pequeñas */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Oculta el menú en pantallas pequeñas */
        flex-direction: column;
        width: 100%;
        background-color: #007bff;
        position: absolute;
        top: 60px; /* Ajusta según la altura de tu cabecera */
        left: 0;
        text-align: center;
        z-index: 10; /* Asegura que esté por encima de otros elementos */
    }

    .nav-links.active {
        display: flex; /* Muestra el menú cuando está activo */
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links li a {
        padding: 10px;
        display: block;
    }

    .nav-toggle {
        display: block; /* Muestra el botón del menú hamburguesa */
    }
}

/* Estilos para el menú hamburguesa */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-toggle {
    display: none; /* Oculto por defecto */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle-icon {
    width: 30px;
    height: 3px;
    background-color: #fff;
    position: relative;
    display: block;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    width: 30px;
    height: 3px;
    background-color: #fff;
    position: absolute;
}

.nav-toggle-icon::before {
    top: -8px;
}

.nav-toggle-icon::after {
    top: 8px;
}

.nav-links {
    list-style: none;
    display: flex;
    margin-right: 20px;
}

.nav-links li {
    margin-left: 20px;
}

nav-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
}

/* Media Query para pantallas pequeñas */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Oculta el menú en pantallas pequeñas */
        flex-direction: column;
        width: 100%;
        background-color: #007bff;
        position: absolute;
        top: 60px; /* Ajusta según la altura de tu cabecera */
        left: 0;
        text-align: center;
        z-index: 10; /* Asegura que esté por encima de otros elementos */
    }

    .nav-links.active {
        display: flex; /* Muestra el menú cuando está activo */
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links li a {
        padding: 10px;
        display: block;
    }

    .nav-toggle {
        display: block; /* Muestra el botón del menú hamburguesa */
    }
}
/* â”€â”€ Submenu desplegable del item "Cursos" del header (desktop.php) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
nav ul li.menu-desplegable {
    position: relative;
}

nav ul li.menu-desplegable .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #007bff;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    margin: 0;
    min-width: 240px;
    z-index: 1000;
    flex-direction: column;
    text-align: left;
}

/* Se abre al pasar el mouse y tambien al navegar con teclado (focus-within) */
nav ul li.menu-desplegable:hover .submenu,
nav ul li.menu-desplegable:focus-within .submenu {
    display: flex;
}

nav ul li.menu-desplegable .submenu li {
    margin: 0;
}

nav ul li.menu-desplegable .submenu li a {
    display: block;
    padding: 8px 16px;
    color: #000099;
    font-size: 1em;
    font-family: "Cooper Black", serif;
}

nav ul li.menu-desplegable .submenu li a:hover {
    background-color: #e7f1ff;
}

@media (max-width: 768px) {
    /* En el layout apilado del responsive, el submenu fluye en linea (sin flotar) */
    nav ul li.menu-desplegable .submenu {
        position: static;
        border: none;
        box-shadow: none;
    }
}

/* â”€â”€ Equipo de trabajo: galeria + lightbox (reemplaza el viejo swap onClick/onMouseOut
   que fallaba en pantallas tactiles, donde no existe el evento mouseout) â”€â”€â”€â”€â”€â”€â”€â”€ */
.equipo-pista {
    color: #666;
    font-size: 0.95em;
    margin: 6px 0 18px;
}

.equipo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
}

.miembro-equipo {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 14px 12px 10px;
    cursor: pointer;
    width: 150px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.miembro-equipo:hover,
.miembro-equipo:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 153, 0.18);
    outline: none;
    border-color: #007bff;
}

.miembro-equipo img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 8px;
    border: 3px solid #007bff;
}

.miembro-equipo span {
    display: block;
    color: #000099;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
}

.lightbox-equipo {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.lightbox-equipo[hidden] {
    display: none;
}

.lightbox-contenido {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    max-width: min(640px, 94vw);
    max-height: 92vh;
    overflow: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    animation: lightbox-aparecer 0.22s ease;
}

@keyframes lightbox-aparecer {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.lightbox-contenido img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    margin: 0 auto;
    border-radius: 8px;
}

#lightbox-nombre {
    text-align: center;
    color: #000099;
    font-weight: bold;
    font-size: 1.1em;
    margin: 10px 0 0;
}

.lightbox-cerrar {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 30px;
    line-height: 1;
    color: #000099;
    cursor: pointer;
}

.lightbox-cerrar:hover {
    color: #d00;
}
