/**
 * Featured Property Card with Liquid Glass Overlay
 * Apple-style glassmorphism design for featured properties on home page
 * 
 * Design Principles:
 * - Bigger images (full card height, minimal white space)
 * - Compact information overlay with liquid glass effect
 * - Information appears on hover (desktop) / click (mobile)
 * - Professional, modern, minimalist
 */

/* ==========================================================================
   Base Card Structure - Full Height Image
   ========================================================================== */

.featured-property-card-overlay {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--color-background, #fff);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    height: 100%;
    min-height: 450px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.featured-property-card-overlay:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}

/* ==========================================================================
   Image Container - Big, Beautiful, Full Height
   ========================================================================== */

.featured-property-card-image {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 450px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    aspect-ratio: 16/10;
}

@media (min-width: 1200px) {
    .featured-property-card-image {
        min-height: 500px;
        aspect-ratio: 21/9;
    }
}

@media (max-width: 768px) {
    .featured-property-card-image {
        min-height: 380px;
        aspect-ratio: 16/9;
    }
}

/* Images - Full Coverage */
.featured-property-card-image img,
.featured-property-card-image .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.featured-property-card-overlay:hover .featured-property-card-image img,
.featured-property-card-overlay:hover .card-image {
    transform: scale(1.08);
}

/* ==========================================================================
   Carousel Styles (Reuse from property-card-overlay)
   ========================================================================== */

.featured-property-card-image .property-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.featured-property-card-image .carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.featured-property-card-image .carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.featured-property-card-image .carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.featured-property-card-image .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Carousel Navigation */
.featured-property-card-image .carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

.featured-property-card-overlay:hover .carousel-nav {
    opacity: 1;
}

.featured-property-card-image .carousel-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.featured-property-card-image .carousel-prev {
    left: 1rem;
}

.featured-property-card-image .carousel-next {
    right: 1rem;
}

.featured-property-card-image .carousel-nav i {
    font-size: 0.95rem;
    color: var(--color-primary, #0c2340);
}

/* Carousel Indicators */
.featured-property-card-image .carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 15;
    pointer-events: auto;
}

.featured-property-card-image .carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
}

.featured-property-card-image .carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

.featured-property-card-image .carousel-indicator.active {
    background: rgba(255, 255, 255, 1);
    width: 24px;
    border-radius: 4px;
}

@media (max-width: 991px) {
    .featured-property-card-image .carousel-nav {
        opacity: 1;
        background: rgba(255, 255, 255, 0.85);
    }
}

/* ==========================================================================
   Badges and Favorite Button
   ========================================================================== */

.featured-property-card-image .property-card-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.featured-property-card-image .property-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.45rem 0.8rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-primary, #0c2340);
}

.featured-property-card-image .property-badge.featured {
    background: linear-gradient(135deg, var(--color-accent, #d4af37), #f4d03f);
    color: white;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.featured-property-card-image .property-badge i {
    font-size: 0.7rem;
}

/* Favorite Button */
.featured-property-card-image .favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.featured-property-card-image .favorite-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.featured-property-card-image .favorite-btn i {
    font-size: 1.15rem;
    color: var(--color-accent, #d4af37);
    transition: all 0.2s ease;
}

/* Ensure favorite button is visible for non-authenticated users */
body:not(.user-authenticated) .featured-property-card-image .favorite-btn {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    pointer-events: auto !important;
    z-index: 999 !important; /* Ensure it's on top */
}

body:not(.user-authenticated) .featured-property-card-image .favorite-btn i {
    color: #ef4444 !important; /* Red color for visibility */
    opacity: 0.85 !important;
    display: inline-block !important;
}

/* Override any hide rules */
body:not(.user-authenticated) .featured-property-card-image .favorite-btn.hidden,
body:not(.user-authenticated) .featured-property-card-image .favorite-btn[style*="display: none"] {
    display: flex !important;
    visibility: visible !important;
}

.featured-property-card-image .favorite-btn.favorited i {
    color: #ef4444;
}

/* ==========================================================================
   Liquid Glass Information Overlay - Compact, Apple-style
   ========================================================================== */

.featured-property-glass-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1.5rem 1.5rem; /* Compact padding - less white space */
    /* Liquid Glass Background - Apple-style */
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.82) 25%,
        rgba(0, 0, 0, 0.65) 55%,
        rgba(0, 0, 0, 0.35) 80%,
        rgba(0, 0, 0, 0) 100%
    );
    /* Enhanced glassmorphism */
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    z-index: 3;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    /* Very compact - max 40% of card height */
    max-height: 40%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Tight spacing */
    justify-content: flex-end;
    /* Border for definition */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Shadow for depth */
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
}

/* NO hover support - click only for consistency with property list cards */

/* Show overlay on click/tap (mobile and desktop - handled by JS class 'info-visible') */
.featured-property-card-overlay.info-visible .featured-property-glass-overlay {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

/* Prevent overlay during carousel interaction */
.featured-property-card-overlay[data-carousel-interacting="true"] .featured-property-glass-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ==========================================================================
   Overlay Content - Compact Typography
   ========================================================================== */

/* Title - Compact */
.glass-overlay-title {
    color: white;
    font-size: 1.35rem; /* Compact but readable */
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.featured-property-card-overlay:hover .glass-overlay-title {
    opacity: 0.95;
}

/* Location - Very Compact */
.glass-overlay-location {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem; /* Smaller */
    margin: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

.glass-overlay-location i {
    color: var(--color-accent, #d4af37);
    font-size: 0.75rem;
}

/* Features - Compact Row */
.glass-overlay-features {
    display: flex;
    gap: 0.5rem; /* Very tight gap */
    flex-wrap: wrap;
    margin: 0;
    align-items: center;
}

.glass-overlay-feature {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.8rem; /* Compact */
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.glass-overlay-feature i {
    color: var(--color-accent, #d4af37);
    font-size: 0.85rem;
}

/* Price - Compact Display */
.glass-overlay-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0;
    width: 100%;
    margin-top: 0.25rem;
}

/* Single Price */
.glass-overlay-price .price-amount-large {
    font-size: 1.6rem; /* Compact but prominent */
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
}

.glass-overlay-price .price-type-small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

/* Multiple Offers - Compact Grid */
.multiple-offers-glass {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    width: 100%;
}

.glass-price-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.glass-price-item .price-amount-glass {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.glass-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.2;
}

.glass-badge.sale {
    background: rgba(239, 68, 68, 0.3);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.glass-badge.rent {
    background: rgba(59, 130, 246, 0.3);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.glass-badge.short {
    background: rgba(16, 185, 129, 0.3);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(16, 185, 129, 0.5);
}

/* ==========================================================================
   Mobile Adjustments - Click to Show, More Compact
   ========================================================================== */

@media (max-width: 991px) {
    /* Hide overlay by default on mobile */
    .featured-property-glass-overlay {
        opacity: 0 !important;
        transform: translateY(20px) !important;
        pointer-events: none !important;
        visibility: hidden;
    }
    
    /* Show on touch - handled by JS class 'info-visible' */
    .featured-property-card-overlay.info-visible .featured-property-glass-overlay {
        opacity: 1 !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
        visibility: visible !important;
    }
    
    /* Even more compact on mobile */
    .featured-property-glass-overlay {
        padding: 1rem 1.25rem 1.25rem;
        max-height: 45%;
        gap: 0.4rem;
    }
    
    .glass-overlay-title {
        font-size: 1.2rem;
    }
    
    .glass-overlay-location {
        font-size: 0.75rem;
    }
    
    .glass-overlay-feature {
        font-size: 0.75rem;
    }
    
    .glass-overlay-price .price-amount-large {
        font-size: 1.4rem;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

[data-theme="dark"] .featured-property-card-overlay {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .featured-property-card-image .property-badge,
[data-theme="dark"] .featured-property-card-image .favorite-btn {
    background: rgba(30, 30, 30, 0.95);
}

