/* Blog Portal Stylesheet - One Future Foundation */

:root {
    --blog-primary: #00C853;
    --blog-secondary: #2196F3;
    --blog-dark: #0F172A;
    --blog-bg: #F8FAFC;
    --blog-card-glass: rgba(255, 255, 255, 0.7);
    --blog-card-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    --blog-gradient: linear-gradient(135deg, #00C853, #2196F3);
    --blog-gradient-hover: linear-gradient(135deg, #00b047, #1e88e5);
}

/* Custom Scroll Progress Bar */
.blog-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: transparent;
    z-index: 1050;
}
.blog-progress-bar {
    height: 100%;
    background: var(--blog-gradient);
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Blog Hero Section */
.blog-hero {
    position: relative;
    padding: 180px 0 100px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.85) 100%), 
                url('../images/odisha-biodiversity-bg.jpg') center/cover no-repeat;
    color: white;
    overflow: hidden;
    min-height: 550px;
    display: flex;
    align-items: center;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(33, 150, 243, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.blog-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #FFFFFF 30%, #a7f3d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.blog-hero-desc {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #cbd5e1;
    max-width: 600px;
    margin-bottom: 2rem;
}

/* Premium Buttons */
.btn-blog-primary {
    background: var(--blog-gradient);
    color: white !important;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 20px rgba(0, 200, 83, 0.2);
}

.btn-blog-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 200, 83, 0.35);
}

.btn-blog-outline {
    background: transparent;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-blog-outline:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* Category Filter Pills */
.blog-filter-section {
    padding: 50px 0 20px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.filter-pill {
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.filter-pill:hover {
    border-color: var(--blog-secondary);
    color: var(--blog-secondary);
    transform: translateY(-2px);
}

.filter-pill.active {
    background: var(--blog-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.25);
}

/* Live Search bar */
.blog-search-wrapper {
    max-width: 600px;
    margin: 0 auto 40px;
}

.blog-search-input-group {
    position: relative;
    border-radius: 50px;
    background: white;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.blog-search-input-group:focus-within {
    border-color: var(--blog-secondary);
    box-shadow: 0 8px 30px rgba(33, 150, 243, 0.1);
}

.blog-search-icon {
    padding-left: 24px;
    color: #94a3b8;
}

.blog-search-input {
    border: none;
    outline: none;
    padding: 14px 20px;
    font-size: 1rem;
    width: 100%;
    color: var(--blog-dark);
}

/* Featured Article Section */
.featured-blog-section {
    margin-bottom: 60px;
}

.featured-blog-card {
    background: var(--blog-card-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow: var(--blog-card-shadow);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.12);
}

.featured-blog-img-container {
    height: 100%;
    min-height: 350px;
    overflow: hidden;
}

.featured-blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.featured-blog-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.badge-featured {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    align-self: flex-start;
    margin-bottom: 15px;
}

.blog-category-badge {
    background: rgba(33, 150, 243, 0.1);
    color: var(--blog-secondary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 15px;
}

.blog-category-badge.category-community {
    background: rgba(0, 200, 83, 0.1);
    color: var(--blog-primary);
}

.blog-category-badge.category-research {
    background: rgba(147, 51, 234, 0.1);
    color: #9333ea;
}

.blog-category-badge.category-climate {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.featured-blog-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--blog-dark);
    line-height: 1.3;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.featured-blog-title a:hover {
    color: var(--blog-secondary);
}

.featured-blog-preview {
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 25px;
    align-items: center;
}

.blog-meta item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-meta i {
    color: #94a3b8;
}

.read-more-link {
    color: var(--blog-secondary);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.read-more-link:hover {
    color: var(--blog-primary);
    transform: translateX(4px);
}

/* Premium Blog Grid Cards */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.blog-card {
    background: var(--blog-card-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow: var(--blog-card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 255, 255, 0.8);
}

.blog-card-img-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    overflow: hidden;
}

.blog-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.blog-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--blog-dark);
    line-height: 1.4;
    margin-bottom: 12px;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-title a:hover {
    color: var(--blog-secondary);
}

.blog-card-desc {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Skeleton Loading Effect */
.skeleton-card {
    background: white;
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.skeleton-image {
    width: 100%;
    padding-bottom: 56.25%;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
}

.skeleton-content {
    padding: 28px;
}

.skeleton-text {
    height: 16px;
    background: #e2e8f0;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-text.title {
    height: 24px;
    width: 80%;
}

.skeleton-text.short {
    width: 40%;
}

.shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Newsletter Subscription Section */
.blog-newsletter-section {
    padding: 60px 0 100px;
}

.newsletter-glass-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-radius: 30px;
    padding: 60px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.newsletter-glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 30%, rgba(0, 200, 83, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(33, 150, 243, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.newsletter-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.newsletter-desc {
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 550px;
    position: relative;
    z-index: 5;
}

.newsletter-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 14px 24px;
    color: white;
    outline: none;
    width: 100%;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    border-color: var(--blog-secondary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.2);
}

.newsletter-input::placeholder {
    color: #64748b;
}

/* ==========================================================================
   BLOG DETAIL PAGES STYLING
   ========================================================================== */

/* Detail Header Hero */
.blog-detail-hero {
    position: relative;
    height: 500px;
    margin-top: 76px;
    overflow: hidden;
}

.blog-detail-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-detail-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.9) 100%);
    display: flex;
    align-items: flex-end;
    padding-bottom: 50px;
}

.blog-detail-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: white;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

/* Related articles and Detail wrapper */
.blog-detail-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
}

/* Sticky Share Panel */
.blog-share-panel {
    position: absolute;
    left: 40px;
    top: 60px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 50px;
}

.blog-share-panel-sticky {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    font-size: 1.1rem;
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.share-btn.share-linkedin:hover {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.share-btn.share-facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.share-btn.share-twitter:hover {
    background: #000000;
    color: white;
    border-color: #000000;
}

.share-btn.share-link:hover {
    background: var(--blog-secondary);
    color: white;
    border-color: var(--blog-secondary);
}

/* Article content layout */
.blog-content-body {
    max-width: 850px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.9;
    color: #334155;
}

.blog-content-body h1, 
.blog-content-body h2, 
.blog-content-body h3 {
    color: var(--blog-dark);
    font-weight: 800;
    margin: 40px 0 20px;
    line-height: 1.3;
}

.blog-content-body h1 { font-size: 2.2rem; }
.blog-content-body h2 { font-size: 1.75rem; border-left: 4px solid var(--blog-secondary); padding-left: 15px; }
.blog-content-body h3 { font-size: 1.4rem; }

.blog-content-body p {
    margin-bottom: 25px;
}

.blog-content-body strong {
    color: var(--blog-dark);
    font-weight: 700;
}

.blog-content-body ul, 
.blog-content-body ol {
    margin-bottom: 30px;
    padding-left: 25px;
}

.blog-content-body li {
    margin-bottom: 10px;
}

/* Table styles inside DOCX */
.blog-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border-radius: 12px;
    overflow: hidden;
}

.blog-content-body th, 
.blog-content-body td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.blog-content-body th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--blog-dark);
}

.blog-content-body tr:hover {
    background: #f8fafc;
}

/* You May Also Like Section */
.related-articles-section {
    border-top: 1px solid #e2e8f0;
    padding: 60px 0;
    margin-top: 60px;
}

.related-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--blog-dark);
    margin-bottom: 30px;
    text-align: center;
}

.related-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
}

.related-card-img-wrap {
    width: 40%;
    min-width: 250px;
    overflow: hidden;
}

.related-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.related-card-content {
    padding: 30px;
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Toast alert styling */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.copy-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1300px) {
    .blog-share-panel {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-hero-title {
        font-size: 2.8rem;
    }
    .featured-blog-img-container {
        min-height: 250px;
    }
    .featured-blog-content {
        padding: 30px;
    }
    .blog-detail-title {
        font-size: 2.2rem;
    }
    .related-card {
        flex-direction: column;
    }
    .related-card-img-wrap {
        width: 100%;
        padding-bottom: 50%;
    }
    .related-card-content {
        width: 100%;
        padding: 24px;
    }
}

@media (max-width: 767.98px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-hero {
        padding: 140px 0 60px;
        min-height: 450px;
    }
    .blog-hero-title {
        font-size: 2.2rem;
    }
    .featured-blog-img-container {
        min-height: auto;
        height: 240px;
        padding-bottom: 0;
    }
    .blog-detail-wrapper {
        padding: 30px 15px;
    }
    .featured-blog-title {
        font-size: 1.6rem;
    }
    .newsletter-glass-card {
        padding: 40px 24px;
    }
    .newsletter-title {
        font-size: 1.75rem;
    }
    .newsletter-form {
        flex-direction: column;
    }
    .newsletter-input {
        width: 100%;
    }
    .blog-detail-hero {
        height: 350px;
    }
    .blog-detail-title {
        font-size: 1.75rem;
    }
    .blog-content-body {
        font-size: 16px;
    }
    .blog-content-body h1 { font-size: 1.8rem; }
    .blog-content-body h2 { font-size: 1.45rem; }
}
