/* ==========================================================================
   Narrow Real Estate - Homepage Stylesheet (index.css)
   ========================================================================== */

/* hero */
.hero {
    position: relative;
    min-height: clamp(28rem, 60vh, 37.5rem);
    background: url('../images/hero.png') center/cover no-repeat;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 40.625rem;
    color: #ffffff;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5.5vw, 3.75rem);
    font-weight: normal;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

.hero-content p {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    margin-bottom: 1.875rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 0.9375rem;
}

.btn-outline {
    background-color: transparent;
    color: #fff;
    border: 0.125rem solid #fff;
}

.btn-outline:hover {
    background-color: #fff;
    color: var(--text-dark);
}

/* properties */
.featured-properties {
    background-color: var(--bg-light);
    padding: clamp(3.5rem, 6vw, 5rem) 0;
    text-align: center;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: normal;
    margin-bottom: 0.9375rem;
}

.section-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    color: var(--text-gray);
    margin-bottom: clamp(2rem, 4vw, 3.125rem);
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.25rem, 2.5vw, 1.875rem);
    text-align: left;
}

/* property card */
.property-card {
    background: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.9375rem rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,0.1);
}

.property-img-container {
    position: relative;
    height: 12.5rem;
    overflow: hidden;
}

.property-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-img-container img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 0.9375rem;
    left: 0.9375rem;
    background-color: var(--primary-red);
    color: #fff;
    padding: 0.3125rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0.25rem;
    z-index: 2; /* Keeps badge above zooming image */
}

.property-info {
    padding: 1.25rem;
}

.property-info h3 {
    font-family: var(--font-main);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.3125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location {
    color: var(--text-gray);
    font-size: 0.8125rem;
    margin-bottom: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.3125rem;
}

.price {
    font-family: var(--font-main);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 1.25rem;
}

.stats {
    display: flex;
    justify-content: space-between;
    border-top: 0.0625rem solid #eaeaea;
    border-bottom: 0.0625rem solid #eaeaea;
    padding: 0.9375rem 0;
    margin-bottom: 1.25rem;
}

.stat-item {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-gray);
}

.stat-item span {
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-dark);
    margin-bottom: 0.125rem;
}

.btn-view {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.625rem 0;
    color: var(--primary-red);
    border: 0.0625rem solid var(--primary-red);
    border-radius: 0.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background-color: var(--primary-red);
    color: #fff;
    transform: translateY(0); /* Resets the global .btn transform so it doesn't jump inside the card */
    box-shadow: none;
}

/* features */
.why-us {
    padding: clamp(3.5rem, 6vw, 5rem) 0;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1rem, 2vw, 1.5625rem);
    margin-top: 2.5rem;
}

.feature-card {
    background: #ffffff;
    padding: 2.5rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.625rem 1.875rem rgba(0,0,0,0.08);
    border: 0.0625rem solid #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 0.9375rem 2.1875rem rgba(0,0,0,0.12);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    display: block;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: normal;
    margin-bottom: 0.9375rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* cta */
.cta {
    background: linear-gradient(to right, #3e0c0c, #7a1010);
    padding: clamp(3.5rem, 6vw, 5rem) 0;
    text-align: center;
    color: #ffffff;
}

.cta h2 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: normal;
    margin-bottom: 0.9375rem;
}

.cta p {
    font-size: 1rem;
    margin-bottom: 1.875rem;
    max-width: 37.5rem;
    margin-left: auto;
    margin-right: auto;
}

.btn-cta {
    padding: 0.9375rem 1.875rem;
    font-size: 1rem;
}

/* RESPONSIVENESS: Homepage specific layouts */
@media (max-width: 62em) {
    .section-title {
        font-size: 2.5rem;
    }

    .properties-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 48em) {
    .hero {
        min-height: 28rem;
        text-align: center;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 18.75rem;
        margin: 0 auto;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section-title {
        font-size: 2rem;
    }

    .cta h2 {
        font-size: 2.25rem;
    }

    .btn-cta {
        width: 100%;
        max-width: 18.75rem;
        display: inline-block;
    }

    .featured-properties,
    .why-us,
    .cta {
        padding: 3.75rem 0;
    }

    .properties-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 30em) {
    .feature-card {
        padding: 1.75rem 1rem;
    }

    .stats {
        padding: 0.75rem 0.25rem;
        gap: 0.25rem;
    }

    .stat-item {
        min-width: 0;
        font-size: 0.6875rem;
    }

    .stat-item span {
        font-size: 0.8125rem;
    }
}