/**
 * PROPERTISM V4 - PROPERTIES SECTION MODULE
 * High-Density Asset Grid
 */

#properties-section.featured-properties-section {
    background-color: var(--bg-primary) !important;
    padding: var(--section-v-padding) 0 !important;
    border-top: 1px solid var(--border-subtle) !important;
    scroll-margin-top: var(--nav-height) !important;
}

#properties-section .section-inner {
    max-width: 1400px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 40px !important;
}

#properties-section .section-header {
    text-align: left !important;
    margin-bottom: 60px !important;
    max-width: 100% !important; /* Edge-to-edge alignment with first card */
    width: 100% !important;
}

#properties-section .section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--brand-gold) !important;
    margin-bottom: 20px !important;
}

#properties-section .section-kicker-icon {
    width: 18px;
    height: 18px;
    color: var(--brand-gold);
}

#properties-section .section-title {
    font-family: var(--serif-main) !important;
    font-size: clamp(1.2rem, 2vw + 0.8rem, 2.2rem) !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
    color: var(--text-main) !important;
    margin-bottom: 20px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#properties-section .section-subtitle {
    font-size: 1.2rem !important;
    line-height: 1.6 !important;
    color: var(--text-muted) !important;
}

/* 1. THE PROPERTY GRID */
#properties-section .property-grid-hybrid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1px !important; /* Sharp 1px separator logic */
    background-color: var(--border-subtle) !important;
}

/* 2. THE ASSET CARD */
.property-card-hybrid {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 0 !important;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.property-card-hybrid:hover {
    border-color: var(--brand-gold) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-5px);
}

/* 3. ASSET IMAGE */
.property-image-hybrid {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.property-image-hybrid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card-hybrid:hover .property-image-hybrid img {
    transform: scale(1.05);
}

.property-badge-hybrid {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--brand-gold) !important;
    color: #0F172A !important;
    padding: 6px 14px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0 !important;
}

/* 4. ASSET DETAILS */
.property-details-hybrid {
    padding: 30px !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-title-hybrid {
    margin: 0 0 10px 0 !important;
}

.property-title-hybrid a {
    font-family: var(--serif-main) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em;
}

.property-price-hybrid {
    font-family: var(--serif-main) !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: var(--brand-gold) !important;
    margin-bottom: 4px !important;
}

.property-price-words-hybrid {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px !important;
}

.property-address {
    font-size: 0.95rem !important;
    color: var(--text-muted) !important;
    margin-bottom: 24px !important;
}

/* 5. ASSET FEATURES (DASHBOARD ROW) */
.property-features {
    display: flex;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

.property-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.property-feature svg {
    color: var(--brand-gold) !important;
}

/* 6. CTA */
.featured-properties-cta {
    margin-top: 60px;
    text-align: left;
}

.featured-properties-cta .btn-gold {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--brand-gold) !important;
    color: #0F172A !important;
    padding: 18px 40px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    text-decoration: none !important;
    border: none !important;
    border-radius: 0 !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.featured-properties-cta .btn-gold:hover {
    background: #0F172A !important;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* RESPONSIVENESS */
@media (max-width: 1024px) {
    .property-grid-hybrid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    #properties-section .section-inner {
        padding: 0 24px !important;
    }

    #properties-section .section-title {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: 15ch !important;
    }

    .property-grid-hybrid {
        grid-template-columns: 1fr;
    }

    .property-details-hybrid {
        padding: 24px !important;
    }
}

/* ============================================
   DARK MODE OVERRIDES
   Driven by [data-theme="dark"] on <html>
   ============================================ */
html[data-theme="dark"] #properties-section.featured-properties-section {
    background-color: #0b0f1a !important; /* bg-primary hex */
}

/* Force 1px gap even on Ultra-Wide displays */
#properties-section .property-grid-hybrid,
@media (min-width: 1600px) { #properties-section .property-grid-hybrid } {
    gap: 1px !important;
}

html[data-theme="dark"] .property-card-hybrid {
    background: #1E2A3A !important; /* bg-card hex + Neutralizes legacy gradients */
    border-color: var(--border-subtle) !important;
}

[data-theme="dark"] .property-title-hybrid a {
    color: var(--text-main) !important;
}

[data-theme="dark"] .property-price-words-hybrid,
[data-theme="dark"] .property-address {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .property-feature {
    color: var(--text-main) !important;
}

[data-theme="dark"] .property-features {
    border-top-color: var(--border-subtle) !important;
}

[data-theme="dark"] .btn-gold {
    background: var(--brand-gold) !important;
    color: #0F172A !important;
}

[data-theme="dark"] .btn-gold:hover {
    background: #FFFFFF !important;
    color: #0F172A !important;
}
