/* Premium Article Discovery & Detail Styles - Refined */

:root {
    --article-primary: #0d6efd;
    --article-bg-soft: #f8fafc;
    --article-text-dark: #1a1a2e;
    --article-text-muted: #64748b;
    --card-radius: 28px;
    --article-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    --article-shadow-lg: 0 25px 60px -12px rgba(0, 0, 0, 0.12);
}

/* Immersive Page Header */
.articles-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 100px 0 120px;
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    text-align: center;
}

.articles-header .badge {
    background: rgba(13, 110, 253, 0.1) !important;
    color: var(--article-primary) !important;
    border: 1px solid rgba(13, 110, 253, 0.2);
}

.articles-header h1 {
    font-size: 4rem;
    font-weight: 900;
    color: var(--article-text-dark);
    margin-bottom: 20px;
}

.articles-header .lead {
    color: var(--article-text-muted);
    font-weight: 500;
    max-width: 700px;
    margin: 0 auto;
}

/* Integrated Filter Section */
.filter-section {
    margin-top: -35px;
    position: relative;
    z-index: 100;
}

.filter-container {
    display: inline-flex;
    padding: 8px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.category-filter-btn {
    border: none;
    background: transparent;
    color: var(--article-text-muted);
    padding: 12px 25px;
    border-radius: 15px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-filter-btn:hover {
    color: var(--article-primary);
    background: rgba(13, 110, 253, 0.05);
}

.category-filter-btn.active {
    background: var(--article-primary);
    color: white !important;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

/* Common Card Components */
.article-card {
    background: white;
    border-radius: var(--card-radius);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--article-shadow);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    text-align: right;
    text-decoration: none !important;
}

.article-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px -12px rgba(13, 110, 253, 0.15);
}

.article-img-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.article-img-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s ease;
}

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

.category-pill {
    position: absolute; top: 20px; right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    color: var(--article-primary);
    padding: 8px 18px; border-radius: 14px;
    font-size: 0.75rem; font-weight: 800; z-index: 10;
}

.article-body {
    padding: 30px; flex-grow: 1; display: flex; flex-direction: column;
}

.article-date {
    font-size: 0.85rem; color: var(--article-text-muted);
    font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}

.article-title {
    font-size: 1.4rem; font-weight: 800; line-height: 1.5; color: var(--article-text-dark);
    margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.article-excerpt {
    font-size: 1rem; line-height: 1.8; color: var(--article-text-muted);
    margin-bottom: 25px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.article-footer {
    margin-top: auto; padding-top: 20px; border-top: 1px solid #f1f5f9;
    display: flex; justify-content: space-between; align-items: center;
}

.read-more-link {
    color: var(--article-primary); font-weight: 800; font-size: 0.9rem;
    display: flex; align-items: center; gap: 8px; transition: gap 0.3s ease;
}

.read-more-link:hover { gap: 12px; }

/* Detail Page Header */
.article-hero-section {
    position: relative; height: 600px; width: 100%; overflow: hidden;
    display: flex; align-items: center; background: #000;
}

.hero-bg-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.hero-bg-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.hero-overlay-gradient {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 70%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%); z-index: 2;
}

.hero-container { position: relative; z-index: 5; padding-top: 80px; text-align: right; }
.article-main-title { font-size: 3.5rem; font-weight: 800; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }

.content-container-offset { margin-top: -100px; position: relative; z-index: 20; padding-bottom: 80px; }
.article-main-card { background: white; border-radius: 32px; padding: 60px; border: 1px solid rgba(0,0,0,0.02); }
.article-rich-text { font-size: 1.25rem; line-height: 2.2; color: #334155; text-align: justify; }

/* Tag Styles */
.tag-badge {
    background: rgba(13, 110, 253, 0.08);
    color: var(--article-primary);
    padding: 10px 22px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1.5px solid rgba(13, 110, 253, 0.15);
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.05);
}

.tag-badge:hover {
    background: var(--article-primary);
    color: white;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.2);
    border-color: var(--article-primary);
}

.article-tags-footer h6 {
    font-size: 1.1rem;
    margin-bottom: 20px !important;
}

.sidebar-card { background: white; border-radius: 24px; padding: 30px; box-shadow: var(--article-shadow); }
.newsletter-card-dark { background: #0f172a; border-radius: 24px; padding: 40px 30px; text-align: center; color: white; }

/* Global Hero Overrides for Visibility */
.hero::before, .hero::after {
    display: none !important;
}

.hero {
    background: linear-gradient(-45deg, #0d6efd, #0dcaf0, #084298, #052c65) !important;
    background-size: 400% 400% !important;
    animation: gradientAnimation 15s ease infinite !important;
    position: relative;
    overflow: hidden;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero h1 {
    color: white !important;
    text-shadow: 0 2px 15px rgba(0,0,0,0.2);
}

.hero p {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.hero .btn-outline-light {
    border-width: 2px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
}

.hero .btn-outline-light:hover {
    background: white !important;
    color: var(--article-primary) !important;
}

/* Related Articles Sidebar Widget */
.sidebar-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--article-text-dark);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
    margin-bottom: 25px !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-item {
    display: flex;
    gap: 15px;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid transparent;
}

.related-item:hover {
    background: white;
    border-color: rgba(13, 110, 253, 0.1);
    transform: translateX(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.related-img {
    width: 90px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

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

.related-item:hover .related-img img {
    transform: scale(1.15);
}

.related-placeholder {
    width: 100%;
    height: 100%;
    background: var(--article-bg-soft);
    display: grid;
    place-items: center;
    color: var(--article-primary);
}

.related-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-item-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--article-text-dark);
    line-height: 1.4;
    margin-bottom: 6px;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item:hover .related-item-title {
    color: var(--article-primary);
}

.related-item-date {
    font-size: 0.75rem;
    color: var(--article-text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Social Share Buttons */
.article-share-section {
    border-color: #f1f5f9 !important;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    border-radius: 100px;
    color: white !important;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.share-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    filter: brightness(1.1);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #000000; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.linkedin { background: #0a66c2; }

.share-btn i { font-size: 1.1rem; }
