.hero-section {
    background-image: url('/barbell.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1,
.hero-section p,
.hero-section i,
.hero-section .text-white,
.hero-section .text-white-50 {
    color: #ffffff;
    position: relative;
    z-index: 2;
}

/* Estilos para botones btn-light en hero section */
.hero-section .btn-light {
    color: #000000 !important;
}

.hero-section .btn-light i {
    color: #000000 !important;
}

.hero-section .btn-light:hover {
    color: #000000 !important;
}

.hero-section .btn-light:hover i {
    color: #000000 !important;
}

.hero-section .btn-light:active,
.hero-section .btn-light:focus {
    color: #000000 !important;
}

.hero-section .btn-light:active i,
.hero-section .btn-light:focus i {
    color: #000000 !important;
}

/* Estilos para iconos dentro de badges */
.hero-section .badge i {
    color: inherit !important;
}

/* Estilos para la sección de WODs mejorada */
.transition-all {
    transition: all 0.3s ease-in-out;
}

.bg-gradient-to-r {
    background: linear-gradient(135deg, #343a40 0%, #6c757d 100%);
}

.card-header.bg-gradient-to-r {
    border: none;
}

.wod-item:hover {
    background-color: rgba(0,123,255,0.1);
    transition: background-color 0.2s ease;
}

.collapse-icon {
    transition: transform 0.3s ease;
}

.collapse-icon[aria-expanded="true"] {
    transform: rotate(180deg);
}

.badge-improved {
    padding: 0.5em 0.75em;
    border-radius: 0.5rem;
    font-weight: 500;
}

.wod-summary-icon {
    transition: transform 0.2s ease;
}

.wod-summary-icon:hover {
    transform: scale(1.1);
}

.bg-gradient-to-r.from-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Animación para el spinner de carga */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-spinner {
    animation: pulse 2s infinite;
}

/* Estilos para DataTables en vista pública */
#puntuacionesTable_wrapper .dataTables_length,
#puntuacionesTable_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

#puntuacionesTable_wrapper .dataTables_info,
#puntuacionesTable_wrapper .dataTables_paginate {
    margin-top: 1rem;
}

#puntuacionesTable_wrapper .dataTables_length select {
    margin: 0 0.5rem;
}

#puntuacionesTable_wrapper .dataTables_filter input {
    margin-left: 0.5rem;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .table td, .table th {
        padding: 0.5rem 0.25rem;
    }
    
    .badge {
        font-size: 0.6rem;
        padding: 0.25rem 0.4rem;
    }
}

/* Mejoras para elementos táctiles en móviles */
.modal-trigger {
    transition: all 0.2s ease-in-out;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.modal-trigger:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.modal-trigger:active {
    transform: scale(0.95);
    opacity: 0.7;
}

/* Mejorar el área táctil en móviles */
@media (max-width: 768px) {
    .modal-trigger {
        padding: 4px 8px;
        margin: 2px 0;
        min-height: 32px; /* Altura reducida pero aún táctil */
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        background-color: rgba(0, 0, 0, 0.05);
    }
    
    .modal-trigger:hover {
        background-color: rgba(0, 0, 0, 0.1);
    }
}

/* Mejoras para modales en móviles */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 1rem 1rem 0.5rem 1rem;
        border-bottom: 1px solid #dee2e6;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.5rem 1rem 1rem 1rem;
        border-top: 1px solid #dee2e6;
    }
}

/* Prevenir zoom en inputs en iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select, textarea, input[type="text"], input[type="password"], 
    input[type="datetime"], input[type="datetime-local"], 
    input[type="date"], input[type="month"], input[type="time"], 
    input[type="week"], input[type="number"], input[type="email"], 
    input[type="url"], input[type="search"], input[type="tel"], 
    input[type="color"] {
        font-size: 16px;
    }
}

/* Estilos para iconos de ordenamiento de DataTables - Siempre blancos */
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_desc_disabled:after {
    color: white !important;
    opacity: 1 !important;
}

table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_asc_disabled:before,
table.dataTable thead .sorting_desc_disabled:before {
    color: white !important;
    opacity: 1 !important;
}

/* Asegurar que los iconos de ordenamiento sean blancos en todos los estados */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    color: white !important;
}

table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
    color: white !important;
}

table.dataTable thead th.sorting:before,
table.dataTable thead th.sorting_asc:before,
table.dataTable thead th.sorting_desc:before {
    color: white !important;
}

.example-box {
    border-left: 4px solid #007bff;
    font-size: 0.9rem;
}

/* Limitar altura máxima de los modales */
[id^="modalDesempate"] .modal-dialog,
#scoringSystemModal .modal-dialog {
    max-height: 90vh;
}

[id^="modalDesempate"] .modal-content,
#scoringSystemModal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Quitar borde azul del botón de cerrar cuando tiene foco */
#scoringSystemModal .btn-close:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Animación para badge de WOD Especial */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 165, 0, 0.9);
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: pulse-glow 2s infinite;
}

/* Efecto hover para el badge de WOD Especial */
.badge.animate-pulse:hover {
    animation-play-state: paused;
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(255, 165, 0, 1);
}

