/* 
    YEXTHÓ REAL ESTATE - HERO CAROUSEL STYLES
    Unified carousel with Yexthó brand palette
*/

/* --- YEXTHÓ COLOR PALETTE --- */
:root {
    --yext-red: #D91B2B;
    --yext-yellow: #FFD60F;
    --yext-green: #57C965;
    --yext-blue: #3B5BDB;
    --yext-purple: #6F42C1;
    --yext-orange: #F7941D;
    --yext-dark: #1a1a1a;
    --yext-light: #f5f5f5;
}

/* --- MAIN CAROUSEL CONTAINER --- */
.hero-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 70vh;
    overflow: hidden;
    background-color: transparent;
    margin-bottom: 0;
}

.hero-carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

.premium-photo-layer {
    position: absolute;
    transform: scale(1.12);
    transition: transform 10s linear;
    will-change: transform;
    z-index: 0;
}

.hero-carousel-slide.active .premium-photo-layer {
    transform: scale(1.02) translate3d(-1.5%, -1%, 0);
}

.hero-carousel-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 20, 18, 0.6);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.hero-carousel-mask.is-active {
    opacity: 1;
}

/* --- SLIDE CONTENT TYPES --- */

/* Property Slide - NEW DESIGN: Fullscreen image + Small overlay card with Ken Burns effect */
.slide-property-hero {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow: hidden;
}

/* Hero Title Bars (Plecas) - Top Left */
.hero-title-bars {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-title-bar {
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.75rem 1.5rem;
    line-height: 1.2;
    animation: slideInLeft 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: clamp(1rem, 1.8vw, 1.4rem);
}

.hero-title-bar.bar-1 {
    width: auto;
    max-width: 90vw;
}

.hero-title-bar.bar-2 {
    width: fit-content;
    max-width: 50vw;
    animation-delay: 0.1s;
}



/* Mask: Dark overlay on image */
.slide-property-overlay-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

/* Information card: Small white transparent box in bottom-right - REFINED DESIGN */
.slide-property-info-card {
    position: absolute;
    bottom: 6rem;
    right: 2rem;
    z-index: 20;
    background: rgba(255, 255, 255, 0.60);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem 1.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    max-width: 480px;
    min-width: 350px;
    animation: slideInRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slide-property-info-card .property-card-title {
    display: none;
}


.slide-property-info-card .property-card-subtitle {
    font-size: clamp(0.85rem, 1.4vw, 1rem);
    color: #333;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-weight: 400;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.slide-property-info-card .property-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.slide-property-info-card .property-card-price {
    font-size: clamp(1.4rem, 2.6vw, 1.8rem);
    font-weight: 700;
    color: var(--yext-red);
    letter-spacing: -0.01em;
    margin: 0;
}

.slide-property-info-card .property-card-cta {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, var(--yext-dark) 0%, #1a1a1a 100%);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.slide-property-info-card .property-card-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.slide-cortinilla-publish .slide-property-info-card .property-card-cta {
    background: #E40046;
    box-shadow: 0 4px 15px rgba(228, 0, 70, 0.35);
}

.slide-cortinilla-publish .slide-property-info-card .property-card-cta:hover {
    background: #c4003c;
    box-shadow: 0 6px 20px rgba(228, 0, 70, 0.45);
}

/* Responsive: Card centered on mobile/tablet, stays in corner on desktop */
@media (max-width: 768px) {
    .slide-property-hero {
        justify-content: flex-end;
        align-items: flex-end;
        padding: 1.5rem 1rem;
    }

    .hero-title-bars {
        top: 1rem;
        left: 1rem;
        right: 1rem;
        gap: 0.35rem;
    }

    .hero-title-bar {
        padding: 0.5rem 0.9rem;
        font-size: clamp(0.85rem, 4vw, 1rem);
        letter-spacing: 0.02em;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .hero-title-bar.bar-1,
    .hero-title-bar.bar-2 {
        max-width: 100%;
    }

    .slide-property-info-card {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 4rem;
        max-width: none;
        min-width: 0;
        width: auto;
        padding: 0.7rem 0.9rem;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .slide-property-info-card .property-card-subtitle {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
        -webkit-line-clamp: 2;
    }

    .slide-property-info-card .property-card-footer {
        gap: 0.75rem;
    }

    .slide-property-info-card .property-card-price {
        font-size: clamp(1.2rem, 6vw, 1.5rem);
    }

    .slide-property-info-card .property-card-cta {
        padding: 0.7rem 1rem;
        min-height: 44px;
        font-size: 0.8rem;
    }

    .carousel-indicators {
        bottom: 1rem;
    }
}

/* --- ANIMATIONS --- */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Video Slide */
.slide-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 8;
}

.slide-video-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 9;
}

.slide-video-content {
    position: relative;
    z-index: 12;
    text-align: center;
}

.slide-video .hero-title-bars,
.video-title-bars {
    z-index: 15;
}

.slide-video-info-card {
    z-index: 15;
    max-width: 480px;
}

.slide-video-info-card .property-card-subtitle {
    -webkit-line-clamp: unset;
    overflow: visible;
    display: block;
}

.video-highlight {
    font-weight: 700;
    color: var(--yext-red);
}

@media (max-width: 768px) {
    .slide-video-info-card {
        min-width: 0;
        left: 1rem;
        right: 1rem;
        bottom: 2rem;
        max-width: none;
    }
}

.video-loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Cortinilla - Publicación (Invitation) */
.slide-cortinilla-publish {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    position: absolute;
    inset: 0;
    padding: 2rem;
    z-index: 8;
    overflow: hidden;
}

.slide-cortinilla-publish .premium-photo-layer {
    width: 100%;
    height: 100%;
    object-fit: cover;
    inset: 0;
}

.slide-cortinilla-publish .hero-title-bars {
    align-items: flex-start;
}

.slide-cortinilla-publish .hero-title-bar {
    width: fit-content;
    max-width: 90vw;
}

.slide-cortinilla-publish .slide-property-info-card {
    max-width: 620px;
    min-width: 0;
}

.slide-cortinilla-publish .slide-property-info-card .property-card-subtitle {
    margin-bottom: 0;
    font-size: clamp(1.05rem, 2vw, 1.5rem);
    line-height: 1.4;
    -webkit-line-clamp: unset;
    overflow: visible;
    display: block;
}

.slide-cortinilla-publish .publish-highlight {
    color: #E40046;
    font-weight: 700;
}

.slide-cortinilla-publish .slide-property-info-card .property-card-footer {
    margin-top: 1rem;
    justify-content: flex-start;
}

.slide-cortinilla-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.slide-cortinilla-publish .cortinilla-panel {
    position: relative;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.92);
    padding: 2rem 2.5rem;
    margin: 2rem;
    border-left: 5px solid var(--yext-orange);
    max-width: 500px;
    animation: slideInUp 0.6s ease;
}

.slide-cortinilla-publish .cortinilla-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.8rem;
    color: var(--yext-dark);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.slide-cortinilla-publish .cortinilla-subtitle {
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: #666;
}

.slide-cortinilla-publish .btn {
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 4px;
}

.slide-cortinilla-publish .btn-primary {
    background-color: var(--yext-orange);
    border-color: var(--yext-orange);
    color: white;
}

.slide-cortinilla-publish .btn-primary:hover {
    background-color: #e0811a;
    border-color: #e0811a;
    transform: translateY(-2px);
}
    color: #667eea;
    border: none;
}

.slide-cortinilla-publish .btn-light:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
}

/* Cortinilla - Insight (Market Trends) */
.slide-cortinilla-insight {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    position: absolute;
    inset: 0;
    padding: 2rem;
    z-index: 8;
    overflow: hidden;
}

.slide-cortinilla-insight .premium-photo-layer {
    width: 100%;
    height: 100%;
    object-fit: cover;
    inset: 0;
}

.slide-cortinilla-insight .hero-title-bars {
    align-items: flex-start;
}

.slide-cortinilla-insight .hero-title-bar {
    width: fit-content;
    max-width: 90vw;
}

.slide-cortinilla-insight .slide-property-info-card {
    max-width: 620px;
    min-width: 0;
}

.slide-cortinilla-insight .slide-property-info-card .property-card-subtitle {
    margin-bottom: 0;
    font-size: clamp(1.25rem, 2.4vw, 1.9rem);
    line-height: 1.35;
    -webkit-line-clamp: unset;
    overflow: visible;
    display: block;
}

.slide-cortinilla-insight .insight-metric {
    color: #E40046;
    font-weight: 700;
}



.slide-cortinilla-insight .slide-cortinilla-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.slide-cortinilla-insight .cortinilla-panel {
    position: relative;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.92);
    padding: 2rem 2.5rem;
    margin: 2rem;
    border-right: 5px solid var(--yext-blue);
    max-width: 500px;
    animation: slideInUp 0.6s ease;
    text-align: left;
}

.slide-cortinilla-insight .cortinilla-title {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--yext-dark);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.slide-cortinilla-insight .cortinilla-insight-text {
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: #666;
}

.slide-cortinilla-insight .btn {
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 4px;
}

.slide-cortinilla-insight .btn-primary {
    background-color: var(--yext-blue);
    border-color: var(--yext-blue);
    color: white;
}

.slide-cortinilla-insight .btn-primary:hover {
    background-color: #2d4196;
    border-color: #2d4196;
    transform: translateY(-2px);
}

.slide-cortinilla-insight .btn-outline-light:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: white;
    transform: translateY(-2px);
}

/* --- SLIDE OVERLAY --- */
.slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

/* --- NAVIGATION CONTROLS --- */
.hero-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 50px;
    height: 50px;
    background-color: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hero-carousel-nav:hover {
    background-color: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

.hero-carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.hero-carousel-prev {
    left: 2rem;
    display: none; /* Escondido - usar dots en su lugar */
}

.hero-carousel-next {
    right: 2rem;
    display: none; /* Escondido - usar dots en su lugar */
}

/* --- CAROUSEL INDICATORS (DOTS) --- */
.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    z-index: 25;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: fit-content;
    margin: 0 auto;
    pointer-events: auto;
}

.carousel-indicators .indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.carousel-indicators .indicator-dot:hover {
    background-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.carousel-indicators .indicator-dot.active {
    background-color: white;
    width: 12px;
    height: 12px;
}
@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDownFade {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUpFade {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- RESPONSIVE DESIGN (MOBILE-FIRST) --- */

/* Extra Small (< 576px) */
@media (max-width: 575.98px) {
    .hero-carousel-wrapper {
        height: 70vh;
    }

    .hero-carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .hero-carousel-prev {
        left: 1rem;
        display: none;
    }

    .hero-carousel-next {
        right: 1rem;
        display: none;
    }

    .carousel-indicators {
        bottom: 1rem;
        padding: 0.4rem 0.9rem;
        gap: 0.6rem;
        width: auto;
        max-width: calc(100% - 2rem);
    }

    .carousel-indicators .indicator-dot {
        flex: 0 0 10px;
        width: 10px;
        height: 10px;
        min-width: 10px;
        min-height: 10px;
        margin: 0;
        padding: 0;
        position: relative;
        border-radius: 50%;
        aspect-ratio: 1 / 1;
    }

    .carousel-indicators .indicator-dot::after {
        content: "";
        position: absolute;
        inset: -17px;
    }

    .carousel-indicators .indicator-dot.active {
        flex-basis: 12px;
        width: 12px;
        height: 12px;
        min-width: 12px;
        min-height: 12px;
    }

    .slide-property-content {
        padding: 2.5rem 1.5rem;
    }

    .slide-cortinilla-publish .cortinilla-content {
        padding: 2.5rem 1.5rem;
    }

    .slide-cortinilla-insight .cortinilla-content {
        padding: 2.5rem 1.5rem;
    }
}

/* Small (576px - 767.98px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-carousel-wrapper {
        height: 75vh;
    }

    .slide-property-content {
        padding: 3rem 2rem;
    }

    .slide-cortinilla-publish .cortinilla-content {
        padding: 3rem 2rem;
    }

    .slide-cortinilla-insight .cortinilla-content {
        padding: 3rem 2rem;
    }
}

/* Medium and up (≥ 768px) */
@media (min-width: 768px) {
    .hero-carousel-nav {
        width: 60px;
        height: 60px;
    }

    .hero-carousel-nav:hover {
        background-color: rgba(255,255,255,0.4);
    }
}

/* Desabilitar navegación en devices táctiles (optional smooth feedback) */
@media (hover: none) and (pointer: coarse) {
    .hero-carousel-nav {
        background-color: rgba(255,255,255,0.25);
    }

    .hero-carousel-nav:active {
        background-color: rgba(255,255,255,0.4);
    }
}

/* --- ACCESSIBILITY --- */
.hero-carousel-nav:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-carousel-slide {
        transition: opacity 0.2s linear;
    }

    .slide-property-content,
    .slide-cortinilla-publish .cortinilla-title,
    .slide-cortinilla-acquire .cortinilla-title,
    .slide-cortinilla-insight .cortinilla-insight-text {
        animation: none;
    }

    .video-loader {
        animation: none;
        border-top-color: transparent;
        opacity: 0.5;
    }
}
