/**
 * archive-blog.css — Blog Index / Archive Styles
 * Body Symmetry MD
 *
 * Loaded only on archive/blog pages via functions.php conditional.
 * All classes prefixed with "blog-" to prevent conflicts with
 * other templates (pillar pages, single posts, homepage).
 */

/* ============================================================
   HERO
   ============================================================ */
.blog-hero {
    background: linear-gradient(135deg, #000 0%, #1a1a1a 50%, #2d2d2d 100%);
    color: var(--brand-white);
    padding: 10rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23CC0000' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.blog-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.blog-hero-badge {
    display: inline-block;
    background: var(--brand-red);
    color: var(--brand-white);
    padding: 0.375rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.blog-hero h1 {
    color: var(--brand-white);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.25rem;
}

.blog-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 1.75rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Quick Answer */
.blog-quick-answer {
    background: rgba(16, 118, 158, 0.15);
    border-left: 4px solid var(--brand-blue);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem auto;
    max-width: 700px;
    text-align: left;
    border-radius: 0 8px 8px 0;
}

.blog-quick-answer-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-blue);
    margin-bottom: 0.5rem;
}

.blog-quick-answer p:last-child {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.9);
}

/* Search */
.blog-hero-search {
    margin: 1.75rem auto;
    max-width: 580px;
}

.blog-search-form {
    display: flex;
    gap: 0;
    background: var(--brand-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.blog-search-form input[type="search"] {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    font-size: 1rem;
    font-family: 'Source Sans 3', sans-serif;
    color: var(--brand-black);
    background: transparent;
    min-width: 0;
}

.blog-search-form input[type="search"]:focus {
    outline: none;
}

.blog-search-form button {
    border-radius: 0;
    flex-shrink: 0;
}

/* Stats */
.blog-hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.blog-stat { text-align: center; }

.blog-stat-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-red);
    line-height: 1;
}

.blog-stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 0.375rem;
}

/* Mobile hero */
@media (max-width: 768px) {
    .blog-hero {
        padding: 14rem 0 3rem;
    }
    .blog-hero-stats {
        gap: 1.5rem;
    }
    .blog-stat-number {
        font-size: 1.875rem;
    }
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.blog-breadcrumbs {
    background: var(--brand-grey);
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--brand-grey-dark, #d0d0d0);
}

.blog-breadcrumbs-list {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    list-style: none;
    font-size: 0.875rem;
}

.blog-breadcrumbs-list li:not(:last-child)::after {
    content: '›';
    margin-left: 0.375rem;
    color: #999;
}

.blog-breadcrumbs-list a {
    color: #666;
    text-decoration: none;
}

.blog-breadcrumbs-list a:hover { color: var(--brand-red); }

.blog-breadcrumbs-list li:last-child {
    color: var(--brand-black);
    font-weight: 500;
}

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
.blog-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--brand-black);
    margin-bottom: 0.75rem;
}

.blog-section-header p {
    font-size: 1.0625rem;
    color: var(--text-secondary, #5a5556);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================
   TOPIC CLUSTERS
   ============================================================ */
.blog-topics {
    background: var(--brand-white);
    padding: 5rem 0;
}

.blog-topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.blog-topic-card {
    background: var(--brand-white);
    border: 1px solid var(--brand-grey);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}


.blog-topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brand-grey);
    transition: background 0.3s ease;
}

.blog-topic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.blog-topic-card:hover::before,
.blog-topic-card.featured::before {
    background: var(--brand-red);
}

.blog-topic-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
}

.blog-topic-icon {
    width: 56px;
    height: 56px;
    background: var(--brand-blue-light, rgba(16,118,158,0.1));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

.blog-topic-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.blog-topic-card h3 a {
    color: var(--brand-black);
    text-decoration: none;
}

.blog-topic-card h3 a:hover { color: var(--brand-red); }

.blog-topic-description {
    color: #666;
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.blog-topic-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.875rem;
    color: #666;
}

.blog-topic-meta a {
    color: var(--brand-blue) !important;
    text-decoration: none;
    pointer-events: all;
}

.blog-topic-meta a:hover {
    color: var(--brand-red) !important;
}

.blog-topic-count,
a.blog-topic-count {
    font-weight: 600;
    color: var(--brand-blue) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

a.blog-topic-count::after {
    content: ' →';
    font-size: 0.8125rem;
}

a.blog-topic-count:hover {
    color: var(--brand-red) !important;
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .blog-topics-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-topic-card.featured { grid-column: span 2; }
}

@media (max-width: 640px) {
    .blog-topics-grid { grid-template-columns: 1fr; }
    .blog-topic-card.featured { grid-column: span 1; }
}

/* ============================================================
   FEATURED ARTICLES — 5-up portrait grid
   ============================================================ */
.blog-featured-articles {
    background: linear-gradient(180deg, var(--brand-grey) 0%, var(--brand-white) 100%);
    padding: 2rem 0 4rem;
}

.blog-featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.blog-featured-header h2 {
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-featured-header h2::before {
    content: '';
    display: block;
    width: 4px;
    height: 22px;
    background: var(--brand-red);
    border-radius: 2px;
    flex-shrink: 0;
}

.blog-view-all {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-view-all:hover { color: var(--brand-red); }

.blog-view-all svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.blog-view-all:hover svg { transform: translateX(3px); }

.blog-featured-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.blog-featured-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/5;
    background: var(--brand-black);
    display: block;
    text-decoration: none;
}

.blog-featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-featured-card:hover img {
    transform: scale(1.08);
    opacity: 1;
}

.blog-featured-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a, #333);
}

.blog-featured-card-content {
    position: absolute;
    inset: 0;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(0deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}

.blog-featured-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--brand-red);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 3px;
}

.blog-featured-card h3 {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-featured-card h3 a {
    color: white;
    text-decoration: none;
}

.blog-featured-card:hover h3 a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-read-time {
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.7);
    margin-top: 6px;
    display: block;
}

@media (max-width: 1024px) {
    .blog-featured-grid { grid-template-columns: repeat(3, 1fr); }
    .blog-featured-card:nth-child(4),
    .blog-featured-card:nth-child(5) { display: none; }
}

@media (max-width: 640px) {
    .blog-featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .blog-featured-card:nth-child(4),
    .blog-featured-card:nth-child(5) { display: none; }
    .blog-featured-card:nth-child(3) { display: none; }
    .blog-featured-card h3 { font-size: 0.8125rem; }
}

/* ============================================================
   RECENT ARTICLES
   ============================================================ */
.blog-recent-articles {
    background: var(--brand-white);
    padding: 5rem 0;
}

/* Filter Tabs */
.blog-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 0.625rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.blog-filter-tab {
    padding: 0.5rem 1.25rem;
    background: var(--brand-grey);
    border: none;
    border-radius: 50px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--brand-black);
    text-decoration: none;
    display: inline-block;
}

.blog-filter-tab:hover,
.blog-filter-tab.active {
    background: var(--brand-red);
    color: var(--brand-white) !important;
    text-decoration: none;
}

/* Article Grid */
.blog-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

@keyframes blogCardFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.blog-article-card {
    background: var(--brand-white);
    border: 1px solid var(--brand-grey);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    border-color: transparent;
}

.blog-article-image-link { display: block; }

.blog-article-image {
    height: 210px;
    overflow: hidden;
    background: var(--brand-grey);
}

.blog-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-article-card:hover .blog-article-image img {
    transform: scale(1.05);
}

.blog-article-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-article-placeholder svg {
    width: 48px;
    height: 48px;
    color: #bbb;
}

.blog-article-content {
    padding: 1.5rem;
}

.blog-article-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-red);
    text-decoration: none;
    margin-bottom: 0.625rem;
}

.blog-article-category:hover { color: var(--brand-red-dark); }

.blog-article-card h3 {
    font-size: 1.125rem;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.blog-article-card h3 a {
    color: var(--brand-black);
    text-decoration: none;
}

.blog-article-card h3 a:hover { color: var(--brand-red); }

.blog-article-excerpt {
    color: #666;
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-article-footer {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.8125rem;
    color: #888;
    flex-wrap: wrap;
}

.blog-article-date { color: #888; }
.blog-article-readtime { color: #aaa; }

.blog-article-read-more {
    margin-left: auto;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--brand-blue);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.blog-article-read-more:hover { color: var(--brand-red); }

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.blog-pagination .page-numbers li a,
.blog-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid var(--brand-grey);
    border-radius: 8px;
    font-size: 0.9375rem;
    color: var(--brand-black);
    text-decoration: none;
    transition: all 0.2s ease;
}

.blog-pagination .page-numbers li a:hover {
    background: var(--brand-red);
    color: var(--brand-white);
    border-color: var(--brand-red);
}

.blog-pagination .page-numbers li span.current {
    background: var(--brand-red);
    color: var(--brand-white);
    border-color: var(--brand-red);
    font-weight: 700;
}

.blog-pagination .page-numbers li span.dots {
    border-color: transparent;
}

/* Category page CTA buttons */
.blog-category-ctas {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

/* No posts */
.blog-no-posts {
    text-align: center;
    padding: 4rem 0;
    color: #666;
    font-size: 1.0625rem;
}

.blog-no-posts a { color: var(--brand-blue); }

/* Responsive grid */
@media (max-width: 1024px) {
    .blog-articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .blog-articles-grid { grid-template-columns: 1fr; }
    .blog-filter-tabs { gap: 0.5rem; }
    .blog-filter-tab { font-size: 0.8125rem; padding: 0.375rem 1rem; }
}

/* ============================================================
   FAQ
   ============================================================ */
.blog-faq {
    background: var(--brand-grey);
    padding: 5rem 0;
}

.blog-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.blog-faq-item {
    background: var(--brand-white);
    border-radius: 12px;
    padding: 1.75rem;
}

.blog-faq-question {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--brand-black);
    margin-bottom: 0.75rem;
}

.blog-faq-answer {
    color: #666;
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .blog-faq-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.blog-newsletter {
    background: linear-gradient(135deg, var(--brand-black) 0%, #1a1a1a 100%);
    color: var(--brand-white);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.blog-newsletter::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23CC0000' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.blog-newsletter-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.blog-newsletter-content h2 {
    color: var(--brand-white);
    margin-bottom: 1rem;
}

.blog-newsletter-content p {
    opacity: 0.85;
    margin-bottom: 1.75rem;
    line-height: 1.7;
}

.blog-newsletter-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-newsletter-benefits li {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
    font-size: 0.9375rem;
    opacity: 0.9;
}

.blog-newsletter-benefits li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: var(--brand-red);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.blog-newsletter-form-card {
    background: var(--brand-white);
    border-radius: 16px;
    padding: 2.5rem;
    color: var(--brand-black);
}

.blog-newsletter-form-card h3 {
    font-size: 1.375rem;
    margin-bottom: 1.5rem;
}

.blog-form-group {
    margin-bottom: 1rem;
}

.blog-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
}

.blog-form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--brand-grey-dark, #d0d0d0);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Source Sans 3', sans-serif;
    transition: border-color 0.2s ease;
}

.blog-form-group input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(16,118,158,0.1);
}

.blog-newsletter-form-card .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.blog-form-disclaimer {
    font-size: 0.75rem;
    color: #888;
    text-align: center;
    margin-top: 0.875rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .blog-newsletter-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* ============================================================
   LOCATIONS BANNER
   ============================================================ */
.blog-locations-banner {
    background: rgba(16, 118, 158, 0.08);
    padding: 2.5rem 0;
    text-align: center;
    border-top: 1px solid rgba(16,118,158,0.15);
}

.blog-locations-banner h3 {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    color: var(--brand-black);
}

.blog-locations-list {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.blog-location-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--brand-white);
    padding: 0.5rem 1.125rem;
    border-radius: 50px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--brand-black);
    text-decoration: none;
    border: 1px solid var(--brand-grey);
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.blog-location-tag:hover {
    background: var(--brand-blue);
    color: var(--brand-white);
    border-color: var(--brand-blue);
}

.blog-location-tag svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ============================================================
   ACCESSIBILITY UTILITY
   ============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ============================================================
   SEARCH — no results state
   ============================================================ */
.search-no-results {
    text-align: center;
    padding: 5rem 0;
}

.search-no-results svg {
    width: 64px;
    height: 64px;
    color: #ccc;
    margin: 0 auto 1.5rem;
}

.search-no-results h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.search-no-results p {
    color: #666;
    font-size: 1.0625rem;
}

.search-no-results a { color: var(--brand-blue); }

/* Slightly less top padding on search hero since it's simpler */
.search-hero {
    padding-bottom: 3rem;
}
