/* ============================================
   Homes Page — RealPro
   ============================================ */

/* Hero */
.homes-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.homes-hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.homes-hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 2;
}

.homes-hero-content {
    position: relative;
    z-index: 3;
    max-width: 750px;
}

.homes-hero-content h1 {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 20px;
    animation: fadeInUp 1s ease forwards;
}

.homes-hero-content p {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

/* Filter Bar */
.filter-bar {
    position: relative;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 20px 0;
}

.filter-bar-inner {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 160px;
}

.filter-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold-dark);
    margin-bottom: 8px;
}

.filter-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 14px;
    background: var(--white);
    color: var(--charcoal);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C5A059' stroke-width='2'%3e%3cpolyline points='6,9 12,15 18,9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    transition: border-color 0.3s;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--gold-primary);
}

.filter-reset {
    padding: 12px 28px;
    font-size: 12px;
    white-space: nowrap;
}

/* Homes Grid */
.homes-grid-section {
    padding: 80px 0 120px;
    background: var(--pale-gray);
    min-height: 60vh;
}

.homes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* Home Card */
.home-card {
    background: var(--white);
    box-shadow: var(--shadow-subtle);
    overflow: hidden;
    transition: transform 0.5s ease, box-shadow 0.5s ease, opacity 0.6s ease;
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px);
}

.home-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.home-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.home-card-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.home-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2,1,0.3,1);
}

.home-card:hover .home-card-image img {
    transform: scale(1.08);
}

.home-card-type {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 16px;
    background: var(--gold-primary);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.home-card-price {
    position: absolute;
    bottom: 16px;
    right: 16px;
    padding: 8px 18px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
}

.home-card-body {
    padding: 28px 28px 32px;
}

.home-card-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 12px;
}

.home-card-specs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--medium-gray);
}

.home-card-specs span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-card-specs .spec-icon {
    color: var(--gold-primary);
    font-size: 14px;
}

.home-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-dark);
    border-bottom: 1px solid var(--gold-primary);
    padding-bottom: 4px;
    transition: color 0.3s, border-color 0.3s;
}

.home-card-btn:hover {
    color: var(--charcoal);
    border-color: var(--charcoal);
}

.no-results {
    text-align: center;
    font-size: 16px;
    color: var(--medium-gray);
    padding: 60px 0;
    font-style: italic;
}

/* Detail Modal */
.home-detail-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.home-detail-modal.active {
    opacity: 1;
    visibility: visible;
}

.home-detail-content {
    background: var(--white);
    max-width: 900px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.detail-close {
    position: fixed;
    top: 24px;
    right: 30px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 40px;
    cursor: pointer;
    z-index: 5001;
    transition: color 0.3s;
}

.detail-close:hover {
    color: var(--gold-primary);
}

.detail-hero {
    position: relative;
    height: 350px;
    overflow: hidden;
}

.detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--white);
}

.detail-hero-overlay h2 {
    font-family: var(--font-display);
    font-size: 36px;
    color: var(--white);
    margin-bottom: 8px;
}

.detail-hero-overlay .detail-price {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--gold-light);
}

.detail-body {
    padding: 40px;
}

.detail-specs-bar {
    display: flex;
    gap: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
    font-size: 14px;
    color: var(--medium-gray);
}

.detail-specs-bar strong {
    color: var(--charcoal);
}

.detail-features h4 {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--charcoal);
    margin-bottom: 20px;
}

.detail-features ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    list-style: none;
    margin-bottom: 30px;
}

.detail-features ul li {
    font-size: 14px;
    color: var(--medium-gray);
    padding-left: 20px;
    position: relative;
}

.detail-features ul li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--gold-primary);
    font-size: 10px;
    top: 3px;
}

.detail-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.detail-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.3s;
    border: 2px solid transparent;
}

.detail-gallery img:hover {
    opacity: 0.8;
    border-color: var(--gold-primary);
}

.detail-cta {
    text-align: center;
    padding: 30px 0 10px;
}

/* Responsive */
@media (max-width: 1024px) {
    .homes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .homes-hero {
        height: 50vh;
        min-height: 400px;
    }
    .homes-hero-content h1 {
        font-size: 36px;
    }
    .filter-bar {
        top: 60px;
    }
    .filter-bar-inner {
        gap: 12px;
    }
    .filter-group {
        min-width: 120px;
    }
    .homes-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .detail-hero {
        height: 250px;
    }
    .detail-body {
        padding: 24px;
    }
    .detail-features ul {
        grid-template-columns: 1fr;
    }
    .detail-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .homes-hero-content h1 {
        font-size: 28px;
    }
}
