/* ================================================================
   blog.css — Blog index page styles
   Scoped to .blog-page; linked only from template/pages/blog.php.
   Color tokens match the compiled theme (css/style.scss):
     $red        #921219   category labels, active states, accents
     $darkBlue   #0c3c7f   headings, interactive elements
     $textColor1 #414141   body text
     $border1    #f1f2f3   light borders / card backgrounds
   ================================================================ */

/* ----------------------------------------------------------------
   Page wrapper — clears the fixed 70px nav
   ---------------------------------------------------------------- */
.blog-page {
    padding-top: 35px;
}

/* ================================================================
   HERO  (lives inside .blog-layout, spans grid-column: 1 / -1)
   ================================================================ */
.blog-hero {
    position: relative;
    min-height: 420px;
    background-color: #2b2a2b;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: flex-end;
    margin-bottom: 8px; /* small gap before cards row */
}

.blog-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(12, 60, 127, 0.92) 0%,
        rgba(0, 0, 0, 0.30) 70%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 36px 40px 32px;
    box-sizing: border-box;
}

.blog-hero-inner {
    max-width: 640px;
}

/* Category badge — top-left corner */
.blog-hero-cat {
    position: absolute;
    top: 20px;
    left: 40px;
    background-color: #921219;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 9px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.blog-hero-cat:hover {
    background-color: #7a0f14;
    color: #fff;
}
.blog-hero-cat.is-static,
.blog-hero-cat.is-static:hover {
    background-color: #921219;
    cursor: default;
}

/* Byline (author) */
.blog-hero-byline {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0 0 10px;
}
.blog-hero-byline a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}
.blog-hero-byline a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Title */
.blog-hero-title {
    font-size: 34px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.3px;
    text-transform: uppercase;
    margin: 0 0 20px;
}
.blog-hero-title a {
    color: #fff;
    text-decoration: none;
}
.blog-hero-title a:hover {
    text-decoration: underline;
}

/* Read more link */
.blog-hero-more {
    display: inline-block;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 2px solid #921219;
    padding-bottom: 2px;
    transition: border-color 0.2s ease;
}
.blog-hero-more:hover {
    border-bottom-color: #fff;
    color: #fff;
}

/* ================================================================
   TWO-COLUMN LAYOUT  (CSS Grid)
   Row 1: hero spans both columns
   Row 2: main content | sidebar
   ================================================================ */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    grid-template-rows: auto 1fr;
    column-gap: 36px;
    row-gap: 28px;
    max-width: 1040px;
    margin: 0 auto 60px;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Hero spans both columns */
.blog-hero {
    grid-column: 1 / -1;
    grid-row: 1;
}

.blog-main {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
}

.blog-sidebar {
    grid-column: 2;
    grid-row: 2;
    font-size: 13px;
    color: #939598;
    line-height: 22px;
}

/* ================================================================
   ACTIVE FILTER CHIPS
   ================================================================ */
.blog-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
}

.blog-filter-tag {
    display: inline-block;
    background-color: #f1f2f3;
    color: #414141;
    border: 1px solid #d5d5d5;
    padding: 3px 9px;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.blog-filter-tag:hover {
    background-color: #921219;
    border-color: #921219;
    color: #fff;
}

.blog-clear-all {
    color: #921219;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    margin-left: 4px;
}
.blog-clear-all:hover {
    text-decoration: underline;
}

/* ================================================================
   POST GRID  (two columns)
   ================================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

/* ---- Card ---- */
.blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f2f3;
    background: #fff;
    overflow: hidden;
}

.blog-card-img {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.blog-card:hover .blog-card-img img {
    transform: scale(1.03);
}

.blog-card-body {
    padding: 14px 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.blog-card-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #921219;
    text-decoration: none;
}
.blog-card-cat:hover {
    text-decoration: underline;
}
.blog-card-cat.is-static,
.blog-card-cat.is-static:hover {
    text-decoration: none;
    cursor: default;
}

.blog-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.28;
    margin: 0;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}
.blog-card-title a {
    color: #0c3c7f;
    text-decoration: none;
}
.blog-card-title a:hover {
    color: #921219;
    text-decoration: underline;
}

.blog-card-meta {
    font-size: 11px;
    color: #939598;
    margin: 0;
    letter-spacing: 0.2px;
}
.blog-card-meta a {
    color: #939598;
    text-decoration: none;
}
.blog-card-meta a:hover {
    text-decoration: underline;
}

.blog-card-excerpt {
    font-size: 13px;
    color: #595a5c;
    line-height: 1.45;
    margin: 2px 0 0;
    flex: 1;
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.blog-empty {
    color: #595a5c;
    font-size: 16px;
    padding: 48px 0;
}
.blog-empty a {
    color: #921219;
    text-decoration: none;
}
.blog-empty a:hover {
    text-decoration: underline;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #f1f2f3;
}

.blog-pag-prev,
.blog-pag-next {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #0c3c7f;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #d5d5d5;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.blog-pag-prev:hover,
.blog-pag-next:hover {
    background-color: #0c3c7f;
    border-color: #0c3c7f;
    color: #fff;
}

.blog-pag-num {
    display: inline-block;
    min-width: 30px;
    text-align: center;
    font-size: 13px;
    padding: 5px 7px;
    border: 1px solid #d5d5d5;
    color: #414141;
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.blog-pag-num:hover {
    background-color: #f1f2f3;
}
.blog-pag-num.current {
    background-color: #921219;
    border-color: #921219;
    color: #fff;
    font-weight: 600;
}

.blog-pag-ellipsis {
    color: #939598;
    font-size: 13px;
    padding: 5px 3px;
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.blog-widget {
    margin-bottom: 28px;
}

.blog-widget-heading {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #414141;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f1f2f3;
}

/* -- Search form -- */
.blog-search-bar {
    display: flex;
    border: 1px solid #d5d5d5;
}

.blog-search-bar input[type="search"] {
    flex: 1;
    border: none;
    padding: 7px 10px;
    font-size: 13px;
    color: #414141;
    font-family: inherit;
    outline: none;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}
.blog-search-bar input[type="search"]::placeholder {
    color: #aaa;
}

.blog-search-bar button {
    background-color: #0c3c7f;
    border: none;
    color: #fff;
    padding: 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}
.blog-search-bar button:hover {
    background-color: #921219;
}

/* -- Category / Archive list -- */
.blog-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-widget-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f2f3;
    padding: 5px 0;
}

.blog-widget-list li a {
    flex: 1;
    color: #939598;
    font-size: 13px;
    text-decoration: none;
    line-height: 1.4;
}
.blog-widget-list li a:hover {
    color: #921219;
}
.blog-widget-list li.is-active a {
    color: #921219;
    font-weight: 600;
}

.blog-widget-arrow {
    color: #d5d5d5;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    padding-left: 4px;
}
.blog-widget-list li.is-active .blog-widget-arrow {
    color: #921219;
}

/* -- Tag cloud -- */
.blog-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.blog-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background-color: #f1f2f3;
    color: #595a5c;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.blog-tag:hover,
.blog-tag.is-active {
    background-color: #921219;
    border-color: #921219;
    color: #fff;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet: narrow sidebar */
@media (min-width: 768px) and (max-width: 900px) {
    .blog-layout {
        grid-template-columns: 1fr 180px;
        column-gap: 24px;
        padding: 0 16px;
    }
}

/* Mobile: stack hero then single column, sidebar last */
@media (max-width: 767px) {
    .blog-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        row-gap: 24px;
        margin: 0 auto 40px;
    }

    .blog-hero {
        grid-column: 1;
    }

    .blog-main {
        grid-column: 1;
        grid-row: 2;
    }

    .blog-sidebar {
        grid-column: 1;
        grid-row: 3;
        width: 100%;
    }

    .blog-hero {
        min-height: 280px;
    }
    .blog-hero-overlay {
        padding: 20px;
    }
    .blog-hero-title {
        font-size: 22px;
    }
    .blog-hero-cat {
        top: 12px;
        left: 20px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }
}
