/* assets/css/style.css - LUXE EDITORIAL REDESIGN */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&display=swap');

:root {
    --color-red: #E53E3E;
    --color-black: #111111;
    --color-white: #FFFFFF;
    --bg-light: #F9F9F9;
    --text-light: #2d2d2d;
    --border-light: #EAEAEA;
    --font-body: 'Cairo', sans-serif;
    --font-heading: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-light);
    font-family: var(--font-body);
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html.dark {
    --bg-light: var(--color-black);
    --text-light: #E0E0E0;
    --border-light: #2d2d2d;
}

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* --- Global Styles --- */
.section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
}
.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 3rem;
    text-align: center;
}
html.dark .section-title {
    color: var(--color-white);
}

/* --- Hero Section --- */
.hero-section {
    height: 90vh;
    min-height: 700px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    overflow: hidden;
}
.hero-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    transition: transform 8s ease-out;
}
.hero-section:hover .hero-background {
    transform: scale(1);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: slideInUp 1s ease-out 0.3s backwards;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 3px 10px rgba(0,0,0,0.5);
}
@media (min-width: 768px) {
    .hero-title { font-size: 6rem; }
}
.hero-cta {
    margin-top: 2rem;
    padding: 0.8rem 2.5rem;
    background-color: var(--color-red);
    color: var(--color-white);
    border-radius: 0.25rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}
.hero-cta:hover {
    background-color: var(--color-red-dark);
    transform: translateY(-3px);
}

/* --- Article Card --- */
.article-card .card-image-wrapper {
    overflow: hidden;
    border-radius: 0.25rem;
}
.article-card .card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease-out;
}
.article-card:hover .card-image {
    transform: scale(1.05);
}
.article-card .card-category {
    color: var(--color-red);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.article-card .card-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-black);
    transition: color 0.3s ease;
}
html.dark .article-card .card-title {
    color: var(--color-white);
}
.article-card:hover .card-title {
    color: var(--color-red);
}
.article-card .card-date {
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.7;
    margin-top: 0.75rem;
}

/* --- Articles Grid --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2.5rem;
}
@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- About Section --- */
.about-section {
    background-color: var(--color-black);
    color: var(--color-white);
}
.about-section .section-title {
    color: var(--color-white);
}
.about-text {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.25rem;
    line-height: 1.8;
    text-align: center;
    color: rgba(255,255,255,0.8);
}
/* --- Header & Search --- */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    background-color: rgba(249, 249, 249, 0.8);
}
html.dark .header {
    background-color: rgba(17, 17, 17, 0.8);
}

.search-container {
    position: relative;
}
.search-input {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 9999px;
    padding: 0.5rem 1rem 0.5rem 2.5rem; /* Padding for icon */
    width: 100%;
    transition: all 0.3s ease;
}
html[dir="rtl"] .search-input {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
}
.search-input:focus {
    outline: none;
    border-color: var(--color-red);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2);
}
.search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF; /* gray-400 */
}
html[dir="rtl"] .search-icon { right: 0.75rem; }
html[dir="ltr"] .search-icon { left: 0.75rem; }

.search-results {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
}
.search-result-item {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-item:hover {
    background-color: var(--border-light);
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}



/* --- Reading Progress Bar --- */
.reading-progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    height: 4px;
    background: var(--color-red);
    box-shadow: 0 2px 10px var(--color-red);
    z-index: 1000;
}

/* --- Comment Section Component --- */
.comment-section {
    margin-top: 4rem;
}
.comment-form textarea, .comment-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-main);
    border-radius: 0.5rem;
    color: var(--text-main);
    transition: border-color 0.3s ease;
}
.comment-form textarea:focus, .comment-form input:focus {
    border-color: var(--color-red);
}
.comment-form .btn-submit {
    background-color: var(--color-red);
    color: var(--color-white);
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}
.comment-form .btn-submit:hover {
    background-color: var(--color-red-dark);
}
.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-main);
}
.comment-item:last-child {
    border-bottom: none;
}
.comment-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}
.comment-author {
    font-weight: 900;
    color: var(--text-main);
}
.comment-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}
.comment-body {
    margin-top: 0.5rem;
}

/* --- Related Articles Sidebar --- */
.related-articles-sidebar h3 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-red);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-main);
}
.related-article-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    transition: opacity 0.3s ease;
}
.related-article-card:hover {
    opacity: 0.8;
}
.related-article-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.5rem;
}
.related-article-card h4 {
    font-weight: 900;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-main);
}
.related-article-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* --- Prose for Article Content --- */
/* --- Article Content Styling (Prose) --- */
.prose {
    animation: slideInUp 0.8s ease-out;
}

.prose h1, .prose h2, .prose h3 {
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 1em;
}

.prose h2 {
    color: var(--color-red);
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--border-main);
}

.prose p {
    margin-bottom: 1.75em; /* Increased paragraph spacing */
    font-size: 1.1rem;
}

.prose a {
    color: var(--color-red);
    text-decoration: none;
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--color-red-dark);
    transition: box-shadow 0.3s ease, color 0.3s ease;
}

.prose a:hover {
    box-shadow: inset 0 -25px 0 var(--color-red-dark);
    color: var(--color-white);
}

.prose img {
    border-radius: 0.75rem;
    box-shadow: 0 15px 30px -10px var(--shadow-color);
    margin-top: 2.5em;
    margin-bottom: 2.5em;
}

.prose blockquote {
    border-right: 4px solid var(--color-red);
    padding-right: 1.5em;
    margin: 2em 0;
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-style: italic;
}

.prose ul, .prose ol {
    padding-right: 2em;
    margin-bottom: 1.75em;
}

.prose li::marker {
    color: var(--color-red);
}

/* --- Author Bio Component --- */
.author-bio {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-main);
    border-radius: 0.75rem;
    margin-top: 4rem;
}
.author-bio img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--color-red);
}
.author-bio h4 {
    font-size: 1.25rem;
    font-weight: 900;
    margin: 0;
    color: var(--text-main);
}
.author-bio p {
    font-size: 1rem;
    margin: 0.25rem 0 0 0;
    color: var(--text-secondary);
}

/* Form Container */
.form-container {
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Input Fields */
.input-field {
    border: 2px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--color-black);
    color: var(--color-white);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.input-field:focus {
    outline: none;
    border-color: var(--color-red);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.3);
}

.input-field::placeholder {
    color: var(--text-light);
}

/* Submit Button */
.submit-btn {
    background: var(--color-red);
    color: var(--color-white);
    font-weight: 700;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-align: center;
}

.submit-btn:hover {
    background: var(--color-red);
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background: var(--border-light);
    cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out;
}

/* Dark Mode Compatibility */
html.dark {
    --bg-light: var(--color-black);
    --text-light: var(--color-white);
    --border-light: #4b5563;
}