:root {
    --shadow-soft: 0 20px 50px -25px rgba(15, 23, 42, 0.3);
}

.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.1));
}

/* Hero text: MOBILE siempre centrado (por Tailwind base), padding seguro en mobile */
.hero-slide-text {
    padding: 0 clamp(24px, 4vw, 48px);
}

/* Hero text: DESKTOP (md+): respetar alineación por slide y offset */
@media (min-width: 768px) {
    .hero-slide-text[data-hero-align="left"] {
        padding-left: clamp(24px, 18vw + 32px, 350px);
        padding-right: clamp(24px, 4vw, 48px);
    }
    .hero-slide-text[data-hero-align="right"] {
        padding-right: clamp(24px, 18vw + 32px, 350px);
        padding-left: clamp(24px, 4vw, 48px);
    }
}

.card-hover {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
}

/* Listado: en mobile siempre 1 propiedad por fila; cols configurables solo para desktop */
.properties-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}
@media (min-width: 768px) {
    /* Desktop/tablet: respetar cols configurables */
    #properties-grid.properties-grid {
        grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)) !important;
    }
}

.sticky-panel {
    position: sticky;
    top: 100px;
}

.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--color-secondary, #22C55E);
    opacity: 1;
}

/* Destacadas: paginación debajo + flechas laterales */
.featured-nav .featured-pagination {
    position: static !important;
    width: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 !important;
}

.featured-nav .featured-pagination .swiper-pagination-bullet {
    background: rgba(15, 23, 42, 0.35) !important; /* slate */
    opacity: 1 !important;
}

.featured-nav .featured-pagination .swiper-pagination-bullet-active {
    background: var(--color-primary, #0F172A) !important;
    width: 22px !important;
    border-radius: 9999px !important;
}

.featured-prev,
.featured-next {
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.featured-prev:hover,
.featured-next:hover {
    transform: scale(1.06);
    background: rgba(255, 255, 255, 1);
}

.featured-prev::after,
.featured-next::after {
    font-size: 16px;
    line-height: 1;
    color: rgba(15, 23, 42, 0.9);
    font-weight: 700;
}

.featured-prev::after { content: '‹'; }
.featured-next::after { content: '›'; }

.featured-prev.swiper-button-disabled,
.featured-next.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

html {
    scroll-behavior: smooth;
}

/* Property Swiper con previews laterales */
#property-carousel-section {
    overflow: visible !important;
    padding: 0 120px;
    position: relative;
}

@media (max-width: 1024px) {
    #property-carousel-section {
        padding: 0 100px;
    }
}

@media (max-width: 768px) {
    #property-carousel-section {
        padding: 0 60px;
    }
}

@media (max-width: 640px) {
    #property-carousel-section {
        padding: 0 40px;
    }
}

.property-swiper {
    width: 100%;
    position: relative;
    height: 100%;
    overflow: visible !important;
}

.property-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
    height: 100%;
    overflow: visible;
}

.property-swiper .swiper-slide {
    transition: opacity 0.4s ease, transform 0.4s ease;
    visibility: visible !important;
    display: flex !important;
    flex-shrink: 0;
    opacity: 1 !important;
    transform: scale(1) !important;
    filter: none !important;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.property-swiper .swiper-slide img,
.property-swiper .swiper-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.property-swiper .swiper-slide-active {
    cursor: pointer;
}

.property-swiper .swiper-slide-active img {
    cursor: zoom-in;
}

/* Solo aplicar efectos de preview si hay 3+ slides Y el atributo está presente */
.property-swiper[data-multiple-slides="true"] .swiper-slide {
    opacity: 0.4 !important;
    transform: scale(0.9) !important;
    filter: blur(2px) !important;
}

.property-swiper[data-multiple-slides="true"] .swiper-slide-active {
    opacity: 1 !important;
    transform: scale(1) !important;
    z-index: 2;
    filter: blur(0) !important;
}

.property-swiper[data-multiple-slides="true"] .swiper-slide-prev,
.property-swiper[data-multiple-slides="true"] .swiper-slide-next {
    opacity: 0.6 !important;
    transform: scale(0.95) !important;
    filter: blur(1px) !important;
}

/* Paginación del property swiper */
.property-pagination {
    position: absolute !important;
    bottom: 16px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 20 !important;
    width: auto !important;
}

.property-pagination .swiper-pagination-bullet {
    width: 10px !important;
    height: 10px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 4px !important;
}

.property-pagination .swiper-pagination-bullet-active {
    background: var(--color-secondary, #22C55E) !important;
    width: 24px !important;
    border-radius: 5px !important;
    opacity: 1 !important;
}

/* Gradientes difuminados en los extremos laterales (solo si hay previews) */
#property-carousel-section[data-multiple-slides="true"] {
    position: relative;
}

#property-carousel-section[data-multiple-slides="true"]::before,
#property-carousel-section[data-multiple-slides="true"]::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 15;
    pointer-events: none;
    height: 100%;
}

#property-carousel-section[data-multiple-slides="true"]::before {
    left: calc(-1 * (100vw - 100%) / 2);
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.95) 20%, 
        rgba(255, 255, 255, 0.7) 50%, 
        rgba(255, 255, 255, 0.3) 80%, 
        transparent 100%);
}

#property-carousel-section[data-multiple-slides="true"]::after {
    right: calc(-1 * (100vw - 100%) / 2);
    background: linear-gradient(to left, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.95) 20%, 
        rgba(255, 255, 255, 0.7) 50%, 
        rgba(255, 255, 255, 0.3) 80%, 
        transparent 100%);
}

@media (max-width: 1024px) {
    #property-carousel-section[data-multiple-slides="true"]::before,
    #property-carousel-section[data-multiple-slides="true"]::after {
        width: 100px;
    }
}

@media (max-width: 768px) {
    #property-carousel-section[data-multiple-slides="true"]::before,
    #property-carousel-section[data-multiple-slides="true"]::after {
        width: 60px;
    }
}

@media (max-width: 640px) {
    #property-carousel-section[data-multiple-slides="true"]::before,
    #property-carousel-section[data-multiple-slides="true"]::after {
        width: 40px;
    }
}

/* Lightbox para propiedades */
.property-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.property-lightbox.hidden {
    opacity: 0;
    visibility: hidden;
}

.property-lightbox:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.property-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.property-lightbox-content {
    position: relative;
    width: 90vw;
    max-width: 1400px;
    height: 90vh;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.property-lightbox-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.property-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.property-lightbox-video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.property-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

.property-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.property-lightbox-prev,
.property-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

.property-lightbox-prev {
    left: -70px;
}

.property-lightbox-next {
    right: -70px;
}

.property-lightbox-prev:hover,
.property-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.property-lightbox-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    z-index: 10001;
}

@media (max-width: 768px) {
    .property-lightbox-content {
        width: 95vw;
        height: 85vh;
    }
    
    .property-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .property-lightbox-prev,
    .property-lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 32px;
    }
    
    .property-lightbox-prev {
        left: 10px;
    }
    
    .property-lightbox-next {
        right: 10px;
    }
    
    .property-lightbox-counter {
        bottom: 10px;
        font-size: 14px;
        padding: 6px 12px;
    }
}

/* Flechas de navegación */
.property-swiper-next,
.property-swiper-prev {
    color: white !important;
    background: rgba(0, 0, 0, 0.6) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 20 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0 !important;
}

.property-swiper-next:hover,
.property-swiper-prev:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    transform: scale(1.1);
}

.property-swiper-next::after,
.property-swiper-prev::after {
    font-size: 20px !important;
    font-weight: bold !important;
    color: white !important;
}

@media (max-width: 640px) {
    .property-swiper[data-multiple-slides="true"]::before,
    .property-swiper[data-multiple-slides="true"]::after {
        width: 50px;
    }
    
    .property-swiper-next,
    .property-swiper-prev {
        width: 36px !important;
        height: 36px !important;
    }
    
    .property-swiper-next::after,
    .property-swiper-prev::after {
        font-size: 16px !important;
    }
}

/* Flechas de navegación */
.property-swiper-next,
.property-swiper-prev {
    color: white !important;
    background: rgba(0, 0, 0, 0.6) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 20 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.property-swiper-next:hover,
.property-swiper-prev:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    transform: scale(1.1);
}

.property-swiper-next::after,
.property-swiper-prev::after {
    font-size: 20px !important;
    font-weight: bold !important;
    color: white !important;
}

@media (max-width: 640px) {
    .property-swiper::before,
    .property-swiper::after {
        width: 50px;
    }
    
    .property-swiper-next,
    .property-swiper-prev {
        width: 36px;
        height: 36px;
    }
    
    .property-swiper-next::after,
    .property-swiper-prev::after {
        font-size: 16px;
    }
}

/* Galería de miniaturas */
.property-thumbnails {
    padding: 0 20px;
}

.property-thumbnails-swiper {
    overflow: visible;
}

.property-thumbnails-swiper .swiper-wrapper {
    display: flex;
    gap: 12px;
}

.property-thumbnail-slide {
    width: 100px !important;
    flex-shrink: 0;
}

.property-thumbnail-slide .rounded-lg {
    opacity: 0.6;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

.property-thumbnail-slide.active .rounded-lg,
.property-thumbnail-slide:hover .rounded-lg {
    opacity: 1;
    border-color: var(--color-primary, #0F172A) !important;
}

.property-thumbnail-slide.active .rounded-lg {
    border-width: 2px;
    border-color: var(--color-primary, #0F172A) !important;
}

@media (max-width: 640px) {
    .property-thumbnails {
        padding: 0 10px;
    }
    
    .property-thumbnail-slide {
        width: 70px !important;
    }
    
    .property-thumbnail-slide .rounded-lg {
        height: 60px;
    }
}

/* Testimonios */
.testimonials-swiper {
    overflow: visible;
    padding-bottom: 40px;
}

.testimonials-swiper .swiper-slide {
    height: auto;
    overflow: visible;
    padding-bottom: 16px;
}

.testimonial-card {
    min-height: 400px;
}

/* Utilidad para ocultar scrollbars */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@media (min-width: 768px) {
    .testimonial-card {
        min-height: 420px;
    }
}

