/* ========================================================
   Green AVIC - News & Insights (Blog) Stylesheet
   Editorial, Clean, Nature-Inspired, Fully Responsive
   ======================================================== */

:root {
    --green-primary: #4CAF50;
    --green-hover: #45a049;
    --green-dark: #0D3D2F;
    --green-light: #E8F5E9;
    --green-accent: #B8F542;
    --text-main: #333333;
    --text-muted: #666666;
    --text-light: #888888;
    --bg-light: #F9F9F9;
    --border-color: #E6EAE7;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.blog-page {
    background-color: #ffffff;
}

/* Active Nav State */
.active-nav {
    color: var(--green-primary) !important;
    position: relative;
}

.active-nav::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--green-primary);
    border-radius: 2px;
}

/* ========================================================
   Blog Hero
   ======================================================== */
.blog-hero {
    background: linear-gradient(180deg, #F9FBF9 0%, #FFFFFF 100%);
    padding: 70px 0 40px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.blog-hero-content {
    max-width: 760px;
    margin: 0 auto;
}

.blog-hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--green-dark);
    margin: 15px 0 16px;
    line-height: 1.25;
}

.blog-hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0;
}

/* ========================================================
   Main Content Section
   ======================================================== */
.blog-content-section {
    padding: 50px 0 90px;
    min-height: 480px;
}

/* ========================================================
   Badges & Meta Elements
   ======================================================== */
.category-badge {
    display: inline-block;
    background: var(--green-light);
    color: #2E7D32;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid rgba(46, 125, 50, 0.15);
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.meta-divider {
    color: #CCD3CD;
}

/* ========================================================
   Featured Publication Card
   ======================================================== */
.blog-featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    align-items: stretch;
}

.blog-featured-card:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-3px);
}

.featured-media {
    position: relative;
    background: #F1F4F1;
    overflow: hidden;
    min-height: 360px;
}

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

.blog-featured-card:hover .featured-media img {
    transform: scale(1.03);
}

.featured-details {
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-title {
    font-size: 2rem;
    line-height: 1.3;
    color: var(--text-main);
    margin-bottom: 16px;
    font-weight: 700;
}

.featured-excerpt {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.featured-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.author-info {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.author-label {
    margin-right: 4px;
}

.author-name {
    color: var(--green-dark);
}

.btn-read-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    font-size: 0.875rem;
    border-radius: 25px;
    cursor: pointer;
}

.btn-read-action svg {
    transition: transform 0.25s ease;
}

.btn-read-action:hover svg {
    transform: translateX(4px);
}

/* ========================================================
   State Cards: Empty & Error & Loading
   ======================================================== */
.blog-state-card {
    max-width: 650px;
    margin: 40px auto;
    padding: 56px 40px;
    text-align: center;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaf-icon {
    background: #E8F5E9;
}

.error-icon {
    background: #FFEBEE;
    color: #D32F2F;
}

.blog-state-card h2 {
    font-size: 1.75rem;
    color: var(--green-dark);
    margin-bottom: 14px;
}

.blog-state-card p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 28px;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 25px;
    background: #f1f4f1;
    color: var(--green-dark);
    border: 1px solid #D5DDD5;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e5ece5;
    color: var(--green-dark);
}

/* ========================================================
   Loading State (Skeleton)
   ======================================================== */
.blog-loading-state {
    max-width: 1000px;
    margin: 0 auto;
}

.skeleton-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    min-height: 380px;
}

.skeleton-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.skeleton-pill {
    width: 110px;
    height: 24px;
    border-radius: 12px;
    background: #f0f0f0;
}

.skeleton-title {
    width: 85%;
    height: 38px;
    border-radius: 6px;
    background: #f0f0f0;
}

.skeleton-line {
    width: 100%;
    height: 16px;
    border-radius: 4px;
    background: #f0f0f0;
}

.skeleton-line.short {
    width: 60%;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ========================================================
   Full Article Reader Mode View
   ======================================================== */
.blog-reader-view {
    max-width: 820px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    padding: 44px 50px;
}

.reader-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 14px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid #DCE3DC;
    padding: 8px 18px;
    border-radius: 20px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-back:hover {
    background: #F4F7F4;
    color: var(--green-dark);
    border-color: #B8C8B8;
}

.reader-share-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.btn-share {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F4F7F4;
    color: var(--text-main);
    border: 1px solid #E1E8E1;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-share:hover {
    background: var(--green-primary);
    color: #ffffff;
    border-color: var(--green-primary);
    transform: translateY(-2px);
}

.reader-header {
    margin-bottom: 30px;
}

.reader-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.reader-title {
    font-size: 2.5rem;
    line-height: 1.25;
    color: var(--green-dark);
    margin-bottom: 18px;
    font-weight: 700;
}

.reader-lead {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 400;
    padding-left: 14px;
    border-left: 3px solid var(--green-primary);
}

.reader-author-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
}

.author-avatar-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--green-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.author-meta-details {
    display: flex;
    flex-direction: column;
}

.author-byline {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

/* Reader Featured Figure */
.reader-figure {
    margin: 20px 0 36px;
    border-radius: 12px;
    overflow: hidden;
    background: #F1F4F1;
}

.reader-figure img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.reader-caption {
    font-size: 0.8125rem;
    color: var(--text-light);
    padding: 8px 12px;
    background: #FAFCFA;
    font-style: italic;
    border-top: 1px solid var(--border-color);
}

/* Reader Body Content & Typography */
.reader-body-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #2F3631;
}

.reader-body-content p {
    margin-bottom: 22px;
    color: #2F3631;
}

.reader-body-content h2 {
    font-size: 1.85rem;
    color: var(--green-dark);
    margin: 38px 0 16px;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: normal;
}

.reader-body-content h3 {
    font-size: 1.45rem;
    color: var(--green-dark);
    margin: 30px 0 12px;
    line-height: 1.35;
    text-transform: none;
}

.reader-body-content ul,
.reader-body-content ol {
    margin: 18px 0 24px 24px;
    padding-left: 8px;
}

.reader-body-content ul {
    list-style: disc;
}

.reader-body-content ol {
    list-style: decimal;
}

.reader-body-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.reader-body-content blockquote {
    margin: 28px 0;
    padding: 20px 26px;
    background: #F8FAF8;
    border-left: 4px solid var(--green-primary);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    font-size: 1.15rem;
    color: #1F3F2A;
}

.reader-body-content a {
    color: var(--green-primary);
    text-decoration: underline;
    font-weight: 600;
}

.reader-body-content a:hover {
    color: var(--green-hover);
}

.reader-body-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 36px 0;
}

/* Reader Footer CTA */
.reader-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.reader-cta-card {
    background: linear-gradient(135deg, #0D3D2F 0%, #175442 100%);
    border-radius: 12px;
    padding: 34px 36px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.reader-cta-card h3 {
    color: #ffffff;
    font-size: 1.4rem;
    margin-bottom: 8px;
    text-transform: none;
}

.reader-cta-card p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
    font-size: 0.95rem;
    max-width: 480px;
}

.reader-cta-card .btn-primary {
    background: #B8F542;
    color: #0D3D2F;
    font-weight: 700;
}

.reader-cta-card .btn-primary:hover {
    background: #cbf96f;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(184, 245, 66, 0.4);
}

.reader-bottom-nav {
    display: flex;
    justify-content: flex-start;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0D3D2F;
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-notification.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ========================================================
   RESPONSIVE BREAKPOINTS
   ======================================================== */
@media (max-width: 992px) {
    .blog-featured-card {
        grid-template-columns: 1fr;
    }

    .featured-media {
        min-height: 280px;
        max-height: 380px;
    }

    .featured-details {
        padding: 32px 28px;
    }

    .blog-reader-view {
        padding: 32px 26px;
    }

    .reader-title {
        font-size: 2.1rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 50px 0 30px;
    }

    .blog-hero-title {
        font-size: 2.2rem;
    }

    .blog-content-section {
        padding: 30px 0 60px;
    }

    .featured-title {
        font-size: 1.6rem;
    }

    .featured-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-read-action {
        width: 100%;
        justify-content: center;
    }

    .reader-top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .reader-title {
        font-size: 1.75rem;
    }

    .reader-lead {
        font-size: 1.05rem;
    }

    .reader-body-content {
        font-size: 1rem;
    }

    .reader-body-content h2 {
        font-size: 1.5rem;
    }

    .reader-cta-card {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
    }

    .reader-cta-card .btn-primary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .blog-state-card {
        padding: 40px 20px;
    }

    .empty-actions .btn {
        width: 100%;
        text-align: center;
    }
}
