/* ==========================================================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================================================== */
:root {
    --bs-body-font-family: 'Poppins', sans-serif;
    --primary-color: #0d6efd;
    --light-bg: #f8f9fa;
    --dark-bg: #0b1120;

    /* DISEÑO PREMIUM */
    --card-radius: 16px;
    /* CAMBIO: Sombra más oscura (0.12) para mejor contraste */
    --card-shadow: 0 12px 24px -5px rgba(0, 0, 0, 0.12);
    --hover-bg: #f4f9ff;
    /* Azul muy suave */
    --border-color-soft: #f0f0f0;
    /* Líneas sutiles */
}

[data-bs-theme="dark"] {
    --bs-body-bg: var(--dark-bg);
    --bs-body-color: #e1e9f4;
    --hover-bg: #151f32;
    --border-color-soft: #2a3a5a;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: #fcfcfc;
}

/* ==========================================================================
   2. NAVBAR Y NAVEGACIÓN
   ========================================================================== */
.navbar {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.25rem;
    transition: transform 0.2s;
}

.theme-toggle:hover {
    transform: rotate(15deg);
}

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 50vh;
    padding: 6rem 1rem 4rem 1rem;
    background-color: #1a202c;
    background-size: cover;
    background-position: center;
    color: white;
    position: relative;
}

.hero-section h1 {
    font-weight: 800;
    letter-spacing: -1px;
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   4. BUSCADOR Y RESULTADOS (MEJORAS VISUALES)
   ========================================================================== */

/* Contenedor de resultados: Sombra fuerte y bordes redondeados */
#search-results {
    /* ... tus estilos anteriores ... */
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    /* Sombra potente */
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 0;
    /* Un poco de aire arriba y abajo */
    background: #fff;
}

/* Elemento de lista */
#search-results .list-group-item {
    padding: 0.8rem 1.2rem;
    /* Más espacio interno */
    border: none;
    border-bottom: 1px solid #f4f4f4;
    /* Línea separadora sutil */
    transition: background-color 0.1s ease;
    cursor: pointer;
}

#search-results .list-group-item:last-child {
    border-bottom: none;
}

/* Efecto Hover: Azul muy suave */
#search-results .list-group-item:hover,
#search-results .list-group-item:focus {
    background-color: #f8fbff;
    text-decoration: none;
}

/* Ajuste Dark Mode */
[data-bs-theme="dark"] #search-results {
    background-color: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] #search-results .list-group-item {
    background-color: #1e293b;
    border-bottom-color: #334155;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] #search-results .list-group-item:hover {
    background-color: #334155;
}

[data-bs-theme="dark"] .text-dark {
    color: #f1f5f9 !important;
    /* Forzar texto blanco en modo oscuro */
}

/* ==========================================================================
   5. WIDGET MONETIZACIÓN
   ========================================================================== */
.monetization-widget-card {
    border: none !important;
    border-radius: 50px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
    background: white;
}

/* ==========================================================================
   6. TARJETAS DE DESTINO (HOME) - CORREGIDO
   ========================================================================== */
.destination-card-link {
    text-decoration: none;
    display: block;
    color: inherit;
    height: 100%;
    /* Asegura que el enlace ocupe toda la altura */
}

.destination-card {
    border: none;
    overflow: hidden;
    min-height: 350px;
    /* Altura mínima fija */
    height: 100%;
    /* Si el contenido crece, que ocupe todo */
    position: relative;
    border-radius: 16px;
    background-color: #2c3e50;
    /* Color de fondo por si la imagen tarda */
}

/* CRÍTICO: Forzar a la imagen a llenar la tarjeta */
.destination-card .card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    /* Forzamos altura */
    object-fit: cover;
    /* Recorta la imagen para que llene sin deformar */
    opacity: 0.85;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 0;
}

.destination-card:hover .card-img {
    transform: scale(1.1);
    opacity: 0.7;
}

/* Overlay para que el texto se lea bien */
.destination-card .card-img-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 60%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

.destination-card .card-title {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.destination-card .card-text {
    opacity: 0.9;
    font-weight: 300;
}

/* ==========================================================================
   6. DISEÑO PREMIUM UI (TARJETAS, TABLAS, LISTAS)
   ========================================================================== */

/* 6.1. TARJETAS MAESTRAS (Aplica a Mapa, Estaciones y Aeropuertos) */
.card-rounded,
.card {
    border-radius: 16px !important;
    border: none !important;
    /* QUITA BORDES GRISES */
    box-shadow: var(--card-shadow) !important;
    background-color: white;
    overflow: hidden;
    /* Mantiene contenido dentro de las curvas */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    /* Efecto elevación al pasar el ratón */
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.18) !important;
    transform: translateY(-2px);
}

.card-header {
    background-color: #fff !important;
    border-bottom: 1px solid #f2f2f2 !important;
    padding: 1.5rem 2rem !important;
}

.card-header h4 {
    margin: 0;
    font-weight: 700;
    font-size: 1.2rem;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

/* 6.2. TABLAS LIMPIAS (Estilo Aireado) */
.table {
    margin-bottom: 0;
    --bs-table-bg: transparent;
}

.table thead th {
    background-color: #fbfbfb !important;
    color: #8898aa;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none !important;
    padding: 1rem 1.5rem !important;
}

.table tbody td {
    border-top: 1px solid var(--border-color-soft) !important;
    border-bottom: none !important;
    padding: 1.25rem 1.5rem !important;
    /* Espaciado generoso */
    vertical-align: middle;
    color: #32325d;
    font-weight: 500;
}

/* 6.3. HOVER UNIFICADO (Tablas y Listas) */
.table-hover tbody tr:hover,
.list-group-item-action:hover {
    background-color: var(--hover-bg) !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
    transform: none !important;
}

/* 6.4. LISTAS (Estilo igualado a Tabla) */
.list-group-item {
    border: none !important;
    border-top: 1px solid var(--border-color-soft) !important;
    padding: 1rem 1.5rem !important;
    background-color: transparent;
    color: #32325d;
}

.list-group-item:first-child {
    border-top: none !important;
}

/* Scrollbar bonito */
.list-group-flush::-webkit-scrollbar {
    width: 6px;
}

.list-group-flush::-webkit-scrollbar-track {
    background: transparent;
}

.list-group-flush::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 10px;
}

/* 6.5. MAPA */
.map-marker-icon {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.map-marker-icon:hover {
    transform: scale(1.2);
    z-index: 1000 !important;
}

/* ==========================================================================
   7. MODO OSCURO (DARK MODE)
   ========================================================================== */
[data-bs-theme="dark"] body {
    background-color: #0b1120;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .monetization-widget-card,
[data-bs-theme="dark"] #search-results {
    background-color: #151f32;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
}

[data-bs-theme="dark"] .card-header {
    background-color: #151f32 !important;
    border-bottom-color: #2a3a5a !important;
}

[data-bs-theme="dark"] .card-header h4 {
    color: #fff;
}

[data-bs-theme="dark"] .table thead th {
    background-color: #1a263e !important;
    color: #8898aa;
}

[data-bs-theme="dark"] .table tbody td,
[data-bs-theme="dark"] .list-group-item {
    color: #e1e9f4;
    border-top-color: #2a3a5a !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover,
[data-bs-theme="dark"] .list-group-item-action:hover {
    background-color: #1e2c46 !important;
}

/* ==========================================================================
   9. FAQS (ACORDEÓN MINIMALISTA)
   ========================================================================== */

/* Contenedor del acordeón */
#faqAccordion {
    background: #fff;
    border-radius: 16px;
    /* Coherente con el resto */
}

/* El botón (La pregunta) */
.accordion-button {
    background-color: transparent !important;
    /* Quita el fondo gris/azul por defecto */
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 1.5rem 2rem !important;
    /* Más espacio lateral para alinear */
    border: none;
    box-shadow: none !important;
    /* CRÍTICO: Quita la línea/resplandor azul al hacer clic */
}

/* Estado cuando está abierto */
.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    /* Solo el texto se pone azul */
    background-color: transparent !important;
    /* Asegura que no haya fondo azul */
    box-shadow: none !important;
    /* Asegura que no haya borde azul */
}

/* La flecha del acordeón */
.accordion-button:after {
    filter: grayscale(100%);
    /* Flecha gris neutra */
    opacity: 0.5;
}

.accordion-button:not(.collapsed):after {
    filter: none;
    /* Flecha azul cuando está abierto */
    /* Si quieres la flecha azul, usa un filtro SVG o déjalo así */
}

/* El cuerpo (La respuesta) */
.accordion-body {
    padding: 0 2rem 2rem 2rem !important;
    /* Alineado verticalmente con el título (2rem) */
    color: #555;
    line-height: 1.7;
    /* Mejor lectura */
    font-size: 0.95rem;
}

/* Líneas separadoras más sutiles */
.accordion-item {
    border: none;
    border-bottom: 1px solid var(--border-color-soft);
}

.accordion-item:last-child {
    border-bottom: none;
}





/* Efecto de punto parpadeante para el Radar */
@keyframes blinker {
    50% {
        opacity: 0.4;
    }
}

.blinking-dot {
    animation: blinker 1.5s linear infinite;
}


/* Oculta el icono de imagen rota nativo del navegador */
img[alt^="Plug"] {
    text-indent: -10000px;
}

/* Ocultar el icono de imagen rota nativo del navegador si el SVG no carga */
.card-rounded img[alt^="Plug"] {
    /* Esto hace que si la imagen falla, el texto 'alt' (la letra) se vea limpio */
    display: block;
    position: relative;
}

/* Truco para Firefox/Chrome: si la imagen falla, oculta el gráfico roto */
.card-rounded img[alt^="Plug"]:-moz-broken {
    opacity: 0;
}

.card-rounded img[alt^="Plug"]:not([src]) {
    visibility: hidden;
}