:root {
    --primary-color: #009AAE;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --breakpoint-mobile: 990px; /* Punto de quiebre para mobile Esto es información para JS */
    --z-index-filter-panel: 1040;
}

/* Filter Panel */
.filter-panel {
    background: #fff;
    overflow-y: auto;
    z-index: var(--z-index-filter-panel);
}

.sticky-filter-panel {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    height: 100%;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group h5 {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Result Cards */
.result-card {
    border: 1px solid #CCC;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s;
    background-color: #f8f8f8;
}

.result-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Tabs con borde como botones y color primario #009AAE */
.nav-tabs .nav-link {
    border: 1px solid #dee2e6 !important;
    color: #009AAE !important;
}

.nav-tabs .nav-link.active {
    border: 1px solid #009AAE !important;
    border-bottom: none !important;
    background-color: #009AAE !important;
    color: #FFF !important;
}

/* Mejora para evitar tab-item de distintas alturas */
.nav-justified .nav-item {
    flex-shrink: 1;
    flex-basis: unset !important;
}


/* ============================================
   MOBILE STYLES (hasta lo que indica el --breakpoint-mobile)
   ============================================ */
@media (max-width: 990px) {
    .filter-panel {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: 370px;
        height: 100vh;
        border-right: 2px solid var(--primary-color);
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
        transition: left 0.3s ease-in-out;
    }
    
    .filter-panel.show {
        left: 0;
    }
    
    /* Overlay oscuro cuando el panel está abierto */
    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: calc(var(--z-index-filter-panel) - 1);
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }
    
    .filter-overlay.show {
        display: block !important;
        opacity: 1;
    }
}

/* ============================================
   DESKTOP STYLES (desde el --breakpoint-mobile en adelante)
   ============================================ */
@media (min-width: 991px) {
    .filter-panel {
        border-right: 1px solid #dee2e6;
    }
    
    /* Ocultar botón de filtros mobile */
    #filtersButtonMobile {
        display: none !important;
    }
    
    /* Asegurar que overlay no aparezca en desktop */
    .filter-overlay {
        display: none !important;
    }
}

/* Tamaños y colores de los elemebntos del filtro */
.form-check {
  font-size: 0.875rem;
}

.form-check-input {
  transform: scale(0.85);
  margin-top: 0.15em;
  border-color: #888;
  margin-top: 0.3em;
}

.form-check-input:checked {
  background-color: #009AAE;
  border-color: #009AAE;
}

/* Badges */
.text-bg-badge {
  color: #fff;
  background-color:#009AAE;
}
.badge {
  padding: 0.55em 0.75em !important;
  font-size: 0.8em !important;
  border-radius: 0.375rem !important;
  font-weight: 600 !important;
}

/* Textos de partido y contacto */
.text-ficha-small {
  font-size: 0.9em;
}

/* Ocultar filtros temporalmente */
.filter-hidden {
  display: none !important;
}