/* ===========================
   TN APAT - FLAT VERSION
   Sin sombras ni animaciones (excepto header)
   =========================== */

/* ===========================
   1. VARIABLES CSS
   =========================== */
:root {
    /* Colores principales */
    --tn-celeste-oficial: #21b7ea;
    --tn-rojo-oficial: #ee3f34;
    --tn-celeste-header: #a2c4d7;
    --tn-rojo-header: #d57c72;
    --tn-gris-header: #dbdbdb;
    --tn-tipografia-gris: #777777;

    /* Colores extendidos */
    --tn-celeste-hover: #1da8db;
    --tn-rojo-hover: #d63528;
    --tn-negro-overlay: rgba(0, 0, 0, 0.8);
    --tn-blanco-semi: rgba(255, 255, 255, 0.1);

    /* Espaciado - SIN EFECTOS */
    --tn-border-radius: 0px;
    --tn-border-radius-lg: 0px;
    --tn-border-radius-xl: 0px;
    --tn-transition: none;
    --tn-shadow: none;
    --tn-shadow-hover: none;

    /* Tipografía */
    --tn-font-family: "Poppins", sans-serif;
    --tn-font-weight-normal: 400;
    --tn-font-weight-medium: 500;
    --tn-font-weight-semibold: 600;
    --tn-font-weight-bold: 700;
}

/* ===========================
   2. BASE STYLES
   =========================== */
body {
    font-family: var(--tn-font-family);
    padding-top: 200px;
}

/* ===========================
   3. COMPONENTES REUTILIZABLES - SIN EFECTOS
   =========================== */

/* === BOTONES === */
.btn-tn-primary {
    background: var(--tn-celeste-oficial);
    border: none;
    color: white;
    font-weight: var(--tn-font-weight-semibold);
    border-radius: 0;
    font-family: var(--tn-font-family);
}

.btn-tn-primary:hover {
    color: white;
    background: var(--tn-celeste-hover);
}

.btn-tn-secondary {
    background: var(--tn-tipografia-gris);
    border: none;
    color: white;
    font-weight: var(--tn-font-weight-semibold);
    border-radius: 0;
    font-family: var(--tn-font-family);
}

.btn-tn-secondary:hover {
    color: white;
    background: #666;
}

.btn-leer {
    background-color: var(--tn-rojo-oficial);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-family: var(--tn-font-family);
    font-weight: var(--tn-font-weight-semibold);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-leer:hover {
    background-color: var(--tn-rojo-hover);
    color: #fff;
}

/* === TARJETAS - SIN SOMBRAS === */
.card-tn {
    border: 1px solid #dee2e6;
    border-radius: 0;
}

/* === BADGES Y POSICIONES === */
.position-badge {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-weight: var(--tn-font-weight-bold);
    font-size: 1.2rem;
    margin: 0 auto;
}

.first-place {
    background: #ffd700;
    color: #2d3748;
    border: 3px solid #f6e05e;
}

.second-place {
    background: #c0c0c0;
    color: #2d3748;
    border: 3px solid #cbd5e0;
}

.third-place {
    background: #cd7f32;
    color: white;
    border: 3px solid #b7791f;
}

/* ===========================
   4. FLASH MESSAGES
   =========================== */
.alert {
    border-radius: 0;
}

/* ===========================
   5. NAVEGACIÓN DE ARTÍCULOS - SIN EFECTOS
   =========================== */
.article-navigation {
    border-top: 1px solid #dee2e6;
    margin-top: 2rem;
    padding-top: 2rem;
}

.article-navigation .nav-item {
    padding: 0.75rem;
    border: 1px solid transparent;
}

.article-navigation .nav-item:hover {
    border-color: var(--tn-celeste-oficial);
    background-color: #f8f9fa;
}

.article-navigation .nav-item:hover h6 {
    color: var(--tn-celeste-oficial) !important;
}

/* ===========================
   6. CIRCUITOS - SIN EFECTOS
   =========================== */
.circuit-card {
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.circuit-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.circuit-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.circuit-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circuit-stats-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--tn-negro-overlay);
    color: white;
    padding: 4px 8px;
    border-radius: 0;
    font-size: 0.75rem;
}

.circuit-info .badge {
    font-size: 0.7rem;
    font-weight: var(--tn-font-weight-medium);
}

.circuit-dates {
    border-top: 1px solid #e9ecef;
    padding-top: 0.5rem;
}

/* ===========================
   7. SLIDER - MANTENER ANIMACIONES DEL HEADER
   =========================== */
.slider-container {
    background-color: #000;
    position: relative;
    width: 100%;
}

.carousel {
    height: 70vh;
    min-height: 500px;
}

.carousel-item {
    height: 100%;
    position: relative;
}

.slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

.slide-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
}

.slide-text-box {
    background: var(--tn-negro-overlay);
    padding: 40px;
    border-radius: 0;
    max-width: 600px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--tn-blanco-semi);
}

.slide-title {
    color: #fff;
    font-family: var(--tn-font-family);
    font-size: 3rem;
    font-weight: var(--tn-font-weight-bold);
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-excerpt {
    color: #f8f9fa;
    font-family: var(--tn-font-family);
    font-size: 1.1rem;
    font-weight: var(--tn-font-weight-normal);
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Controles del carousel - MANTENER PARA HEADER */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background-color: rgba(33, 183, 234, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: 30px;
}
.carousel-control-next {
    right: 30px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: rgba(33, 183, 234, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

.carousel-indicators {
    bottom: 30px;
    margin-bottom: 0;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(33, 183, 234, 0.8);
    margin: 0 5px;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: var(--tn-celeste-oficial);
    transform: scale(1.2);
}

/* ===========================
   8. RANKING HOME - SIN EFECTOS
   =========================== */
.ranking-section {
    font-family: var(--tn-font-family);
}

.ranking-clase {
    background: white;
    margin-bottom: 50px;
}

.clase-titulo {
    text-align: left;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 2.5rem;
    font-weight: var(--tn-font-weight-semibold);
    color: var(--tn-tipografia-gris);
    background: none;
    border-bottom: dashed 2px #dee2e6;
    padding: 0 0 15px 0;
}

.podio-card {
    padding: 20px;
    background: white;
    text-align: left;
    margin-bottom: 20px;
}

.position-number {
    color: white;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    font-weight: var(--tn-font-weight-bold);
    font-family: var(--tn-font-family);
}

.piloto-foto {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.piloto-placeholder {
    width: 120px;
    height: 120px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.piloto-placeholder i {
    font-size: 3rem;
    color: #dee2e6;
}

.piloto-nombre {
    font-size: 1.1rem;
    line-height: 1.3;
    font-weight: var(--tn-font-weight-semibold);
    color: #333;
    margin-bottom: 10px;
}

.piloto-team {
    font-style: italic;
    color: var(--tn-tipografia-gris);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.piloto-stats {
    line-height: 1.6;
    font-size: 0.85rem;
    color: var(--tn-tipografia-gris);
}

/* Tabla de Rankings - SIN EFECTOS */
.tabla-ranking {
    background: white;
    height: fit-content;
}

.tabla-header {
    background-color: white;
    color: #333;
    padding: 15px;
    font-weight: var(--tn-font-weight-semibold);
    border-bottom: 2px dotted #dee2e6;
}

.tabla-header .row {
    margin: 0;
}

.tabla-body {
    max-height: 400px;
    overflow-y: auto;
}

.fila-piloto {
    padding: 10px 15px;
    border-bottom: 1px dotted #dee2e6;
    font-size: 0.85rem;
    background-color: white;
}

.fila-piloto .row {
    margin: 0;
}

.fila-piloto:hover {
    background-color: #e3f2fd !important;
}

.tabla-footer {
    padding: 15px;
    text-align: center;
    background-color: white;
    border-top: 1px dotted #dee2e6;
}

.btn-ver-tabla {
    color: var(--tn-celeste-oficial);
    text-decoration: none;
    font-weight: var(--tn-font-weight-medium);
    font-size: 0.9rem;
}

.btn-ver-tabla:hover {
    color: var(--tn-rojo-oficial) !important;
    text-decoration: none;
}

/* ===========================
   9. TABLAS Y CLASIFICACIONES - SIN ANIMACIONES
   =========================== */
.table-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.badge.bg-warning.text-dark {
    background: #ffd700 !important;
    border: 1px solid #f6e05e;
    font-weight: var(--tn-font-weight-semibold);
}

.badge.bg-info {
    background: var(--tn-celeste-oficial) !important;
    font-weight: var(--tn-font-weight-semibold);
}

.table td strong {
    color: var(--tn-rojo-oficial);
    font-weight: var(--tn-font-weight-bold);
}

.table tbody tr:first-child {
    position: relative;
    overflow: hidden;
}

.table tbody tr:first-child::before {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ffd700;
}

/* ===========================
   10. UTILIDADES Y HELPERS - SIN EFECTOS
   =========================== */
.cursor-pointer {
    cursor: pointer;
}

.rounded-circle {
    border: 2px solid transparent;
}

.rounded-circle:hover {
    border-color: var(--tn-celeste-oficial);
}

.noticias-header {
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%);
    background: var(--tn-rojo-oficial);
}

.noticias-header h2 {
    font-family: var(--tn-font-family);
}

.tn-footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: auto;
}

.tn-section-ribbon {
    width: 4px;
    height: 40px;
    background: var(--tn-rojo-oficial);
    margin-right: 15px;
}

/* ===========================
   11. DASHBOARD CLASE APAT - FLAT DESIGN
   =========================== */

/* Colores por clase */
.dashboard-clase-apat.clase-c2 {
    --clase-color: var(--tn-celeste-oficial);
}

.dashboard-clase-apat.clase-c3 {
    --clase-color: var(--tn-rojo-oficial);
}

/* Header angular */
.apat-header-angular {
    background: var(--clase-color);
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%);
    padding: 40px 0 60px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clase-titulo-principal {
    font-size: 4rem;
    font-weight: var(--tn-font-weight-bold);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.subtitulo-campeonato {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

.stats-header-box {
    display: flex;
    gap: 40px;
}

.stat-box {
    text-align: center;
    border: 2px solid white;
    padding: 20px;
    min-width: 120px;
}

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

.label-stat {
    font-size: 0.9rem;
    font-weight: var(--tn-font-weight-semibold);
    letter-spacing: 1px;
}

/* Bloques modulares */
.apat-content {
    margin-top: 30px;
    padding: 0 15px;
}

.bloque-apat {
    background: white;
    margin-bottom: 30px;
    border: 2px solid #ddd;
}

.titulo-bloque-angular {
    background: var(--tn-rojo-oficial);
    color: white;
    padding: 15px 20px;
    clip-path: polygon(0 0, 95% 0, 100% 100%, 0% 100%);
    margin-bottom: 0;
}

.titulo-bloque-angular.celeste {
    background: var(--tn-celeste-oficial);
}

.titulo-bloque-angular.gris {
    background: var(--tn-tipografia-gris);
}

.titulo-bloque-angular.negro {
    background: #333;
}

.titulo-bloque-angular h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: var(--tn-font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contenido-bloque {
    padding: 25px;
}

/* Próxima fecha */
.proxima-fecha-bloque {
    border-left: 5px solid var(--clase-color);
}

.imagen-circuito-container {
    height: 200px;
    overflow: hidden;
}

.imagen-circuito-apat {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nombre-circuito {
    font-size: 2.5rem;
    font-weight: var(--tn-font-weight-bold);
    color: var(--clase-color);
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

.fecha-carrera {
    font-size: 1.3rem;
    color: var(--tn-tipografia-gris);
    margin-bottom: 25px;
}

.botones-acceso {
    display: flex;
    gap: 15px;
}

/* Botones APAT */
.btn-apat-rojo {
    background: var(--tn-rojo-oficial);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: var(--tn-font-weight-bold);
    letter-spacing: 1px;
    border: none;
}

.btn-apat-rojo:hover {
    background: var(--tn-rojo-hover);
    color: white;
}

.btn-apat-celeste {
    background: var(--tn-celeste-oficial);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: var(--tn-font-weight-bold);
    letter-spacing: 1px;
    border: none;
}

.btn-apat-celeste:hover {
    background: var(--tn-celeste-hover);
    color: white;
}

.btn-apat-link {
    color: var(--tn-rojo-oficial);
    text-decoration: none;
    font-weight: var(--tn-font-weight-bold);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-apat-link:hover {
    color: var(--tn-celeste-oficial);
}

/* Podio */
.podio-apat {
    margin-bottom: 25px;
}

.posicion-podio {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid;
}

.posicion-podio.pos-1 {
    background: #fff9c4;
    border-color: #ffd700;
}

.posicion-podio.pos-2 {
    background: #f5f5f5;
    border-color: #c0c0c0;
}

.posicion-podio.pos-3 {
    background: #fdf2e9;
    border-color: #cd7f32;
}

.numero-posicion {
    font-size: 2rem;
    font-weight: var(--tn-font-weight-bold);
    width: 60px;
    text-align: center;
}

.nombre-piloto {
    font-size: 1.1rem;
    font-weight: var(--tn-font-weight-bold);
    text-transform: uppercase;
}

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

.puntos-piloto {
    color: var(--clase-color);
    font-weight: var(--tn-font-weight-bold);
    font-size: 1rem;
}

/* Tabla resto clasificación */
.fila-clasificacion-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    border-bottom: 1px dotted #ddd;
    font-size: 0.9rem;
}

.fila-clasificacion-simple .pos {
    font-weight: var(--tn-font-weight-bold);
    width: 30px;
}

.fila-clasificacion-simple .piloto {
    flex: 1;
    text-transform: uppercase;
}

.fila-clasificacion-simple .puntos {
    font-weight: var(--tn-font-weight-bold);
    color: var(--clase-color);
}

/* Items carrera */
.item-carrera-apat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px;
}

.fecha-item {
    font-weight: var(--tn-font-weight-bold);
    color: var(--tn-rojo-oficial);
    font-size: 1rem;
}

.btn-ver-apat {
    background: var(--tn-tipografia-gris);
    color: white;
    padding: 5px 12px;
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: var(--tn-font-weight-bold);
}

/* Separadores */
.separador-apat {
    height: 2px;
    background: #f0f0f0;
    margin: 20px 0;
}

.subtitulo-bloque {
    font-size: 1rem;
    font-weight: var(--tn-font-weight-bold);
    text-transform: uppercase;
    color: var(--tn-tipografia-gris);
    margin: 0 0 15px 0;
    letter-spacing: 1px;
}

/* Records */
.record-apat {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    margin-bottom: 15px;
}

.icono-record {
    width: 50px;
    text-align: center;
    font-size: 1.5rem;
    color: var(--tn-rojo-oficial);
}

.titulo-record {
    font-size: 0.8rem;
    font-weight: var(--tn-font-weight-bold);
    text-transform: uppercase;
    color: var(--tn-tipografia-gris);
}

.tiempo-record {
    font-size: 1.2rem;
    font-weight: var(--tn-font-weight-bold);
    color: var(--tn-rojo-oficial);
}

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

/* Campeones */
.item-campeon {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px dotted #ddd;
    margin-bottom: 8px;
}

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

.nombre-campeon {
    text-transform: uppercase;
    font-weight: var(--tn-font-weight-medium);
}

/* Stats extra */
.stats-extra {
    display: flex;
    gap: 30px;
}

.stat-item-apat {
    text-align: center;
}

.numero-stat {
    display: block;
    font-size: 2rem;
    font-weight: var(--tn-font-weight-bold);
    color: var(--clase-color);
}

/* Accesos rápidos */
.grid-accesos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.acceso-item-apat {
    text-align: center;
}

.acceso-link-apat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 15px;
    background: white;
    border: 2px solid var(--tn-tipografia-gris);
    text-decoration: none;
    color: var(--tn-tipografia-gris);
}

.acceso-link-apat:hover {
    border-color: var(--clase-color);
    color: var(--clase-color);
    background: #f8f9fa;
}

.acceso-link-apat i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.acceso-link-apat span {
    font-weight: var(--tn-font-weight-bold);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* ===========================
   12. RESPONSIVE DESIGN
   =========================== */

/* Tablets grandes y laptops pequeñas */
@media (max-width: 1199.98px) {
    .slide-image {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
}

/* Tablets */
@media (max-width: 991.98px) {
    .carousel {
        height: 60vh;
        min-height: 450px;
    }

    .slide-text-box {
        padding: 30px;
        max-width: 500px;
    }

    .slide-title {
        font-size: 2.5rem;
    }
    .slide-excerpt {
        font-size: 1rem;
    }
}

/* Móviles grandes */
@media (max-width: 767.98px) {
    .carousel {
        height: 50vh;
        min-height: 400px;
    }

    .slide-text-box {
        padding: 25px;
        margin: 0 15px;
    }

    .slide-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .slide-excerpt {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }

    .btn-leer {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
    }

    .carousel-control-prev {
        left: 15px;
    }
    .carousel-control-next {
        right: 15px;
    }

    /* Tablas responsive */
    .table th:nth-child(5),
    .table td:nth-child(5),
    .table th:nth-child(6),
    .table td:nth-child(6) {
        display: none;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
    }

    /* Rankings responsive */
    .ranking-clase {
        padding: 20px 15px;
    }
    .clase-titulo {
        font-size: 2rem;
    }

    .position-number {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .piloto-foto img,
    .piloto-foto div {
        width: 100px !important;
        height: 100px !important;
    }

    .tabla-ranking {
        margin-top: 30px;
    }

    /* Circuitos responsive */
    .circuit-image-container {
        height: 150px;
    }

    .circuit-stats-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .card-title {
        font-size: 1rem;
    }

    .position-badge {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .card-tn.bg-warning .rounded-circle {
        width: 80px !important;
        height: 80px !important;
    }

    .card-tn.bg-light .rounded-circle {
        width: 60px !important;
        height: 60px !important;
    }

    /* Dashboard responsive */
    .clase-titulo-principal {
        font-size: 2.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .stats-header-box {
        gap: 20px;
    }

    .grid-accesos {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Móviles pequeños */
@media (max-width: 575.98px) {
    .slide-text-box {
        padding: 20px;
        margin: 0 10px;
    }

    .slide-title {
        font-size: 1.8rem;
    }
    .carousel-indicators {
        bottom: 20px;
    }

    /* Rankings móviles pequeños */
    .podio-card {
        margin-bottom: 30px;
    }
    .clase-titulo {
        font-size: 1.8rem;
    }

    .position-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .piloto-foto img,
    .piloto-foto div {
        width: 80px !important;
        height: 80px !important;
    }

    .piloto-nombre {
        font-size: 1rem;
    }
    .tabla-header .col-4 {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .tabla-header .col-4 {
        font-size: 0.7rem;
    }
}

/* === POSICIONES POR FECHA === */
.fecha-column {
    border-left: 1px solid #dee2e6;
}

.fecha-header {
    font-weight: var(--tn-font-weight-semibold);
    font-size: 0.8rem;
}

.posicion-cell {
    vertical-align: middle;
}

.posicion-badge {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: var(--tn-font-weight-semibold);
    text-align: center;
    background: #f8f9fa;
    color: #495057;
}

.podio-cell {
    background: var(--tn-celeste-oficial);
    color: white;
}

.no-puntos-cell {
    background: #6c757d;
    color: white;
}

/* === GRILLA DE LARGADA === */
.grilla-container {
    max-height: 600px;
    overflow-y: auto;
}

.grilla-row {
    margin-bottom: 15px;
    position: relative;
}

.grilla-position {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: var(--tn-border-radius);
    background: white;
    transition: var(--tn-transition);
}

.grilla-position:hover {
    border-color: var(--tn-celeste-oficial);
    transform: translateX(5px);
}

.position-left {
    margin-right: 40px;
}

.position-right {
    margin-left: 40px;
    flex-direction: row-reverse;
}

.position-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tn-rojo-oficial);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--tn-font-weight-bold);
    font-size: 1.1rem;
    margin-right: 15px;
}

.position-right .position-number {
    margin-right: 0;
    margin-left: 15px;
}

.pilot-info {
    flex: 1;
    text-align: left;
}

.position-right .pilot-info {
    text-align: right;
}

.pilot-number {
    font-size: 1.5rem;
    font-weight: var(--tn-font-weight-bold);
    color: var(--tn-celeste-oficial);
}

.pilot-name {
    font-size: 1.1rem;
    font-weight: var(--tn-font-weight-semibold);
    color: #333;
}

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

.pilot-points {
    font-size: 0.9rem;
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-rojo-oficial);
}

/* Responsive */
@media (max-width: 768px) {
    .fecha-column:nth-child(n + 8) {
        display: none;
    }

    .grilla-position {
        padding: 10px;
    }

    .position-left,
    .position-right {
        margin: 0;
        flex-direction: row;
    }

    .position-right .position-number {
        margin-right: 15px;
        margin-left: 0;
    }

    .position-right .pilot-info {
        text-align: left;
    }
}

/* ===========================
   MÓDULO CAMPEONATO - ESTILOS ADICIONALES
   Para agregar al final de apat.css
   =========================== */

/* === PILOTOS GRID === */
.piloto-foto-container {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.stat-numero {
    font-size: 1.25rem;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.piloto-details {
    line-height: 1.4;
}

.piloto-stats .row {
    margin: 0;
}

/* === GRILLA DE LARGADA === */
.grilla-container {
    max-height: 80vh;
    overflow-y: auto;
    padding: 10px 0;
}

.grilla-row {
    margin-bottom: 20px;
    position: relative;
}

.grilla-position {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #dee2e6;
    background: white;
    margin: 0 auto;
    max-width: 500px;
    position: relative;
}

.grilla-position:hover {
    border-color: var(--tn-celeste-oficial);
    background-color: #f8f9fa;
}

.position-left {
    margin-right: 50px;
}

.position-right {
    margin-left: 50px;
    flex-direction: row-reverse;
}

.position-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--tn-rojo-oficial);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--tn-font-weight-bold);
    font-size: 1.3rem;
    margin-right: 20px;
    flex-shrink: 0;
}

.position-right .position-number {
    margin-right: 0;
    margin-left: 20px;
}

.pilot-info {
    flex: 1;
    text-align: left;
}

.position-right .pilot-info {
    text-align: right;
}

.pilot-number {
    font-size: 1.8rem;
    font-weight: var(--tn-font-weight-bold);
    color: var(--tn-celeste-oficial);
    line-height: 1;
}

.pilot-name {
    font-size: 1.2rem;
    font-weight: var(--tn-font-weight-semibold);
    color: #333;
    margin: 5px 0;
    line-height: 1.2;
}

.pilot-details {
    font-size: 0.9rem;
    color: var(--tn-tipografia-gris);
    margin: 3px 0;
}

.pilot-points {
    font-size: 0.95rem;
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-rojo-oficial);
}

/* === ANUARIO ESTADÍSTICAS === */
.stat-box {
    padding: 15px;
}

.record-item {
    border-left: 4px solid var(--tn-celeste-oficial);
    padding-left: 15px;
    margin-bottom: 20px;
}

.record-icon {
    width: 60px;
    text-align: center;
}

.winners-list {
    max-height: 350px;
    overflow-y: auto;
}

.winner-item {
    border-left: 3px solid var(--tn-celeste-oficial);
    transition: background-color 0.2s ease;
}

.winner-item:hover {
    background-color: #e3f2fd !important;
}

.performance-stats .stat-row {
    padding: 5px 0;
    border-bottom: 1px dotted #ddd;
}

.performance-stats .stat-row:last-child {
    border-bottom: none;
}

.balance-info > div {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.balance-info > div:last-child {
    border-bottom: none;
}

.schedule-info > div {
    padding: 8px 0;
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 991.98px) {
    /* Grilla responsive */
    .grilla-position {
        padding: 15px;
        max-width: 100%;
    }

    .position-left,
    .position-right {
        margin: 0;
        flex-direction: row;
    }

    .position-right .position-number {
        margin-right: 20px;
        margin-left: 0;
    }

    .position-right .pilot-info {
        text-align: left;
    }

    .pilot-number {
        font-size: 1.5rem;
    }

    .pilot-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 767.98px) {
    /* Pilotos grid responsive */
    .piloto-foto-container img,
    .piloto-foto-container div {
        width: 60px !important;
        height: 60px !important;
    }

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

    /* Grilla móvil */
    .grilla-position {
        padding: 12px;
    }

    .position-number {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-right: 15px;
    }

    .pilot-number {
        font-size: 1.3rem;
    }

    .pilot-name {
        font-size: 1rem;
    }

    .pilot-details {
        font-size: 0.85rem;
    }

    /* Anuario responsive */
    .record-item {
        padding-left: 10px;
        border-left-width: 3px;
    }

    .record-icon {
        width: 45px;
    }

    .record-icon i {
        font-size: 1.5rem !important;
    }

    .stat-box {
        padding: 10px;
    }

    .stat-box .h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    /* Extra small devices */
    .grilla-position {
        padding: 10px;
    }

    .position-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin-right: 12px;
    }

    .pilot-number {
        font-size: 1.2rem;
    }

    .pilot-name {
        font-size: 0.95rem;
    }

    .pilot-details {
        font-size: 0.8rem;
    }

    .pilot-points {
        font-size: 0.85rem;
    }

    /* Stats responsive */
    .stat-box .h2 {
        font-size: 1.3rem;
    }

    .record-icon {
        width: 40px;
    }
}

/* === NAVEGACIÓN ESPECÍFICA DEL MÓDULO === */
.btn-toolbar .btn-group .btn {
    border-radius: 0;
}

.btn-toolbar .btn-group .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-toolbar .btn-group .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* === TABLAS MEJORADAS === */
.table-sm th,
.table-sm td {
    padding: 0.5rem 0.75rem;
}

.table-responsive {
    border-radius: 0;
}

/* === CARDS ESPECÍFICAS === */
.card-tn.h-100 {
    min-height: 300px;
}

.card-tn .card-header {
    font-weight: var(--tn-font-weight-semibold);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.card-tn .card-body {
    padding: 1.25rem;
}

/* === BADGES Y ELEMENTOS PEQUEÑOS === */
.badge.fs-6 {
    font-size: 1rem !important;
    padding: 0.5rem 0.75rem;
}

.position-badge.podio-cell {
    background: var(--tn-celeste-oficial) !important;
    color: white !important;
}

.position-badge.no-puntos-cell {
    background: #6c757d !important;
    color: white !important;
}

/* === ELEMENTOS INTERACTIVOS === */
.winner-item,
.grilla-position,
.record-item {
    transition: all 0.2s ease;
}

.progress {
    height: 6px;
    background-color: #e9ecef;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* === FIXES ESPECÍFICOS === */
.text-center .position-badge {
    margin: 0 auto;
}

.small {
    font-size: 0.875rem;
}

.text-muted {
    color: var(--tn-tipografia-gris) !important;
}

/* === ACCESIBILIDAD === */
.grilla-position:focus,
.winner-item:focus,
.record-item:focus {
    outline: 2px solid var(--tn-celeste-oficial);
    outline-offset: 2px;
}

/* === IMPRESIÓN === */
@media print {
    .btn-toolbar,
    .tn-section-ribbon,
    .pagination {
        display: none !important;
    }

    .grilla-position {
        border: 1px solid #000 !important;
        break-inside: avoid;
    }

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

/* ===========================
   MEGAMENU CALENDARIO - APAT
   Agregar al final de apat.css
   =========================== */

/* === MEGAMENU CALENDARIO === */
.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;
}

/* === PROXIMA FECHA === */
.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);
}

/* === COLUMNAS DE FECHAS === */
.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;
}

/* === ESTADOS DE FECHAS === */
.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 === */
@media (max-width: 1199px) {
    .tn-calendario-megamenu {
        min-width: 800px;
    }
}

@media (max-width: 991px) {
    .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;
    }
}
