/**
 * Siebert Realty Blog - Main Styles
 * Modern knowledge-hub design — coastal, clean, professional.
 */

/* ============================================
   Design Tokens
   ============================================ */
:root {
    /* Brand palette — muted coastal */
    --clr-ocean:       #4db6cd;
    --clr-ocean-dark:  #3a9fb8;
    --clr-ocean-deep:  #2c8fa8;
    --clr-teal:        #3d7a8c;
    --clr-sand:        #f5f1eb;
    --clr-sand-dark:   #e8e1d8;

    /* Neutrals */
    --clr-white:       #ffffff;
    --clr-bg:          #f7f9fb;
    --clr-gray-50:     #f8fafc;
    --clr-gray-100:    #f1f5f9;
    --clr-gray-200:    #e2e8f0;
    --clr-gray-400:    #94a3b8;
    --clr-gray-500:    #64748b;
    --clr-gray-600:    #475569;
    --clr-gray-700:    #334155;
    --clr-gray-800:    #1e293b;
    --clr-gray-900:    #0f172a;

    /* Semantic */
    --clr-text:        var(--clr-gray-800);
    --clr-text-muted:  var(--clr-gray-500);
    --clr-border:      var(--clr-gray-200);
    --clr-link:        var(--clr-ocean-dark);

    /* Shadows */
    --shadow-sm:  0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
    --shadow-md:  0 4px 14px rgba(0,0,0,.08);
    --shadow-lg:  0 12px 28px rgba(0,0,0,.10);
    --shadow-card: 0 1px 3px rgba(0,0,0,.05);
    --shadow-card-hover: 0 8px 30px rgba(0,0,0,.10);

    /* Layout */
    --container-max: 1200px;
    --radius:     10px;
    --radius-lg:  14px;
    --transition: .25s ease;
    --transition-slow: .4s ease;

    /* Spacing scale */
    --space-section: 5.5rem;
    --space-section-sm: 3.5rem;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--clr-text);
    line-height: 1.65;
    background: var(--clr-bg);
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--clr-gray-900);
    line-height: 1.25;
    margin: 0 0 .75rem;
}

a {
    color: var(--clr-link);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--clr-ocean-deep); }

img { max-width: 100%; height: auto; display: block; }

/* Shared container */
.hp-container,
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ============================================
   Navigation (shared all pages)
   ============================================ */
.navbar {
    padding: .75rem 0;
    background: var(--clr-white) !important;
    box-shadow: 0 1px 0 var(--clr-gray-200);
    z-index: 1000;
}

.navbar-brand {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--clr-teal) !important;
    letter-spacing: -.02em;
}
.navbar-brand:hover { color: var(--clr-ocean-dark) !important; }
.navbar-brand span { font-weight: 400; color: var(--clr-gray-500); }

.nav-link {
    font-weight: 500;
    font-size: .88rem;
    padding: .5rem .85rem !important;
    color: var(--clr-gray-600) !important;
    transition: color var(--transition);
    letter-spacing: .01em;
}
.nav-link:hover { color: var(--clr-ocean-dark) !important; }

/* ============================================
   Blog Header Banner (non-homepage pages)
   ============================================ */
.blog-header-banner {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.blog-header-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Buttons (shared)
   ============================================ */
.btn-primary,
.hp-btn--primary {
    background: var(--clr-ocean-dark);
    border: none;
    padding: .75rem 1.75rem;
    font-weight: 600;
    font-size: .92rem;
    border-radius: 8px;
    color: var(--clr-white);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    display: inline-block;
    text-decoration: none;
    letter-spacing: .01em;
}
.btn-primary:hover,
.hp-btn--primary:hover {
    background: var(--clr-ocean-deep);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--clr-white);
}
.btn-primary:focus-visible,
.hp-btn--primary:focus-visible {
    outline: 2px solid var(--clr-ocean);
    outline-offset: 2px;
}

.hp-btn--white {
    background: var(--clr-white);
    color: var(--clr-ocean-deep);
    border: none;
    padding: .75rem 2rem;
    font-weight: 700;
    font-size: .92rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.hp-btn--white:hover {
    background: var(--clr-gray-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   HOMEPAGE — Hero
   ============================================ */
.hp-hero {
    position: relative;
    min-height: clamp(380px, 45vh, 550px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../images/SandbridgeBlogHeader.jpg') center top / cover no-repeat;
    text-align: center;
    overflow: hidden;
}
.hp-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15,23,42,.15) 0%,
        rgba(15,23,42,.28) 50%,
        rgba(15,23,42,.42) 100%
    );
}
.hp-hero__content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    padding: 4rem 1.25rem 4.5rem;
}
.hp-hero__eyebrow {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: rgba(255,255,255,.50);
    margin-bottom: 1rem;
    text-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.hp-hero__title {
    font-size: clamp(2.1rem, 5vw, 2.85rem);
    font-weight: 800;
    color: var(--clr-white);
    margin-bottom: .55rem;
    letter-spacing: -.03em;
    line-height: 1.15;
}
.hp-hero__sub {
    font-size: 1.08rem;
    color: rgba(255,255,255,.80);
    margin-bottom: 2.25rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Hero search bar */
.hp-hero__search {
    display: flex;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
    background: var(--clr-white);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.15);
}
.hp-hero__search-icon {
    padding-left: 1.3rem;
    color: var(--clr-gray-400);
    font-size: 1rem;
    flex-shrink: 0;
}
.hp-hero__search input {
    flex: 1;
    border: none;
    outline: none;
    padding: .9rem .85rem .9rem .65rem;
    font-size: .95rem;
    font-family: inherit;
    color: var(--clr-gray-700);
    background: transparent;
    min-width: 0;
}
.hp-hero__search input::placeholder { color: var(--clr-gray-400); }
.hp-hero__search button {
    background: var(--clr-ocean-dark);
    border: none;
    color: var(--clr-white);
    padding: .7rem 1.35rem;
    margin: .3rem .35rem .3rem 0;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}
.hp-hero__search button:hover {
    background: var(--clr-ocean-deep);
}

/* Hero wave divider */
.hp-hero__wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    z-index: 3;
    line-height: 0;
}
.hp-hero__wave svg {
    display: block;
    width: 100%;
    height: 40px;
}

/* ============================================
   HOMEPAGE — Topic Navigation Grid
   ============================================ */
.hp-topics {
    padding: 2.5rem 0 3rem;
    background: var(--clr-white);
}
.hp-topics__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.hp-topic-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    border: 1px solid var(--clr-gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.35rem;
    background: var(--clr-white);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.hp-topic-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--clr-ocean);
}
.hp-topic-card:focus-visible {
    outline: 2px solid var(--clr-ocean);
    outline-offset: 2px;
}
.hp-topic-card__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(77,182,205,.1);
    color: var(--clr-ocean-dark);
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition);
}
.hp-topic-card:hover .hp-topic-card__icon-wrap {
    background: var(--clr-ocean-dark);
    color: var(--clr-white);
}
.hp-topic-card__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.hp-topic-card__label {
    font-weight: 700;
    font-size: .95rem;
    color: var(--clr-gray-800);
    line-height: 1.3;
}
.hp-topic-card__count {
    font-size: .78rem;
    color: var(--clr-text-muted);
    margin-top: .15rem;
}

/* ============================================
   Section Headers (shared)
   ============================================ */
.hp-section-header {
    text-align: center;
    margin-bottom: 2.75rem;
}
.hp-section-rule {
    display: block;
    width: 40px;
    height: 3px;
    background: var(--clr-ocean);
    border-radius: 2px;
    margin: 0 auto 1rem;
}
.hp-section-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.025em;
    color: var(--clr-gray-900);
    margin-bottom: .4rem;
}
.hp-section-desc {
    color: var(--clr-text-muted);
    font-size: 1.02rem;
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   HOMEPAGE — Latest Articles Grid
   ============================================ */
.hp-articles {
    padding: var(--space-section) 0;
    background: var(--clr-bg);
}
.hp-articles__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

/* Article Card */
.hp-card {
    background: var(--clr-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.hp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}
.hp-card__img-link {
    display: block;
    overflow: hidden;
    position: relative;
}
.hp-card__img-link img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.hp-card:hover .hp-card__img-link img {
    transform: scale(1.04);
}
.hp-card__body {
    padding: 1.4rem 1.5rem 1.35rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.hp-card__cat {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--clr-ocean-deep);
    background: rgba(77,182,205,.10);
    padding: .3rem .7rem;
    border-radius: 5px;
    margin-bottom: .7rem;
    align-self: flex-start;
    line-height: 1;
}
.hp-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: .35rem;
}
.hp-card__title a {
    color: var(--clr-gray-900);
    text-decoration: none;
    transition: color var(--transition);
}
.hp-card__title a:hover { color: var(--clr-ocean-dark); }

.hp-card__meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    color: var(--clr-gray-400);
    margin-bottom: .7rem;
    font-weight: 500;
}
.hp-card__dot { opacity: .5; }

.hp-card__excerpt {
    font-size: .9rem;
    color: var(--clr-gray-600);
    line-height: 1.65;
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.1rem;
    padding-top: .85rem;
    border-top: 1px solid var(--clr-gray-100);
}
.hp-card__author {
    font-size: .78rem;
    font-weight: 500;
    color: var(--clr-gray-500);
}
.hp-card__more {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--clr-ocean-dark);
    transition: color var(--transition), gap var(--transition);
    text-decoration: none;
}
.hp-card__more i {
    font-size: .75rem;
    transition: transform var(--transition);
}
.hp-card__more:hover {
    color: var(--clr-ocean-deep);
}
.hp-card__more:hover i {
    transform: translateX(3px);
}

/* Empty state */
.hp-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--clr-text-muted);
}
.hp-empty i { font-size: 3rem; margin-bottom: 1rem; display: block; }
.hp-empty h3 { color: var(--clr-gray-700); }

/* ============================================
   HOMEPAGE — Featured Authority Block
   ============================================ */
.hp-featured {
    padding: var(--space-section) 0;
    background: var(--clr-sand);
}
.hp-featured__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}
.hp-featured__image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.hp-featured__image img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
}
.hp-featured__label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--clr-ocean-deep);
    background: rgba(77,182,205,.12);
    padding: .35rem .85rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}
.hp-featured__label i {
    font-size: .65rem;
}
.hp-featured__title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -.025em;
    margin-bottom: .85rem;
    line-height: 1.3;
}
.hp-featured__desc {
    font-size: 1rem;
    color: var(--clr-gray-600);
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

/* ============================================
   HOMEPAGE — Newsletter
   ============================================ */
.hp-newsletter {
    background: linear-gradient(135deg, var(--clr-teal) 0%, var(--clr-ocean-deep) 100%);
    padding: var(--space-section) 0;
    text-align: center;
}
.hp-newsletter__inner { max-width: 540px; }
.hp-newsletter__icon {
    font-size: 2rem;
    color: rgba(255,255,255,.5);
    display: block;
    margin-bottom: .85rem;
}
.hp-newsletter__title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--clr-white);
    margin-bottom: .5rem;
    letter-spacing: -.02em;
}
.hp-newsletter__desc {
    color: rgba(255,255,255,.78);
    font-size: .98rem;
    margin-bottom: 2rem;
    line-height: 1.55;
}
.hp-newsletter__form {
    display: flex;
    max-width: 460px;
    margin: 0 auto;
    gap: .5rem;
    align-items: stretch;
}
.hp-newsletter__input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 8px;
    padding-left: 1rem;
    transition: border-color var(--transition), background var(--transition);
}
.hp-newsletter__input-wrap:focus-within {
    border-color: rgba(255,255,255,.5);
    background: rgba(255,255,255,.2);
}
.hp-newsletter__input-wrap i {
    color: rgba(255,255,255,.45);
    font-size: .9rem;
    flex-shrink: 0;
}
.hp-newsletter__form input {
    flex: 1;
    border: none;
    outline: none;
    padding: .8rem .85rem;
    border-radius: 0;
    font-size: .92rem;
    font-family: inherit;
    background: transparent;
    color: var(--clr-white);
}
.hp-newsletter__form input::placeholder { color: rgba(255,255,255,.5); }

/* ============================================
   Footer (redesigned)
   ============================================ */
.site-footer {
    background: var(--clr-gray-900);
    color: var(--clr-gray-400);
    padding: 4.5rem 0 0;
    margin-top: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
    padding-bottom: 3.5rem;
}
.footer-brand {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--clr-white);
    margin-bottom: .75rem;
}
.footer-brand span { font-weight: 400; color: var(--clr-gray-400); }
.footer-tagline {
    font-size: .88rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.footer-social { display: flex; gap: .5rem; }
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    color: var(--clr-gray-400);
    font-size: 1rem;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}
.footer-social a:hover {
    background: var(--clr-ocean-dark);
    color: var(--clr-white);
    transform: translateY(-2px);
}

.footer-heading {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--clr-white);
    margin-bottom: 1rem;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li { margin-bottom: .55rem; }
.footer-col ul a {
    color: var(--clr-gray-400);
    font-size: .9rem;
    transition: color var(--transition);
}
.footer-col ul a:hover { color: var(--clr-white); }

.footer-nl-form {
    display: flex;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--clr-gray-700);
}
.footer-nl-form input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: .6rem .85rem;
    color: var(--clr-white);
    font-family: inherit;
    font-size: .88rem;
}
.footer-nl-form input::placeholder { color: var(--clr-gray-500); }
.footer-nl-form button {
    background: var(--clr-ocean);
    border: none;
    color: var(--clr-white);
    padding: 0 .9rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background var(--transition);
}
.footer-nl-form button:hover { background: var(--clr-ocean-dark); }

.footer-bottom {
    border-top: 1px solid var(--clr-gray-700);
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .82rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--clr-gray-500); transition: color var(--transition); }
.footer-bottom a:hover { color: var(--clr-white); }

/* ============================================
   EXISTING PAGE STYLES (non-homepage)
   ============================================ */

/* Page Title Banner */
.page-title-banner {
    background-color: var(--clr-ocean);
    color: white;
    padding: 2rem 0;
    text-align: center;
}
.page-title-banner h1 {
    color: white;
    margin: 0;
    font-size: 1.75rem;
    font-weight: 500;
}

/* Post Cards (legacy — used on category / search pages) */
.post-card {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    background: var(--clr-white);
    box-shadow: var(--shadow-sm);
    position: relative;
}
.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.post-card img {
    height: 200px;
    object-fit: cover;
    transition: transform .35s ease;
}
.post-card:hover img { transform: scale(1.04); }

.post-card .card-title a {
    font-weight: 600;
    color: var(--clr-gray-900);
    transition: color var(--transition);
}
.post-card .card-title a:hover { color: var(--clr-ocean); }

.post-categories .badge {
    background: linear-gradient(135deg, var(--clr-ocean), var(--clr-ocean-dark));
    font-weight: 500;
    padding: .4rem .8rem;
}

.post-meta { font-size: .875rem; }

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--clr-ocean-deep);
    color: white;
    padding: .4rem .8rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    z-index: 10;
}

/* Single Post */
.post-single .post-header { text-align: center; }
.post-single .post-content { font-size: 1.1rem; line-height: 1.8; overflow: hidden; /* contain stray content styles */ }
.post-single .post-content * { max-width: 100%; box-sizing: border-box; }
.post-single .post-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 2rem 0; }
.post-single .post-content h2,
.post-single .post-content h3,
.post-single .post-content h4 { margin-top: 2rem; margin-bottom: 1rem; }
.post-single .post-content p { margin-bottom: 1.5rem; }
.post-single .post-content ul,
.post-single .post-content ol { margin-bottom: 1.5rem; padding-left: 2rem; }
.post-single .post-content blockquote {
    border-left: 4px solid var(--clr-ocean);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--clr-text-muted);
}
.post-featured-image { margin-bottom: 2rem; }
.post-featured-image img { width: 100%; height: auto; border-radius: var(--radius-lg); }
.author-box { border-left: 4px solid var(--clr-ocean); }

/* ============================================
   Page Hero — shared hero for category, search, post pages
   ============================================ */
.page-hero {
    position: relative;
    min-height: clamp(340px, 40vh, 500px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../images/SandbridgeBlogHeader.jpg') center top / cover no-repeat;
    text-align: center;
    overflow: hidden;
}
.page-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15,23,42,.18) 0%,
        rgba(15,23,42,.30) 50%,
        rgba(15,23,42,.45) 100%
    );
}
.page-hero__content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 3rem 1.25rem 3.5rem;
}
.page-hero__eyebrow {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: rgba(255,255,255,.50);
    margin-bottom: .75rem;
    text-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.page-hero__title {
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    font-weight: 800;
    color: var(--clr-white);
    margin-bottom: .5rem;
    letter-spacing: -.03em;
    line-height: 1.15;
}
.page-hero__sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,.75);
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.5;
}
.page-hero__sub a {
    color: rgba(255,255,255,.9);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.page-hero__sub a:hover { color: var(--clr-white); }
.page-hero__meta {
    margin-top: 1rem;
    font-size: .9rem;
    color: rgba(255,255,255,.55);
}
.page-hero__badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: var(--clr-white);
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .3rem .8rem;
    border-radius: 50px;
    margin-bottom: .75rem;
    text-decoration: none;
    transition: background var(--transition);
}
.page-hero__badge:hover {
    background: rgba(255,255,255,.25);
    color: var(--clr-white);
}

/* Hero search bar (reusable) */
.page-hero__search {
    display: flex;
    align-items: center;
    max-width: 500px;
    margin: 1.5rem auto 0;
    background: var(--clr-white);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.15);
}
.page-hero__search-icon {
    padding-left: 1.3rem;
    color: var(--clr-gray-400);
    font-size: 1rem;
    flex-shrink: 0;
}
.page-hero__search input {
    flex: 1;
    border: none;
    outline: none;
    padding: .85rem .85rem .85rem .65rem;
    font-size: .95rem;
    font-family: inherit;
    color: var(--clr-gray-700);
    background: transparent;
    min-width: 0;
}
.page-hero__search input::placeholder { color: var(--clr-gray-400); }
.page-hero__search button {
    background: var(--clr-ocean-dark);
    border: none;
    color: var(--clr-white);
    padding: .65rem 1.25rem;
    margin: .3rem .35rem .3rem 0;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}
.page-hero__search button:hover {
    background: var(--clr-ocean-deep);
}

/* Post hero — uses featured image as background */
.page-hero--post {
    min-height: clamp(340px, 42vh, 520px);
}
.page-hero--post.has-featured-image {
    background-size: cover;
    background-position: center top;
}

/* Wave divider */
.page-hero__wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    z-index: 3;
    line-height: 0;
}
.page-hero__wave svg {
    display: block;
    width: 100%;
    height: 35px;
}

/* Timeline Posts (legacy — kept for non-homepage listing) */
.timeline-posts { max-width: 100%; }
.timeline-post {
    background: var(--clr-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.timeline-image-link { display: block; text-decoration: none; }
.timeline-image {
    position: relative;
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius) var(--radius) 0 0;
}
.timeline-image::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
}
.date-badge {
    position: absolute;
    top: 0; left: 0;
    background: var(--clr-ocean);
    color: white;
    text-align: center;
    padding: 10px 15px;
    line-height: 1.2;
}
.date-badge .day { display: block; font-size: 1.5rem; font-weight: 700; }
.date-badge .month { display: block; font-size: .85rem; text-transform: uppercase; }
.timeline-title-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; }
.timeline-title-overlay h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0,0,0,.5);
}
.timeline-image-link:hover .timeline-title-overlay h2 { color: var(--clr-ocean-deep); }
.timeline-meta { padding: 0 20px; font-size: .9rem; color: var(--clr-text-muted); }
.timeline-meta .meta-item { margin-right: 15px; }
.timeline-meta .meta-item i { margin-right: 5px; color: var(--clr-ocean); }
.timeline-meta a { color: var(--clr-text-muted); text-decoration: none; }
.timeline-meta a:hover { color: var(--clr-ocean); }
.timeline-excerpt { padding: 0 20px 20px; }
.timeline-excerpt p { margin: 0; color: var(--clr-text); line-height: 1.8; }

/* Sidebar (for non-homepage pages) */
.blog-sidebar { position: sticky; top: 100px; }
.sidebar-widget {
    background: var(--clr-white);
    padding: 20px;
    margin-bottom: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.widget-title {
    background: var(--clr-ocean);
    color: white;
    padding: 12px 15px;
    margin: -20px -20px 15px -20px;
    font-size: 1rem;
    font-weight: 600;
}
.search-widget { padding: 15px; }
.search-widget .form-control { border-radius: var(--radius); border: 1px solid var(--clr-border); }
.search-widget .btn { border-radius: 0 var(--radius) var(--radius) 0; background: var(--clr-ocean); border: none; }
.recent-posts-list { list-style: none; padding: 0; margin: 0; }
.recent-posts-list li { padding: 10px 0; border-bottom: 1px solid var(--clr-border); }
.recent-posts-list li:last-child { border-bottom: none; }
.recent-posts-list a { color: var(--clr-text); text-decoration: none; font-size: .95rem; display: block; }
.recent-posts-list a:hover { color: var(--clr-ocean); }
.categories-list { list-style: none; padding: 0; margin: 0; }
.categories-list li { padding: 8px 0; border-bottom: 1px solid var(--clr-border); }
.categories-list li:last-child { border-bottom: none; }
.categories-list a { color: var(--clr-text); text-decoration: none; display: flex; justify-content: space-between; }
.categories-list a:hover { color: var(--clr-ocean); }
.categories-list .count { color: var(--clr-text-muted); }
.archives-list { list-style: none; padding: 0; margin: 0; }
.archives-list li { padding: 8px 0; border-bottom: 1px solid var(--clr-border); }
.archives-list li:last-child { border-bottom: none; }
.archives-list a { color: var(--clr-text); text-decoration: none; }
.archives-list a:hover { color: var(--clr-ocean); }

/* Pagination */
.pagination { margin-top: 3rem; }
.pagination .page-link {
    color: var(--clr-ocean);
    border: 1px solid var(--clr-border);
    padding: .65rem 1rem;
    margin: 0 .2rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    font-size: .9rem;
}
.pagination .page-link:hover {
    background: var(--clr-ocean);
    color: white;
    border-color: var(--clr-ocean);
    transform: translateY(-2px);
}
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--clr-ocean), var(--clr-ocean-dark));
    border-color: var(--clr-ocean);
}
.pagination .page-item.disabled .page-link {
    color: var(--clr-text-muted);
    background: var(--clr-gray-50);
}

/* Badges */
.badge { font-weight: 500; padding: .4rem .8rem; border-radius: 6px; }
.badge.bg-primary { background: linear-gradient(135deg, var(--clr-ocean), var(--clr-ocean-dark)) !important; }
.badge.bg-secondary { background-color: var(--clr-gray-500) !important; }

/* Utility overrides */
.text-primary { color: var(--clr-ocean) !important; }
.bg-primary { background: linear-gradient(135deg, var(--clr-ocean), var(--clr-ocean-dark)) !important; }
.border-primary { border-color: var(--clr-ocean) !important; }

/* Loading */
.loading {
    display: inline-block;
    width: 20px; height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: var(--clr-ocean);
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Fade-in animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hp-card { animation: fadeInUp .45s ease-out both; }
.hp-card:nth-child(2) { animation-delay: .06s; }
.hp-card:nth-child(3) { animation-delay: .12s; }
.hp-card:nth-child(4) { animation-delay: .18s; }
.hp-card:nth-child(5) { animation-delay: .24s; }
.hp-card:nth-child(6) { animation-delay: .30s; }
.hp-card:nth-child(7) { animation-delay: .36s; }
.hp-card:nth-child(8) { animation-delay: .42s; }
.hp-card:nth-child(9) { animation-delay: .48s; }

.hp-topic-card { animation: fadeInUp .4s ease-out both; }
.hp-topic-card:nth-child(2) { animation-delay: .06s; }
.hp-topic-card:nth-child(3) { animation-delay: .12s; }
.hp-topic-card:nth-child(4) { animation-delay: .18s; }

/* ============================================
   Responsive — Homepage
   ============================================ */
@media (min-width: 1441px) {
    .hp-hero {
        min-height: clamp(520px, 48vh, 700px);
    }
    .hp-hero__wave svg { height: 56px; }
    .page-hero {
        min-height: clamp(440px, 42vh, 620px);
    }
    .page-hero--post {
        min-height: clamp(460px, 44vh, 640px);
    }
    .page-hero__wave svg { height: 48px; }
}

/* 2K / QHD displays (2560×1440 and above) */
@media (min-width: 2400px) {
    .hp-hero {
        min-height: clamp(600px, 50vh, 800px);
        background-image: url('../images/SandbridgeBlogHeader-2k.jpg');
    }
    .page-hero {
        min-height: clamp(500px, 45vh, 720px);
        background-image: url('../images/SandbridgeBlogHeader-2k.jpg');
    }
    .page-hero--post {
        min-height: clamp(520px, 46vh, 740px);
    }
}

@media (max-width: 1024px) {
    :root {
        --space-section: 4rem;
    }
    .hp-topics__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hp-articles__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hp-featured__inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hp-featured__image img { height: 280px; }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --space-section: 3.25rem;
    }
    .hp-hero { min-height: clamp(300px, 40vh, 420px); }
    .hp-hero__content { padding: 2.5rem 1rem 3.5rem; }
    .hp-hero__eyebrow { font-size: .95rem; }
    .hp-hero__title { font-size: 1.75rem; }
    .hp-hero__sub { font-size: .95rem; margin-bottom: 1.75rem; }
    .hp-hero__search { border-radius: var(--radius); }
    .hp-hero__search button { border-radius: var(--radius); }
    .hp-hero__wave svg { height: 24px; }
    .page-hero { min-height: clamp(280px, 35vh, 380px); }
    .page-hero__content { padding: 2rem 1rem 2.5rem; }
    .page-hero__title { font-size: 1.6rem; }
    .page-hero__sub { font-size: .92rem; }
    .page-hero__search { border-radius: var(--radius); }
    .page-hero__search button { border-radius: var(--radius); }
    .page-hero__wave svg { height: 20px; }
    .page-hero--post { min-height: clamp(260px, 35vh, 380px); }
    .hp-section-title { font-size: 1.55rem; }
    .hp-articles__grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
    .hp-newsletter__form { flex-direction: column; }
    .hp-newsletter__form .hp-btn--white { width: 100%; text-align: center; }
    .hp-featured__title { font-size: 1.4rem; }

    /* Legacy */
    .timeline-image { height: 250px; }
    .timeline-title-overlay h2 { font-size: 1.25rem; }
    .blog-sidebar { position: relative; top: 0; margin-top: 40px; }
    .navbar-brand { font-size: 1.15rem; }
}

@media (max-width: 576px) {
    :root {
        --space-section: 2.75rem;
    }
    .hp-topics__grid { grid-template-columns: 1fr; gap: .75rem; }
    .hp-topic-card { padding: 1rem 1.15rem; }
    .hp-card__img-link img { height: 190px; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; text-align: center; gap: .4rem; }
}
