/* ============================================================================
   NEIGHBORHOOD-GUIDES.CSS - /guides/ and /guides/<slug>/

   Both templates have linked this file since they were written and it never
   existed - /static/webpages/css/neighborhood-guides.css answered 404 - so the
   guide list rendered as a stack of headings with the meta icons colliding
   into the text. These are the hub-and-spoke content pages, carried in the
   sitemap at priority 0.9, so they were the worst place on the site to be
   unstyled.

   The card vocabulary follows service-pages.css and help_center.css.
   ============================================================================ */

.guides-hero {
    padding: 2.5rem 0;
    margin-bottom: 2.5rem;
    background: #f8f9fb;
    border-bottom: 1px solid #e8eaed;
}

.guides-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 0.75rem;
}

.guides-hero p {
    max-width: 48rem;
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #6b7280;
}

.guide-breadcrumb {
    font-size: 0.875rem;
}

.guide-breadcrumb__link {
    color: var(--brand-blue, #313b61);
    text-decoration: none;
}

.guide-breadcrumb__link:hover {
    text-decoration: underline;
}

.guide-breadcrumb__active {
    color: #6b7280;
}

/* --------------------------------------------------------------------------
   THE GRID
   -------------------------------------------------------------------------- */

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.guide-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 0.875rem;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.guide-card:hover {
    transform: translateY(-0.1875rem);
    border-color: #d1d5db;
    box-shadow: 0 0.75rem 1.75rem rgba(15, 15, 26, 0.1);
}

/* Fixed ratio so a card with a photo and one with the fallback glyph are the
   same height in the same row. */
.guide-card__image {
    position: relative;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f4;
    overflow: hidden;
}

.guide-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.guide-card:hover .guide-card__image img {
    transform: scale(1.04);
}

/* Shown instead of a photo when the guide has none. */
.guide-card__image .area-icon {
    font-size: 2.5rem;
    color: #c2c2c2;
}

.featured-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f0f1a;
    background: var(--brand-yellow, #F3C130);
    border-radius: 999px;
}

.guide-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem;
}

/* The headline is an <h2> for the Article markup, not for its size. */
.guide-card__body h2 {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 0.625rem;
    color: #0f0f1a;
}

.guide-card__body h2 a {
    color: inherit;
    text-decoration: none;
}

.guide-card__body h2 a:hover {
    color: var(--brand-blue, #313b61);
}

.guide-card__body .intro {
    flex: 1;
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #6b7280;
}

.guide-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid #f0f1f3;
    font-size: 0.8125rem;
    color: #6b7280;
}

/* The icons sat hard against their labels with no stylesheet. */
.guide-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.guide-card__meta i {
    color: var(--brand-yellow, #F3C130);
}

/* --------------------------------------------------------------------------
   CLOSING CTA
   -------------------------------------------------------------------------- */

.guides-cta {
    padding: 2.5rem 2rem;
    margin-bottom: 3rem;
    text-align: center;
    background: #f8f9fb;
    border: 1px solid #e8eaed;
    border-radius: 0.875rem;
}

.guides-cta h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-blue, #313b61);
    margin-bottom: 0.5rem;
}

.guides-cta p {
    max-width: 34rem;
    margin: 0 auto 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #6b7280;
}

/* --------------------------------------------------------------------------
   PHONE
   -------------------------------------------------------------------------- */

@media (max-width: 47.9375rem) {
    .guides-hero {
        padding: 1.75rem 0;
        margin-bottom: 1.75rem;
    }

    .guides-hero h1 {
        font-size: 1.75rem;
    }

    .guides-hero p {
        font-size: 0.9375rem;
    }

    .guides-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* A tap that becomes a scroll leaves a hover lift stuck mid-transform. */
    .guide-card:hover {
        transform: none;
        box-shadow: none;
    }

    .guides-cta {
        padding: 1.75rem 1.25rem;
    }
}


/* ============================================================================
   GUIDE DETAIL - /guides/<slug>/

   The same missing stylesheet, so this page was unstyled too: no hero, the
   table of contents ran as a bare list under the article, and the key stats
   stacked one per line.

   The hero image arrives as a custom property, not a background: the template
   carries it in `data-hero-bg` and its inline script sets `--hero-bg` on the
   element. A guide with no image simply never gets the property, so the
   gradient below stands on its own.
   ============================================================================ */

.guide-hero {
    position: relative;
    padding: 3.5rem 0 3rem;
    margin-bottom: 2.5rem;
    color: #ffffff;
    background-color: var(--brand-blue, #313b61);
    background-image: linear-gradient(rgba(15, 15, 26, 0.62), rgba(15, 15, 26, 0.62)), var(--hero-bg, none);
    background-size: cover;
    background-position: center;
}

/* Undoes the navy gradient text-fill brandkit-typography puts on every h1,
   which on this dark band is invisible. */
.guide-hero h1 {
    background: none;
    background-clip: border-box;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 1rem;
}

.guide-hero .guide-breadcrumb__link,
.guide-hero .guide-breadcrumb__active {
    color: rgba(255, 255, 255, 0.85);
}

.guide-hero .intro {
    max-width: 48rem;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.92);
}

.guide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
}

.guide-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

/* -------------------------------------------------------------- key stats */

.key-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.guide-stat__card {
    padding: 1rem 1.125rem;
    text-align: center;
    background: #f8f9fb;
    border: 1px solid #e8eaed;
    border-radius: 0.75rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--brand-blue, #313b61);
}

.stat-label {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

/* ---------------------------------------------------------- article body */

.guide-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
}

.guide-section {
    padding-top: 1.5rem;
    margin-bottom: 2rem;
    scroll-margin-top: 5rem;
}

.guide-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-blue, #313b61);
    margin-bottom: 0.875rem;
}

.guide-section ul,
.guide-section ol {
    padding-left: 1.25rem;
}

.guide-section li {
    margin-bottom: 0.375rem;
}

/* ------------------------------------------------- properties in the zone */

.guide-properties {
    padding-top: 1.5rem;
    margin-bottom: 2.5rem;
    scroll-margin-top: 5rem;
}

.guide-properties h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-blue, #313b61);
    margin-bottom: 1rem;
}

.guide-properties__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 1rem;
}

.mini-property-card {
    display: block;
    padding: 1rem;
    color: inherit;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mini-property-card:hover {
    color: inherit;
    border-color: var(--brand-yellow, #F3C130);
    box-shadow: 0 0.375rem 1rem rgba(15, 15, 26, 0.08);
}

.mini-property-card .price {
    display: block;
    font-weight: 700;
    color: var(--brand-blue, #313b61);
}

.mini-property-card .type,
.mini-property-card .area {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
}

.type-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.type-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-blue, #313b61);
    text-decoration: none;
    background: #eef0f7;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.type-tag:hover {
    color: var(--brand-blue, #313b61);
    background: #dfe3ef;
}

/* ----------------------------------------------------------------- related */

.related-guides {
    padding-top: 1.5rem;
    margin-bottom: 2.5rem;
}

.related-guides h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--brand-blue, #313b61);
    margin-bottom: 1rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
}

.related-card {
    display: block;
    padding: 1rem 1.125rem;
    font-weight: 600;
    color: #0f0f1a;
    text-decoration: none;
    background: #f8f9fb;
    border: 1px solid #e8eaed;
    border-radius: 0.75rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.related-card:hover {
    color: var(--brand-blue, #313b61);
    background: #ffffff;
    border-color: var(--brand-yellow, #F3C130);
}

/* ---------------------------------------------------- table of contents */

.toc-sidebar {
    position: sticky;
    top: 5rem;
}

.toc-card {
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 0.875rem;
}

.toc-card h3 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.toc-card--help {
    margin-top: 1rem;
    background: #fff7dc;
    border-color: #f5e3a8;
}

.toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc-list li + li {
    border-top: 1px solid #f0f1f3;
}

.toc-list a {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
}

.toc-list a:hover {
    color: var(--brand-blue, #313b61);
}

@media (max-width: 61.9375rem) {
    /* Sticky only works where there is a column beside the article. */
    .toc-sidebar {
        position: static;
    }
}

@media (max-width: 47.9375rem) {
    .guide-hero {
        padding: 2.25rem 0 2rem;
        margin-bottom: 1.75rem;
    }

    .guide-hero h1 {
        font-size: 1.75rem;
    }

    .guide-hero .intro {
        font-size: 0.9375rem;
    }

    .guide-section h2,
    .guide-properties h2 {
        font-size: 1.25rem;
    }

    .key-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
