    body {
        font-family: 'Segoe UI', sans-serif;
        margin: 0;
        background-color: #f9f9f9;
        color: #333;
    }

    /* Barra de navegación principal colorida */
    header {
        background: linear-gradient(90deg, #004aad 60%, #1e90ff 100%);
        color: white;
        padding: 1.2rem 2rem;
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 12px rgba(0, 74, 173, 0.13);
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .logo-title {
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }

    .logo-title img {
        height: 60px;
        filter: drop-shadow(0 2px 8px #1e90ff44);
    }

    .logo-title h1 {
        margin: 0;
        font-size: 1.7rem;
        color: #fff;
        text-shadow: 0 2px 8px #004aad44;
    }

    nav {
        display: flex;
        gap: 2rem;
        flex-wrap: wrap;
    }

    nav a {
        color: #fff;
        text-decoration: none;
        font-weight: bold;
        font-size: 1.08em;
        padding: 8px 18px;
        border-radius: 8px;
        transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    }

    nav a:hover,
    .submenu a:hover {
        background: #fff;
        color: #004aad;
        box-shadow: 0 2px 8px #004aad22;
    }

    .menu-item {
        position: relative;
    }

    .submenu {
        display: none;
        position: absolute;
        background: linear-gradient(90deg, #e0e7ff 60%, #f8fafc 100%);
        top: 100%;
        left: 0;
        min-width: 250px;
        border-radius: 8px;
        box-shadow: 0 2px 12px #004aad22;
        z-index: 1001;
        padding: 0.5rem 0;
    }

    .submenu a {
        display: block;
        color: #004aad;
        padding: 0.5rem 1rem;
        text-decoration: none;
        font-weight: bold;
        border-radius: 6px;
        transition: background 0.2s, color 0.2s;
    }

    .submenu a:hover {
        background: #dbeafe;
        color: #1e90ff;
    }

    .menu-item:hover .submenu {
        display: block;
    }

    .eventos-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 2rem;
        padding: 2rem;
        max-width: 1200px;
        /* Controlar ancho máximo */
        margin: auto;
    }

    .evento-card {
        background: white;
        border-radius: 12px;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        transition: transform 0.2s ease-in-out;
        display: flex;
        flex-direction: column;
    }

    .evento-card:hover {
        transform: translateY(-5px) scale(1.02);
    }


    .evento-img {
        width: 100%;
        height: 220px;
        object-fit: contain;
        /* no recorta */
        background-color: #f9f9f9;
        /* relleno si sobra espacio */
    }


    .evento-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 1rem;
    }

    .evento-info h3 {
        margin: 0.6rem 0;
        font-size: 1.3rem;
        color: #004aad;
        text-align: center;
        min-height: 3rem;
        /* 🔹 asegura misma altura de títulos */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .evento-info ul {
        list-style: none;
        padding: 0;
        margin: 0 0 1rem 0;
        font-size: 1rem;
        color: #444;
        line-height: 1.6;
        min-height: 8rem;
        /* 🔹 asegura misma altura de listas */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .countdown {
        text-align: center;
        font-weight: bold;
        color: #007bff;
        font-size: 1.1rem;
        margin-bottom: 1rem;
        min-height: 1.4em;
        transition: opacity 0.5s ease;
    }

    .evento-botones {
        margin-top: auto;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        /* asegura que quede en el pie */
    }

    .botones-principal {
        display: flex;
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
        margin-bottom: 1rem;
    }

    .btn-inscripcion {
        padding: 10px 22px;
        border-radius: 6px;
        font-weight: bold;
        text-decoration: none;
        color: white;
        display: inline-block;
        transition: background-color 0.3s ease, box-shadow 0.3s ease;
    }

    .btn-inscripcion.rojo {
        background-color: #d40000;
        box-shadow: 0 4px 8px rgba(212, 0, 0, 0.4);
    }

    .btn-inscripcion.rojo:hover {
        background-color: #a80000;
        box-shadow: 0 6px 14px rgba(168, 0, 0, 0.6);
    }

    .btn-inscripcion.verde {
        background-color: #28a745;
        box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
    }

    .btn-inscripcion.verde:hover {
        background-color: #218838;
        box-shadow: 0 6px 14px rgba(33, 136, 56, 0.6);
    }

    .btn-inscripcion.azul {
        background-color: #007bff;
        box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
    }

    .btn-inscripcion.azul:hover {
        background-color: #0056b3;
        box-shadow: 0 6px 14px rgba(0, 86, 179, 0.6);
    }

    .btn-inscripcion.ancho-completo {
        display: block;
        width: 100%;
        text-align: center;
        /*margin-top: 1rem;*/
    }

    footer {
        text-align: center;
        padding: 1rem;
        background-color: #eee;
        font-size: 0.9rem;
        margin-top: 3rem;
    }

    .titulo-eventos {
        text-align: center;
        font-size: 2rem;
        color: blue;
        margin-top: 3rem;
        margin-bottom: -1rem;
        font-weight: bold;
    }

    @media (max-width: 768px) {
        header {
            flex-direction: column;
            align-items: flex-start;
        }

        nav {
            justify-content: flex-start;
            width: 100%;
            margin-top: 1rem;
        }

    }

    /* Fondo del modal */
    .modal {
        display: none;
        /* Oculto por defecto */
        position: fixed;
        z-index: 2000;
        padding-top: 60px;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 0, 0, 0.8);
    }

    /* Imagen ampliada */
    .modal-contenido {
        margin: auto;
        display: block;
        max-width: 80%;
        max-height: 80%;
        border-radius: 10px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
        animation: zoom 0.3s;
    }

    @keyframes zoom {
        from {
            transform: scale(0.7);
        }

        to {
            transform: scale(1);
        }
    }

    /* Texto debajo (opcional) */
    #caption {
        margin: 15px auto;
        text-align: center;
        color: #f1f1f1;
        font-size: 1.1rem;
    }

    /* Botón cerrar */
    .cerrar {
        position: absolute;
        top: 20px;
        right: 35px;
        color: #fff;
        font-size: 40px;
        font-weight: bold;
        cursor: pointer;
        transition: color 0.2s;
    }

    .cerrar:hover {
        color: #ff4444;
    }

    /* Botón hamburguesa */
    .menu-toggle {
        display: none;
        font-size: 1.8rem;
        background: none;
        border: none;
        color: white;
        cursor: pointer;
    }

    /* Versión escritorio */
    nav {
        display: flex;
        gap: 2rem;
        flex-wrap: wrap;
    }

    /* Versión móvil */
    @media (max-width: 768px) {
        .menu-toggle {
            display: block;
        }

        nav {
            display: none;
            /* oculto por defecto en móvil */
            flex-direction: column;
            width: 100%;
            background: #004aad;
            margin-top: 1rem;
            border-radius: 8px;
        }

        nav.show {
            display: flex;
            /* se muestra cuando el usuario clickea */
        }

        .submenu {
            position: static;
            /* los submenús en móvil se comportan como bloques */
            background: #1e3a8a;
            box-shadow: none;
            margin-left: 1rem;
        }

        .submenu a {
            color: #fff;
        }
    }