/* === VintagePress Theme | Risij.uk Blog === */

/* --- CSS Variables --- */
:root {
    --background-color: #fdfaf3; /* Off-white, parchment-like */
    --text-color: #4a2c2a; /* Dark, warm brown */
    --primary-accent-color: #8b4513; /* SaddleBrown, for links and headers */
    --secondary-accent-color: #d2b48c; /* Tan, for borders and highlights */
    --header-footer-bg: #f0e6d6; /* A slightly darker parchment */
    --font-primary: 'Amiri', serif;
    --font-display: 'Merriweather', serif;
    --container-width: 1100px;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* --- Global & Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    direction: rtl; /* Set layout to Right-to-Left for Arabic */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
    font-size: 18px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--primary-accent-color);
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #5a2d0c;
    text-decoration: underline;
}

ul {
    list-style: none;
    padding-right: 20px; /* Indentation for RTL */
}

ul li {
    margin-bottom: 0.75rem;
    position: relative;
}

ul li::before {
    content: '•';
    color: var(--primary-accent-color);
    position: absolute;
    right: -20px; /* Position bullet to the right for RTL */
    top: 0;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Header --- */
.site-header {
    background-color: var(--header-footer-bg);
    padding: 1.5rem 0;
    border-bottom: 2px solid var(--secondary-accent-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}
.site-title a {
    color: var(--text-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-menu li::before {
    content: ''; /* Remove bullets from nav */
}

.nav-menu a {
    font-weight: 600;
    font-size: 1.1rem;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover {
    border-bottom-color: var(--primary-accent-color);
    text-decoration: none;
}

/* --- Main Layout --- */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .main-layout {
        grid-template-columns: 3fr 1fr;
    }
}

/* --- Hero Section (Homepage) --- */
.hero {
    text-align: center;
    padding: 2rem;
    margin-bottom: 2rem;
    background-color: #fff;
    border: 1px solid var(--secondary-accent-color);
}

.hero h1 {
    margin-bottom: 0.5rem;
}

/* --- Articles Grid (Homepage) --- */
.articles-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 600px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.article-card {
    background-color: #fff;
    border: 1px solid var(--secondary-accent-color);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.card-content p {
    flex-grow: 1;
}

.read-more-btn {
    display: inline-block;
    background-color: var(--primary-accent-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.read-more-btn:hover {
    background-color: #5a2d0c;
    color: #fff;
}

/* --- Sidebar --- */
.sidebar .widget {
    background-color: #fff;
    padding: 1.5rem;
    border: 1px solid var(--secondary-accent-color);
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--secondary-accent-color);
    margin-bottom: 1.5rem;
}

.widget.widget-promo p {
    font-style: italic;
}

/* --- Single Article & Sub-Pages --- */
.article-content, .subpage-content {
    background-color: #fff;
    padding: 2.5rem;
    border: 1px solid var(--secondary-accent-color);
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--secondary-accent-color);
    padding-bottom: 1.5rem;
}

.article-meta {
    font-size: 0.9rem;
    color: #777;
}

.cta-section {
    background-color: var(--header-footer-bg);
    text-align: center;
    padding: 2.5rem;
    margin: 2rem 0;
    border: 1px dashed var(--secondary-accent-color);
}
.cta-section h2 {
    margin-top: 0;
}

/* --- Contact Form --- */
.contact-form {
    margin-top: 2rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 600;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--secondary-accent-color);
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 1rem;
    background-color: #fdfdfd;
}
.contact-form button {
    display: inline-block;
    background-color: var(--primary-accent-color);
    color: #fff;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.contact-form button:hover {
    background-color: #5a2d0c;
}


/* --- Footer --- */
.site-footer {
    background-color: var(--header-footer-bg);
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 2px solid var(--secondary-accent-color);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links li::before {
    content: '';
}

.copyright {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

/* --- Mobile Menu (Simple for no-JS) --- */
@media (max-width: 767px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    .main-layout {
        padding: 1.5rem 0;
    }
    .article-content, .subpage-content {
        padding: 1.5rem;
    }
}
