/* ========================================
   CSS UNIFICADO - Sistema de Retos de Tenis
   ======================================== */

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

:root {
    /* Colores principales - Estilo Ranking Racket */
    --primary-color: #2b7fa6;
    --primary-dark: #2c5f7c;
    --primary-darker: #1e4258;
    --secondary-color: #4a9bc7;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    /* Colores para el navbar y hero - basados en el mismo esquema */
    --navbar-bg: #1b5674;
    --hero-bg: linear-gradient(135deg, #1b5674 0%, #2a6a8a 50%, #2b7fa6 100%);
    --hero-overlay: linear-gradient(180deg, rgba(29, 78, 107, 0.15) 0%, transparent 100%);
    
    /* Espaciado y dimensiones */
    --border-radius: 0px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    
    /* Tipografía */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;

    /* Safe area (viewport-fit=cover en app nativa y móviles con notch) */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --navbar-height: 56px;
    --mobile-bottom-bar-height: 56px;
    --mobile-bottom-bar-bg: #ffffff;
    --mobile-bottom-bar-border: rgba(15, 23, 42, 0.08);
    --mobile-bottom-bar-radius: 16px;
    --mobile-bottom-bar-muted: #64748b;
    /* Lima de marca (mismo que .page-header-modern .header-icon) */
    --mobile-bottom-bar-accent: #b2ca26;
}

/* Fallback nativo: algunos WebView no reportan safe-area correctamente */
html.app-native {
    --safe-area-top: max(env(safe-area-inset-top, 0px), 24px);
    --safe-area-bottom: max(env(safe-area-inset-bottom, 0px), 20px);
}

/* iOS: prevenir overscroll encadenado en scrollers internos (modales, listas, etc.).
   NOTA: en la app nativa, el desplazamiento de las barras fijas y el fondo azul que
   asomaba arriba/abajo NO se arreglan desde CSS: los provocaba el content-inset de
   safe-area de la WKWebView (ios.contentInset en capacitor.config.ts, ahora 'never').
   La franja que se veía queda FUERA del documento, así que ningún pseudo-elemento ni
   background del html puede taparla. */
@supports (-webkit-touch-callout: none) {
    html, body {
        overscroll-behavior: none;
        -webkit-overflow-scrolling: touch;
    }
}

/* ========================================
   RESET Y ESTILOS BASE
   ======================================== */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
    /* iOS Safari: prevenir overscroll/bounce que muestra fondo detrás de barras fijas */
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: #333;
    background-color: var(--light-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* iOS Safari: prevenir overscroll/bounce */
    overscroll-behavior: none;
}

/* ========================================
   LAYOUT PRINCIPAL - STICKY FOOTER
   ======================================== */

/* Contenedor principal que empuja el footer hacia abajo */
.main-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* Contenido que se expande para llenar el espacio disponible */
.content-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* Footer que se mantiene en la parte inferior */
footer {
    flex-shrink: 0;
    margin-top: auto;
}

footer small {
    font-size: 0.95rem;
}

footer .footer-accordion-toggle,
footer p[style*="font-size:.75rem"] {
    font-size: 0.85rem !important;
}

/* Botón "Back to top" móvil en footer */
.footer-back-to-top {
    position: fixed;
    right: 1rem;
    bottom: calc(var(--mobile-bottom-bar-height) + var(--safe-area-bottom) + 0.75rem);
    z-index: 1050;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    font-size: 1.1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    padding: 0;
}

.footer-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Ocultar tooltip del botón back-to-top en móvil */
@media (max-width: 991.98px) {
    .tooltip.tooltip-desktop-only {
        display: none !important;
    }
}

/* Botón flotante "Reglas del sistema" */
/* Eliminar borde inferior de columnas del footer en escritorio */
@media (min-width: 768px) {
    .footer-accordion-col {
        border-bottom: none !important;
    }

    /* Separador vertical entre logo y columnas de links */
    .border-end-md {
        border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
    }
}

/* Centrar bloque logo/descripción del footer en móvil */
@media (max-width: 767.98px) {
    footer .col-md-4,
    footer .col-md-3 {
        text-align: center;
    }

    footer .col-md-4 .d-flex,
    footer .col-md-3 .d-flex {
        justify-content: center;
    }
}

/* ========================================
   HERO SECTION - PRIORIDAD MÁXIMA
   ======================================== */

.hero-section {
    background: url('/assets/img/banner.png');
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    min-height: 60vh !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    margin-top: 0 !important;
    padding-top: 20px !important;
}

/* Portada personalizada del club: oscurecer imagen como el banner por defecto */
.hero-section.hero-section--has-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(27, 86, 116, 0.6);
    pointer-events: none;
    z-index: 0;
}

.hero-section.hero-section--has-cover > .container {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .hero-section:not(.hero-section--has-cover) {
        background-image: url('/assets/img/banner_movil_rankingracket.png') !important;
    }
}

/* ========================================
   PAGE HEADER - ESTILO RANKING RACKET
   ======================================== */

.page-header-modern {
    background: var(--hero-bg);
    position: relative;
    padding: 3rem 0 4rem 0;
    overflow: hidden;
}

.page-header-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hero-overlay);
    pointer-events: none;
}

.page-header-modern::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Ccircle cx='200' cy='200' r='120' stroke='%23ffffff' stroke-width='1' fill='none' stroke-opacity='0.18'/%3E%3Ccircle cx='200' cy='200' r='150' stroke='%23ffffff' stroke-width='1' fill='none' stroke-opacity='0.12'/%3E%3C/svg%3E") no-repeat center center;
    background-size: contain;
    pointer-events: none;
}

.page-header-modern .container-fluid {
    position: relative;
    z-index: 1;
}

.page-header-modern h1 {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5rem;
}

.page-header-modern .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.page-header-modern .header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #b2ca26 0%, #a8c000 100%);
    border-radius: 50%;
    margin-right: 1rem;
    box-shadow: 0 4px 15px rgba(200, 230, 0, 0.3);
}

.page-header-modern .header-icon i {
    font-size: 1.8rem;
    color: #1b5674;
}

.page-header-modern .header-icon img {
    width: 36px;
    height: 36px;
}

@media (max-width: 768px) {
    .page-header-modern {
        padding: 2rem 0 3rem 0;
    }
    
    .page-header-modern::after {
        width: 500px;
        height: 500px;
    }
    
    .page-header-modern h1 {
        font-size: 1.75rem;
    }
    
    .page-header-modern .header-icon {
        width: 50px;
        height: 50px;
        margin-right: 0.75rem;
    }
    
    .page-header-modern .header-icon i {
        font-size: 1.4rem;
    }
}

/* ========================================
   MANTENIMIENTO (alineado al home)
   ======================================== */

#maintenance-page .card {
    border-radius: var(--border-radius);
}

#maintenance-page .maintenance-info.card {
    border-left: 4px solid var(--primary-color);
}

#maintenance-page .progress {
    height: 8px;
    border-radius: 4px;
}

#maintenance-page .status-badge {
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    border-radius: 25px;
    font-weight: 600;
}

#maintenance-page .alert-success i,
#maintenance-page .alert-info i,
#maintenance-page .alert-warning i {
    width: 18px;
    text-align: center;
}

/* Overlay y modal de mantenimiento */
.maintenance-no-navbar body { padding-top: 0 !important; }

.maintenance-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 2000;
}

.maintenance-modal {
    max-width: 760px;
    width: 95%;
}

/* ========================================
   TIPOGRAFÍA
   ======================================== */

h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--dark-color);
}

h1{
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* ========================================
   ENLACES
   ======================================== */

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* ========================================
   COMPONENTES DE TARJETAS
   ======================================== */

.card {
    border: none;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.stats-card {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stats-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   FORMULARIOS
   ======================================== */


.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(69, 148, 190, 0.25);
}

/* ========================================
   BOTONES
   ======================================== */


.btn-retar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 1.1rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .btn-retar {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   TABLAS GENERALES
   ======================================== */

/* ========================================
   INFORMACIÓN DE POSICIÓN ACTUAL Y DISPONIBILIDAD
   ======================================== */

/* Estilos para la información de posición actual y disponibilidad */
.alert-info {
    font-size: 1.1rem;
    padding: 20px 25px;
    border-radius: var(--border-radius);
    border: 2px solid #0dcaf0;
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    box-shadow: 0 4px 15px rgba(13, 202, 240, 0.2);
}

.alert-info .badge {
    font-size: 1.2rem;
    padding: 8px 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

.alert-info strong {
    font-size: 1.2rem;
    font-weight: 700;
}

.alert-info .text-warning,
.alert-info .text-success {
    font-size: 1.1rem;
    font-weight: 600;
}

.alert-info .text-warning i,
.alert-info .text-success i {
    font-size: 1.2rem;
    margin-right: 8px;
}

/* Hacer más grande el icono de medalla */
.alert-info .fas.fa-medal {
    font-size: 1.5rem;
    margin-right: 10px;
}


/* ========================================
   IMÁGENES Y AVATARES
   ======================================== */


.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--box-shadow);
}

/* Clases para reemplazar estilos inline */
.avatar-100 {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.avatar-50 {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.avatar-40 {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.avatar-150 {
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.logo-120 {
    height: 120px;
    object-fit: contain;
}

.logo-80 {
    height: 80px;
    object-fit: contain;
}

.logo-40 {
    height: 40px;
    object-fit: contain;
    background: transparent;
}

.logo-navbar-pelota {
    max-width: 200px;
    width: auto;
}
/* ========================================
   BADGES Y ESTADOS
   ======================================== */

.status-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
}

.status-pendiente {
    background-color: var(--warning-color);
    color: #212529;
}

.status-aceptado {
    background-color: var(--success-color);
    color: white;
}

.status-finalizado {
    background-color: #6c757d;
    color: white;
}

.status-cancelado {
    background-color: var(--danger-color);
    color: white;
}


/* ========================================
   NAVEGACIÓN Y NAVBAR
   ======================================== */

.navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 0.5rem 0;
    padding-top: calc(0.5rem + var(--safe-area-top));
    transition: box-shadow 0.3s ease;
    background: var(--navbar-bg) !important;
}

/* App nativa: el navbar mantiene top:0 y absorbe la safe area con padding-top (regla
   de arriba), así su propio fondo pinta la franja de la status bar.
   NO se reposiciona con top:var(--safe-area-top): en Android edge-to-edge (targetSdk 35+)
   el color nativo de la status bar se ignora, y esa franja mostraría el fondo claro de
   la página por detrás de los iconos blancos del sistema. */

.navbar.bg-primary {
    background: var(--navbar-bg) !important;
}

.navbar.navbar-flotante {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    padding: 0.25rem 0;
}

.navbar-brand img {
    background: transparent;
}

/* Nombre del club en la cabecera */
.navbar-club-name {
    font-size: 0.9rem;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .navbar > .container {
        flex-wrap: nowrap;
    }

    .navbar-brand {
        flex: 1;
        min-width: 0;
        margin-right: 0.5rem;
    }

    .navbar-club-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        line-height: 1.25;
        text-align: left;
        display: block;
    }

    .mobile-quick-actions {
        flex-shrink: 0;
    }
}

.navbar-nav .nav-link {
    padding: 0.5rem 0.75rem;
}

.navbar-toggler {
    padding: 0.25rem 0.5rem;
}

/* Mejorar contraste de enlaces del navbar en móvil y escritorio */
.navbar-dark .navbar-nav .nav-link,
.navbar-dark .navbar-brand {
    color: rgba(255, 255, 255, 0.98) !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff !important;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.navbar-dark .navbar-nav .nav-link i {
    color: inherit !important;
    opacity: 1;
}

/* Suavizar la transición del resaltado */
.navbar .nav-link {
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* Mantener el énfasis cuando el dropdown está abierto */
.navbar-dark .navbar-nav .show > .nav-link {
    background-color: rgba(255, 255, 255, 0.22);
    border-radius: 6px;
}

/* Utilidades derecha del navbar: campana, idioma y reloj en la misma línea */
@media (min-width: 992px) {
    .navbar-expand-lg .navbar-nav {
        align-items: center;
    }

    .navbar-nav > .nav-item {
        display: flex;
        align-items: center;
    }

    .navbar-utils-inner {
        display: flex;
        align-items: center;
        height: 100%;
    }

    .navbar-utils-link,
    .navbar-utils .lang-switcher .nav-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0.75rem;
        line-height: 1;
        min-height: 2.5rem;
        box-sizing: border-box;
    }

    .navbar-utils-link .fa-bell,
    .navbar-utils-link .fa-clock {
        font-size: 1rem;
        line-height: 1;
    }

    .navbar-utils #session-timer {
        display: inline-block;
        min-width: 4.5rem;
        font-variant-numeric: tabular-nums;
        line-height: 1;
    }

    html.app-native-session .navbar-utils-link:has(#session-timer) {
        display: none !important;
    }

    html.app-native-session #hero-timer {
        display: none !important;
    }

    html.app-native-session .alert:has(#hero-timer) {
        display: none !important;
    }

    .navbar-utils .lang-switcher {
        display: flex;
        align-items: center;
    }

    .navbar-utils .lang-switcher-flag {
        width: 1.5rem;
        height: 1.125rem;
        display: block;
        flex-shrink: 0;
    }

    .navbar-utils .lang-switcher .dropdown-toggle::after {
        display: none;
    }
}

/* Selector de idioma fuera del grupo utils (p. ej. navbar no logueado) */
.navbar-nav .nav-item > .lang-switcher .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    line-height: 1;
    min-height: 2.5rem;
}

.navbar-nav .nav-item > .lang-switcher .lang-switcher-flag {
    width: 1.5rem;
    height: 1.125rem;
    display: block;
}

.navbar-nav .nav-item > .lang-switcher .dropdown-toggle::after {
    display: none;
}

/* Estilos para las acciones rápidas de administración */
.navbar .dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.navbar .dropdown-menu .dropdown-item i {
    width: 16px;
    text-align: center;
}

/* Resaltar las acciones rápidas */
.navbar .nav-link[href*="admin"] {
    font-weight: 600;
}

/* Separador visual para las acciones rápidas */
.navbar .dropdown-divider {
    margin: 0.5rem 0;
    border-color: #dee2e6;
}

/* Espacio para el contenido debajo del navbar */
body {
    padding-top: calc(var(--navbar-height) + var(--safe-area-top));
}

/* Ajustar el primer elemento para compensar el navbar */
.container:first-of-type,
section:first-of-type {
    margin-top: 0;
}

/* Ajustes para páginas de autenticación */
.bg-light {
    padding-top: 0;
}

/* Override específico para el selector de semana en registrar resultado */
.semana-selector-header {
    padding-top: 0.75rem !important;
}

/* ========================================
   RAIZ NAVBAR - Navbar para páginas raíz
   ======================================== */

.raiz-navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 0.5rem 0;
    padding-top: calc(0.5rem + var(--safe-area-top));
    background: var(--navbar-bg) !important;
}

/* App nativa: mismo criterio que .navbar — top:0 + padding-top con la safe area,
   para que el fondo del navbar cubra la franja de la status bar. */

.raiz-navbar .navbar-brand img {
    background: transparent;
}

.raiz-navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.7);
}

.raiz-navbar .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
}

.raiz-navbar .btn-light {
    background-color: #ffffff;
    border-color: #ffffff;
    color: var(--navbar-bg);
}

.raiz-navbar .btn-light:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   RAIZ LAYOUT - Sticky footer en páginas raíz
   ======================================== */

body.raiz-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.raiz-page .raiz-main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

body.raiz-page > footer {
    margin-top: auto !important;
    flex-shrink: 0;
}

/* ========================================
   PERSONALIZACIÓN DE BOOTSTRAP
   ======================================== */

:root {
    --bs-primary: #2b7fa6 !important;
    --bs-primary-rgb: 58, 124, 165 !important;
}

.btn-primary {
    background-color: #1b5674 !important;
    border-color: #1b5674 !important;
}

.btn-primary:hover {
    background-color: #2c5f7c !important;
    border-color: #2c5f7c !important;
}

.btn-outline-primary {
    color: #2b7fa6 !important;
    border-color: #2b7fa6 !important;
}

.btn-outline-primary:hover {
    background-color: #2b7fa6 !important;
    border-color: #2b7fa6 !important;
    color: white !important;
}

/* Botones de filtro en retos (mejor legibilidad) */
.btn-filter {
    font-weight: 600;
    padding: 0.45rem 0.9rem;
}

.btn-filter i {
    vertical-align: text-bottom;
}

.btn-outline-primary:hover i {
    color: white !important;
}

.btn-outline-primary.show,
.btn-outline-primary[aria-expanded="true"] {
    background-color: #2b7fa6 !important;
    border-color: #2b7fa6 !important;
    color: white !important;
}

.btn-outline-primary.show i,
.btn-outline-primary[aria-expanded="true"] i {
    color: white !important;
}

.bg-primary {
    background-color: #2b7fa6 !important;
}

.text-primary {
    color: #2b7fa6 !important;
}

.bg-primary .text-primary {
    color: #ffffff !important;
}

.border-primary {
    border-color: #2b7fa6 !important;
}

.table-primary {
    background-color: #2b7fa6 !important;
}

.badge.bg-primary {
    background-color: #2b7fa6 !important;
}

.accordion-button:not(.collapsed) {
    background-color: #2b7fa6 !important;
    color: #fff !important;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(58, 124, 165, 0.25) !important;
}


/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
    
    /* Clasificación responsive */
    .jugador-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .jugador-foto {
        width: 40px;
        height: 40px;
    }
    
    /* Padding-top para páginas de autenticación solo en móvil */
    .bg-light {
        padding-top: 40px;
    }
}

@media (max-width: 576px) {
    .profile-avatar {
        width: 60px;
        height: 60px;
    }
    
    .stats-number {
        font-size: 2rem;
    }
}

/* ========================================
   UTILIDADES
   ======================================== */

.shadow-custom {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
}

.modal-hidden {
    display: none;
}

/* ========================================
   CHAT DE RETOS
   ======================================== */

.chat-button {
    position: relative;
}

.chat-unread-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #dc3545;
    color: #fff;
    border-radius: 999px;
    font-size: 0.7rem;
    padding: 2px 6px;
    box-shadow: 0 0 0 2px #fff;
}

.chat-highlight {
    animation: chatPulse 1.5s infinite;
}

@keyframes chatPulse {
    0% { box-shadow: 0 0 0 0 rgba(69, 148, 190, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(69, 148, 190, 0); }
    100% { box-shadow: 0 0 0 0 rgba(69, 148, 190, 0); }
}

.chat-message-content {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Suavizar desplazamiento en el contenedor de mensajes del chat */
.chat-smooth {
    scroll-behavior: smooth;
}

/* Estilos del modal de chat: public/assets/css/chat.css */

/* ========================================
   NAVBAR MOBILE OPTIMIZATIONS
   ======================================== */

/* Resolución intermedia (escritorio estrecho): icono arriba, texto abajo */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .navbar > .container {
        max-width: 100%;
    }

    .navbar-nav .nav-item:not(.navbar-utils) .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.25rem 0.35rem;
        font-size: 0.90rem;
        text-align: center;
        line-height: 1.2;
        white-space: nowrap;
    }

    .navbar-utils .navbar-utils-link,
    .navbar-utils .lang-switcher .nav-link {
        flex-direction: row;
        padding: 0.5rem 0.75rem;
        line-height: 1;
        min-height: 2.5rem;
        font-size: inherit;
    }

    .navbar-utils-inner {
        flex-direction: row;
    }

    .navbar-nav .nav-item:not(.navbar-utils) .nav-link i {
        margin-right: 0 !important;
        margin-bottom: 3px;
        font-size: 0.95rem;
    }

    .navbar-nav .dropdown-toggle::after {
        display: none;
    }
}

/* Rango 1200–1400: un poco más de aire sin volver al layout horizontal */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .navbar-nav .nav-item:not(.navbar-utils) .nav-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.92rem;
    }
}

/* Ajustes de elementos en móvil */
@media (max-width: 991.98px) {
    .navbar-brand .brand-text {
        display: inline-block !important;
        font-size: 1.00rem;
        margin-left: 0.35rem;
    }
    
    .navbar-nav .nav-item.d-none.d-lg-block {
        display: none !important;
    }
    
    /* Asegurar que el menú se vea a la derecha */
    .navbar-collapse {
        justify-content: flex-end !important;
    }
    
    .navbar-nav {
        margin-left: auto !important;
        text-align: right;
    }
    
    /* Mejorar el espaciado del menú móvil */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Estilo para el dropdown en móvil */
    .navbar-nav .dropdown-menu {
        border: none;
        background-color: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
    }
    
    .navbar-nav .dropdown-item {
        color: white;
        padding: 0.75rem 1rem;
    }
    
    .navbar-nav .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.2);
        color: white;
    }
    
    /* Mejorar el botón hamburguesa */
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
}

/* Estilos adicionales para pantallas muy pequeñas */
@media (max-width: 575.98px) {
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .navbar-nav .dropdown-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   MENÚ MÓVIL: BARRA INFERIOR + SHEET
   ======================================== */
@media (max-width: 991.98px) {
    /* Reservar espacio exacto: barra + safe area (el contenido no pasa por detrás) */
    body {
        padding-bottom: calc(var(--mobile-bottom-bar-height) + var(--safe-area-bottom));
    }

    /* Barra inferior fija al borde — safe area empuja los botones hacia arriba.
       overflow:hidden recorta el indicador de pestaña activa contra las esquinas. */
    .mobile-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1040;
        background: var(--mobile-bottom-bar-bg);
        border-top: 1px solid var(--mobile-bottom-bar-border);
        border-top-left-radius: var(--mobile-bottom-bar-radius);
        border-top-right-radius: var(--mobile-bottom-bar-radius);
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
        padding-bottom: var(--safe-area-bottom);
        overflow: hidden;
    }

    /* Tipografía e iconos con clamp(): en un iPhone X (375px) cada celda mide
       75px, así que "Estadísticas" cabe justo. En pantallas mayores crece hasta
       el tope y en las de 320px baja al mínimo sin romper la fila. */
    .mobile-bottom-bar .mobile-nav-item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        height: var(--mobile-bottom-bar-height);
        padding: 0.25rem 0.15rem;
        color: var(--mobile-bottom-bar-muted);
        font-size: clamp(0.6rem, 2.8vw, 0.72rem);
        font-weight: 600;
        letter-spacing: -0.02em;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.2s ease;
    }

    /* Indicador lima sobre la pestaña activa */
    .mobile-bottom-bar .mobile-nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        width: clamp(24px, 8vw, 34px);
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: var(--mobile-bottom-bar-accent);
        transform: translateX(-50%) scaleX(0);
        transition: transform 0.2s ease;
    }

    .mobile-bottom-bar .mobile-nav-item.active::before {
        transform: translateX(-50%) scaleX(1);
    }

    .mobile-bottom-bar .mobile-nav-item span {
        line-height: 1;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-bottom-bar .mobile-nav-item i {
        font-size: clamp(1.05rem, 4.6vw, 1.25rem);
        line-height: 1;
        color: inherit;
    }

    /* Pestaña activa */
    .mobile-bottom-bar .mobile-nav-item.active {
        color: var(--primary-color);
        font-weight: 700;
    }

    .mobile-bottom-bar .mobile-nav-item:not(.active):hover,
    .mobile-bottom-bar .mobile-nav-item:not(.active):focus {
        color: var(--primary-color);
        text-decoration: none;
    }

    /* Pantallas muy estrechas (iPhone SE y similares): apurar el espacio horizontal */
    @media (max-width: 359.98px) {
        .mobile-bottom-bar .mobile-nav-item {
            padding-left: 0.05rem;
            padding-right: 0.05rem;
            letter-spacing: -0.04em;
        }
    }

    /* Respetar "reducir movimiento" del sistema */
    @media (prefers-reduced-motion: reduce) {
        .mobile-bottom-bar .mobile-nav-item,
        .mobile-bottom-bar .mobile-nav-item::before {
            transition: none;
        }
    }

    /* Offcanvas inferior estilo hoja */
    .mobile-menu-sheet.offcanvas-bottom {
        height: auto;
        max-height: 75vh;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.25);
    }
    .mobile-menu-sheet .offcanvas-header {
        border-bottom: 1px solid #e9ecef;
    }
    .mobile-menu-sheet .list-group-item {
        font-size: 1rem;
        padding: 0.875rem 0.75rem;
        border: none;
        align-items: flex-start;
    }
    .mobile-menu-sheet .list-group-item i {
        width: 1.25rem;
        text-align: center;
    }
    .mobile-menu-sheet .section-title {
        background: #f8f9fa;
    }

    /* Header móvil: campana, perfil e idioma con el mismo espacio entre iconos */
    .mobile-quick-actions {
        gap: 1.25rem;
    }

    .mobile-quick-actions > a.mobile-quick-actions-icon,
    .mobile-quick-actions .lang-switcher {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
    }

    .mobile-quick-actions > a.mobile-quick-actions-icon,
    .mobile-quick-actions .lang-switcher > .lang-switcher-toggle {
        color: #ffffff !important;
        text-decoration: none;
        line-height: 1;
    }

    .mobile-quick-actions > a.mobile-quick-actions-icon:focus,
    .mobile-quick-actions > a.mobile-quick-actions-icon:hover,
    .mobile-quick-actions .lang-switcher > .lang-switcher-toggle:focus,
    .mobile-quick-actions .lang-switcher > .lang-switcher-toggle:hover {
        color: #ffffff !important;
        opacity: 0.9;
        text-decoration: none;
    }

    .mobile-quick-actions .lang-switcher > .lang-switcher-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
        margin: 0;
        min-height: 0;
        min-width: 0;
    }

    .mobile-quick-actions .lang-switcher-flag {
        width: 1.5rem;
        height: 1.125rem;
        display: block;
        flex-shrink: 0;
    }

    .mobile-quick-actions .lang-switcher .dropdown-toggle::after {
        display: none;
    }

    .mobile-quick-actions .lang-switcher .dropdown-menu {
        background-color: #ffffff;
        border: 1px solid rgba(0, 0, 0, 0.1);
        min-width: 11rem;
    }

    .mobile-quick-actions .lang-switcher .dropdown-menu .dropdown-item {
        color: #212529 !important;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }

    .mobile-quick-actions .lang-switcher .dropdown-menu .dropdown-item:hover,
    .mobile-quick-actions .lang-switcher .dropdown-menu .dropdown-item:focus {
        color: #212529 !important;
        background-color: #f8f9fa;
    }

    .mobile-quick-actions .lang-switcher .dropdown-menu .dropdown-item.active {
        color: #ffffff !important;
        background-color: var(--primary-color, #1b5674);
    }
}

/* Móviles muy pequeños (iPhone SE 375px, etc.) */
@media (max-width: 400px) {
    .navbar-club-name {
        font-size: 0.8rem;
    }

    .mobile-quick-actions {
        gap: 0.75rem !important;
    }

    .mobile-quick-actions .fa-lg {
        font-size: 1.1em;
    }
}

/* ========================================
   PÁGINA DE RETOS - OPTIMIZACIONES MÓVILES
   ======================================== */

/* Tarjetas de retos móviles */
.reto-card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.reto-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.reto-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.reto-card .card-body {
    padding: 1rem;
}

.reto-card .card-body .row > div {
    margin-bottom: 0.5rem;
}

.reto-card .card-body strong {
    color: #495057;
    font-weight: 600;
}

.reto-card .card-body .ms-2 {
    color: #6c757d;
}

/* Estadísticas móviles */
.stats-card-mobile {
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stats-card-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.stats-card-mobile h4 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stats-card-mobile small {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Optimizaciones específicas para pantallas muy pequeñas */
@media (max-width: 575.98px) {
    .reto-card .card-header h6 {
        font-size: 0.9rem;
    }
    
    .reto-card .card-body {
        padding: 0.75rem;
    }
    
    .reto-card .card-body .row > div {
        margin-bottom: 0.75rem;
    }
    
    .reto-card .card-body strong {
        font-size: 0.85rem;
    }
    
    .reto-card .card-body .ms-2 {
        font-size: 0.85rem;
    }
    
    .stats-card-mobile h4 {
        font-size: 1.25rem;
    }
    
    .stats-card-mobile small {
        font-size: 0.75rem;
    }
}

/* Estados de las tarjetas de retos */
.reto-card[data-estado="pendiente"] {
    border-left: 4px solid #ffc107;
}

.reto-card[data-estado="aceptado"] {
    border-left: 4px solid #28a745;
}

.reto-card[data-estado="finalizado"] {
    border-left: 4px solid #17a2b8;
}

.reto-card[data-estado="cancelado"] {
    border-left: 4px solid #dc3545;
}

/* Animaciones para las tarjetas */
.reto-card {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mejoras para los botones de acción en móvil */
.reto-card .btn-group {
    flex-wrap: wrap;
    gap: 0.25rem;
}

.reto-card .btn-group .btn {
    flex: 1;
    min-width: 80px;
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
}

 /* Estilos para los badges de estado en móvil */
 .reto-card .badge {
     font-size: 0.75rem;
     padding: 0.375rem 0.5rem;
 }
 
 /* ========================================
    PAGINACIÓN MÓVIL - RETOS
    ======================================== */
 
 /* Paginación optimizada para móvil */
 .pagination-sm .page-link {
     padding: 0.375rem 0.5rem;
     font-size: 0.875rem;
     line-height: 1.2;
 }
 
 .pagination-sm .page-item .page-link {
     border-radius: 0.25rem;
     margin: 0 0.125rem;
 }
 
 .pagination-sm .page-item.active .page-link {
     background-color: var(--primary-color);
     border-color: var(--primary-color);
     color: white;
 }
 
 .pagination-sm .page-item .page-link:hover {
     background-color: var(--primary-color);
     border-color: var(--primary-color);
     color: white;
 }
 
 .pagination-sm .page-item.disabled .page-link {
     color: #6c757d;
     background-color: transparent;
     border-color: #dee2e6;
 }
 
 /* Optimizaciones para pantallas muy pequeñas */
 @media (max-width: 575.98px) {
     .pagination-sm .page-link {
         padding: 0.25rem 0.375rem;
         font-size: 0.8rem;
     }
     
     .pagination-sm .page-item .page-link {
         margin: 0 0.0625rem;
     }
 }
 
 /* Animación para la paginación */
 .pagination-sm .page-item .page-link {
     transition: all 0.2s ease-in-out;
 }
 
 .pagination-sm .page-item .page-link:hover {
     transform: translateY(-1px);
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
 }

/* ========================================
   ESTILOS PARA POLÍTICA DE PRIVACIDAD
   ======================================== */

.politica-privacidad .content h2 {
    color: #5396be;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.politica-privacidad .content h2:first-child {
    margin-top: 0;
}

.politica-privacidad .content ul {
    margin-bottom: 1.5rem;
}

.politica-privacidad .content li {
    margin-bottom: 0.5rem;
}

.politica-privacidad .content a {
    color: #0d6efd;
    text-decoration: none;
}

.politica-privacidad .content a:hover {
    text-decoration: underline;
}

/* ========== ESTILOS PARA EL ESTADO WO ========== */

/* Badge para el estado WO */
.badge.bg-wo {
    background-color: #ff8000 !important;
    color: white;
}

/* Botones outline para el estado WO */
.btn-outline-wo {
    color: #ff8000;
    border-color: #ff8000;
}

.btn-outline-wo:hover {
    background-color: #ff8000;
    border-color: #ff8000;
    color: white;
}

/* Botones sólidos para el estado WO */
.btn-wo {
    background-color: #ff8000;
    border-color: #ff8000;
    color: white;
}

.btn-wo:hover {
    background-color: #e67300;
    border-color: #e67300;
    color: white;
}

/* Texto con color WO */
.text-wo {
    color: #ff8000 !important;
}

/* Fondo con color WO */
.bg-wo {
    background-color: #ff8000 !important;
}

/* Texto blanco para headers con fondo WO */
.bg-wo h1,
.bg-wo h2,
.bg-wo h3,
.bg-wo h4,
.bg-wo h5,
.bg-wo h6,
.bg-wo .mb-0,
.bg-wo .card-title,
.bg-wo .card-header h4,
.bg-wo .card-header h5,
.bg-wo .card-header h6 {
    color: white !important;
}

.bg-wo .text-wo {
    color: #ff8000 !important;
}

/* Fondo con color WO y opacidad */
.bg-wo.bg-opacity-10 {
    background-color: rgba(255, 128, 0, 0.1) !important;
}

/* Estilos adicionales para botones WO */
.btn-wo:focus {
    background-color: #e67300;
    border-color: #e67300;
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(255, 128, 0, 0.25);
}

.btn-wo:active {
    background-color: #cc6600;
    border-color: #cc6600;
    color: white;
}

.btn-wo:disabled {
    background-color: #ffb366;
    border-color: #ffb366;
    color: white;
    opacity: 0.65;
}

/* ========================================
   CLASES ESPECÍFICAS PARA GANADOR WO
   ======================================== */

.ganador-wo {
    color: #ff8000 !important;
}

.ganador-wo i {
    color: #ff8000 !important;
}

/* ============================
   MODAL REGLAS DEL SISTEMA v2
   ============================ */

/* Dialog */
.reglas-modal-dialog { max-width: 860px; }
.reglas-modal-content { border-radius: 12px; overflow: hidden; }

/* En móvil, bajar el modal para no tapar la barra de estado/notificaciones */
@media (max-width: 767.98px) {
    #modalReglasDelSistema .modal-dialog {
        margin-top: calc(var(--safe-area-top, 0px) + 3.5rem);
        margin-bottom: 0.5rem;
    }
}

/* Cabecera */
.reglas-modal-header {
    background-color: #1b5674;
    color: #fff;
    padding: 1rem 1.25rem;
    align-items: flex-start;
    border-bottom: none;
}
.reglas-modal-title { font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: 0.15rem; }
.reglas-modal-subtitle { font-size: 0.8rem; color: rgba(255,255,255,0.75); }

/* Pie */
.reglas-modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.65rem 1.25rem;
}
.reglas-btn-close {
    background-color: #1b5674;
    color: #fff;
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
}
.reglas-btn-close:hover { background-color: #154460; color: #fff; }

/* Layout dos columnas */
.reglas-layout {
    display: flex;
    min-height: 420px;
    max-height: 520px;
}

/* Sidebar izquierda */
.reglas-nav {
    width: 210px;
    min-width: 210px;
    background-color: #f4f6f8;
    border-right: 1px solid #e2e6ea;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    overflow-y: auto;
}
.reglas-nav nav { flex: 1; }
.reglas-nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.84rem;
    color: #495057;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.15s;
    position: relative;
}
.reglas-nav-item:hover { background-color: #e8edf2; }
.reglas-nav-item.active {
    background-color: #1b5674;
    color: #fff;
    font-weight: 600;
}
.reglas-nav-icon {
    width: 28px;
    min-width: 28px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.85;
}
.reglas-nav-label { flex: 1; line-height: 1.2; }
.reglas-nav-arrow {
    font-size: 0.65rem;
    opacity: 0;
    transition: opacity 0.15s;
}
.reglas-nav-item.active .reglas-nav-arrow { opacity: 1; }

/* Área de contenido derecha */
.reglas-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}

/* Panel (sección) */
.reglas-panel { display: none; }
.reglas-panel.active { display: block; }

/* Cabecera del panel */
.reglas-panel-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}
.reglas-panel-icon-wrap {
    width: 48px;
    min-width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    background-color: #1b5674 !important;
}
.reglas-panel-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.15rem; color: #212529; }
.reglas-panel-subtitle { font-size: 0.8rem; color: #6c757d; margin: 0; }

/* Items de regla */
.reglas-items { display: flex; flex-direction: column; gap: 0.9rem; counter-reset: regla-item; }
.reglas-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}
.reglas-item-icon {
    counter-increment: regla-item;
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1b5674;
    background-color: #e8f1f6 !important;
    margin-top: 1px;
}
.reglas-item-icon::before { content: counter(regla-item); }
.reglas-item-icon i { display: none; }
.reglas-item-body { flex: 1; font-size: 0.875rem; }
.reglas-item-body > strong { display: block; color: #212529; margin-bottom: 0.1rem; }
.reglas-item-body p { color: #495057; margin: 0; line-height: 1.45; }
.reglas-item-body p strong { display: inline; font-weight: 600; }

/* Paleta de colores para iconos */
.reglas-icon-gold    { background-color: #f59e0b; }
.reglas-icon-blue    { background-color: #3b82f6; }
.reglas-icon-purple  { background-color: #8b5cf6; }
.reglas-icon-teal    { background-color: #14b8a6; }
.reglas-icon-orange  { background-color: #f97316; }
.reglas-icon-red     { background-color: #ef4444; }
.reglas-icon-green   { background-color: #22c55e; }
.reglas-icon-indigo  { background-color: #6366f1; }
.reglas-icon-gray    { background-color: #6b7280; }
.reglas-icon-pink    { background-color: #ec4899; }

/* Responsive: sidebar horizontal en móvil */
@media (max-width: 600px) {
    .reglas-layout { flex-direction: column; max-height: none; }
    .reglas-nav {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid #e2e6ea;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.25rem 0;
        white-space: nowrap;
    }
    .reglas-nav nav { display: flex; flex-direction: row; }
    .reglas-nav-item { flex-direction: column; gap: 0.2rem; padding: 0.5rem 0.65rem; font-size: 0.72rem; }
    .reglas-nav-arrow { display: none; }
    .reglas-content { padding: 1rem; }
}
