@import url('https://fonts.googleapis.com/css2?family=Lalezar&family=Playpen+Sans+Arabic:wght@100..800&display=swap');
/* News Detail Page Styles */
:root {
    --article-font-family: 'Times New Roman', Times, serif; /* Classic newspaper font */
    --title-font-family: 'Poppins', sans-serif;
    --paper-bg: #fdfdf8; /* Slightly off-white for paper feel */
}

body {
    background-color: #e8e8e8; /* A neutral background for the page */
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><g fill-rule="evenodd"><g fill="%23d9d9d9" fill-opacity="0.4"><path opacity=".5" d="M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10-10v-9h-9v9h9zm0-10v-9h-9v9h9zm0-10v-9h-9v9h9zm0-10v-9h-9v9h9zm0-10v-9h-9v9h9zm0-10v-9h-9v9h9zm0-10v-9h-9v9h9zm0-10v-9h-9v9h9zm0-10v-9h-9v9h9zm9-10v-9h-9v9h9zm10 0v-9h-9v9h9zm10 0v-9h-9v9h9zm10 0v-9h-9v9h9zm10 0v-9h-9v9h9zm10 0v-9h-9v9h9zm10 0v-9h-9v9h9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v-9h-9v9h9zm0 10v-9h-9v9h9zm0 10v-9h-9v9h9zm0 10v-9h-9v9h9zm9 10v-9h-9v9h9zm10 0v-9h-9v9h9zm10 0v-9h-9v9h9zm10 0v-9h-9v9h9zm10 0v-9h-9v9h9zm10 0v-9h-9v9h9zm10 0v-9h-9v9h9zm10 0v-9h-9v9h9zm10 0v-9h-9v9h9z"/></g></g></svg>');
}

.article-container {
    max-width: 900px;
    margin: 100px auto 50px;
    padding: 40px 50px;
    background: var(--paper-bg);
    border-radius: 5px; /* Sharper edges */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--accent-yellow);
    animation: fadeIn 0.5s ease-out;
    position: relative;
    overflow: hidden; /* For background animations */
}

/* Background animation: slowly moving lines */
.article-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 100% 1.5rem; /* Match line-height */
    opacity: 0.5;
    animation: scroll-lines 60s linear infinite;
    z-index: 0;
}

@keyframes scroll-lines {
    from { background-position: 0 0; }
    to { background-position: 0 -100rem; }
}

/* Ensure content is above the background animation */
.article-header, .article-main-image, .article-body, .article-actions {
    position: relative;
    z-index: 1;
}

.article-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 4px double var(--text-dark); /* Double line for classic feel */
}

.article-title {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--primary-purple);
    line-height: 1.3;
    margin-bottom: 15px;
    font-family: "Playpen Sans Arabic", cursive;
    font-optical-sizing: auto;
    font-weight: 800;
    font-style: normal;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: var(--title-font-family); /* Use Poppins for meta */
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-meta i {
    color: var(--primary-purple);
}

.article-main-image {
    margin-bottom: 30px;
    text-align: center;
}

.article-main-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #ccc;
}

.article-body {
    font-family: var(--article-font-family);
    font-size: 1.1rem; /* Slightly smaller for a denser look */
    line-height: 1.9;
    color: #333;
    text-align: justify;
    column-count: 2; /* Multi-column layout */
    column-gap: 40px;
    column-rule: 1px solid #eee;
}

/* Disable multi-column on smaller screens */
@media (max-width: 768px) {
    .article-body {
        column-count: 1;
    }
}

.article-body p {
    margin-bottom: 20px;
}

.article-body p:first-of-type::first-letter {
    font-size: 3em;
    float: right;
    line-height: 1;
    margin-left: 8px;
    font-weight: bold;
    color: var(--primary-purple);
}

.article-body a {
    color: var(--primary-purple);
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.3s ease;
}

.article-body a:hover {
    color: var(--accent-yellow);
    background-color: var(--primary-purple);
    text-decoration: none;
}

.article-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 30px 0;
    column-span: all; /* Make gallery span across all columns */
}

.article-gallery img {
    width: 100%;
    border-radius: 5px;
    border: 1px solid #ccc;
    padding: 5px;
    background: var(--secondary-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-gallery img:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.article-actions {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    column-span: all; /* Make actions span across all columns */
}

.article-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--title-font-family);
}

.article-actions .btn-primary {
    background: var(--primary-purple);
    color: var(--secondary-white);
}

.article-actions .btn-primary:hover {
    background: var(--dark-purple);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.article-actions .btn-secondary {
    background: transparent;
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
}

.article-actions .btn-secondary:hover {
    background: var(--primary-purple);
    color: var(--secondary-white);
    transform: translateY(-2px);
}

.article-not-found {
    text-align: center;
    padding: 80px 20px;
}

/* Responsive Design */
@media (max-width: 900px) {
    .article-container {
        padding: 30px 35px;
    }
}

@media (max-width: 768px) {
    .article-container {
        margin-top: 80px;
        padding: 20px;
    }

    .article-title {
        font-size: 2.2rem;
    }

    .article-body {
        font-size: 1rem;
        line-height: 1.8;
    }

    .article-meta {
        flex-direction: column;
        gap: 10px;
    }

    .article-actions {
        flex-direction: column;
    }

    .article-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.9rem;
    }
}

/* Placeholder animation */
.article-placeholder .placeholder-title { height: 40px; width: 70%; margin: 0 auto 20px; background: #e0e0e0; border-radius: 8px; animation: pulse-bg 1.5s infinite; }
.article-placeholder .placeholder-meta { height: 20px; width: 50%; margin: 0 auto 30px; background: #e0e0e0; border-radius: 8px; animation: pulse-bg 1.5s infinite; }
.article-placeholder .placeholder-img { height: 400px; width: 100%; background: #e0e0e0; border-radius: 15px; margin-bottom: 30px; animation: pulse-bg 1.5s infinite; }
.article-placeholder .placeholder-text { height: 20px; width: 100%; margin-bottom: 15px; background: #e0e0e0; border-radius: 8px; animation: pulse-bg 1.5s infinite; }
.article-placeholder .placeholder-text:last-child { width: 80%; }
@keyframes pulse-bg { 0% { background-color: #e0e0e0; } 50% { background-color: #f0f0f0; } 100% { background-color: #e0e0e0; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
