/* HOMEX - Premium Real Estate Marketplace */
:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --secondary: #0F172A;
    --accent: #F59E0B;
    --bg: #F8FAFC;
    --white: #FFFFFF;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-400: #94A3B8;
    --gray-600: #475569;
    --gray-800: #1E293B;
    --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--secondary);
    line-height: 1.6;
}

/* Header */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1030;
}

.site-header .navbar { padding: 0.75rem 0; }

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--secondary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon { color: var(--primary); font-size: 1.75rem; }

.nav-link {
    font-weight: 500;
    color: var(--gray-600) !important;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.nav-link:hover { color: var(--primary) !important; }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: 8px;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Hero */
.hero-section {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--secondary) 0%, #1E3A5F 50%, var(--primary) 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></svg>') repeat;
    background-size: 30px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
}

.hero-content { position: relative; z-index: 1; padding: 4rem 0; }

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2.5rem;
}

.hero-search {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
}

.search-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.search-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gray-100);
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.search-field i { color: var(--gray-400); }

.search-field input,
.search-field select {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
}

.btn-search {
    padding: 0.75rem 2rem !important;
    white-space: nowrap;
}

/* Sections */
.section-padding { padding: 5rem 0; }

.section-header { margin-bottom: 3rem; }

.section-header h2 {
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header p { color: var(--gray-600); margin: 0; }

.page-header {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 { font-weight: 800; margin-bottom: 0.5rem; }
.page-header p { opacity: 0.85; margin: 0; }

/* Category Cards */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--secondary);
    transition: var(--transition);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: var(--primary);
}

/* Property Cards */
.property-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.property-card-image {
    position: relative;
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.property-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-card-image img { transform: scale(1.05); }

.property-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-sale { background: var(--primary); color: white; }
.badge-rent { background: var(--accent); color: var(--secondary); }

.property-featured {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: var(--secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

.property-card-body { padding: 1.25rem; }

.property-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.property-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.property-title a {
    color: var(--secondary);
    text-decoration: none;
}

.property-title a:hover { color: var(--primary); }

.property-location {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.property-features {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.property-features span { display: flex; align-items: center; gap: 0.25rem; }

/* Feature Boxes */
.feature-box {
    text-align: center;
    padding: 2rem;
}

.feature-box i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.feature-box h4 { font-weight: 700; margin-bottom: 0.75rem; }
.feature-box p { color: rgba(255,255,255,0.7); margin: 0; }

/* Testimonials */
.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    height: 100%;
}

.testimonial-card .stars { color: var(--accent); margin-bottom: 1rem; }
.testimonial-card p { font-style: italic; color: var(--gray-600); }

.testimonial-author strong { display: block; }
.testimonial-author span { font-size: 0.875rem; color: var(--gray-400); }

/* CTA */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 5rem 0;
}

.cta-section h2 { font-weight: 800; margin-bottom: 1rem; }
.cta-section p { opacity: 0.9; margin-bottom: 2rem; font-size: 1.125rem; }

/* Footer */
.site-footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.8);
    padding: 4rem 0 2rem;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-text { font-size: 0.9rem; }

.site-footer h6 {
    color: white;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: white; }

.footer-contact { list-style: none; padding: 0; }
.footer-contact li { margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
}

/* Auth */
.auth-section { padding: 4rem 0; min-height: 70vh; display: flex; align-items: center; }

.auth-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.auth-icon { font-size: 3rem; color: var(--primary); }

/* Property Detail */
.property-gallery { border-radius: var(--radius); overflow: hidden; }

.gallery-main img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.gallery-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.gallery-thumbs img:hover,
.gallery-thumbs img.active { opacity: 1; border: 2px solid var(--primary); }

.property-info-card,
.sidebar-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.property-detail-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.property-detail-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.property-detail-features span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.amenities-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.amenity-tag {
    background: var(--gray-100);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.map-placeholder {
    background: var(--gray-100);
    padding: 3rem;
    border-radius: var(--radius);
    text-align: center;
}

.map-placeholder i { font-size: 3rem; color: var(--primary); }

.seller-info { display: flex; gap: 1rem; align-items: center; }
.seller-avatar i { font-size: 3rem; color: var(--primary); }

/* Filters */
.filter-sidebar {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 90px;
}

/* About */
.about-image-placeholder {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image-placeholder i { font-size: 6rem; color: rgba(255,255,255,0.3); }

.stat-box {
    background: var(--gray-100);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
}

.contact-info-list { list-style: none; padding: 0; }
.contact-info-list li { margin-bottom: 1rem; display: flex; align-items: center; gap: 0.75rem; font-size: 1.05rem; }
.contact-info-list i { color: var(--primary); font-size: 1.25rem; }

/* Error */
.error-section { padding: 6rem 0; }

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeInUp 0.6s ease forwards; }
.animate-fade-in-delay { animation: fadeInUp 0.6s ease 0.2s forwards; opacity: 0; }
.animate-fade-in-delay-2 { animation: fadeInUp 0.6s ease 0.4s forwards; opacity: 0; }

.fade-in-up { animation: fadeInUp 0.5s ease forwards; }

/* Loading */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 992px) {
    .search-grid { grid-template-columns: 1fr 1fr; }
    .btn-search { grid-column: span 2; }
}

@media (max-width: 576px) {
    .search-grid { grid-template-columns: 1fr; }
    .btn-search { grid-column: span 1; }
    .hero-section { min-height: auto; }
    .section-padding { padding: 3rem 0; }
}
