/* News Detail Page Styles */
:root {
    --news-card-bg: #ffffff;
    --news-text-main: #2d3748;
    --news-text-muted: #718096;
    --news-sidebar-bg: #f7fafc;
}

.news-page-wrapper {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2.5rem;
}

.news-main-content {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 0;
    /* Padding handled by internal sections */
}

/* Breadcrumb Styling */
.news-breadcrumb {
    padding: 1.5rem 2rem 0;
}

.news-breadcrumb ol {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--news-text-muted);
}

.news-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.news-breadcrumb a:hover {
    color: var(--primary-dark);
}

/* Hero & Swiper */
.news-hero-container {
    padding: 0;
}

.news-swiper-container {
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.news-swiper {
    height: 550px;
    width: 100%;
}

.news-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Article Header & Hero Integration */
.news-hero-container {
    padding: 0;
    position: relative;
    margin-bottom: 2.5rem;
    background: #000;
    /* Fallback for loading images */
}

.news-swiper-container {
    border-radius: 0 0 30px 30px;
    height: 650px;
    overflow: hidden;
}

.news-swiper {
    height: 100%;
}

.news-article-header {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 2.5rem 2rem;
    /* Reduced padding */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    color: white;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.news-article-header * {
    pointer-events: auto;
}

.news-title {
    font-size: 2.2rem;
    /* Reduced from 3.5rem */
    line-height: 1.2;
    color: #ffffff !important;
    margin: 0 0 1rem 0;
    /* Reduced margin */
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    max-width: 850px;
}

.news-category-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    /* Reduced padding */
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 0.8rem;
    /* Reduced font size */
    font-weight: 800;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    align-self: flex-start;
}

.news-meta-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    /* Reduced gap */
    padding-bottom: 0;
    border-bottom: none;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    /* Reduced font size */
    font-weight: 600;
}

.news-meta-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.news-meta-item i {
    color: var(--primary);
    background: white;
    width: 28px;
    /* Reduced size */
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Article Body */
.news-article-body {
    padding: 1.5rem 3.5rem 4rem;
    font-size: 1.3rem;
    line-height: 2;
    color: #2d3748;
}

.news-content p {
    margin-bottom: 1.5rem;
}

.news-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1.5rem 0;
}

/* Share & Actions */
.news-footer-actions {
    padding: 2.5rem 3.5rem;
    background: #ffffff;
    /* Explicit white background */
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    border-radius: 0 0 24px 24px;
}

.share-tools {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.share-tools span {
    font-weight: 800;
    color: #1a202c;
    /* Clear dark text on white */
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.share-icon-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-facebook {
    background: #1877f2;
}

.btn-x {
    background: #000;
}

.btn-whatsapp {
    background: #25d366;
}

.btn-print {
    background: #718096;
}

/* Sidebar */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.recent-post-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.recent-post-item:hover {
    transform: translateX(5px);
}

[dir="rtl"] .recent-post-item:hover {
    transform: translateX(-5px);
}

.recent-post-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.recent-post-info {
    flex: 1;
}

.recent-post-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--news-text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.recent-post-date {
    font-size: 0.8rem;
    color: var(--news-text-muted);
}

/* Animations */
.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .news-page-wrapper {
        grid-template-columns: 1fr;
    }

    .news-sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .news-title {
        font-size: 2rem;
    }

    .news-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .news-swiper {
        height: 350px;
    }

    .news-article-header,
    .news-article-body,
    .news-footer-actions,
    .news-hero-container {
        padding: 1.5rem;
    }
}

/* Modal Styling */
#imageModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

#modalImage {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}