/**
 * home-styles.css
 * Core styling for the HomeSmart homepage.
 */

/* --- BASE VARIABLES --- */
:root { 
    --primary: #0C0020; 
    --bg: #f9f9f9; 
    --white: #ffffff; 
    --border: #E1E0E4; 
    --text-muted: #666; 
    --remax-blue: #003DA5;
    --remax-red: #E11B22;
}

* { box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { margin: 0; background-color: var(--white); color: var(--primary); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

.container { max-width: 1450px; margin: 0 auto; padding: 1.5rem 2rem; }
.section-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.section-subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2.5rem; }

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 40vh;
    z-index: 10;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}
.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }

.hero-search-form {
    display: flex;
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: left;
}
.hero-search-form input {
    width: 100%; /* <-- Adds full width to fill the wrapper */
    box-sizing: border-box; /* <-- Ensures padding doesn't push it out of bounds */
    border: none;
    padding: 15px 20px;
    font-size: 1.1rem;
    outline: none;
    border-radius: 6px;
}
.hero-search-btn {
    background: var(--remax-red);
    color: white;
    border: none;
    padding: 0 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}
.hero-search-btn:hover { background: #b3151b; }

/* =========================================
   PROPERTY CARDS & SLIDER
   ========================================= */
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem; 
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    color: var(--remax-blue);
    border: 1px solid var(--border);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.slider-arrow:hover { 
    background: var(--remax-blue); 
    color: white; 
    border-color: var(--remax-blue); 
}
.left-arrow { left: -20px; }
.right-arrow { right: -20px; }

.property-slider {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 15px 5px 20px 5px; 
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.property-slider::-webkit-scrollbar { display: none; }
.property-slider .card { flex: 0 0 320px; scroll-snap-align: start; }
.property-slider .photo-card { flex: 0 0 300px; scroll-snap-align: start; }

.card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--white); transition: box-shadow 0.2s; cursor: pointer; display: flex; flex-direction: column; }
.card:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.card-img-wrapper { position: relative; height: 200px; }
.card-img { width: 100%; height: 100%; object-fit: cover; border-bottom: 1px solid var(--border); }
.tag-sale { position: absolute; top: 10px; right: 10px; background: var(--remax-red); color: white; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; }
.tag-new { position: absolute; top: 10px; left: 10px; background: #008040; color: white; padding: 3px 8px; border-radius: 20px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; z-index: 2; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }

.card-info { padding: 16px 18px; position: relative; } 
.card-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-price { font-size: 1.55rem; font-weight: 700; color: var(--primary); margin: 0; }
.card-actions { display: flex; gap: 12px; }
.action-btn { background: none; border: none; cursor: pointer; padding: 0; color: var(--primary); transition: 0.2s; }
.action-btn:hover { color: var(--remax-red); transform: scale(1.15); }
.action-btn svg { width: 22px; height: 22px; stroke-width: 2.2; }
.card-stats { font-size: 0.95rem; color: var(--text-main); margin-bottom: 6px; }
.card-stats b { font-weight: 700; color: var(--primary); }
.card-address { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-office { font-size: 0.75rem; color: #888; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }

/* --- PHOTO CARD GRIDS --- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.photo-card { position: relative; border-radius: 2px; overflow: hidden; height: 200px; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; display: block; }
.photo-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.photo-card:hover img { transform: scale(1.05); }

.city-gradient {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    z-index: 1;
}
.city-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 25px;
    color: white;
    z-index: 2;
}
.city-info h3 { margin: 0 0 5px 0; font-size: 1.25rem; }
.city-stats { display: flex; gap: 15px; font-size: 0.95rem; font-weight: 500; opacity: 0.9; }

/* --- LOCAL EXPERTISE --- */
.expertise-section { background: var(--bg); padding: 4rem 2rem; }
.expertise-grid { max-width: 1450px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.expertise-text h2 { font-size: 2.8rem; margin-top: 0; color: var(--remax-blue); }
.expertise-text p { font-size: 1.15rem; color: var(--text-main); margin-bottom: 2rem; }
.btn-outline { display: inline-block; padding: 14px 30px; border: 2px solid var(--remax-blue); color: var(--remax-blue); font-weight: bold; font-size: 1.1rem; border-radius: 6px; transition: 0.2s; }
.btn-outline:hover { background: var(--remax-blue); color: white; }
.expertise-img img { width: 100%; border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

/* --- SMART SEARCH AUTOCOMPLETE --- */
.search-wrapper { position: relative; width: 100%; flex: 1; }
.smart-dropdown {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-top: 5px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none; 
    text-align: left;
}
.smart-dropdown.active { display: block; }
.smart-category {
    padding: 8px 15px;
    background: var(--bg);
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.smart-option {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    color: var(--primary);
    font-size: 0.95rem;
    transition: background 0.2s;
}
.smart-option:last-child { border-bottom: none; }
.smart-option:hover { background: #f0f4ff; color: var(--remax-blue); }

/* --- RESPONSIVE DESIGN (Mobile Overrides) --- */
@media (max-width: 992px) {
    .hero { height: 30vh; min-height: 270px; z-index: 10; }
    .hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
    .hero p { font-size: 1rem; margin-bottom: 1.5rem; }
    .hero-search-form { flex-direction: column; gap: 10px; padding: 15px; background: transparent; box-shadow: none; width: 100%; }
    .hero-search-form input, .hero-search-btn { width: 100%; padding: 15px; box-sizing: border-box; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
    
    .expertise-grid { grid-template-columns: 1fr; gap: 2rem; }
    .expertise-img { order: -1; } 
    .section-title { font-size: 1.6rem; } 
    .section-subtitle { font-size: 0.95rem; margin-bottom: 1.5rem; } 
    .container { padding: 1.25rem 1rem; } 
}