/* ===========================
   TN APAT - EXTENSIONES CSS
   Estilos adicionales no incluidos en apat.css
   =========================== */

/* ===========================
   VARIABLES ADICIONALES
   =========================== */
:root {
    --tn-verde-fecha: #28a745;
}

/* ===========================
   HEADER ESPECÍFICO - ELEMENTOS ÚNICOS
   =========================== */

/* Header sticky - funcionalidad adicional */
.tn-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    transition: transform 0.3s ease-in-out;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tn-header.hidden {
    transform: translateY(-100%);
}

.tn-header.compact .tn-navbar-main {
    min-height: 80px;
}

.tn-header.compact .tn-logo {
    height: 40px;
}

.tn-header.compact .tn-navbar-secondary {
    min-height: 40px;
}

.tn-header.compact .tn-nav-link {
    height: 40px;
    font-size: 0.85rem;
}

/* Barra institucional */
.tn-institutional-bar {
    background-color: #f8f9fa;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.8rem;
}

.tn-institutional-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.tn-institutional-links li a {
    color: var(--tn-tipografia-gris);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.tn-institutional-links li a:hover {
    color: var(--tn-celeste-oficial);
}

/* Header principal específico */
.tn-navbar-main {
    min-height: 135px;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.tn-logo {
    height: 65px;
    width: auto;
    transition: height 0.3s ease;
}

/* Botones destacados del header */
.tn-btn-tiempos {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    border: none;
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #000;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.tn-btn-tiempos:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    color: #000;
}

.tn-btn-rus {
    background: linear-gradient(135deg, #0dcaf0 0%, #0d6efd 100%);
    border: none;
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(13, 202, 240, 0.3);
}

.tn-btn-rus:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.4);
    color: #fff;
}

.tn-btn-fecha {
    background: linear-gradient(135deg, var(--tn-verde-fecha) 0%, #20c997 100%);
    border: none;
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.tn-btn-fecha:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    color: #fff;
}

/* Dropdown específico para fecha actual */
.tn-fecha-dropdown {
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    min-width: 200px;
}

.tn-fecha-dropdown .dropdown-item {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tn-fecha-dropdown .dropdown-item:hover {
    background-color: var(--tn-verde-fecha);
    color: white;
}

/* Redes sociales del header */
.tn-social-icons {
    display: flex;
    gap: 0.5rem;
}

.tn-social-icons a {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tn-tipografia-gris);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tn-social-icons a:hover {
    transform: translateY(-2px);
    color: var(--tn-celeste-oficial);
}

.tn-social-icons .fab.fa-facebook:hover {
    color: #1877f2;
}
.tn-social-icons .fab.fa-instagram:hover {
    color: #e4405f;
}
.tn-social-icons .fab.fa-twitter:hover {
    color: #1da1f2;
}
.tn-social-icons .fab.fa-youtube:hover {
    color: #ff0000;
}

/* Hamburguesa del header */
.tn-navbar-toggler {
    border: 2px solid var(--tn-celeste-oficial);
    border-radius: 8px;
    padding: 8px 12px;
    background: transparent;
    transition: all 0.3s ease;
    color: var(--tn-tipografia-gris);
}

.tn-navbar-toggler:hover {
    background-color: var(--tn-celeste-oficial);
    color: white;
}

/* Navegación secundaria */
.tn-navbar-secondary {
    background: var(--tn-gris-header);
    min-height: 55px;
    padding: 0;
    transition: all 0.3s ease;
}

.tn-nav-item {
    margin: 0;
}

.tn-nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0 1rem !important;
    border-radius: 0;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tn-tipografia-gris) !important;
}

.tn-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.tn-nav-link.active {
    background-color: var(--tn-celeste-oficial);
    color: white !important;
    font-weight: 600;
}

.tn-nav-link.c2 {
    background-color: var(--tn-celeste-header);
    color: white !important;
}

.tn-nav-link.c3 {
    background-color: var(--tn-rojo-header);
    color: white !important;
}

.tn-nav-link-resultados {
    background-color: #979797;
    color: white !important;
    font-weight: 600;
}

.tn-nav-link-resultados:hover {
    background-color: #a1a1a1;
    color: white !important;
}

/* Dropdowns del header */
.tn-dropdown-menu {
    background-color: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
}

.tn-dropdown-item {
    color: var(--tn-tipografia-gris);
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tn-dropdown-item:hover {
    background-color: var(--tn-celeste-oficial);
    color: white;
}

/* Acceso pilotos */
.tn-acceso-pilotos {
    background-color: var(--tn-gris-header);
    border-radius: 0;
    padding: 0 1rem;
    color: var(--tn-tipografia-gris);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 55px;
}

.tn-acceso-pilotos:hover {
    background-color: var(--tn-celeste-oficial);
    color: white;
    transform: translateY(-1px);
}

/* ===========================
   MODAL PERFIL PILOTO - ÚNICO
   =========================== */

.modal-header-apat {
    background: linear-gradient(135deg, var(--tn-celeste-oficial) 0%, var(--tn-rojo-oficial) 100%);
    color: white;
    padding: 20px 30px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body-apat {
    padding: 30px;
    background: #f8f9fa;
}

.modal-footer-apat {
    background: white;
    padding: 20px 30px;
    border-top: 2px solid var(--tn-celeste-oficial);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.piloto-header-info {
    display: flex;
    align-items: center;
    gap: 25px;
}

.piloto-posicion-modal {
    text-align: center;
}

.numero-posicion-grande {
    display: block;
    font-size: 2.5rem;
    font-weight: var(--tn-font-weight-bold);
    line-height: 1;
}

.label-posicion {
    font-size: 0.8rem;
    font-weight: var(--tn-font-weight-medium);
    letter-spacing: 1px;
    opacity: 0.9;
}

.piloto-nombre-modal .nombre-completo-modal {
    font-size: 1.8rem;
    font-weight: var(--tn-font-weight-bold);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.clase-info-modal {
    display: flex;
    gap: 15px;
    align-items: center;
}

.badge-clase-modal {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: var(--tn-font-weight-bold);
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.numero-auto-modal {
    font-size: 1.2rem;
    font-weight: var(--tn-font-weight-bold);
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-close-apat {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    opacity: 0.8;
    cursor: pointer;
    padding: 10px;
}

.btn-close-apat:hover {
    opacity: 1;
}

.piloto-foto-principal {
    text-align: center;
    margin-bottom: 25px;
}

.foto-modal-principal {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 4px solid var(--tn-celeste-oficial);
    background: white;
}

.datos-personales-modal {
    background: white;
    padding: 20px;
    border-left: 4px solid var(--tn-celeste-oficial);
    margin-bottom: 25px;
}

.titulo-seccion-modal {
    font-size: 1.1rem;
    font-weight: var(--tn-font-weight-bold);
    color: var(--tn-rojo-oficial);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px dotted #dee2e6;
}

.dato-personal {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.label-dato-modal {
    font-size: 0.8rem;
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-tipografia-gris);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.valor-dato-modal {
    font-weight: var(--tn-font-weight-semibold);
    color: #333;
}

.puntos-destacado {
    color: var(--tn-rojo-oficial);
    font-size: 1.1rem;
    font-weight: var(--tn-font-weight-bold);
}

.estadisticas-completas-modal {
    background: white;
    padding: 20px;
    border-left: 4px solid var(--tn-rojo-oficial);
    margin-bottom: 25px;
}

.grid-estadisticas-modal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card-modal {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stat-card-modal:hover {
    border-color: var(--tn-celeste-oficial);
}

.stat-card-modal.participaciones {
    border-left: 3px solid #6c757d;
}

.stat-card-modal.victorias {
    border-left: 3px solid #ffd700;
}

.stat-card-modal.podios {
    border-left: 3px solid #28a745;
}

.stat-card-modal.top5 {
    border-left: 3px solid var(--tn-celeste-oficial);
}

.numero-stat-card {
    font-size: 2rem;
    font-weight: var(--tn-font-weight-bold);
    color: var(--tn-rojo-oficial);
    line-height: 1;
}

.label-stat-card {
    font-size: 0.8rem;
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-tipografia-gris);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* ===========================
   PILOTOS - ELEMENTOS ÚNICOS
   =========================== */

.card-piloto-apat {
    background: white;
    border: 2px solid #ddd;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-piloto-apat:hover {
    border-color: var(--tn-celeste-oficial);
    transform: translateY(-5px);
}

.posicion-piloto-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--tn-rojo-oficial);
    color: white;
    padding: 8px 12px;
    font-weight: var(--tn-font-weight-bold);
    font-size: 0.8rem;
    z-index: 2;
    letter-spacing: 1px;
}

.piloto-imagen-container {
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.piloto-imagen-principal {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.piloto-info-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.piloto-nombre-completo {
    font-size: 1.2rem;
    font-weight: var(--tn-font-weight-bold);
    color: #333;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
}

.piloto-datos-principales {
    margin-bottom: 15px;
}

.dato-piloto {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px dotted #eee;
}

.label-dato {
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-tipografia-gris);
    font-size: 0.9rem;
}

.valor-dato {
    font-weight: var(--tn-font-weight-bold);
    color: #333;
}

.ranking-numero {
    color: var(--tn-celeste-oficial);
    font-size: 1.1rem;
}

.puntos-numero {
    color: var(--tn-rojo-oficial);
    font-size: 1.1rem;
}

.piloto-estadisticas-mini {
    display: flex;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 10px;
    margin-bottom: 15px;
    border-left: 3px solid var(--tn-celeste-oficial);
}

.estadistica-item {
    text-align: center;
    flex: 1;
}

.numero-stat-mini {
    display: block;
    font-size: 1.3rem;
    font-weight: var(--tn-font-weight-bold);
    color: var(--tn-rojo-oficial);
    line-height: 1;
}

.label-stat-mini {
    font-size: 0.7rem;
    color: var(--tn-tipografia-gris);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: var(--tn-font-weight-medium);
}

.piloto-vehiculo-info {
    margin-bottom: 15px;
    padding: 8px 10px;
    background: #f9f9f9;
    border-left: 2px solid var(--tn-tipografia-gris);
}

.piloto-vehiculo-info .tipo-vehiculo {
    font-weight: 600;
    color: var(--tn-celeste-oficial);
    margin-right: 5px;
}

.piloto-vehiculo-info .tipo-vehiculo::after {
    content: " - ";
    color: var(--tn-tipografia-gris);
    font-weight: normal;
}

.piloto-acciones {
    margin-top: auto;
}

.btn-ver-piloto-perfil {
    width: 100%;
    background: var(--tn-celeste-oficial);
    color: white;
    border: none;
    padding: 12px 20px;
    font-weight: var(--tn-font-weight-bold);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-ver-piloto-perfil:hover {
    background: var(--tn-celeste-hover);
    color: white;
    transform: translateY(-2px);
}

/* ===========================
   GRILLA - ELEMENTOS ÚNICOS
   =========================== */

.piloto-foto-mini {
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid #dee2e6;
}

.piloto-foto-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.piloto-nombre {
    font-size: 0.95rem;
    color: #333;
}

#grilla-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
    transition: all 0.2s ease;
}

/* ===========================
   MEGAMENÚ CALENDARIO - ÚNICO
   =========================== */

.tn-calendario-megamenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 900px;
    max-width: 1200px;
    background: white;
    border: 2px solid var(--tn-celeste-oficial);
    border-top: none;
    padding: 0;
    margin: 0;
    z-index: 999;
}

.tn-calendario-content {
    padding: 30px;
}

.tn-proxima-fecha {
    background: linear-gradient(135deg, var(--tn-celeste-oficial), var(--tn-rojo-oficial));
    color: white;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.tn-proxima-fecha::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 40px 40px 0;
    border-color: transparent rgba(255, 255, 255, 0.1) transparent transparent;
}

.tn-proxima-label {
    font-size: 0.8rem;
    font-weight: var(--tn-font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.tn-proxima-fecha-numero {
    font-size: 3rem;
    font-weight: var(--tn-font-weight-bold);
    line-height: 1;
    margin-bottom: 5px;
}

.tn-proxima-mes {
    font-size: 1.1rem;
    font-weight: var(--tn-font-weight-semibold);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.tn-proxima-circuito {
    font-size: 1.3rem;
    font-weight: var(--tn-font-weight-bold);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.tn-proxima-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

.tn-btn-ver-fecha {
    background: white;
    color: var(--tn-celeste-oficial);
    border: none;
    padding: 8px 20px;
    font-weight: var(--tn-font-weight-semibold);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-top: 15px;
    text-decoration: none;
    display: inline-block;
}

.tn-btn-ver-fecha:hover {
    background: #f0f0f0;
    color: var(--tn-rojo-oficial);
}

.tn-fechas-columna {
    padding: 0 15px;
}

.tn-fechas-titulo {
    font-size: 0.9rem;
    font-weight: var(--tn-font-weight-bold);
    text-transform: uppercase;
    color: var(--tn-tipografia-gris);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    letter-spacing: 1px;
}

.tn-fecha-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    text-decoration: none;
    color: #333;
    border-left: 3px solid transparent;
}

.tn-fecha-item:hover {
    background: #f8f9fa;
    border-left-color: var(--tn-celeste-oficial);
    color: var(--tn-celeste-oficial);
    transform: translateX(3px);
}

.tn-fecha-numero {
    width: 35px;
    height: 35px;
    background: #f0f0f0;
    color: var(--tn-tipografia-gris);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--tn-font-weight-bold);
    font-size: 0.9rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.tn-fecha-item:hover .tn-fecha-numero {
    background: var(--tn-celeste-oficial);
    color: white;
}

.tn-fecha-info {
    flex: 1;
}

.tn-fecha-circuito {
    font-weight: var(--tn-font-weight-semibold);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.tn-fecha-mes {
    font-size: 0.75rem;
    color: var(--tn-tipografia-gris);
    text-transform: uppercase;
}

.tn-fecha-item.finalizada {
    opacity: 0.6;
}

.tn-fecha-item.finalizada .tn-fecha-numero {
    background: #e0e0e0;
}

.tn-fecha-item.activa {
    background: rgba(33, 183, 234, 0.1);
    border-left-color: var(--tn-rojo-oficial);
}

.tn-fecha-item.activa .tn-fecha-numero {
    background: var(--tn-rojo-oficial);
    color: white;
}

/* ===========================
   RESPONSIVE ESPECÍFICO
   =========================== */

/* Header responsive */
@media (max-width: 991.98px) {
    .tn-navbar-main {
        min-height: 110px;
    }

    .tn-logo {
        height: 55px;
    }

    .tn-btn-tiempos,
    .tn-btn-rus,
    .tn-btn-fecha {
        font-size: 0.8rem;
        padding: 6px 15px;
    }

    .tn-social-icons a {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .tn-calendario-megamenu {
        min-width: 800px;
    }
}

@media (max-width: 767.98px) {
    .tn-navbar-main {
        padding: 0.5rem 0;
    }

    .tn-navbar-secondary {
        padding: 0.25rem 0;
    }

    .tn-nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem !important;
    }

    .tn-institutional-bar {
        display: none;
    }

    /* Modal responsive */
    .modal-header-apat {
        padding: 15px 20px;
    }

    .modal-body-apat {
        padding: 20px;
    }

    .piloto-header-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .grid-estadisticas-modal {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Pilotos responsive */
    .piloto-imagen-container {
        height: 200px;
    }

    .piloto-info-content {
        padding: 15px;
    }

    .piloto-nombre-completo {
        font-size: 1.1rem;
    }

    .piloto-estadisticas-mini {
        padding: 8px;
    }

    .numero-stat-mini {
        font-size: 1.1rem;
    }

    .label-stat-mini {
        font-size: 0.65rem;
    }

    /* Grilla responsive */
    .piloto-foto-mini {
        width: 40px;
        height: 40px;
    }

    .piloto-nombre {
        font-size: 0.9rem;
    }

    /* Calendario responsive */
    .tn-calendario-megamenu {
        position: static;
        min-width: auto;
        max-width: none;
        width: 100%;
        border: none;
        border-top: 2px solid var(--tn-celeste-oficial);
    }

    .tn-proxima-fecha {
        margin-bottom: 20px;
    }

    .tn-fechas-columna {
        margin-bottom: 20px;
    }
}

@media (max-width: 575.98px) {
    /* Modal muy pequeño */
    .modal-dialog {
        margin: 5px;
    }

    .foto-modal-principal {
        width: 150px;
        height: 150px;
    }

    .numero-posicion-grande {
        font-size: 1.8rem;
    }

    .nombre-completo-modal {
        font-size: 1.3rem;
    }

    .grid-estadisticas-modal {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-card-modal {
        padding: 10px;
    }

    .numero-stat-card {
        font-size: 1.5rem;
    }

    /* Pilotos muy pequeño */
    .piloto-imagen-container {
        height: 180px;
    }
}

/* ===========================
   ANIMACIONES ESPECÍFICAS
   =========================== */

/* Animación de entrada del header */
.tn-header {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===========================
   FOCUS STATES PARA ACCESIBILIDAD
   =========================== */

.tn-btn-tiempos:focus,
.tn-btn-rus:focus,
.tn-btn-fecha:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
}

.tn-navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(33, 183, 234, 0.25);
}

.btn-ver-piloto-perfil:focus {
    outline: 2px solid var(--tn-celeste-oficial);
    outline-offset: 2px;
}

/* ===========================
   ELEMENTOS ADICIONALES ESPECÍFICOS DEL MODAL
   =========================== */

.vehiculos-modal {
    background: white;
    padding: 20px;
    border-left: 4px solid #6c757d;
    margin-bottom: 25px;
}

.vehiculo-item-modal {
    padding: 12px;
    background: #f8f9fa;
    margin-bottom: 10px;
    border-left: 2px solid var(--tn-celeste-oficial);
}

.vehiculo-principal {
    font-weight: var(--tn-font-weight-semibold);
    margin-bottom: 5px;
}

.tipo-vehiculo-modal {
    color: var(--tn-celeste-oficial);
    font-weight: var(--tn-font-weight-bold);
    margin-right: 8px;
}

.marca-modelo {
    color: #333;
}

.anio-vehiculo {
    color: var(--tn-tipografia-gris);
    font-weight: normal;
}

.patente-vehiculo {
    font-size: 0.85rem;
    color: var(--tn-tipografia-gris);
}

.mejores-tiempos-modal {
    background: white;
    padding: 20px;
    border-left: 4px solid #ffd700;
    margin-bottom: 25px;
}

.tiempo-item-modal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    margin-bottom: 8px;
    border-left: 2px solid var(--tn-rojo-oficial);
}

.circuito-tiempo {
    font-weight: var(--tn-font-weight-semibold);
    color: #333;
    flex: 1;
}

.tiempo-valor {
    font-weight: var(--tn-font-weight-bold);
    color: var(--tn-rojo-oficial);
    font-family: monospace;
    font-size: 1rem;
}

.tipo-vuelta-tiempo {
    font-size: 0.75rem;
    color: var(--tn-tipografia-gris);
    text-align: right;
    margin-left: 10px;
    min-width: 80px;
}

.historial-carreras-modal {
    background: white;
    padding: 20px;
    border-left: 4px solid var(--tn-celeste-oficial);
}

.lista-carreras-historial {
    max-height: 300px;
    overflow-y: auto;
}

.carrera-historial-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    margin-bottom: 8px;
    border-left: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.carrera-historial-item:hover {
    border-left-color: var(--tn-celeste-oficial);
    background: #e3f2fd;
}

.fecha-carrera-historial {
    width: 50px;
    text-align: center;
    font-weight: var(--tn-font-weight-bold);
    color: var(--tn-rojo-oficial);
    font-size: 0.9rem;
    margin-right: 15px;
}

.info-carrera-historial {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.circuito-carrera {
    font-weight: var(--tn-font-weight-medium);
    color: #333;
}

.posicion-carrera {
    text-align: right;
}

.posicion-numero-historial {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 50%;
    font-weight: var(--tn-font-weight-bold);
    font-size: 0.9rem;
}

.posicion-numero-historial.pos-1 {
    background: #ffd700;
    color: #333;
    border: 2px solid #f6e05e;
}

.posicion-numero-historial.pos-2 {
    background: #c0c0c0;
    color: #333;
    border: 2px solid #a0a0a0;
}

.posicion-numero-historial.pos-3 {
    background: #cd7f32;
    color: white;
    border: 2px solid #b7791f;
}

.posicion-numero-historial.pos-normal {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #dee2e6;
}

.no-clasifico {
    display: inline-block;
    padding: 5px 10px;
    background: #dc3545;
    color: white;
    font-weight: var(--tn-font-weight-bold);
    font-size: 0.8rem;
    border-radius: 3px;
}

.acciones-piloto-modal {
    display: flex;
    gap: 15px;
}

.btn-cerrar-modal {
    background: var(--tn-tipografia-gris);
    color: white;
    border: none;
    padding: 10px 20px;
    font-weight: var(--tn-font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.btn-cerrar-modal:hover {
    background: #666;
    color: white;
}

/* ===========================
   ESTADÍSTICAS ESPECÍFICAS DE MODAL
   =========================== */

.estadisticas-detalle {
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
}

.detalle-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    align-items: center;
}

.label-detalle {
    font-size: 0.9rem;
    color: var(--tn-tipografia-gris);
}

.valor-detalle {
    font-weight: var(--tn-font-weight-bold);
    color: #333;
}

.valor-detalle.destacado {
    color: var(--tn-rojo-oficial);
    font-size: 1.1rem;
}

/* ===========================
   PRINT STYLES
   =========================== */

@media print {
    .tn-header,
    .btn-toolbar,
    .pagination,
    .modal,
    .tn-social-icons {
        display: none !important;
    }

    .card-piloto-apat {
        border: 1px solid #000 !important;
        break-inside: avoid;
    }
}