/* ==========================================================================
   OVBRYJOD EDUCATION HUB LIMITED — NEWS & BLOG STYLESHEET
   File: css/blog.css
   ========================================================================== */

/* Global container & document overflow guards */
.blog-container,
.blog-page-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    box-sizing: border-box;
}

/* ==========================================================================
   HERO SECTION (#blog-hero)
   ========================================================================== */
#blog-hero {
    width: 100%;
    background: linear-gradient(135deg, #0d1b33 0%, #1a2b4a 55%, #1d4ed8 100%);
    padding: 72px 0 84px 0;
    position: relative;
    overflow: hidden;
}

#blog-hero::after {
    content: '';
    position: absolute;
    right: -100px;
    top: -100px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(230, 126, 34, 0.22) 0%, rgba(230, 126, 34, 0) 70%);
    pointer-events: none;
}

#blog-hero::before {
    content: '';
    position: absolute;
    left: -80px;
    bottom: -80px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, rgba(37, 99, 235, 0) 70%);
    pointer-events: none;
}

#blog-hero-inner {
    width: 90%;
    max-width: 1240px;
    margin: auto;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 52px;
    box-sizing: border-box;
}

#blog-hero-text {
    flex: 1.25;
    min-width: 0;
}

#blog-hero-text h1 {
    font-size: 40px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.22;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

#blog-hero-text h1 span {
    color: #e67e22;
    background: linear-gradient(135deg, #f39c12 0%, #ffbe76 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-hero-motto {
    font-size: 17px;
    font-weight: 600;
    color: #93c5fd;
    margin-bottom: 16px;
    letter-spacing: 0.2px;
}

#blog-hero-text p {
    font-size: 15.5px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.75;
    margin-bottom: 24px;
    max-width: 620px;
}

.blog-hero-trust-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.blog-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 7px 16px;
    border-radius: 9999px;
    color: #e2e8f0;
    font-size: 12.5px;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.blog-trust-item svg {
    stroke: #ffbe76;
    flex-shrink: 0;
}

/* Hero Spotlight Lead (Right Column) */
#blog-hero-spotlight {
    flex: 0.95;
    min-width: 320px;
    position: relative;
    box-sizing: border-box;
}

.blog-spotlight-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.blog-spotlight-card:hover {
    transform: translateY(-4px);
}

.blog-spotlight-media {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: #0b2d4e;
}

.blog-spotlight-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.blog-spotlight-card:hover .blog-spotlight-media img {
    transform: scale(1.05);
}

.blog-spotlight-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #e67e22;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 9999px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.blog-spotlight-body {
    padding: 22px 24px;
}

.blog-spotlight-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-spotlight-title {
    font-size: 18px;
    font-weight: 800;
    color: #0b2d4e;
    line-height: 1.35;
    margin-bottom: 10px;
}

.blog-spotlight-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.author-mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.author-mini-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #0b2d4e;
}

.read-more-link {
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 700;
    color: #e67e22;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   FILTER & SEARCH TOOLBAR
   ========================================================================== */
.blog-filter-bar {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 0;
    box-shadow: 0 2px 8px rgba(11, 45, 78, 0.03);
}

.blog-filter-inner {
    width: 90%;
    max-width: 1240px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.blog-pills-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.blog-pills-wrap::-webkit-scrollbar {
    display: none;
}

.blog-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.blog-pill-btn svg {
    stroke: currentColor;
    flex-shrink: 0;
}

.blog-pill-btn:hover {
    background: #f1f5f9;
    color: #0b2d4e;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.blog-pill-btn.active {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(230, 126, 34, 0.3);
}

.blog-pill-btn.active svg {
    stroke: #ffffff;
}

/* Inline article search */
.blog-search-box {
    position: relative;
    width: 260px;
}

.blog-search-box input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    border-radius: 9999px;
    border: 1.5px solid #e2e8f0;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.blog-search-box input:focus {
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}

.blog-search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    stroke: #94a3b8;
    pointer-events: none;
}

/* ==========================================================================
   MAIN ARTICLES SECTION & GRID
   ========================================================================== */
.blog-main-section {
    width: 90%;
    max-width: 1240px;
    margin: 40px auto 70px;
    box-sizing: border-box;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 28px;
    box-sizing: border-box;
}

/* Article Card */
.article-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 18px rgba(11, 45, 78, 0.05);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(11, 45, 78, 0.12);
    border-color: rgba(230, 126, 34, 0.4);
}

.article-card-media {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #0b2d4e;
}

.article-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

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

.article-category-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(11, 45, 78, 0.9);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
    backdrop-filter: blur(6px);
    z-index: 2;
}

.article-read-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 9999px;
    backdrop-filter: blur(6px);
    z-index: 2;
}

.article-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 600;
}

.article-card-title {
    font-size: 18px;
    font-weight: 800;
    color: #0b2d4e;
    line-height: 1.35;
    margin-bottom: 10px;
}

.article-card-excerpt {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

/* Author footer inside article card */
.article-card-author-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.author-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.author-name {
    font-size: 13px;
    font-weight: 700;
    color: #0b2d4e;
    line-height: 1.2;
}

.author-title {
    font-size: 11.5px;
    color: #64748b;
}

.btn-read-article {
    font-size: 12.5px;
    font-weight: 700;
    color: #e67e22;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s;
}

.article-card:hover .btn-read-article {
    transform: translateX(3px);
}

/* ==========================================================================
   ARTICLE READING DRAWER / MODAL (#articleModal)
   ========================================================================== */
.article-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 29, 51, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-sizing: border-box;
}

.article-modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.article-modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    border-radius: 24px;
    overflow-y: auto;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
    transform: translateY(24px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.article-modal-backdrop.show .article-modal-card {
    transform: translateY(0);
}

.article-modal-header {
    background: linear-gradient(135deg, #0b2d4e 0%, #163b61 100%);
    color: #ffffff;
    padding: 24px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.article-modal-header h3 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #f39c12;
    margin: 0;
}

.article-modal-body {
    padding: 36px 40px;
}

.modal-article-title {
    font-size: 28px;
    font-weight: 800;
    color: #0b2d4e;
    line-height: 1.25;
    margin-bottom: 16px;
}

.modal-article-meta-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

.modal-article-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 28px;
    border: 1px solid #e2e8f0;
}

.modal-article-content {
    font-size: 16px;
    line-height: 1.85;
    color: #334155;
}

.modal-article-content h3 {
    font-size: 20px;
    font-weight: 800;
    color: #0b2d4e;
    margin: 28px 0 12px;
}

.modal-article-content blockquote {
    background: #f8fafc;
    border-left: 4px solid #e67e22;
    padding: 16px 22px;
    margin: 24px 0;
    font-size: 16.5px;
    font-style: italic;
    color: #0b2d4e;
    border-radius: 0 12px 12px 0;
}

.modal-article-content ol,
.modal-article-content ul {
    margin: 16px 0 20px 24px;
}

.modal-article-content li {
    margin-bottom: 8px;
}

/* Author signature box at bottom of article */
.article-author-bio-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 36px;
}

.author-bio-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e67e22;
}

.author-bio-name {
    font-size: 16px;
    font-weight: 800;
    color: #0b2d4e;
    margin-bottom: 4px;
}

.author-bio-role {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

/* ==========================================================================
   NEWSLETTER STRIP
   ========================================================================== */
.blog-newsletter-section {
    width: 100%;
    background: linear-gradient(135deg, #0b2d4e 0%, #163b61 100%);
    padding: 56px 0;
    color: #ffffff;
}

.blog-newsletter-inner {
    width: 90%;
    max-width: 900px;
    margin: auto;
    text-align: center;
    box-sizing: border-box;
}

.blog-newsletter-inner h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.blog-newsletter-inner p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 26px;
}

.newsletter-form-inline {
    display: flex;
    max-width: 520px;
    margin: 0 auto;
    gap: 10px;
}

.newsletter-form-inline input {
    flex: 1;
    padding: 13px 20px;
    border-radius: 9999px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.newsletter-form-inline input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.newsletter-form-inline input:focus {
    border-color: #e67e22;
    background: rgba(255, 255, 255, 0.2);
}

.newsletter-form-inline button {
    padding: 13px 28px;
    border-radius: 9999px;
    background: #e67e22;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(230, 126, 34, 0.35);
}

.newsletter-form-inline button:hover {
    background: #cf6d17;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 126, 34, 0.45);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    #blog-hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    #blog-hero-text p {
        margin-left: auto;
        margin-right: auto;
    }
    .blog-hero-trust-row,
    .about-hero-btns {
        justify-content: center;
    }
    #blog-hero-spotlight {
        width: 100%;
        max-width: 480px;
    }
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    #blog-hero {
        padding: 50px 0 60px 0;
    }
    #blog-hero-text h1 {
        font-size: 30px;
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .article-modal-body {
        padding: 24px 20px;
    }
    .modal-article-title {
        font-size: 22px;
    }
    .newsletter-form-inline {
        flex-direction: column;
    }
    .blog-search-box {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #blog-hero-text h1 {
        font-size: 26px;
    }
    .blog-hero-trust-row {
        gap: 8px;
    }
    .blog-trust-item {
        font-size: 11.5px;
        padding: 5px 12px;
    }
}
