/**
 * Featured Homes CSS - v13.2 FIXED SPECS LAYOUT
 * File: /assets/css/featured-homes.css
 * 
 * FIXES v13.2:
 * ✅ Single lot/units specs: SQ FT (left) | BEDS (center) | BATHS (right)
 * ✅ Parent community specs: SQ FT+ (left) | UNITS (right)
 * ✅ Matching Image 3 Figma layout exactly
 * 
 * MATCHES: /inc/featured-homes-component.php v13.2
 */

/* ==========================================
   CSS VARIABLES
========================================== */

:root {
    --fh-dark-text: #2A2A2A;
    --fh-light-text: #666666;
    --fh-border: #E8E5DF;
    --fh-white: #FFFFFF;
    --fh-bg-light: #F5F3F0;
    
    /* Badge Colors - v12.1 */
    --fh-badge-under-construction: #928572;
    --fh-badge-estimated-completion: #5A4F42;
    --fh-badge-plan-ready-lot: #606E76;
    --fh-badge-for-sale: #6A8375;
    --fh-badge-in-contract: #666666;
    --fh-badge-sold: #EEEEEE;
    --fh-badge-coming-soon-border: #2A2A2A;
    --fh-badge-coming-soon-text: #2A2A2A;
}

/* ==========================================
   SECTION & CONTAINER
========================================== */

.featured-homes-section {
    width: 100%;
    padding: 60px 0 80px 0;
    background: #FFFFFF;
}

.fh-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   SECTION HEADER - ROW LAYOUT
========================================== */

.fh-section-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    gap: 30px;
}

.fh-header-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.fh-section-title {
    color: var(--fh-dark-text);
    font-size: 40px;
    font-family: 'Sofia Sans', 'Sofia Pro', sans-serif;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

.fh-section-description {
    color: var(--fh-light-text);
    font-size: 18px;
    font-family: 'Afacad Flux', sans-serif;
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
    max-width: 600px;
}

.fh-header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-top: 8px;
}

.fh-view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--fh-dark-text);
    font-size: 16px;
    font-family: 'Afacad Flux', sans-serif;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.fh-view-all-link:hover {
    color: #000000;
}

.fh-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.fh-view-all-link:hover .fh-arrow {
    transform: translateX(4px);
}

/* ==========================================
   GRID LAYOUT
========================================== */

.fh-properties-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 0;
    align-items: stretch;
}

.fh-properties-grid.fh-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.fh-properties-grid.fh-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.fh-properties-grid.fh-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ==========================================
   PROPERTY CARD
========================================== */

.fh-property-card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid var(--fh-border);
    border-top: none;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    height: 100%;
}

.fh-property-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.fh-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    flex: 1;
}

/* ==========================================
   CARD IMAGE
========================================== */

.fh-card-image {
    position: relative;
    width: 100%;
    padding-top: 56.3%;
    overflow: hidden;
    background: var(--fh-bg-light);
}

.fh-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.fh-property-card:hover .fh-card-image img {
    transform: scale(1.03);
}

.fh-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fh-bg-light);
}

/* ==========================================
   CARD CONTENT
========================================== */

.fh-card-content {
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    background: var(--fh-white);
}

/* ==========================================
   BADGES ROW
========================================== */

.fh-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 24px;
}

.fh-badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 50px;
    font-family: 'Afacad Flux', sans-serif;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    line-height: normal;
}

.fh-badge-text-white { color: var(--fh-white); }
.fh-badge-text-dark { color: var(--fh-dark-text); }
.fh-badge-text-light { color: var(--fh-white); opacity: 0.9; }
.fh-badge-text-bold { color: var(--fh-white); font-weight: 500; }
.fh-badge-text-promo { color: var(--fh-dark-text); }

/* BADGE COLORS - v12.1 */
.fh-badge-under-construction { background: var(--fh-badge-under-construction); }
.fh-badge-estimated { background: var(--fh-badge-estimated-completion); }
.fh-badge-plan-ready-lot { background: var(--fh-badge-plan-ready-lot); }
.fh-badge-for-sale { background: var(--fh-badge-for-sale); }
.fh-badge-move-in-ready { background: var(--fh-badge-for-sale); }
.fh-badge-in-contract { background: var(--fh-badge-in-contract); }
.fh-badge-sold { background: var(--fh-badge-sold); }
.fh-badge-sold .fh-badge-text-white,
.fh-badge-sold .fh-badge-text-dark { color: var(--fh-dark-text); }

.fh-badge-reserved {
    background: var(--fh-white);
    outline: 1px solid var(--fh-border);
    outline-offset: -1px;
}
.fh-badge-reserved .fh-badge-text-white { color: var(--fh-dark-text); }

.fh-badge-coming-soon {
    background: var(--fh-white);
    border: 1px solid var(--fh-badge-coming-soon-border);
}
.fh-badge-coming-soon .fh-badge-text-white,
.fh-badge-coming-soon .fh-badge-text-dark { color: var(--fh-badge-coming-soon-text); }

.fh-badge-promo {
    background: var(--fh-white);
    outline: 1px solid var(--fh-border);
    outline-offset: -1px;
}

/* ==========================================
   TITLE + PRICE ROW
========================================== */

.fh-card-title-price-row {
    display: flex;
    align-items: stretch;
    gap: 14px;
}

.fh-card-title-container {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.fh-card-title {
    font-family: 'Afacad Flux', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--fh-dark-text);
    margin: 0;
    line-height: 1.3;
    text-transform: capitalize;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.fh-card-address {
    font-family: 'Afacad Flux', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--fh-light-text);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fh-card-vertical-divider {
    width: 1px;
    align-self: stretch;
    min-height: 44px;
    background: var(--fh-border);
    flex-shrink: 0;
}

.fh-card-price-container {
    flex-shrink: 0;
    text-align: right;
    min-width: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

.fh-card-price-label {
    font-family: 'Afacad Flux', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: var(--fh-light-text);
    text-transform: lowercase;
    margin-bottom: 2px;
}

.fh-card-price-value {
    font-family: 'Afacad Flux', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--fh-dark-text);
}

/* ==========================================
   HORIZONTAL DIVIDER
========================================== */

.fh-card-horizontal-divider {
    height: 1px;
    background: var(--fh-border);
}

/* ==========================================
   SPECS ROW - FIXED LAYOUT v13.2
   
   Single Lot / Units: SQ FT (left) | BEDS (center) | BATHS (right)
   Parent Community:   SQ FT+ (left) | UNITS (right)
========================================== */

.fh-specs-row {
    display: flex;
    align-items: center;
    padding-top: 4px;
}

.fh-spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fh-spec-icon {
    font-size: 20px;
    color: #928572;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fh-spec-icon.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

.fh-spec-text-group {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.fh-spec-value {
    font-family: 'Afacad Flux', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--fh-dark-text);
    line-height: 1;
}

.fh-spec-label {
    font-family: 'Afacad Flux', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--fh-light-text);
    line-height: 1;
}

/* ==========================================
   SINGLE LOT / UNITS MODE: 3 COLUMNS
   SQ FT (left) | BEDS (center) | BATHS (right)
   Spread across full width with space-between
========================================== */

.fh-specs-row.fh-specs-3-cols {
    justify-content: space-between;
    width: 100%;
}

/* ==========================================
   PARENT COMMUNITY MODE: 2 COLUMNS
   SQ FT+ (left) | UNITS (right)
   Spread with space-between
========================================== */

.fh-specs-row.fh-specs-2-cols {
    justify-content: space-between;
    width: 100%;
}

/* ==========================================
   PAGINATION DOTS
========================================== */

.fh-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.fh-pagination-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fh-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--fh-border);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.fh-dot.active {
    background: var(--fh-dark-text);
    opacity: 1;
}

.fh-dot.adjacent {
    background: #CCC8C0;
    opacity: 0.8;
}

.fh-dot:hover {
    background: var(--fh-light-text);
    opacity: 1;
    transform: scale(1.2);
}

/* ==========================================
   ANIMATIONS
========================================== */

@keyframes fhFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   RESPONSIVE - DESKTOP
========================================== */

@media (max-width: 1439px) and (min-width: 1200px) {
    .fh-container {
        max-width: 1200px;
        padding: 0 40px;
    }
    .fh-properties-grid.fh-cols-3 { gap: 24px; }
}

@media (max-width: 1199px) and (min-width: 1024px) {
    .fh-container { padding: 0 40px; }
    .fh-properties-grid.fh-cols-3 { gap: 20px; }
    .fh-properties-grid.fh-cols-4 { grid-template-columns: repeat(3, 1fr); }
    .fh-card-content { padding: 16px 12px; }
    .fh-card-title { font-size: 16px; }
    .fh-card-price-value { font-size: 16px; }
}

/* ==========================================
   RESPONSIVE - TABLET (768px - 1023px)
========================================== */

@media (max-width: 1023px) and (min-width: 768px) {
    .featured-homes-section { padding: 50px 0 60px 0; }
    .fh-container { padding: 0 30px; }
    
    .fh-section-header {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }
    .fh-section-title { font-size: 32px; }
    .fh-header-right { padding-top: 0; }
    
    .fh-properties-grid.fh-cols-3,
    .fh-properties-grid.fh-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .fh-card-content { padding: 16px 12px; gap: 12px; }
    .fh-card-title { font-size: 16px; }
    .fh-card-price-value { font-size: 16px; }
    .fh-spec-value { font-size: 15px; }
    .fh-spec-label { font-size: 13px; }
}

/* NOTE: MOBILE (<768px) is in featured-homes-mobile.css */