/* ============ RESET Y BASE ============ */
* {
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(180deg, #f5f0fa 0%, #faf5eb 30%, #fefaf5 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #9B72C2;
    --color-primary-dark: #7e55a8;
    --color-secondary: #C8A165;
    --color-secondary-dark: #b88a4a;
}

/* ============ HEADER ANIMADO ============ */
.header-animado {
    background: linear-gradient(180deg, #f5f0fa 0%, #faf5eb 100%);
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(155, 114, 194, 0.15);
    border-bottom: 1px solid rgba(200, 161, 101, 0.15);
}

.contenido-animado {
    display: inline-block;
    animation: scrollLeft 200s linear infinite;
}

.contenido-animado .item-destacado {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4a5568;
    vertical-align: middle;
    font-weight: 500;
    border: 1px solid var(--color-secondary);
    border-radius: 40px;
    padding: 5px 15px 5px 10px;
    background: transparent;
}

.contenido-animado .item-destacado:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: rgba(155, 114, 194, 0.05);
}

.header-img-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #f3f4f6;
    border: 2px solid var(--color-secondary);
}

.separador {
    display: inline-block;
    width: 5px;
    height: 5px;
    background-color: var(--color-secondary);
    border-radius: 50%;
    margin: 0 12px;
    vertical-align: middle;
}

.mensaje-sin-destacados {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 400;
    padding: 5px 15px;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.header-animado:hover .contenido-animado {
    animation-play-state: paused;
}

/* ============ BARRA DE FILTRO ============ */
.filtro-bar {
    background: linear-gradient(180deg, #f5f0fa 0%, #faf5eb 100%);
    padding: 0.75rem 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(200, 161, 101, 0.2);
}

/* ============ SELECTOR PERSONALIZADO PRINCIPAL ============ */
.custom-select-wrapper {
    position: relative;
    min-width: 150px;
}

.custom-select-trigger {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.2s ease;
}

.custom-select-trigger:hover {
    border-color: var(--color-primary);
}

.custom-select-trigger.open {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(155, 114, 194, 0.2);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-option {
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.custom-option:hover {
    background-color: #f3f4f6;
}

.custom-option.selected {
    background-color: var(--color-primary);
    color: white;
}

/* ============ SELECTOR DE UBICACIÓN POR SECCIÓN ============ */
.custom-ubicacion-wrapper {
    position: relative;
    min-width: 200px;
}

.custom-ubicacion-trigger {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 8px 35px 8px 16px;
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.2s ease;
}

.custom-ubicacion-trigger:hover {
    border-color: var(--color-primary);
}

.custom-ubicacion-trigger.open {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(155, 114, 194, 0.2);
}

.custom-ubicacion-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-ubicacion-option {
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.custom-ubicacion-option:hover {
    background-color: #f3f4f6;
}

.custom-ubicacion-option.selected {
    background-color: var(--color-primary);
    color: white;
}

/* ============ SECCIONES ============ */
.seccion-card {
    background: linear-gradient(135deg, #ffffff 0%, #fefaf5 100%);
    border-radius: 20px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(200, 161, 101, 0.2);
}

.seccion-header-card {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-secondary);
    border-radius: 40px;
    padding: 8px 20px;
    background: transparent;
    transition: all 0.2s ease;
}

.seccion-header-card:hover {
    border-color: var(--color-primary);
    background: rgba(155, 114, 194, 0.03);
}

.seccion-titulo-card {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    padding: 0;
}

.seccion-descripcion-card {
    font-size: 0.8rem;
    color: #5a6a7a;
    margin: 0;
    padding: 0;
    position: relative;
}

.seccion-descripcion-card::before {
    content: "•";
    margin-right: 8px;
    color: var(--color-secondary);
}

/* ============ SWIPER Y CARDS ============ */
.swiper {
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.swiper-wrapper {
    padding: 5px 0;
}

.swiper-slide {
    width: auto;
    max-width: 180px;
    min-width: 180px;
}

.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    max-width: 180px;
    min-width: 180px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-img-container {
    width: 100%;
    background-color: #f9fafb;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card .p-2 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-titulo {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2rem;
    height: 2.2rem;
}

.card-especialidad {
    font-size: 0.65rem;
    color: #6b7280;
    min-height: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ver-mas-btn {
    background-color: #f3f4f6;
    color: var(--color-primary);
    font-size: 0.7rem;
    padding: 5px;
    border-radius: 8px;
    width: 100%;
    margin-top: auto;
    transition: all 0.2s ease;
}

.ver-mas-btn:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-1px);
}

/* ============ BADGE DE RELACIÓN ============ */
.relacion-badge {
    display: inline-block;
    background-color: #f3e8ff;
    color: #7e55a8;
    font-size: 0.6rem;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    margin-top: 0.25rem;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.relacion-badge i {
    font-size: 0.55rem;
    margin-right: 0.125rem;
}

/* ============ SWIPER NAVEGACIÓN ============ */
.swiper-button-next,
.swiper-button-prev {
    background-color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 1;
    transition: all 0.2s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 14px;
    font-weight: bold;
    color: var(--color-primary);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: var(--color-primary);
}

.swiper-button-next:hover:after,
.swiper-button-prev:hover:after {
    color: white;
}

/* ============ ICONOS SOCIALES ============ */
.social-icon {
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(155, 114, 194, 0.2);
}

.social-icon:hover {
    transform: translateY(-2px);
    background: var(--color-primary);
}

/* ============ WHATSAPP FLOTANTE ============ */
.float-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.float-whatsapp:hover {
    transform: scale(1.05);
}

/* ============ MODALES ============ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
}

.modal-contenido {
    background-color: transparent;
    margin: 40px auto;
    padding: 0;
    width: auto;
    max-width: 500px;
}

/* ============ LIGHTBOX ============ */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.lightbox-img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* ============ CONTENEDOR PRINCIPAL ============ */
.container-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* ============ FILTROS DE SECCIÓN ============ */
.filtros-seccion {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ============ BOTONES ============ */
.btn-ver-todos {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    border-radius: 40px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-ver-todos:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 114, 194, 0.3);
}

.filtros-busqueda {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

.input-buscar {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px 8px 32px;
    font-size: 14px;
    width: 240px;
    outline: none;
    transition: all 0.2s ease;
}

.input-buscar:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(155, 114, 194, 0.2);
}

.btn-buscar {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-buscar:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.btn-limpiar {
    background: #e5e7eb;
    color: #374151;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-limpiar:hover {
    background: #d1d5db;
    transform: translateY(-1px);
}

.no-results-filtro {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}

/* ============ BANNER OVERLAY ============ */
.banner-overlay {
    background: linear-gradient(135deg, rgba(155, 114, 194, 0.6) 0%, rgba(200, 161, 101, 0.6) 100%);
}

/* ============ BADGE TOP ============ */
.badge-top {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #eab308;
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.125rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 12px;
    }
    
    .input-buscar {
        width: 180px;
    }
    
    .contenido-animado .item-destacado {
        padding: 3px 10px 3px 6px;
        gap: 6px;
        margin: 0 10px;
    }
    
    .header-img-circle {
        width: 22px;
        height: 22px;
    }
    
    .seccion-header-card {
        padding: 6px 15px;
        gap: 6px;
    }
    
    .seccion-titulo-card {
        font-size: 1.1rem;
    }
    
    .seccion-descripcion-card {
        font-size: 0.7rem;
    }
    
    .custom-select-wrapper {
        min-width: 130px;
    }
    
    .custom-select-trigger {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .custom-option {
        font-size: 12px;
        padding: 10px 12px;
    }
    
    .custom-ubicacion-wrapper {
        min-width: 160px;
    }
    
    .custom-ubicacion-trigger {
        font-size: 11px;
        padding: 6px 30px 6px 12px;
    }
    
    .custom-ubicacion-option {
        font-size: 11px;
        padding: 8px 10px;
    }
    
    .relacion-badge {
        font-size: 0.55rem;
    }
}

@media (max-width: 640px) {
    .swiper-slide {
        max-width: 140px;
        min-width: 140px;
    }
    
    .card {
        max-width: 140px;
        min-width: 140px;
    }
    
    .seccion-card {
        padding: 0.75rem;
    }
    
    .container-main {
        padding: 0.5rem;
    }
    
    .custom-ubicacion-wrapper {
        min-width: 140px;
        width: 100%;
    }
    
    .custom-ubicacion-trigger {
        font-size: 10px;
        padding: 6px 25px 6px 10px;
        width: 100%;
    }
    
    .custom-ubicacion-option {
        font-size: 10px;
        padding: 8px 10px;
    }
    
    .custom-select-wrapper {
        min-width: 120px;
    }
    
    .custom-select-trigger {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .custom-option {
        font-size: 11px;
        padding: 8px 10px;
    }
    
    .card-titulo {
        font-size: 0.7rem;
        min-height: 1.8rem;
        height: 1.8rem;
    }
    
    .card-especialidad {
        font-size: 0.55rem;
    }
    
    .btn-ver-todos {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .filtros-seccion {
        gap: 0.5rem;
        flex-direction: column;
    }
    
    .filtros-seccion .custom-ubicacion-wrapper {
        width: 100%;
    }
    
    .header-animado {
        padding: 8px 0;
    }
    
    .contenido-animado .item-destacado {
        margin: 0 8px;
        font-size: 0.7rem;
        gap: 4px;
        padding: 2px 8px 2px 5px;
    }

     /* ============ HEADER ANIMADO MÁS GRANDE EN MÓVIL ============ */
    .header-animado {
        padding: 12px 0 !important;
    }
    
    .contenido-animado .item-destacado {
        padding: 8px 16px 8px 12px !important;
        gap: 10px !important;
        margin: 0 12px !important;
        font-size: 0.85rem !important;
        font-weight: 600 !important;
    }
    
    .header-img-circle {
        width: 28px !important;
        height: 28px !important;
        border-width: 2px !important;
    }
    
    /* ============ FIN HEADER ANIMADO ============ */
    
    .custom-ubicacion-wrapper {
        min-width: 140px;
        width: 100%;
    }
    
    .header-img-circle {
        width: 20px;
        height: 20px;
    }
    
    .separador {
        margin: 0 4px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 26px;
        height: 26px;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 10px;
    }
    
    .filtros-busqueda {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-buscar {
        width: 100%;
    }
    
    .btn-buscar,
    .btn-limpiar {
        width: 100%;
        text-align: center;
    }
    
    .seccion-header-card {
        padding: 4px 12px;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    
    .seccion-titulo-card {
        font-size: 1rem;
    }
    
    .seccion-descripcion-card {
        font-size: 0.65rem;
    }
    
    .badge-top {
        top: 0.25rem;
        right: 0.25rem;
        font-size: 0.5rem;
        padding: 0.1rem 0.25rem;
    }
    
    .badge-top i {
        font-size: 6px;
    }
    
    .relacion-badge {
        font-size: 0.5rem;
        padding: 0.1rem 0.25rem;
    }

        /* ============ SCROLLBAR PERSONALIZADO (OPCIONAL) ============ */
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    ::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb {
        background: var(--color-primary);
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--color-primary-dark);
    }    
}
