/* === IMPORTACIONES DE FUENTES (Deben ir al principio) === */

@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,600;1,600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rubik+Dirt&family=Rubik:ital,wght@0,600;1,600&display=swap');

/* === VARIABLES CSS GLOBALES === */

:root {
    /* Colores originales */
    --black: #0a0a0a;
    --white: #EDEDED;
    --silver: #CCCCCC;
    --red: #D50000;
    --red-light: #FF073A;
    --red-dark: #9E0000;
    --yellow: #FFD700;
    --yellow-gold: #FFA500;
}


/* === CLASES DE FUENTES GLOBALES === */

.unique-font {
    font-family: "Rubik Dirt", system-ui;
}

.regular-font {
    font-family: "Rubik", sans-serif;
}


/* === ESTILOS BASE DEL BODY === */

body {
    background-color: var(--black);
    color: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "Rubik", sans-serif;
    margin: 0;
    line-height: 1.6;
}


/* === ESTILOS CONTENIDO PRINCIPAL === */

main.container {
    flex-grow: 1;
    padding-top: 2rem;
    padding-bottom: 2rem;
}


/* === ENCABEZADO (NAVBAR) === */

.navbar {
    background-color: var(--black);
    border-bottom: 0.125rem solid var(--red);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    position: relative;
    /* Añadido para contexto de posicionamiento si es necesario */
}


/* --- ESTILO DEL CONTENEDOR NAVBAR --- */


/* Aplica Flexbox al contenedor DIRECTO dentro de la navbar */

.navbar>.container,
.navbar>.container-fluid {
    display: flex;
    /* QUITAMOS flex-wrap: nowrap; de aquí */
    justify-content: space-between;
    /* EMPUJA LOGO IZQ, RESTO DER */
    align-items: center;
    /* Alinea verticalmente */
}


/* --- FIN ESTILO CONTENEDOR NAVBAR --- */

.logo-header {
    max-height: 9vh;
    width: auto;
    flex-shrink: 0;
}

.nav-link {
    color: var(--white);
    font-family: "Rubik", sans-serif;
    padding-left: 1rem;
    padding-right: 1rem;
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.li-plantilla {
    transition: background-color 0.2s ease-in-out;
    border-radius: 7%;
}

.li-plantilla:hover {
    background-color: var(--red);
}

.li-plantilla:hover .nav-link {
    color: var(--black);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
    z-index: 10;
    /* Asegurar que esté sobre otros elementos si hay solapamiento */
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(237, 237, 237, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}


/* Comportamiento del div colapsable */

.navbar-collapse {
    /* No necesita flex-basis: 100% aquí, Bootstrap lo maneja */
    flex-grow: 1;
    align-items: center;
    width: 100%;
    /* Asegurar ancho completo cuando es visible */
}


/* --- Media Queries para Navbar --- */


/* Estilos del menú colapsado (Móvil) */

@media (max-width: 991.98px) {
    /* --- AJUSTE CLAVE MÓVIL --- */
    .navbar>.container,
    .navbar>.container-fluid {
        flex-wrap: wrap;
        /* PERMITE QUE EL navbar-collapse BAJE A LA SIGUIENTE LÍNEA */
    }
    /* --- FIN AJUSTE CLAVE MÓVIL --- */
    .navbar-collapse {
        /* Estilos visuales del menú desplegado */
        background-color: rgba(0, 0, 0, 0.9);
        /* Ligeramente más opaco */
        border-top: 1px solid var(--red);
        margin-top: 0.5rem;
        /* Espacio entre toggler y menú */
        padding: 1rem 0;
        backdrop-filter: blur(5px);
        width: 100%;
        /* Doble confirmación de ancho completo */
        order: 3;
        /* Asegura que vaya después del logo (1) y toggler (2) en el flujo flex wrap */
        /* Quitar cualquier posicionamiento absoluto si lo hubiera */
        position: static;
    }
    .navbar-nav {
        text-align: center;
        width: 100%;
    }
    .navbar-nav .nav-item.li-plantilla {
        width: 100%;
        border-bottom: 1px solid rgba(204, 204, 204, 0.2);
    }
    .navbar-nav .nav-item.li-plantilla:last-child {
        border-bottom: none;
    }
    .navbar-nav .nav-item.li-plantilla .nav-link {
        padding: 0.9rem 1rem;
        display: block;
        width: 100%;
    }
    .li-plantilla:hover {
        background-color: var(--red);
    }
    .li-plantilla:hover .nav-link {
        color: var(--black);
    }
}


/* Estilos del menú expandido (Desktop) */

@media (min-width: 992px) {
    /* --- AJUSTE CLAVE DESKTOP --- */
    .navbar>.container,
    .navbar>.container-fluid {
        flex-wrap: nowrap;
        /* ASEGURA QUE TODO QUEDE EN UNA LÍNEA EN DESKTOP */
    }
    /* --- FIN AJUSTE CLAVE DESKTOP --- */
    .navbar-collapse {
        display: flex !important;
        /* Fuerza display flex */
        flex-basis: auto;
        /* Ancho automático */
        width: auto;
        /* Ancho automático */
        order: 0;
        /* Resetear orden */
        background-color: transparent;
        /* Sin fondo especial */
        border-top: none;
        /* Sin borde */
        margin-top: 0;
        /* Sin margen */
        padding: 0;
        /* Sin padding extra */
        backdrop-filter: none;
        /* Sin blur */
    }
    .navbar-nav {
        margin-left: auto !important;
        /* EMPUJA LOS LINKS A LA DERECHA */
        flex-direction: row;
        /* Links en fila */
        gap: 1rem;
        /* Espacio entre LIs */
        width: auto;
        /* Ancho automático */
        text-align: left;
        /* Alinear texto a la izquierda por defecto */
    }
    .li-plantilla {
        border-radius: 7%;
        width: auto;
        /* Ancho automático */
        border-bottom: none;
        /* Sin borde inferior */
    }
    .navbar-nav .nav-item.li-plantilla .nav-link {
        padding: 0.5rem 1rem;
        /* Padding normal de desktop */
        display: inline-block;
        /* Comportamiento normal */
        width: auto;
    }
}


/* === ESTILOS GENERALES DE SECCIONES === */


/* Ajusta la alineación del texto en la sección principal para escritorio */

@media (min-width: 992px) {
    .hero-section .section-title-items {
        text-align: left;
        /* Alinea el texto a la izquierda en vista de escritorio */
    }
}


/* Reduce el tamaño de los títulos de la home en pantallas pequeñas */

@media (max-width: 767.98px) {
    .hero-section .section-title,
    .features-section .section-title,
    .join-section .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 575.98px) {
    .hero-section .section-title,
    .features-section .section-title,
    .join-section .section-title {
        font-size: 1.8rem;
    }
}

.hero-section,
.features-section,
.join-section {
    border-radius: 0.625rem;
    text-align: center;
    display: flex;
    flex-flow: column wrap;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    font-family: "Rubik", sans-serif;
    word-break: break-word;
}

.first-title {
    font-family: "Rubik Dirt", system-ui;
}

.section-title-div {
    padding: 0;
}

.section-title-img {
    display: flex;
    justify-content: center;
    align-items: center;
}

.section-title {
    color: var(--red);
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.hero-img {
    max-width: 100%;
    height: auto;
}


/* === FOOTER === */

footer {
    margin-top: auto;
    background-color: var(--black);
    color: var(--white);
}

.footer-top {
    background-color: var(--red);
    padding: 1.2rem 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.img-footer-partner {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    filter: grayscale(50%) brightness(1.1);
    transition: filter 0.3s ease;
}

.img-footer-partner:hover {
    filter: grayscale(0%) brightness(1);
}

.footer-bottom {
    padding: 1.5rem 1rem;
    text-align: center;
}

.social-icons a {
    color: var(--yellow);
    margin: 0 0.75rem;
    font-size: 1.6rem;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

.social-icons a:hover {
    color: var(--red-light);
    transform: scale(1.1);
}

.footer-bottom p {
    margin-top: 1.5rem;
    margin-bottom: 0;
    font-size: 0.85rem;
    color: var(--silver);
}


/* HOME */


/* === ESTILOS REDISEÑO HOME (V3 - CORREGIDO) === */

/* --- Hero Section (Limpio, sin superposición) --- */
.hero-section {
    padding: 5rem 0;
    background-color: var(--black); /* Fondo sólido */
}

.hero-text-column .section-title {
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(213, 0, 0, 0.4);
}

.hero-text-column .lead {
    color: var(--silver);
    font-size: 1.25rem;
}

.hero-text-column p {
    color: var(--white);
}

.hero-image-column {
    text-align: center; /* Centra la imagen si la columna es más ancha */
}

.hero-image-column .img-fluid {
    max-width: 100%; /* Asegura que la imagen no se salga de su columna */
    height: auto;
}

.hero-logo-small {
    max-height: 10rem; /* Controla el tamaño del logo pequeño */
    width: auto;
    margin-top: -1rem;
    margin-left: 6rem;
}

@media (max-width: 991.98px) {
    .hero-section {
        padding: 3rem 0;
        text-align: center;
    }
    .hero-text-column {
        order: 2; /* El texto va después de la imagen en móvil */
        margin-top: 2rem;
    }
    .hero-image-column {
        order: 1; /* La imagen va primero */
    }
    .hero-logo-small {
        margin-left: 4rem;
    }
}


/* --- Sección Unificada (Join & Features) - SIN CAMBIOS --- */
.join-features-section {
    padding: 5rem 0;
    background-color: #121212; /* Un gris muy oscuro para separar de negro puro */
}

.join-features-section .section-title {
    font-family: "Rubik Dirt", system-ui;
}


/* --- Tarjetas de Características --- */
.feature-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--red);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.feature-icon {
    font-size: 3rem;
    color: var(--red);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.feature-title {
    font-family: "Rubik", sans-serif;
    font-weight: 600;
    color: var(--yellow);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-text {
    color: var(--silver);
    font-size: 0.95rem;
    line-height: 1.6;
}


/* --- Tarjeta de CTA para Discord --- */
.discord-cta-card {
    background: linear-gradient(135deg, #282b30, #1e2124);
    border-radius: 0.75rem;
    padding: 2.5rem;
    border: 1px solid #444;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.discord-icon-link .svg-discord {
    transition: transform 0.3s ease;
}

.discord-icon-link:hover .svg-discord {
    transform: scale(1.1);
}

.discord-cta-title {
    font-family: "Rubik", sans-serif;
    font-weight: 600;
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.discord-cta-text {
    color: var(--silver);
    margin-bottom: 1.5rem;
}

.btn-discord {
    background-color: #5865F2; /* Color oficial de Discord */
    border-color: #5865F2;
    color: var(--white);
    font-weight: 600;
    padding: 0.7rem 1.8rem;
    transition: all 0.3s ease;
}

.btn-discord:hover {
    background-color: #4a56d1;
    border-color: #4a56d1;
    color: var(--white);
    transform: scale(1.05);
}

@media (max-width: 767.98px) {
    .discord-cta-card {
        text-align: center;
    }
}

/* === FIN ESTILOS REDISEÑO HOME (V3) === */


/* FIN DE HOME */


/* === ESTILOS PÁGINA PILOTOS (.nosotros-section) === */

.nosotros-section {
    padding-top: 3rem;
    padding-bottom: 1rem;
}

.nosotros-section .section-title {
    margin-bottom: 3rem;
}

.team-member {
    border-bottom: 1px solid rgba(204, 204, 204, 0.3);
    padding-bottom: 3rem;
    margin-bottom: 3rem !important;
}

.team-member:last-child {
    border-bottom: none;
    margin-bottom: 0 !important;
    padding-bottom: 0;
}

.member-visual {
    text-align: center;
}

.member-photo {
    max-width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 5px solid var(--red-light);
    object-fit: cover;
    aspect-ratio: 1 / 1;
    margin: 0 auto 1rem auto;
    display: block;
    background-color: var(--silver);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.member-photo:hover {
    box-shadow: 0 0 15px 4px rgba(255, 7, 58, 0.6), /* --red-light */
    0 0 25px 8px rgba(255, 215, 0, 0.5);
    /* --yellow */
    transform: scale(1.05);
}

.member-name {
    font-family: "Rubik", sans-serif;
    font-weight: 600;
    color: var(--yellow);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    text-align: center;
}

.member-info {
    text-align: left;
    color: var(--white);
}

.member-info p {
    font-family: "Rubik", sans-serif;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

.member-info p:last-child {
    margin-bottom: 0;
}

.member-info ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 1rem;
    margin-bottom: 0;
    font-family: "Rubik", sans-serif;
}

.member-info li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
    position: relative;
    padding-left: 1.5rem;
}

.member-info li::before {
    content: "\27A4";
    /* Flecha */
    color: var(--red);
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 0.9em;
}

.pilot_event_link {
    color: var(--red);
    text-decoration: none;
    /* Transición suave para el color y el subrayado */
    transition: color 0.1s, text-decoration 0.3s ease;
}

.pilot_event_link:hover {
    color: var(--red-dark);
    text-decoration: underline;
}


/* --- Media Query Pilotos (Móvil) --- */

@media (max-width: 767.98px) {
    .team-member {
        text-align: center;
        padding-bottom: 2rem;
        margin-bottom: 2rem !important;
    }
    .member-info {
        text-align: center;
        margin-top: 1.5rem;
        padding-left: 0;
    }
    .member-photo {
        max-width: 150px;
        height: 150px;
    }
    .member-name {
        font-size: 1.2rem;
    }
    .member-info ul {
        padding-left: 0;
        display: inline-block;
        text-align: left;
    }
    .member-info li {
        padding-left: 1.5rem;
    }
}


/* === ESTILOS PÁGINA CALENDARIO (.calendario-section) === */

.calendario-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.calendario-section .section-title {
    font-family: "Rubik Dirt", system-ui;
}

.event-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.calendario-section .card {
    background-color: #404040;
    border: 1px solid var(--silver);
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.calendario-section .card-img-top {
    width: 100%;
    aspect-ratio: 4 / 5;
    /* Proporción imagen */
    object-fit: cover;
}

.calendario-section .card-body {
    flex-grow: 1;
}

.calendario-section .card-footer {
    background-color: #383838;
    border-top: 1px solid var(--silver);
    padding: 0.75rem 1rem;
    margin-top: auto;
}

.competition-name {
    color: var(--yellow);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0;
    text-align: center;
}

.event-link:hover .card,
.event-link:focus .card {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(213, 0, 0, 0.5);
}

.event-link:focus {
    outline: none;
}

.event-link:focus .card {
    outline: 3px solid var(--yellow);
    outline-offset: 1px;
}


/* --- Media Query Calendario (Móvil) --- */

@media (max-width: 767.98px) {
    .calendario-section .section-title {
        font-size: 2rem;
    }
}


/* === ESTILOS PÁGINA INFORMACIÓN === */

.content-box {
    background-color: #444;
    padding: 1.5rem;
    border-radius: 0.375rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: var(--white);
}

.content-box img.img-fluid {
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

.content-box h3,
.content-box h4 {
    color: var(--yellow);
    font-family: "Rubik Dirt", system-ui;
    margin-bottom: 1rem;
}

.content-box p {
    font-family: "Rubik", sans-serif;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.content-box p:last-child {
    margin-bottom: 0;
}

.content-box ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.content-box li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.7rem;
    font-family: "Rubik", sans-serif;
    line-height: 1.6;
}

.content-box li::before {
    content: "\27A4";
    /* Flecha */
    color: var(--red);
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 0.9em;
}

.content-box.text-center-content {
    align-items: center;
    text-align: center;
}

.content-box.text-center-content ul {
    display: inline-block;
    text-align: left;
}


/* --- Hack para height: 100% en columnas Bootstrap --- */

.row>[class^="col-"] {
    display: flex;
    flex-direction: column;
}

.row>[class^="col-"]>.content-box {
    flex-grow: 1;
}


/* --- Media Query para espaciado de content-box en móvil --- */


/* === INICIO SECCIÓN RESPONSIVE CORREGIDA === */

@media (max-width: 767.98px) {
    /* Ajustes para tablet */
    .pilot-detail-image {
        width: 280px;
        height: 280px;
    }
    .pilot-detail-name {
        font-size: 2.1rem;
    }
    .pilot-section-title {
        font-size: 1.7rem;
    }
}

@media (max-width: 575.98px) {
    /* Ajustes para móvil */
    .pilot-detail-header {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    .pilot-detail-image {
        width: 220px;
        height: 220px;
    }
    .pilot-detail-name {
        font-size: 1.8rem;
    }
    .pilot-detail-quote {
        font-size: 1.1rem;
        max-width: 100%;
    }
    .section-separator {
        margin-top: 2rem;
    }
    .event-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .event-card-info {
        margin-right: 0;
        margin-bottom: 0.85rem;
        width: 100%;
    }
    .event-card-action {
        width: 100%;
    }
    /* Estilo para tarjetas de eventos finalizados */
    .event-card-inactive {
        opacity: 0.7;
        background-color: #e9e9e9;
        transition: opacity 0.3s ease;
    }
    .event-card-inactive:hover {
        opacity: 1;
    }
    .btn-view-event {
        display: block;
        text-align: center;
    }
}


/* === ESTILOS PÁGINA INFORMACIÓN PILOTO DETALLE === */

.pilot-detail-header {
    text-align: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.pilot-detail-image {
    width: 350px;
    height: 350px;
    max-width: 100%;
    /* AÑADIDO: Evita que la imagen se desborde del contenedor */
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
    background-color: var(--silver);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.pilot-detail-name {
    font-family: "Rubik", sans-serif;
    font-weight: 600;
    color: var(--yellow);
    font-size: 2.4rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
    word-break: break-word;
    /* AÑADIDO: Evita desbordamiento con nombres largos */
}

.pilot-detail-quote {
    font-family: "Rubik", sans-serif;
    font-style: italic;
    color: var(--white);
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

.section-separator {
    border: 0;
    border-top: 1px solid rgba(204, 204, 204, 0.25);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.pilot-info-section {
    margin-top: 0;
}

.pilot-section-title {
    font-family: "Rubik Dirt", system-ui;
    color: var(--red);
    font-size: 1.9rem;
    margin-bottom: 1.25rem;
    text-align: left;
    word-break: break-word;
}

.pilot-about-content p {
    font-family: "Rubik", sans-serif;
    color: var(--silver);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: left;
    white-space: pre-line;
}

.pilot-about-content p:last-child {
    margin-bottom: 0;
}

.pilot-join-date {
    font-family: "Rubik", sans-serif;
    color: var(--silver);
    font-size: 0.95rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    text-align: left;
}

.pilot-join-date .icon-calendar {
    margin-right: 8px;
    line-height: 1;
}


/* Eventos del Piloto */

.events-list {
    margin-top: 0.5rem;
}

.event-card {
    background-color: #f8f5f0;
    color: var(--black);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
}

.event-card-info {
    flex-grow: 1;
    margin-right: 1rem;
}

.event-card .event-name {
    font-family: "Rubik", sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--black);
    margin-bottom: 0;
}

.event-card-action {
    flex-shrink: 0;
}

.btn-view-event {
    background-color: var(--black);
    color: var(--white);
    font-family: "Rubik", sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.55rem 1.1rem;
    border-radius: 5px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.btn-view-event:hover,
.btn-view-event:focus {
    background-color: var(--red);
    color: var(--white);
    text-decoration: none;
    outline: none;
    transform: scale(1.03);
}

@media (max-width: 576px) {
    .event-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .event-card-info {
        margin-right: 0;
        margin-bottom: 0.85rem;
        width: 100%;
    }
    .event-card-action {
        width: 100%;
    }
    .btn-view-event {
        display: block;
        text-align: center;
    }
}


/* === ESTILOS PÁGINA GALERÍA === */

.gallery-section {
    padding-top: 1rem;
    /* Reducido de 3rem para que el título no esté tan separado si no hay mucho más contenido */
    padding-bottom: 3rem;
}

.gallery-title {
    font-family: "Rubik Dirt", system-ui;
    /* Usando tu fuente única */
    color: var(--red);
    font-size: 2.5rem;
    /* Consistente con .section-title */
    margin-bottom: 2rem;
    /* Espacio debajo del título, puedes ajustar Bootstrap mb-5 en el h2 si prefieres */
    text-align: center;
}


/* Estilos para el carrusel en sí */
@media (max-width: 991.98px) {

    /*
     * Forzamos una relación de aspecto fija en el slide para evitar los "saltos" de altura.
     * Esto solo se aplicará en tablets y móviles.
    */
    .event-block .carousel-item {
        aspect-ratio: 16 / 9;
        background-color: var(--black);
    }

    /*
     * Hacemos que la imagen llene por completo el contenedor del slide.
     * Esto también se aplicará solo en tablets y móviles.
    */
    .event-block .carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}
#eventGalleryCarousel {
    border-radius: 0.625rem;
    /* Similar a .hero-section */
    overflow: hidden;
    /* Para que las imágenes internas respeten el border-radius del carrusel */
    border: 2px solid var(--red-dark);
    /* Un borde sutil con tu color oscuro */
    background-color: #2a2a2a;
    /* Un fondo oscuro por si las imágenes tardan o no cargan */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.carousel-item img {
    max-height: 70vh;
    /* Limita la altura máxima de la imagen a un 70% de la altura de la ventana */
    object-fit: cover;
    /* Asegura que la imagen cubra el espacio, puede recortar un poco */
    /* No necesitas width: 100% aquí porque .d-block .w-100 ya lo hacen */
}


/* Personalización de los indicadores del carrusel para tema oscuro */

.carousel-indicators [data-bs-target] {
    background-color: var(--silver);
    opacity: 0.6;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 5px;
    margin-right: 5px;
    border-top: none;
    /* Quitar bordes default de bootstrap si los hay */
    border-bottom: none;
}

.carousel-indicators .active {
    background-color: var(--red-light);
    opacity: 1;
}


/* Personalización de los controles (flechas) del carrusel */

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    /* Fondo semi-transparente para mejor contraste */
    border-radius: 50%;
    padding: 1.2rem;
    /* Aumentar el área del icono para que el fondo se vea más */
    /* El color del SVG por defecto es blanco, que se verá bien */
}

.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}


/* Opcional: Caption styling si decides usarlo */

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.6);
    /* Fondo semi-transparente para el texto */
    border-radius: 0.25rem;
    padding: 1rem;
}

.carousel-caption h5 {
    color: var(--yellow);
    /* Título del caption en amarillo */
    font-family: "Rubik", sans-serif;
}

.carousel-caption p {
    color: var(--white);
    font-family: "Rubik", sans-serif;
    font-size: 0.9rem;
}


/* Media query para ajustar el tamaño de las flechas en pantallas pequeñas */

@media (max-width: 767.98px) {
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        padding: 0.8rem;
        /* Más pequeñas en móviles */
    }
    .gallery-title {
        font-size: 2rem;
        /* Título un poco más pequeño en móviles */
    }
    .carousel-item img {
        max-height: 50vh;
        /* Imágenes un poco menos altas en móviles */
    }
}


/* === ESTILOS BOTONES PERSONALIZADOS (BUSCADOR PILOTOS) === */

.btn-buscar-custom {
    background-color: var(--yellow) !important;
    /* Usando tu variable CSS --yellow */
    border-color: var(--yellow) !important;
    color: var(--black) !important;
    /* Texto oscuro para contraste con amarillo */
}

.btn-buscar-custom:hover,
.btn-buscar-custom:focus,
.btn-buscar-custom:active {
    background-color: #e6c300 !important;
    /* Un amarillo un poco más oscuro para el hover/focus */
    border-color: #e6c300 !important;
    color: var(--black) !important;
}

.btn-limpiar-custom {
    background-color: var(--red) !important;
    /* Usando tu variable CSS --red */
    border-color: var(--red) !important;
    color: var(--white) !important;
    /* Texto blanco para contraste con rojo */
}

.btn-limpiar-custom:hover,
.btn-limpiar-custom:focus,
.btn-limpiar-custom:active {
    background-color: var(--red-dark) !important;
    /* Usando tu variable CSS --red-dark para el hover */
    border-color: var(--red-dark) !important;
    color: var(--white) !important;
}


/* Si quieres una versión "outline" para el botón limpiar */

.btn-outline-limpiar-custom {
    color: var(--red) !important;
    border-color: var(--red) !important;
    background-color: transparent;
    /* Asegurar fondo transparente para outline */
}

.btn-outline-limpiar-custom:hover,
.btn-outline-limpiar-custom:focus,
.btn-outline-limpiar-custom:active {
    color: var(--white) !important;
    background-color: var(--red) !important;
    border-color: var(--red) !important;
}


/* === FIN ESTILOS BOTONES PERSONALIZADOS === */


/* === ESTILOS PÁGINA GALERÍA GENERAL === */

.gallery-title-general {
    font-family: "Rubik Dirt", system-ui;
    color: var(--red);
    font-size: 2.5rem;
    /* Consistente con .section-title */
    /* margin-bottom ya está con Bootstrap .mb-5 */
}

.gallery-card-general {
    background-color: #2e2e2e;
    /* Un gris oscuro ligeramente más claro que el body */
    border-radius: 0.5rem;
    /* Bordes redondeados suaves */
    overflow: hidden;
    /* Asegura que la imagen respete el border-radius */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    /* Para estructura interna de imagen y caption */
    flex-direction: column;
    height: 100%;
    /* Para que todas las tarjetas en una fila tengan la misma altura si el contenido varía */
}

.gallery-card-general:hover {
    transform: translateY(-8px) scale(1.02);
    /* Efecto de elevación sutil y zoom ligero */
    box-shadow: 0 10px 25px rgba(213, 0, 0, 0.4);
    /* Sombra roja al hacer hover */
}

.gallery-card-general a {
    display: block;
    /* Para que el enlace ocupe el espacio de la imagen */
    text-decoration: none;
}

.gallery-image-general {
    width: 100%;
    aspect-ratio: 4 / 3;
    /* Mantiene una proporción consistente para las imágenes */
    object-fit: cover;
    /* Asegura que la imagen cubra el área, recortando si es necesario */
    /* No necesita border-radius aquí si .gallery-card-general tiene overflow:hidden */
    transition: opacity 0.3s ease;
}

.gallery-card-general a:hover .gallery-image-general {
    opacity: 0.85;
    /* Ligera transparencia en la imagen al pasar el mouse sobre el enlace */
}

.gallery-caption-general {
    padding: 1rem;
    background-color: rgba(30, 30, 30, 0.8);
    /* Fondo ligeramente transparente para el caption */
    color: var(--white);
    flex-grow: 1;
    /* Permite que esta sección crezca si hay espacio extra */
    display: flex;
    flex-direction: column;
}

.gallery-item-title {
    font-family: "Rubik", sans-serif;
    font-weight: 600;
    color: var(--yellow);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.gallery-item-description {
    font-family: "Rubik", sans-serif;
    color: var(--silver);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0;
    flex-grow: 1;
    /* Asegura que el texto ocupe espacio y empuje elementos si es necesario */
}


/* Ajustes para pantallas más pequeñas si es necesario, aunque Bootstrap ya ayuda mucho */

@media (max-width: 575.98px) {
    .gallery-title-general {
        font-size: 2rem;
    }
    .gallery-item-title {
        font-size: 1rem;
    }
    .gallery-item-description {
        font-size: 0.8rem;
    }
}