/* --- Reset & Base Styles --- */
:root {
    --primary-red: #e60000;
    --bg-light: #f8f9fa;
    --text-dark: #333;
    --text-grey: #777;
    --border-color: #e0e0e0;
    --banner-bg: #fff5f5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Common Container */
.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

/* --- Hero Section --- */
.hero-section {
    background-color: var(--primary-red);
    /* Note: In a real scenario, you would use the actual image here */
    /* background-image: url('path-to-hero-image.jpg'); */
    background-size: cover;
    background-position: center;
    padding: 60px 0 100px; /* Extra padding bottom for overlap effect */
    text-align: center;
    color: white;
    position: relative;
}

.hero-content h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.search-bar-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-form {
    display: flex;
    align-items: center;
}

.search-form input {
    flex-grow: 1;
    border: none;
    padding: 12px 16px;
    font-size: 1rem;
    outline: none;
}

.search-form button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-grey);
}

/* --- Stats Section --- */
.stats-section {
    margin-top: -50px; /* Pull up to overlap hero */
    position: relative;
    /* z-index: 2; */
    margin-bottom: 40px;
}

.stats-grid {
    list-style: none;
    display: grid;
    /* Mobile: 2 columns */
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stats-grid li {
    background: white;
    padding: 20px 15px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-title {
    font-size: 0.8rem;
    color: var(--text-grey);
    font-weight: 600;
    text-transform: uppercase;
}

.stat-count {
    font-size: 1.4rem;
    color: var(--text-dark);
}

/* --- Featured Listings Section --- */
.featured-section {
    margin-bottom: 40px;
}

.listings-grid {
    display: grid;
    /* Mobile: 1 column */
    grid-template-columns: 1fr;
    gap: 20px;
}

.listing-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}

.listing-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-image {
    position: relative;
    height: 200px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-featured {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffd700; /* Gold color */
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
    font-weight: bold;
}

.card-content {
    padding: 15px;
}

.price {
    color: var(--primary-red);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.details, .location-time {
    font-size: 0.85rem;
    color: var(--text-grey);
    margin-bottom: 8px;
}

.location-time {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0;
}

/* --- Inspection Banner Section --- */
.inspection-banner-section {
    margin-bottom: 40px;
}

.inspection-banner {
    background-color: var(--banner-bg);
    border: 1px solid #ffd6d6;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    flex-direction: column; /* Mobile: stack vertically */
    gap: 20px;
}

.red-text {
    color: var(--primary-red);
}

.inspection-text h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.sub-text {
    color: var(--text-dark);
    margin-bottom: 20px;
}

.benefits-list {
    list-style: none;
    display: flex;
    flex-direction: column; /* Mobile: stack vertical */
    gap: 15px;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.icon {
    color: var(--primary-red);
    font-size: 1.2rem;
}

.inspection-cta {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-red {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    width: 100%; /* Mobile: full width */
    transition: background-color 0.2s;
}

.btn-red:hover {
    background-color: #cc0000;
}

/* --- Testimonials Section --- */
.testimonials-section {
    margin-bottom: 60px;
}

.testimonials-grid {
    display: grid;
    /* Mobile: 1 column */
    grid-template-columns: 1fr;
    gap: 25px;
}

.testimonial-card {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    position: relative;
}

.quote-icon {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 4rem;
    color: #e0e0e0;
    line-height: 1;
    z-index: 0;
}

.quote-text {
    position: relative;
    z-index: 1;
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 700;
    color: var(--primary-red);
}

/* =========================================
   RESPONSIVE MEDIA QUERIES
   ========================================= */

/* Tablet (e.g., > 768px) */
@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    /* Stats: 4 columns on tablet */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Listings: 2 columns on tablet */
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Inspection Banner: Side by side on larger screens */
    .inspection-banner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .benefits-list {
        flex-direction: row; /* Horizontal list */
        gap: 30px;
    }

    .btn-red {
        width: auto; /* Natural width */
        padding: 15px 40px;
    }

    /* Testimonials: 2 columns on tablet */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (e.g., > 1024px) */
@media (min-width: 1024px) {
    /* Stats: 7 columns to match screenshot */
    .stats-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    /* Listings: 5 columns to match screenshot */
    .listings-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Testimonials: 3 columns to match screenshot */
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
 .dot {
    display:inline-block;
    width:10px;
    height:10px;
    margin:0 6px;
    border-radius:50%;
    background:#cfcfcf;
    cursor:pointer;
    transition:transform .15s ease, background .15s ease;
  }
  .dot.active {
    background:#0d6efd;
    transform:scale(1.2);
  }

  /* Optional: stop auto-slide when hovering the carousel */
  .carousel-wrapper:hover { cursor:default; }
