/* =========================================================
   El Vanta — HomePage & Listings Page
   ---------------------------------------------------------
   Targets the classes and IDs in index.html exactly.
   A responsive grid of property cards. Each card has a
   placeholder image area with a price tag overlaid in the
   corner — swap the gradient for {{ listing.image.url }}
   once the backend exists.

   Depends on base.css for: CSS variables, font import,
   box-sizing reset, body styles, and the reduced-motion
   global override.
   ========================================================= */

/* ---------------------------------------------------------
   Top bar
   --------------------------------------------------------- */

.top-bar {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    /* left padding clears the fixed hamburger button */
    padding: var(--space-3) var(--space-4) var(--space-3) 68px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

/* Your existing #header h1 — treated as the brand mark */
#header {
    flex-shrink: 0;
}

#header h1 {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-ink);
    white-space: nowrap;
}

/* ---------------------------------------------------------
   Search box
   --------------------------------------------------------- */

.search-box {
    display: flex;
    flex: 1;
    max-width: 380px;
    margin-left: auto;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 1.5px solid var(--color-border);
    border-right: none;
    border-radius: 999px 0 0 999px;
    padding: 9px 16px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-ink);
    background: var(--color-bg);
    outline: none;
    transition: border-color 0.15s ease;
}

.search-box input:focus {
    border-color: var(--color-accent);
    background: var(--color-surface);
}

.search-box button {
    border: 1.5px solid var(--color-border);
    border-left: none;
    border-radius: 0 999px 999px 0;
    background: var(--color-ink);
    color: #FFFFFF;
    padding: 0 18px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.search-box button:hover {
    background: var(--color-navy);
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.hero {
    position: relative;
    padding: var(--space-6) var(--space-4);
    text-align: center;
    overflow: hidden;
    /* Warm layered gradient — replace with a real photo later:
       background: url("../images/hero.jpg") center / cover no-repeat;  */
    background:
        linear-gradient(160deg,
            rgba(239, 237, 232, 0.92) 0%,
            rgba(217, 154, 61, 0.08) 100%),
        radial-gradient(ellipse at 70% 50%,
            #E8DFD0 0%,
            #EFEDE8 60%);
}

/* Decorative dashed ring — pure CSS, no extra HTML */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -80px;
    width: 340px;
    height: 340px;
    border: 2px dashed rgba(28, 31, 29, 0.08);
    border-radius: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

/* eyebrow line above the h1 */
.hero-content::before {
    content: 'ROOMS · APARTMENTS · HOMES';
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--color-ink-soft);
    margin-bottom: var(--space-3);
}

.hero-content h1 {
    margin: 0 0 var(--space-3);
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-ink);
}

.hero-content h1 em {
    font-style: normal;
    color: var(--color-accent);
}

.hero-content p {
    margin: 0 0 var(--space-4);
    color: var(--color-ink-soft);
    font-size: 1rem;
}

.btn-browse {
    display: inline-block;
    background: var(--color-ink);
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 13px 32px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    transition: background 0.15s ease, transform 0.1s ease;
}

.btn-browse:hover {
    background: var(--color-navy);
    transform: translateY(-1px);
}

.btn-browse:focus-visible {
    outline: 2px solid var(--color-ink);
    outline-offset: 3px;
}

/* ---------------------------------------------------------
   Page shell
   --------------------------------------------------------- */

.listings-page {
    min-height: 100vh;
    padding: 72px var(--space-3) var(--space-5);
    /* top padding clears the fixed hamburger button */
}

.listings-header {
    max-width: 1100px;
    margin: 0 auto var(--space-4);
}

.listings-header h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.listings-header p {
    margin: 0;
    color: var(--color-ink-soft);
}

/* ---------------------------------------------------------
   Recent listings
   --------------------------------------------------------- */

.recent-listings {
    padding: var(--space-5) var(--space-3) var(--space-6);
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto var(--space-4);
}

.recent-listings h2 {
    position: relative;
    margin: 0 auto var(--space-5);
    padding-bottom: var(--space-3);

    text-align: center;
    font-family: var(--font-display);
    font-size: 1.8rem;
}

.recent-listings h2::after {
    content: "";
    display: block;

    width: 70px;
    height: 3px;

    margin: var(--space-2) auto 0;

    background: var(--color-accent);
    border-radius: 999px;
}

.see-all {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-ink-soft);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.see-all:hover {
    color: var(--color-ink);
    border-color: var(--color-ink);
}

/* ---------------------------------------------------------
   Card grid
   --------------------------------------------------------- */

.listings-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

@media (min-width: 640px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .listings-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------------------------------------------------------
   Individual listing card
   --------------------------------------------------------- */

.listing-card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 1px 2px rgba(28, 31, 29, 0.04),
        0 8px 24px rgba(28, 31, 29, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 4px 8px rgba(28, 31, 29, 0.06),
        0 12px 28px rgba(28, 31, 29, 0.08);
}

/* Placeholder image area — replace background with a real photo later */
.listing-image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #DCE6E2, #C9D6D1);
}

.listing-price {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--color-ink);
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}

.listing-body {
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.listing-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}

.listing-location {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-ink-soft);
}

.listing-type {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--color-accent-soft);
    color: #8A5A1C;
    padding: 3px 10px;
    border-radius: 999px;
}

.listing-link {
    margin-top: var(--space-2);
    align-self: flex-start;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-ink);
    text-decoration: none;
    border-bottom: 2px solid var(--color-accent);
}

.listing-link:hover {
    color: var(--color-accent);
}

.listing-link:focus-visible {
    outline: 2px solid var(--color-ink);
    outline-offset: 2px;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (min-width: 640px) {
    .hero {
        padding: var(--space-6) var(--space-4);
    }

    #header h1 {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .top-bar {
        flex-wrap: wrap;
        padding-top: var(--space-4);
    }

    .search-box {
        max-width: 100%;
        order: 3;
        flex-basis: 100%;
    }
}

@media (max-width: 900px) {

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

}

@media (max-width: 600px) {

    .footer-top {
        grid-template-columns: 1fr;
        gap: var(--space-4);
        padding: var(--space-5) var(--space-3);
    }

    .footer-brand {
        margin-bottom: var(--space-3);
    }

    .footer-social {
        margin-top: var(--space-3);
    }

}