﻿/* =============================================
   NEWS DETAIL PAGE STYLES
   Author: Denny A Devassy
   Date: 2025-10-10
   Complete Rewrite with Gallery Navigation
   ============================================= */

.news-detail-page {
    padding: 0;
    background: #f8f9fa !important;
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 14px;
}

    .breadcrumb a {
        color: #666;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .breadcrumb a:hover {
            color: #c41e3a;
        }

    .breadcrumb span:last-child {
        color: #1a1a1a;
        font-weight: 600;
    }

/* ==================== NEWS ARTICLE ==================== */
.news-article {
    border-radius: 12px;
    overflow: hidden;
   /* background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);*/
    margin-bottom: 60px;
}

/* Article Header */
.article-header {
    padding: 0px 0px 40px 0px;
    border-bottom: 1px solid #e0e0e0;
}

.article-category {
    display: inline-block;
    background: #c41e3a;
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.article-title {
    font-size: 42px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 25px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.meta-date,
.meta-views {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 15px;
}

    .meta-date i,
    .meta-views i {
        color: #c41e3a;
    }

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.share-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .share-btn:hover {
        background: #c41e3a;
        color: #fff;
        border-color: #c41e3a;
        transform: translateY(-3px);
    }

/* Article Image */
.article-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

    .article-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Article Content */
.article-content {
    padding: 50px 0px;
}

.article-lead {
    font-size: 20px;
    line-height: 1.8;
    color: #333;
    font-weight: 500;
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-left: 4px solid #c41e3a;
    border-radius: 8px;
}

.article-body {
    font-size: 17px;
    line-height: 1.9;
    color: #444;
}

    .article-body p {
        margin-bottom: 20px;
    }

    .article-body h2 {
        font-size: 28px;
        font-weight: 700;
        color: #1a1a1a;
        margin: 35px 0 20px;
    }

    .article-body h3 {
        font-size: 24px;
        font-weight: 600;
        color: #1a1a1a;
        margin: 30px 0 15px;
    }

    .article-body ul,
    .article-body ol {
        margin: 20px 0;
        padding-left: 30px;
    }

    .article-body li {
        margin-bottom: 10px;
    }

    .article-body blockquote {
        border-left: 4px solid #c41e3a;
        padding-left: 20px;
        margin: 30px 0;
        font-style: italic;
        color: #666;
    }

/* ==================== ARTICLE GALLERY WITH NAVIGATION ==================== */
.article-gallery {
    padding: 40px 50px;
    border-top: 1px solid #e0e0e0;
    position: relative;
}

    .article-gallery h3 {
        font-size: 28px;
        font-weight: 700;
        margin-bottom: 25px;
        color: #1a1a1a;
    }

.gallery-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0 60px;
}

.gallery-grid {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
    width: 100%;
}

.gallery-item {
    min-width: calc(33.333% - 13.333px);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

    .gallery-item:hover {
        transform: scale(1.05);
    }

    .gallery-item img {
        width: 100%;
        height: 250px;
        object-fit: cover;
        display: block;
    }

/* Gallery Navigation Buttons */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #c41e3a;
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

    .gallery-nav-btn:hover:not(:disabled) {
        background: #a01629;
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 6px 16px rgba(196, 30, 58, 0.4);
    }

    .gallery-nav-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        background: #999;
    }

    .gallery-nav-btn i {
        font-size: 1.25rem;
    }

.gallery-prev {
    left: 0;
}

.gallery-next {
    right: 0;
}

/* Gallery Counter */
.gallery-counter {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
}

/* Gallery Lightbox Effect */
.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(196, 30, 58, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    background: rgba(196, 30, 58, 0.1);
}

/* ==================== RELATED NEWS ==================== */
.related-news {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    width: 100%;
}

    .section-header h2 {
        font-size: 32px;
        font-weight: 700;
        color: #1a1a1a;
        margin: 0;
    }

.view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000000;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
}

    .view-all:hover {
        gap: 12px;
    }

.related-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 150px;
}

/* ==================== NOT FOUND ==================== */
.not-found {
    text-align: center;
    padding: 100px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

    .not-found i {
        font-size: 100px;
        color: #ddd;
        margin-bottom: 30px;
    }

    .not-found h2 {
        font-size: 32px;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 15px;
    }

    .not-found p {
        font-size: 18px;
        color: #666;
        margin-bottom: 30px;
    }

.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: #c41e3a;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background: #a01730;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
    }

/* ==================== LOADING SPINNER ==================== */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #c41e3a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==================== RTL SUPPORT ==================== */
[lang="ar"] .breadcrumb {
   direction: rtl;
}

[lang="ar"] .article-lead {
    border-left: none;
    border-right: 4px solid #c41e3a;
    padding-left: 0;
    padding-right: 25px;
}

[lang="ar"] .article-meta {
   direction: rtl;
}

[lang="ar"] .share-buttons {
    margin-left: 0;
    margin-right: auto;
}

[lang="ar"] .article-body ul,
[lang="ar"] .article-body ol {
    padding-left: 0;
    padding-right: 30px;
}

[lang="ar"] .article-body blockquote {
    border-left: none;
    border-right: 4px solid #c41e3a;
    padding-left: 0;
    padding-right: 20px;
}

[lang="ar"] .section-header {
   direction: rtl;
}

    [lang="ar"] .section-header h2 {
        text-align: right;
    }

[lang="ar"] .view-all {
   direction: rtl;
}

    [lang="ar"] .view-all i {
        transform: rotate(180deg);
    }

[lang="ar"] .related-news-grid {
    direction: rtl;
}

/* Gallery RTL */
[lang="ar"] .gallery-grid {
    direction: rtl;
}

[lang="ar"] .gallery-prev {
    left: auto;
    right: 0;
}

[lang="ar"] .gallery-next {
    right: auto;
    left: 0;
}

[lang="ar"] .gallery-prev i {
    transform: rotate(180deg);
}

[lang="ar"] .gallery-next i {
    transform: rotate(180deg);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .article-title {
        font-size: 36px;
    }

    .article-image {
        height: 400px;
    }

    .related-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .gallery-item {
        min-width: calc(50% - 10px);
    }

    .gallery-nav-btn {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 768px) {
    .news-detail-page {
        padding: 30px 0 60px;
    }

    .article-header {
        padding: 30px 25px;
    }

    .article-title {
        font-size: 28px;
    }

    .article-meta {
        gap: 15px;
        flex-direction: column;
        align-items: flex-start;
    }

    .share-buttons {
        margin-left: 0;
        width: 100%;
    }

    .article-image {
        height: 300px;
    }

    .article-content {
        padding: 30px 25px;
    }

    .article-lead {
        font-size: 18px;
        padding: 20px;
    }

    .article-body {
        font-size: 16px;
    }

    .article-gallery {
        padding: 30px 25px;
    }

    .gallery-container {
        padding: 0 50px;
    }

    .gallery-item {
        min-width: 100%;
    }

        .gallery-item img {
            height: 200px;
        }

    .gallery-nav-btn {
        width: 40px;
        height: 40px;
    }

    .gallery-prev {
        left: 5px;
    }

    .gallery-next {
        right: 5px;
    }

    [lang="ar"] .gallery-prev {
        right: 5px;
        left: auto;
    }

    [lang="ar"] .gallery-next {
        left: 5px;
        right: auto;
    }

    .related-news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    [lang="ar"] .article-meta {
        align-items: flex-end;
    }

    [lang="ar"] .share-buttons {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 24px;
    }

    .article-category {
        font-size: 11px;
        padding: 6px 15px;
    }

    .share-btn {
        width: 35px;
        height: 35px;
    }

    .article-image {
        height: 250px;
    }

    .article-content {
        padding: 25px 20px;
    }

    .article-lead {
        font-size: 16px;
    }

    .article-body {
        font-size: 15px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .article-gallery h3 {
        font-size: 22px;
    }

    .gallery-container {
        padding: 0 45px;
    }

    .gallery-item img {
        height: 180px;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .breadcrumb,
    .share-buttons,
    .related-news,
    .gallery-nav-btn,
    .gallery-counter {
        display: none;
    }

    .news-detail-page {
        background: #fff;
    }

    .article-header {
        border-bottom: 2px solid #000;
    }

    .article-title {
        color: #000;
    }

    .gallery-container {
        padding: 0;
    }

    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .gallery-item {
        min-width: auto;
    }
}
