/* ============================================
   LISTA DE BALNEARIOS - CSS COMPLETO
   ============================================ */

.app-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* ============================================
   PANEL DE FILTROS - VERSIÓN REALZADA
   ============================================ */
.filtros-panel {
    background: none;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 2px solid #2c5282;
    box-shadow: 0 4px 20px rgba(44, 82, 130, 0.15);
    overflow: visible;
    transition: box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
}

.filtros-panel:hover {
    box-shadow: 0 6px 30px rgba(44, 82, 130, 0.25);
}

.filtros-toggle {
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #2c5282 0%, #3182ce 100%);
    border-radius: 12px;
    user-select: none;
    font-weight: 600;
    color: #ffffff;
    transition: background 0.3s ease;
    position: relative;
    z-index: 2;
}

.filtros-toggle:hover {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
}

.filtros-toggle span {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filtros-toggle span i {
    font-size: 18px;
}

.filtros-count {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    background: #ffc107;
    color: #1a202c;
    border-radius: 50%;
    padding: 3px 12px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

#filtrosIcon {
    transition: transform 0.3s ease;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.filtros-contenido {
    padding: 20px 24px;
    background: #f7fafc;
    border-radius: 12px;
    border-top: 3px solid #e2e8f0;
    display: none;
    overflow: visible;
    position: relative;
    z-index: 2;
}

.filtros-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    position: relative;
    z-index: 3;
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 1;
}

.filtro-grupo:hover {
    border-color: #2c5282;
    box-shadow: 0 2px 12px rgba(44, 82, 130, 0.08);
    z-index: 10;
}

.filtro-grupo label {
    font-size: 12px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filtro-grupo label i {
    margin-right: 6px;
    color: #2c5282;
    font-size: 13px;
}

.filtros-acciones {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 2px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.filtros-acciones .btn-primary {
    background: linear-gradient(135deg, #2c5282 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 10px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(44, 82, 130, 0.25);
}

.filtros-acciones .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.35);
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
}

.filtros-acciones .btn-secondary {
    background: #edf2f7;
    color: #2d3748;
    border: 2px solid #e2e8f0;
    padding: 10px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filtros-acciones .btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

/* ============================================
   SELECTORES PERSONALIZADOS
   ============================================ */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-btn {
    width: 100%;
    padding: 8px 12px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 42px;
    position: relative;
    z-index: 5;
}

.custom-select-btn:hover {
    border-color: #90cdf4;
}

.custom-select-btn:focus {
    outline: none;
    border-color: #2c5282;
    box-shadow: 0 0 0 4px rgba(44, 82, 130, 0.15);
}

.custom-select-btn.active {
    border-color: #2c5282;
    box-shadow: 0 0 0 4px rgba(44, 82, 130, 0.15);
    z-index: 50;
}

.custom-select-text {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-text .fa-star {
    color: #e2e8f0;
    font-size: 14px;
}

.custom-select-text .fa-star.active {
    color: #ecc94b;
}

.custom-select-arrow {
    color: #2c5282;
    font-size: 14px;
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.custom-select-btn.active .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #2c5282;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999;
    display: none;
    animation: dropdownFade 0.2s ease;
}

.custom-select-dropdown.open {
    display: block;
}

.custom-select-dropdown .custom-select-option:first-child {
    border-radius: 8px 8px 0 0;
}

.custom-select-dropdown .custom-select-option:last-child {
    border-radius: 0 0 8px 8px;
}

.custom-select-dropdown .custom-select-option:only-child {
    border-radius: 8px;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-select-option {
    padding: 10px 14px;
    font-size: 14px;
    color: #2d3748;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f0f2f5;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: #ebf8ff;
}

.custom-select-option.selected {
    background: #ebf8ff;
    font-weight: 600;
    color: #2c5282;
}

.custom-select-option.selected .fa-check {
    color: #2c5282;
}

.custom-select-option .fa-check {
    color: #2c5282;
    font-size: 14px;
}

.custom-select-option .fa-star {
    color: #e2e8f0;
    font-size: 14px;
}

.custom-select-option .fa-star.active {
    color: #ecc94b;
}

.custom-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 0 0 10px 10px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: #2c5282;
    border-radius: 10px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: #1a365d;
}

/* Firefox */
.custom-select-dropdown {
    scrollbar-width: thin;
    scrollbar-color: #2c5282 transparent;
}

/* ============================================
   FILTROS ACTIVOS (TAGS)
   ============================================ */
.filtros-activos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #ebf8ff;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #bee3f8;
}

.filtros-label {
    font-weight: 600;
    color: #2c5282;
    font-size: 14px;
    margin-right: 4px;
}

.filtro-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    padding: 5px 12px 5px 10px;
    border-radius: 20px;
    border: 1px solid #2c5282;
    font-size: 13px;
    color: #2c5282;
}

.filtro-tag .fa-star {
    color: #e2e8f0;
    font-size: 12px;
}

.filtro-tag .fa-star.active {
    color: #ecc94b;
}

.filtro-remove {
    color: #e53e3e;
    text-decoration: none;
    margin-left: 4px;
    padding: 0 4px;
    font-size: 16px;
    transition: transform 0.2s;
    line-height: 1;
}

.filtro-remove:hover {
    transform: scale(1.3);
}

/* ============================================
   RESULTADOS
   ============================================ */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.results-count {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.results-count i {
    color: #2c5282;
}

.balnearios-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ============================================
   CARDS DE BALNEARIOS - NUEVA VERSIÓN
   ============================================ */
.balneario-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.balneario-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #2c5282;
}

.balneario-card-link {
    cursor: pointer;
}

/* IMAGEN */
.balneario-imagen {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f0f4f8;
    flex-shrink: 0;
}

.balneario-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.balneario-card:hover .balneario-imagen img {
    transform: scale(1.03);
}

/* CONTENIDO */
.balneario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 0 20px;
}

.balneario-title {
    font-size: 17px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.balneario-arrow {
    color: #a0aec0;
    font-size: 14px;
    transition: transform 0.2s;
}

.balneario-card:hover .balneario-arrow {
    transform: translateX(4px);
    color: #2c5282;
}

.balneario-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 8px;
    font-size: 16px;
    color: #4a5568;
    padding: 0 20px;
}

.balneario-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.balneario-meta i {
    color: #718096;
    font-size: 15px;
}

.balneario-rating {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px 16px 20px;
}

.balneario-rating .fa-star {
    color: #e2e8f0;
    font-size: 15px;
}

.balneario-rating .fa-star.active {
    color: #ecc94b;
}

.balneario-rating small {
    color: #718096;
    font-size: 13px;
    margin-left: 4px;
}

/* ============================================
   BUSCADOR POR NOMBRE
   ============================================ */
.buscador-container {
    margin-bottom: 20px;
    padding: 0;
}

.buscador-input-group {
    position: relative;
    width: 100%;
}

.buscador-icono {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 18px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.buscador-input {
    width: 100%;
    padding: 14px 50px 14px 48px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #2d3748;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.buscador-input:focus {
    border-color: #2c5282;
    box-shadow: 0 0 0 4px rgba(44, 82, 130, 0.15), 0 2px 12px rgba(0, 0, 0, 0.06);
}

.buscador-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.buscador-input:focus::placeholder {
    color: #cbd5e0;
}

.buscador-limpiar {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.buscador-limpiar:hover {
    color: #e53e3e;
    background: #fff5f5;
    transform: translateY(-50%) scale(1.1);
}

.resultado-busqueda {
    font-weight: 400;
    color: #4a5568;
    font-size: 0.9em;
}

.resultado-busqueda strong {
    color: #2c5282;
    font-weight: 600;
}

/* ============================================
   MODAL - FICHA ABREVIADA
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalEntrada 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #dc3545;
}

.modal-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 16px;
}

.modal-loading i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    color: #2c5282;
}

.modal-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
}

.modal-ficha {
    padding: 4px 0;
}

.modal-titulo {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 30px;
    margin-bottom: 24px;
}

.modal-columna {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-campo {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
}

.modal-label {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.modal-label i {
    margin-right: 4px;
    width: 16px;
}

.modal-valor {
    font-size: 15px;
    color: #2d3748;
    word-break: break-word;
}

.modal-valor .fa-star {
    color: #e2e8f0;
    font-size: 14px;
}

.modal-valor .fa-star.active {
    color: #ecc94b;
}

.modal-valor small {
    color: #718096;
    font-size: 13px;
    margin-left: 4px;
}

.modal-valor a {
    color: #2c5282;
    text-decoration: none;
}

.modal-valor a:hover {
    text-decoration: underline;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 48px;
    color: #cbd5e0;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: #2d3748;
    margin-bottom: 8px;
}

.empty-state p {
    color: #718096;
    margin-bottom: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .filtros-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .balneario-imagen {
        height: 170px;
    }
    
    .modal-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-titulo {
        font-size: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        justify-content: center;
    }

    .buscador-input {
        padding: 12px 44px 12px 42px;
        font-size: 15px;
        border-radius: 10px;
    }
    
    .buscador-icono {
        left: 14px;
        font-size: 16px;
    }
    
    .buscador-limpiar {
        right: 12px;
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .filtros-grid {
        grid-template-columns: 1fr;
    }
    
    .filtros-contenido {
        padding: 16px;
    }
    
    .filtros-toggle {
        padding: 14px 16px;
    }
    
    .filtros-toggle span {
        font-size: 14px;
    }
    
    .filtros-acciones {
        flex-wrap: wrap;
    }
    
    .filtros-acciones .btn {
        flex: 1;
        justify-content: center;
    }
    
    .balnearios-list {
        grid-template-columns: 1fr;
    }

    .buscador-input {
        padding: 10px 40px 10px 38px;
        font-size: 14px;
    }
    
    .buscador-icono {
        left: 12px;
        font-size: 14px;
    }
}