/**
 * Featured Homes - Mobile Override
 * File: /assets/css/featured-homes-mobile.css
 * Version: 2.7 - February 2026
 * 
 * FIXES v2.7:
 * ✅ Mobile pagination dots proper spacing at bottom
 * ✅ Specs row: SQ FT (left) | BEDS (center) | BATHS (right) - matching Figma
 * ✅ Fixed bottom margin for pagination
 * ✅ JS controls visibility - no CSS display:none conflicts
 * 
 * MATCHES: /inc/featured-homes-component.php v13.2
 */

@media screen and (max-width: 767px) {
    
    /* ========================================
       SECTION
    ======================================== */
    .featured-homes-section {
        padding: 40px 0 0 0 !important;
        margin-bottom: 0 !important;
    }
    
    .fh-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    
    /* ========================================
       HEADER
    ======================================== */
    .fh-section-header {
        padding: 0 20px !important;
        margin-bottom: 30px !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .fh-section-title {
        font-size: 28px !important;
        font-family: 'Sofia Sans', 'Sofia Pro', sans-serif !important;
    }
    
    .fh-section-description {
        font-size: 16px !important;
    }
    
    .fh-header-right {
        padding-top: 0 !important;
    }
    
    /* ========================================
       GRID - SOLO MODE
    ======================================== */
    .fh-properties-grid {
        display: block !important;
        overflow: visible !important;
        padding: 0 20px !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* ========================================
       CARDS - NO CSS HIDING!
       JavaScript controls display via:
       card.style.display = 'none'  (hide)
       card.style.display = ''      (show)
    ======================================== */
    
    .fh-property-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    /* ========================================
       ACTIVE CARD STYLING
    ======================================== */
    
    .fh-property-card.mobile-active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        left: 0 !important;
        z-index: 2 !important;
        flex-direction: column !important;
        pointer-events: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        animation: mobileCardFadeIn 0.4s ease forwards !important;
        border: 1px solid #E8E5DF !important;
        border-top: none !important;
    }
    
    @keyframes mobileCardFadeIn {
        from { opacity: 0.5; transform: translateX(20px); }
        to { opacity: 1; transform: translateX(0); }
    }
    
    .fh-property-card.mobile-active.swipe-left {
        animation: mobileSwipeLeft 0.4s ease forwards !important;
    }
    
    .fh-property-card.mobile-active.swipe-right {
        animation: mobileSwipeRight 0.4s ease forwards !important;
    }
    
    @keyframes mobileSwipeLeft {
        from { opacity: 0; transform: translateX(50px); }
        to { opacity: 1; transform: translateX(0); }
    }
    
    @keyframes mobileSwipeRight {
        from { opacity: 0; transform: translateX(-50px); }
        to { opacity: 1; transform: translateX(0); }
    }
    
    /* CARD LINK */
    .fh-property-card .fh-card-link {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        pointer-events: auto !important;
        text-decoration: none !important;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
    }
    
    .fh-property-card .fh-card-link:active {
        opacity: 0.95 !important;
    }
    
    /* IMAGE */
    .fh-property-card .fh-card-image {
        width: 100% !important;
        height: 0 !important;
        padding-top: 56.3% !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    .fh-property-card .fh-card-image img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    /* CONTENT */
    .fh-property-card .fh-card-content {
        padding: 15px 12px !important;
        gap: 12px !important;
        background: #FFFFFF !important;
    }
    
    /* ========================================
       BADGES
    ======================================== */
    .fh-property-card .fh-badges-row {
        flex-wrap: wrap !important;
        gap: 5px !important;
    }
    
    .fh-property-card .fh-badge-pill {
        padding: 5px 12px !important;
        font-size: 11px !important;
    }
    
    /* Badge Colors - v12.1 */
    .fh-property-card .fh-badge-under-construction { background: #928572 !important; }
    .fh-property-card .fh-badge-estimated { background: #5A4F42 !important; }
    .fh-property-card .fh-badge-plan-ready-lot { background: #606E76 !important; }
    .fh-property-card .fh-badge-for-sale { background: #6A8375 !important; }
    .fh-property-card .fh-badge-in-contract { background: #666666 !important; }
    .fh-property-card .fh-badge-sold { background: #EEEEEE !important; }
    .fh-property-card .fh-badge-sold .fh-badge-text-white,
    .fh-property-card .fh-badge-sold .fh-badge-text-dark { color: #2A2A2A !important; }
    .fh-property-card .fh-badge-reserved { 
        background: #FFFFFF !important; 
        outline: 1px solid #E8E5DF !important;
    }
    .fh-property-card .fh-badge-reserved .fh-badge-text-white { color: #2A2A2A !important; }
    .fh-property-card .fh-badge-coming-soon { 
        background: #FFFFFF !important; 
        border: 1px solid #2A2A2A !important; 
    }
    .fh-property-card .fh-badge-coming-soon .fh-badge-text-white,
    .fh-property-card .fh-badge-coming-soon .fh-badge-text-dark { color: #2A2A2A !important; }
    .fh-property-card .fh-badge-promo {
        background: #FFFFFF !important;
        outline: 1px solid #E8E5DF !important;
    }
    
    /* ========================================
       TITLE + PRICE
    ======================================== */
    .fh-property-card .fh-card-title-price-row {
        gap: 12px !important;
    }
    
    .fh-property-card .fh-card-title {
        font-size: 18px !important;
    }
    
    .fh-property-card .fh-card-address {
        font-size: 14px !important;
    }
    
    .fh-property-card .fh-card-price-label {
        font-size: 11px !important;
    }
    
    .fh-property-card .fh-card-price-value {
        font-size: 16px !important;
    }
    
    /* ========================================
       SPECS ROW - FIXED LAYOUT
       Single Lot/Units: SQ FT (left) | BEDS (center) | BATHS (right)
       Parent Community: SQ FT+ (left) | UNITS (right)
    ======================================== */
    
    .fh-property-card .fh-specs-row {
        display: flex !important;
        padding-top: 4px !important;
    }
    
    /* Single Lot / Units Mode: 3 columns - spread evenly */
    .fh-property-card .fh-specs-row.fh-specs-3-cols {
        justify-content: space-between !important;
        gap: 0 !important;
        width: 100% !important;
    }
    
    /* Parent mode: 2 columns - space between */
    .fh-property-card .fh-specs-row.fh-specs-2-cols {
        justify-content: space-between !important;
        gap: 0 !important;
        max-width: 100% !important;
    }
    
    .fh-property-card .fh-spec-item {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }
    
    .fh-property-card .fh-spec-icon {
        font-size: 18px !important;
        width: 18px !important;
        height: 18px !important;
        color: #928572 !important;
    }
    
    .fh-property-card .fh-spec-value {
        font-size: 15px !important;
    }
    
    .fh-property-card .fh-spec-label {
        font-size: 13px !important;
    }
    
    /* ========================================
       PAGINATION - FIXED SPACING
    ======================================== */
    
    .fh-pagination-wrapper {
        display: flex !important;
        justify-content: center !important;
        margin-top: 30px !important;
        margin-bottom: 60px !important;
        padding: 15px 20px !important;
        z-index: 1000 !important;
        pointer-events: auto !important;
    }
    
    .fh-pagination-dots {
        display: flex !important;
        gap: 12px !important;
        pointer-events: auto !important;
    }
    
    .fh-dot {
        display: inline-block !important;
        width: 10px !important;
        height: 10px !important;
        min-width: 10px !important;
        min-height: 10px !important;
        border-radius: 50% !important;
        background: #E8E5DF !important;
        opacity: 0.6 !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        transition: all 0.3s ease !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
    }
    
    .fh-dot.active {
        background: #2A2A2A !important;
        opacity: 1 !important;
    }
    
    .fh-dot.adjacent {
        background: #CCC8C0 !important;
        opacity: 0.8 !important;
    }
    
    .fh-dot.far {
        background: #E8E5DF !important;
        opacity: 0.6 !important;
    }
    
    .fh-dot:hover {
        background: #666666 !important;
        transform: scale(1.2) !important;
        opacity: 1 !important;
    }
    
    .fh-dot:active {
        transform: scale(0.9) !important;
    }
}

/* ========================================
   SMALL MOBILE (480px and below)
======================================== */
@media screen and (max-width: 480px) {
    .featured-homes-section {
        padding: 30px 0 0 0 !important;
    }
    
    .fh-properties-grid {
        padding: 0 15px !important;
    }
    
    .fh-section-header {
        padding: 0 15px !important;
    }
    
    .fh-section-title {
        font-size: 24px !important;
    }
    
    .fh-property-card .fh-card-content {
        padding: 12px 10px !important;
    }
    
    .fh-property-card .fh-card-title {
        font-size: 16px !important;
    }
    
    .fh-property-card .fh-card-price-value {
        font-size: 15px !important;
    }
    
    /* Specs - slightly smaller on small mobile */
    .fh-property-card .fh-spec-icon {
        font-size: 16px !important;
        width: 16px !important;
        height: 16px !important;
    }
    
    .fh-property-card .fh-spec-value {
        font-size: 14px !important;
    }
    
    .fh-property-card .fh-spec-label {
        font-size: 12px !important;
    }
    
    /* Pagination spacing */
    .fh-pagination-wrapper {
        margin-top: 25px !important;
        margin-bottom: 50px !important;
    }
    
    .fh-dot {
        width: 8px !important;
        height: 8px !important;
        min-width: 8px !important;
        min-height: 8px !important;
    }
    
    .fh-pagination-dots {
        gap: 10px !important;
    }
}