/* ============================================
   FRESH BLOG PAGE
   Based on Stitch Design c0c2a248
   ============================================ */

:root {
    --blog-primary: #004A99;
    --blog-accent: #E30613;
    --blog-surface: #F8F9FA;
    --blog-radius: 12px;
    --blog-shadow: 0 4px 20px -2px rgba(0, 74, 153, 0.08), 0 2px 8px -1px rgba(0, 0, 0, 0.04);
    --blog-shadow-hover: 0 8px 30px -4px rgba(0, 74, 153, 0.14), 0 4px 12px -2px rgba(0, 0, 0, 0.06);
}

/* ── Page Background ── */
.blog-wrapper.blog-archive {
    background: var(--blog-surface);
}

/* ── Article Card ── */
.blog-archive article.post {
    background: #fff !important;
    border-radius: var(--blog-radius) !important;
    box-shadow: var(--blog-shadow) !important;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    margin-bottom: 32px !important;
}

.blog-archive article.post:hover {
    box-shadow: var(--blog-shadow-hover) !important;
    transform: translateY(-3px);
}

/* Article inner padding */
.blog-archive article .article-inner {
    padding: 0 !important;
}

/* ── Image ── */
.blog-archive article .entry-image {
    overflow: hidden;
    margin: 0 !important;
    border-radius: var(--blog-radius) var(--blog-radius) 0 0;
}

.blog-archive article .entry-image img {
    width: 100% !important;
    transition: transform 0.5s ease;
}

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

/* Hide Flatsome date badge on image */
.blog-archive article .badge.post-date {
    display: none !important;
}

/* ── Entry Header (text area) ── */
.blog-archive article .entry-header,
.blog-archive article .entry-content,
.blog-archive article .entry-meta {
    padding-left: 32px !important;
    padding-right: 32px !important;
}

.blog-archive article .entry-header {
    padding-top: 28px !important;
    text-align: left !important;
}

.blog-archive article .entry-header-text {
    text-align: left !important;
}

/* ── Category Tag ── */
.blog-archive article .entry-category {
    text-align: left !important;
    margin-bottom: 12px !important;
}

.blog-archive article .entry-category a {
    display: inline-block;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--blog-primary) !important;
    border-left: 3px solid var(--blog-primary);
    padding-left: 10px;
    text-decoration: none;
}

/* ── Title ── */
.blog-archive article .entry-title {
    text-align: left !important;
}

.blog-archive article .entry-title a {
    color: var(--blog-primary) !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-archive article:hover .entry-title a {
    color: #003575 !important;
}

/* ── Divider ── */
.blog-archive article .entry-divider {
    display: none !important;
}

/* ── Entry Meta (date/author) ── */
.blog-archive article .entry-meta.is-xsmall {
    text-align: left !important;
    font-size: 12px !important;
    color: #94a3b8 !important;
    margin-bottom: 12px !important;
}

.blog-archive article .entry-meta a {
    color: #94a3b8 !important;
}

.blog-archive article .entry-meta a:hover {
    color: var(--blog-primary) !important;
}

/* ── Excerpt ── */
.blog-archive article .entry-summary {
    text-align: left !important;
}

.blog-archive article .entry-summary p {
    color: #64748b !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Read More Button ── */
.blog-archive article .entry-content .text-center {
    text-align: left !important;
}

.blog-archive article .more-link {
    display: inline-flex !important;
    align-items: center;
    padding: 10px 24px !important;
    border: 2px solid var(--blog-primary) !important;
    color: var(--blog-primary) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 4px !important;
    background: transparent !important;
    transition: all 0.25s ease;
    text-decoration: none;
    margin-bottom: 28px;
}

.blog-archive article .more-link:hover {
    background: var(--blog-primary) !important;
    color: #fff !important;
}

/* Hide arrow in read more */
.blog-archive article .more-link .meta-nav {
    display: none;
}

/* ── Bottom Entry Meta ── */
.blog-archive article .entry-meta.clearfix {
    padding-bottom: 24px !important;
    border-top: 1px solid #f1f5f9;
    margin-top: 0 !important;
    padding-top: 16px !important;
    font-size: 11px !important;
    color: #94a3b8 !important;
}

/* ══════════════════════════════════════════
   SIDEBAR WIDGETS — Auto-style ALL widgets
   ══════════════════════════════════════════ */

#secondary.widget-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Every widget = white card with rounded corners + shadow */
#secondary .widget {
    background: #fff !important;
    border-radius: var(--blog-radius) !important;
    box-shadow: var(--blog-shadow) !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
    padding: 24px !important;
    overflow: hidden;
}

/* Widget titles */
#secondary .widget h2,
#secondary .widget .widget-title,
#secondary .widget .wp-block-heading {
    font-size: 11px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--blog-primary) !important;
    margin-bottom: 16px !important;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

/* ── Search Widget ── */
#secondary .widget_search .wp-block-search__label {
    font-size: 11px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--blog-primary) !important;
    margin-bottom: 12px !important;
}

/* Flex container — forces input + button same height */
#secondary .widget_search .wp-block-search__inside-wrapper {
    display: flex !important;
    align-items: stretch !important;
    gap: 0 !important;
}

#secondary .widget_search .wp-block-search__input {
    flex: 1 !important;
    background: var(--blog-surface) !important;
    border: 1px solid #e2e8f0 !important;
    border-right: none !important;
    border-radius: 6px 0 0 6px !important;
    padding: 0 16px !important;
    height: 44px !important;
    font-size: 13px !important;
    transition: border-color 0.2s;
    box-sizing: border-box !important;
}

#secondary .widget_search .wp-block-search__input:focus {
    border-color: var(--blog-primary) !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 74, 153, 0.1) !important;
}

#secondary .widget_search .wp-block-search__button {
    background: var(--blog-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 6px 6px 0 !important;
    padding: 0 16px !important;
    height: 44px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    box-sizing: border-box !important;
}

#secondary .widget_search .wp-block-search__button:hover {
    background: #003575 !important;
}

/* ── Recent Posts Widget ── */
#secondary .wp-block-latest-posts__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#secondary .wp-block-latest-posts__list li {
    padding: 0 !important;
    margin: 0 !important;
}

#secondary .wp-block-latest-posts__post-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #374151 !important;
    text-decoration: none;
    line-height: 1.5 !important;
    display: block;
    transition: color 0.2s;
}

#secondary .wp-block-latest-posts__post-title:hover {
    color: var(--blog-primary) !important;
}

/* ── Comments Widget ── */
#secondary .wp-block-latest-comments {
    padding: 0 !important;
}

#secondary .wp-block-latest-comments__comment {
    font-size: 13px !important;
    line-height: 1.5;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

#secondary .wp-block-latest-comments__comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

#secondary .wp-block-latest-comments__comment-author {
    font-weight: 700 !important;
    color: #374151 !important;
}

#secondary .wp-block-latest-comments__comment-link {
    color: var(--blog-primary) !important;
    font-weight: 500;
}

/* ══════════════════════════════════════
   NEWSLETTER CTA WIDGET
   ══════════════════════════════════════ */

#secondary .widget.fresh-newsletter-widget {
    background: var(--blog-primary) !important;
    color: #fff !important;
    padding: 32px 24px !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}

/* Logo watermark background */
#secondary .fresh-newsletter-widget::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

#secondary .fresh-newsletter-widget .newsletter-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin-bottom: 8px;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

#secondary .fresh-newsletter-widget .newsletter-desc {
    font-size: 12px;
    color: rgba(191, 219, 254, 0.8);
    line-height: 1.6;
    margin-bottom: 20px;
}

#secondary .fresh-newsletter-widget .newsletter-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    margin-bottom: 12px;
    transition: background 0.2s;
}

#secondary .fresh-newsletter-widget .newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#secondary .fresh-newsletter-widget .newsletter-input:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

#secondary .fresh-newsletter-widget .newsletter-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--blog-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
}

#secondary .fresh-newsletter-widget .newsletter-btn:hover {
    background: #c50510;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(227, 6, 19, 0.4);
}

/* ══════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════ */

.blog-archive .page-numbers,
.blog-archive .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.blog-archive .page-numbers li {
    list-style: none;
}

.blog-archive .page-numbers a,
.blog-archive .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none;
    transition: all 0.2s;
}

.blog-archive .page-numbers a {
    background: #fff;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.blog-archive .page-numbers a:hover {
    border-color: var(--blog-primary);
    color: var(--blog-primary);
}

.blog-archive .page-numbers span.current {
    background: var(--blog-primary) !important;
    color: #fff !important;
    border: none;
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 768px) {

    .blog-archive article .entry-header,
    .blog-archive article .entry-content,
    .blog-archive article .entry-meta {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .blog-archive article .entry-title a {
        font-size: 18px !important;
    }

    .blog-archive article .more-link {
        margin-bottom: 20px;
    }

    .blog-archive article .entry-meta.clearfix {
        padding-bottom: 16px !important;
    }

    #secondary .widget {
        padding: 20px !important;
    }
}