/* ═══════════════════════════════════════════════════════════════════════════
   📰 College News Publisher - Post Content Styling
   ═══════════════════════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap");

:root {
    --cnp-brand: #0f8a6a;
    --cnp-brand-dark: #0a6b52;
    --cnp-brand-light: #12a67f;
    --cnp-brand-soft: rgba(15, 138, 106, 0.1);
    --cnp-text-primary: #0f172a;
    --cnp-text-secondary: #475569;
    --cnp-text-muted: #94a3b8;
    --cnp-bg-white: #ffffff;
    --cnp-bg-light: #f8fafc;
    --cnp-border: #e2e8f0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🖥️ Full Width Layout - Using Body Class
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hide sidebar */
body.cnp-fullwidth-post #sidebar,
body.cnp-fullwidth-post .sidebar,
body.cnp-fullwidth-post aside.widget-area,
body.cnp-fullwidth-post #et-secondary-nav,
body.cnp-fullwidth-post .et_right_sidebar #sidebar,
body.cnp-fullwidth-post .et_left_sidebar #sidebar,
body.cnp-fullwidth-post #sidebar-1,
body.cnp-fullwidth-post .secondary,
.cnp-fullwidth-post aside {
    display: none !important;
    width: 0 !important;
}

/* Make content full width */
body.cnp-fullwidth-post #main-content,
body.cnp-fullwidth-post .container,
body.cnp-fullwidth-post #content-area,
body.cnp-fullwidth-post .entry-content,
body.cnp-fullwidth-post article.post,
body.cnp-fullwidth-post .post-content {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

body.cnp-fullwidth-post #left-area,
body.cnp-fullwidth-post .et_pb_column {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding-right: 0 !important;
    margin: 0 !important;
}

body.cnp-fullwidth-post .et_pb_row {
    max-width: 1400px !important;
    width: 95% !important;
    margin: 0 auto !important;
}

body.cnp-fullwidth-post #content-area {
    display: block !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   📰 Post Title - Professional Design
   ═══════════════════════════════════════════════════════════════════════════ */
body.cnp-fullwidth-post .entry-title,
body.cnp-fullwidth-post h1.post-title,
body.cnp-fullwidth-post article header h1,
body.cnp-fullwidth-post .et_pb_post_title h1 {
    font-family: "Tajawal", Tahoma, sans-serif !important;
    text-align: center !important;
    font-size: 42px !important;
    font-weight: 900 !important;
    color: var(--cnp-text-primary) !important;
    line-height: 1.4 !important;
    margin: 40px auto 50px !important;
    padding: 40px 30px !important;
    max-width: 1000px !important;
    position: relative !important;
    display: block !important;
    background: linear-gradient(135deg, rgba(15, 138, 106, 0.08), rgba(15, 138, 106, 0.03)) !important;
    border-radius: 24px !important;
    border: 2px solid rgba(15, 138, 106, 0.15) !important;
}

/* Title decorative line */
body.cnp-fullwidth-post .entry-title::after,
body.cnp-fullwidth-post h1.post-title::after,
body.cnp-fullwidth-post .et_pb_post_title h1::after {
    content: "";
    display: block;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--cnp-brand), var(--cnp-brand-light));
    margin: 25px auto 0;
    border-radius: 999px;
    box-shadow: 0 4px 15px rgba(15, 138, 106, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   📰 News Article Container
   ═══════════════════════════════════════════════════════════════════════════ */
.cnp-news-article {
    font-family: "Tajawal", Tahoma, sans-serif;
    direction: rtl;
    text-align: right;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   📊 Meta Information - Centered
   ═══════════════════════════════════════════════════════════════════════════ */
.cnp-news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    padding: 25px;
    background: linear-gradient(135deg, var(--cnp-bg-light), var(--cnp-bg-white));
    border-radius: 20px;
    border: 1px solid var(--cnp-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.cnp-news-category {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--cnp-brand), var(--cnp-brand-dark));
    color: white;
    font-size: 15px;
    font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(15, 138, 106, 0.35);
    text-decoration: none;
}

.cnp-news-date,
.cnp-news-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cnp-text-secondary);
    font-size: 15px;
    font-weight: 600;
    background: white;
    padding: 10px 20px;
    border-radius: 999px;
    border: 2px solid var(--cnp-border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   📝 News Body Content
   ═══════════════════════════════════════════════════════════════════════════ */
.cnp-news-body {
    margin-bottom: 50px;
}

.cnp-news-body .cnp-post-content {
    font-size: 19px;
    line-height: 2.2;
    color: var(--cnp-text-primary);
    text-align: justify;
}

.cnp-news-body .cnp-post-content p {
    margin-bottom: 25px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🖼️ Post Gallery
   ═══════════════════════════════════════════════════════════════════════════ */
.cnp-post-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 50px 0;
    padding: 30px;
    background: linear-gradient(135deg, var(--cnp-bg-light), rgba(15, 138, 106, 0.05));
    border-radius: 24px;
    border: 2px solid var(--cnp-border);
}

.cnp-gallery-figure {
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
}

.cnp-gallery-figure:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
}

.cnp-gallery-link {
    display: block;
    overflow: hidden;
}

.cnp-gallery-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.cnp-gallery-link:hover .cnp-gallery-img {
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   🔗 Share Buttons - Centered
   ═══════════════════════════════════════════════════════════════════════════ */
.cnp-news-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px;
    background: linear-gradient(135deg, var(--cnp-bg-light), var(--cnp-bg-white));
    border-radius: 20px;
    border: 2px solid var(--cnp-border);
    margin-top: 50px;
}

.cnp-share-label {
    font-weight: 800;
    color: var(--cnp-text-primary);
    font-size: 16px;
}

.cnp-share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-weight: 900;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cnp-share-btn:hover {
    transform: translateY(-5px) scale(1.15);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.cnp-share-facebook {
    background: linear-gradient(135deg, #1877f2, #0d65d9);
}

.cnp-share-twitter {
    background: linear-gradient(135deg, #1da1f2, #0c85d0);
}

.cnp-share-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

/* ═══════════════════════════════════════════════════════════════════════════
   📱 Responsive
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    body.cnp-fullwidth-post .entry-title,
    body.cnp-fullwidth-post h1.post-title,
    body.cnp-fullwidth-post .et_pb_post_title h1 {
        font-size: 28px !important;
        padding: 25px 20px !important;
        margin: 20px auto 30px !important;
    }

    .cnp-news-article {
        padding: 0 15px;
    }

    .cnp-news-body .cnp-post-content {
        font-size: 17px;
        line-height: 2;
    }

    .cnp-post-gallery {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 15px;
    }

    .cnp-gallery-img {
        height: 220px;
    }

    .cnp-news-share {
        flex-wrap: wrap;
        gap: 15px;
        padding: 20px;
    }

    .cnp-share-label {
        width: 100%;
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ✨ Animations
   ═══════════════════════════════════════════════════════════════════════════ */
.cnp-news-article {
    animation: cnpFadeIn 0.6s ease;
}

@keyframes cnpFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cnp-gallery-figure {
    animation: cnpSlideUp 0.5s ease backwards;
}

.cnp-gallery-figure:nth-child(1) {
    animation-delay: 0.1s;
}

.cnp-gallery-figure:nth-child(2) {
    animation-delay: 0.2s;
}

.cnp-gallery-figure:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes cnpSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Featured Image */
body.cnp-fullwidth-post .post-thumbnail,
body.cnp-fullwidth-post .wp-post-image,
body.cnp-fullwidth-post .et_pb_post_title .et_pb_title_featured_container {
    max-width: 1100px;
    margin: 0 auto 40px !important;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

body.cnp-fullwidth-post .wp-post-image {
    width: 100%;
    height: auto;
    display: block;
}