/* ============================================
   IBH REAL ESTATE — BLOG
   Editorial magazine styling, built on the brand
   tokens from aboutus.css (--navy, --gold, --gold-deep,
   --gold-light, --steel, --ivory, --paper,
   --font-display, --font-sans, --font-body).
   ============================================ */

:root {
    --blog-line: rgba(197, 160, 89, 0.22);
    --blog-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
    --blog-shadow-lg: 0 40px 90px rgba(15, 23, 42, 0.22);
}

/* ── Shared bits ── */
.blog-eyebrow {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.blog-eyebrow::before {
    content: '';
    width: 34px;
    height: 1px;
    background: var(--gold);
}

.blog-cta {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-deep);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
}

.blog-cta span {
    transition: transform 0.25s ease;
    display: inline-block;
}

.blog-cta:hover span { transform: translateX(6px); }
.blog-cta--sm { font-size: 10.5px; }

/* ── Listing hero (fully self-contained so it ignores the four
      conflicting .hero definitions in new-main/aboutus/property/responsive) ── */
.blog-hero {
    position: relative;
    height: 62vh;
    min-height: 440px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--navy);
}

.blog-hero__media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    animation: blogHeroDrift 16s ease-out forwards;
}

@keyframes blogHeroDrift { to { transform: scale(1); } }

.blog-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15,23,42,0.82) 0%, rgba(15,23,42,0.34) 46%, rgba(15,23,42,0.92) 100%),
        linear-gradient(90deg, rgba(15,23,42,0.55) 0%, transparent 62%);
}

.blog-hero__inner {
    position: relative;
    z-index: 2;
    width: 86%;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 0 66px;
    animation: blogHeroUp 1s ease-out both;
}

@keyframes blogHeroUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

.blog-hero__title {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: clamp(36px, 5.4vw, 74px);
    line-height: 1.05;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--ivory);
    max-width: 15ch;
}

.blog-hero__title em {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--gold);
}

.blog-hero__rule {
    width: 64px;
    height: 1.5px;
    background: var(--gold);
    margin: 34px 0 22px;
}

.blog-hero__sub {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.75;
    color: rgba(247, 244, 236, 0.75);
    max-width: 540px;
}

@media (max-width: 640px) {
    .blog-hero {
        height: auto;
        min-height: 56vh;
        padding-top: 40px;
    }
    .blog-hero__inner { width: 90%; padding-bottom: 48px; }
    .blog-hero__title { max-width: 100%; }
}

/* ── Listing shell ── */
.blog-listing {
    background: var(--paper);
    padding: 56px 0 120px;
    position: relative;
}

.blog-listing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--gold), transparent);
}

.blog-container {
    width: 86%;
    max-width: 1260px;
    margin: 0 auto;
}

.blog-empty {
    text-align: center;
    padding: 60px 20px 40px;
    color: var(--steel);
}

.blog-empty .blog-eyebrow {
    justify-content: center;
    margin-bottom: 18px;
}

.blog-empty .blog-eyebrow::after {
    content: '';
    width: 34px;
    height: 1px;
    background: var(--gold);
}

.blog-empty p { font-size: 17px; font-family: var(--font-display); font-style: italic; }

/* ── Featured (latest) post ── */
.featured-post {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: #fff;
    border: 1px solid var(--blog-line);
    box-shadow: var(--blog-shadow);
    margin-bottom: 96px;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.featured-post:hover {
    box-shadow: var(--blog-shadow-lg);
    transform: translateY(-4px);
}

.featured-post__media {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    display: block;
}

.featured-post__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9);
    transition: transform 1.1s ease;
}

.featured-post:hover .featured-post__media img { transform: scale(1.05); }

.featured-post__badge {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 2;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--gold);
    padding: 8px 16px;
}

.featured-post__body {
    padding: 60px 60px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-post__meta {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: 18px;
}

.featured-post__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1.12;
    color: var(--navy);
    margin-bottom: 22px;
    letter-spacing: -0.01em;
}

.featured-post__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.featured-post__title a:hover { color: var(--gold-deep); }

.featured-post__excerpt {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.85;
    color: rgba(15, 23, 42, 0.7);
    margin-bottom: 30px;
}

/* ── Section header above the grid ── */
.blog-section-head {
    margin-bottom: 44px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--blog-line);
}

.blog-section-head .blog-eyebrow { margin-bottom: 14px; }

.blog-section-head h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(28px, 3vw, 40px);
    color: var(--navy);
    line-height: 1.1;
}

/* ── Grid cards ── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.blog-card {
    background: #fff;
    border: 1px solid var(--blog-line);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 3;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--blog-shadow);
}

.blog-card:hover::before { transform: scaleX(1); }

.blog-card__media {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.blog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85);
    transition: transform 0.7s ease;
    display: block;
}

.blog-card:hover .blog-card__media img { transform: scale(1.06); }

.blog-card__body {
    padding: 28px 30px 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__meta {
    font-family: var(--font-sans);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: 14px;
}

.blog-card__body h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 23px;
    line-height: 1.28;
    color: var(--navy);
    margin-bottom: 14px;
}

.blog-card__body h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card__body h3 a:hover { color: var(--gold-deep); }

.blog-card__body p {
    font-family: var(--font-body);
    font-size: 14.5px;
    line-height: 1.8;
    color: rgba(15, 23, 42, 0.66);
    margin-bottom: 22px;
    flex: 1;
}

/* ── Pagination ── */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 80px;
    padding-top: 36px;
    border-top: 1px solid var(--blog-line);
}

.blog-pagination__link {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold-deep);
    border: 1px solid var(--gold);
    padding: 13px 28px;
    text-decoration: none;
    transition: all 0.2s;
}

.blog-pagination__link:hover { background: var(--gold); color: var(--navy); }

.blog-pagination__status {
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--steel);
}

/* ============================================
   ARTICLE (detail page)
   ============================================ */
.article-header {
    background: var(--navy);
    padding: 140px 0 66px;
    position: relative;
    overflow: hidden;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.article-header__inner {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
}

.article-header .hero__breadcrumb {
    animation: none;
    opacity: 1;
    margin-bottom: 24px;
}

.article-header .blog-eyebrow { margin-bottom: 22px; }

.article-header__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(34px, 4.6vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.015em;
    color: var(--ivory);
    max-width: 20ch;
}

.article-header__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(247, 244, 236, 0.6);
}

.article-header__meta .dot { color: var(--gold); }

.article-header .hero__rule { margin-top: 30px; animation: none; opacity: 1; }

/* Article body — 80% wide, featured image floated left, text wrapping */
.blog-article {
    background: var(--paper);
    padding: 80px 0 70px;
}

.article-wrap {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
}

.article-wrap::after {
    content: '';
    display: block;
    clear: both;
}

.article-figure {
    float: left;
    width: 48%;
    margin: 6px 46px 30px 0;
    position: relative;
}

.article-figure img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    filter: saturate(0.92);
}

.article-figure::after {
    content: '';
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(247, 244, 236, 0.35);
    pointer-events: none;
}

/* Simple full-width fallback image (phase 1 — used when a post has no
   inline content image, in place of the floated .article-figure treatment) */
.article-lead-image {
    margin: 0 0 40px;
}

.article-lead-image img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
    filter: saturate(0.92);
}

/* Post body typography */
.post-content {
    font-family: var(--font-body);
    font-size: 17.5px;
    line-height: 1.95;
    color: rgba(15, 23, 42, 0.84);
}

.post-content > p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-size: 74px;
    font-weight: 500;
    line-height: 0.82;
    float: left;
    margin: 8px 14px 0 0;
    color: var(--gold-deep);
}

.post-content h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1.22;
    color: var(--navy);
    margin: 46px 0 20px;
}

.post-content h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 25px;
    line-height: 1.3;
    color: var(--navy);
    margin: 36px 0 16px;
}

.post-content p { margin-bottom: 24px; }

.post-content ul,
.post-content ol { margin: 0 0 24px 24px; }

.post-content li { margin-bottom: 12px; }

.post-content a {
    color: var(--gold-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(168, 133, 74, 0.4);
}

.post-content strong { color: var(--navy); font-weight: 600; }

.post-content blockquote {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(22px, 2.2vw, 28px);
    line-height: 1.5;
    color: var(--navy);
    border-left: 3px solid var(--gold);
    padding: 6px 0 6px 30px;
    margin: 40px 0;
    clear: both;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 34px 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 15px;
    clear: both;
}

.post-content table td,
.post-content table th {
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 11px 15px;
    text-align: left;
}

.post-content table th {
    background: var(--ivory);
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Footer block (clears the floated figure) */
.article-foot {
    clear: both;
    margin-top: 58px;
}

.blog-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 34px;
    border-top: 1px solid var(--blog-line);
}

.blog-share__label {
    font-family: var(--font-sans);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--steel);
    margin-right: 6px;
}

.blog-share a {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-deep);
    text-decoration: none;
    border: 1px solid rgba(197, 160, 89, 0.4);
    padding: 9px 20px;
    transition: all 0.2s;
}

.blog-share a:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

.blog-adjacent {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 46px 0;
    padding: 34px 0;
    border-top: 1px solid var(--blog-line);
    border-bottom: 1px solid var(--blog-line);
}

.blog-adjacent__link {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    transition: transform 0.25s ease;
}

.blog-adjacent__prev:hover { transform: translateX(-4px); }
.blog-adjacent__next { text-align: right; margin-left: auto; }
.blog-adjacent__next:hover { transform: translateX(4px); }

.blog-adjacent__label {
    font-family: var(--font-sans);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold-deep);
}

.blog-adjacent__title {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--navy);
    line-height: 1.3;
}

.blog-back-link {
    display: inline-block;
    color: var(--gold-deep);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

.blog-back-link:hover { opacity: 0.7; }

/* 404 */
.article-missing {
    background: var(--paper);
    padding: 180px 0 140px;
    text-align: center;
}

.article-missing .blog-eyebrow { justify-content: center; margin-bottom: 20px; }

.article-missing h1 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 46px;
    color: var(--navy);
    margin-bottom: 16px;
}

.article-missing p { color: var(--steel); margin-bottom: 30px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
    .featured-post { grid-template-columns: 1fr; }
    .featured-post__media { min-height: 320px; }
    .featured-post__body { padding: 42px 40px 44px; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .article-header__inner,
    .article-wrap { width: 88%; }
}

@media (max-width: 640px) {
    .blog-listing { padding: 40px 0 80px; }
    .blog-container { width: 90%; }
    .blog-grid { grid-template-columns: 1fr; }
    .featured-post { margin-bottom: 64px; }
    .featured-post__body { padding: 34px 26px 36px; }

    /* Stack the featured image full-width on phones */
    .article-figure {
        float: none;
        width: 100%;
        margin: 0 0 30px;
    }

    .post-content > p:first-of-type::first-letter {
        font-size: 60px;
    }

    .blog-adjacent { grid-template-columns: 1fr; gap: 20px; }
    .blog-adjacent__next { text-align: left; margin-left: 0; }

    .blog-pagination { flex-wrap: wrap; justify-content: center; }
}
