/* Blog listing hero — carbon-copied from legacy blogs.php embedded <style>
   (Flying411 staging b1381d6a, "uniform 550px hero sections across public
   pages"). The dark Unsplash photo hero replaces the earlier bespoke
   light .blog-hero. Search uses the shared React SearchSuggestions component
   (search-suggestions.css) wired to /blog-search-suggestions. */

/* Legacy renders the whole blog in EB Garamond (blogs.php
   *{font-family:"EB Garamond",serif !important}). Scoped to the blog's own
   sections (hero + filter + content) — the shared SiteHeader/SiteFooter already
   use EB Garamond via their own styles, so we don't touch their icons. */
.hero,
.hero *,
.featured-header,
.featured-header *,
.blogs-container,
.blogs-container * {
    font-family: "EB Garamond", serif;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('https://images.unsplash.com/photo-1569154941061-e231b4725ef1?auto=format&fit=crop&q=80&w=1200')
        center/cover no-repeat;
    /* Uniform with the other heroes: fixed 550px, content anchored to the
       bottom so search→bottom is a fixed 120px, top padding clears the
       130px absolute nav. */
    min-height: 550px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    color: #ffffff;
    padding: 160px 16px 120px;
    box-sizing: border-box;
}

.hero-content h1 {
    font-family: "EB Garamond", serif !important;
    font-size: 3.5rem;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 0;
    font-weight: 300;
    opacity: 0.9;
}

/* Search pill — shared hero-search look (base rules live in home.css/aircraft.css;
   replicated here so the blog hero's standalone page styles itself). The dropdown
   + responsive width come from search-suggestions.css. */
.hero-content .search-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 60px;          /* match the other heroes: fixed gap above search */
}

.hero-content .search-wrapper .serchicon {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    pointer-events: none;
}

.hero-content .search-input {
    padding: 16px 15px;
    width: 550px;
    max-width: 80vw;
    border-radius: 30px !important;
    border: none;
    font-size: 17px;
    font-weight: 400;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    outline: 0;
    background: #fff;
    color: #142238;
    text-align: center;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* ── Category filter — carbon-copied from legacy .featured-header / .nav-pills /
   .pill / .sub-pill. Parents live in ONE horizontally-scrollable row; the active
   parent (or active child's parent) expands its sub-pills row below. Legacy
   :root vars substituted with their literal values. ── */
.featured-header {
    max-width: 1200px;
    margin: -40px 20px 40px;   /* negative top floats the card over the hero bottom */
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

@media (min-width: 1200px) {
    .featured-header {
        max-width: 1160px;
        margin-left: auto;
        margin-right: auto;
    }
}

.featured-header h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #64748b;
    margin-bottom: 20px;
    text-align: left;
}

.nav-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.nav-pills::-webkit-scrollbar {
    display: none;
}

.pill {
    padding: 10px 20px;
    border-radius: 50px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.pill:hover {
    background: #e2e8f0;
}

.pill.active {
    background: #2843a7;
    color: #ffffff;
}

.pill.parent-active {
    background: #f8fafc;
    color: #2843a7;
    border-color: rgba(40, 67, 167, 0.25);
    box-shadow: 0 1px 4px rgba(40, 67, 167, 0.08);
}

.pill-count {
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.08);
    color: #64748b;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.3;
}

.pill.active .pill-count {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.pill.parent-active .pill-count {
    background: rgba(40, 67, 167, 0.1);
    color: #2843a7;
}

.pill-chevron {
    font-size: 0.7em;
    transition: transform 0.2s ease;
    display: inline-block;
}

.pill-chevron.expanded {
    transform: rotate(180deg);
}

.sub-pills {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.sub-pill {
    padding: 6px 14px;
    font-size: 0.8rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
}

.sub-pill:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #334155;
}

.sub-pill.active {
    background: #2843a7;
    color: #ffffff;
    border-color: #2843a7;
}

.sub-pill .pill-count {
    font-size: 0.65rem;
    padding: 1px 6px;
}

/* ── Content area — carbon-copied from legacy blogs.php (.blogs-container =
   two-column main + right "Popular Articles" sidebar; .article-grid of
   .small-card; legacy pagination). All rules scoped under .blogs-container so
   the generic class names (.meta/.read-more/.category-tag/.pagination) can't
   collide with other pages' globals. Legacy :root vars inlined. ── */
.blogs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
    display: grid;
    grid-template-columns: 8fr 3.5fr; /* ~70% main / ~30% sidebar */
    gap: 40px;
}

.blogs-container .section-title {
    margin-bottom: 24px;
}

.blogs-container .section-title .eyebrow {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 4px;
}

.blogs-container .section-title h2 {
    font-size: 1.9rem;
    color: #0f172a;
    line-height: 1.15;
}

.blogs-container .section-title .result-count {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

.blogs-container .blog-search-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #334155;
}

/* Article grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.small-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.small-card:hover {
    transform: translateY(-5px);
}

.small-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 13px;
    background-color: #eef4f8;
    display: block;
}

.blogs-container .category-tag {
    display: inline-block;
    background: #2843a7;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
}

.card-content h4 {
    font-size: 17px;
    margin: 12px 0 8px;
    color: #0f172a;
    line-height: 1.3;
}

.blogs-container .meta {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 12px;
    display: block;
}

.card-content p {
    font-size: 16px;
    color: #475569;
    margin-bottom: 15px;
    min-height: 3rem;
    line-height: 1.6;
}

.blogs-container .read-more {
    color: #2843a7;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.blogs-container .read-more:hover {
    text-decoration: underline;
}

.blogs-container .empty-results {
    color: #64748b;
    padding: 20px 0;
}

/* Card links shouldn't inherit underline from globals */
.small-card a {
    text-decoration: none;
}

/* Right sidebar — "Popular Articles" widget */
.sidebar-widget {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-left: 4px solid #2843a7;
    padding-left: 15px;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pop-article {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.pop-article:last-child {
    margin-bottom: 0;
}

.pop-article img {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    background-color: #eef4f8;
    flex-shrink: 0;
}

.pop-article a {
    text-decoration: none;
}

.pop-article h5 {
    font-size: 0.9rem;
    line-height: 1.3;
    color: #2843a7;
    margin-bottom: 4px;
}

.pop-article span {
    font-size: 0.75rem;
    color: #64748b;
}

/* Pagination */
.blogs-container .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 30px;
}

.blogs-container .pagination a,
.blogs-container .pagination span {
    padding: 6px 12px;
    border: 1px solid #ddd;
    color: #4747a1;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

.blogs-container .pagination a.active {
    background-color: #4747a1;
    color: #ffffff;
    font-weight: 700;
}

.blogs-container .pagination span.dots {
    color: #999;
    border: none;
}

.blogs-container .pagination a:hover:not(.active) {
    background-color: #f1f1f1;
}

/* Responsive: stack sidebar below main */
@media (max-width: 992px) {
    .blogs-container {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .article-grid {
        grid-template-columns: 1fr;
    }
    .blogs-container .section-title h2 {
        font-size: 1.5rem;
    }
    .pop-article img {
        width: 70px;
        height: 50px;
    }
}
