/*
Theme Name: RIGCRC Theme
Author: Assistant
Description: Custom, high-speed, and professional WordPress theme for the International Journal of Crisis Management and Conflict Resolution. Features a modern grid layout, glassmorphism styling, and a Blue/Brown color scheme.
Version: 3.1.0
Tags: blue, brown, custom-background, custom-colors, custom-header, custom-logo, custom-menu, featured-images, flexible-header, full-width-template, grid-layout, right-sidebar, rtl-language-support, translation-ready
Text Domain: rigcrc
*/

/* ==========================================================================
   1. Typography & Import
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

/* ==========================================================================
   2. CSS Variables (Modern Magazine V4)
   ========================================================================== */
:root {
    /* Brand Colors (Bright & International) */
    --color-primary: #3498db;      /* Light Blue Accent */
    --color-primary-dark: #2980b9; 
    --color-secondary: #d4ac0d;    /* Light Brown/Gold */
    --color-secondary-dark: #b8860b;

    /* Backgrounds & Surfaces */
    --bg-body: #ffffff;            /* Predominantly White */
    --bg-surface: #ffffff;
    --bg-header: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.95);

    /* Text Colors */
    --text-main: #2c3e50;          /* Dark Slate for contrast */
    --text-muted: #7f8c8d;
    --text-light: #ffffff;

    /* Layout & Effects */
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);

    --container-width: 1240px;
    --border-radius: 6px;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   3. Global Reset & Base Elements
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    direction: rtl;
    /* Enforce RTL */
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.85;
    /* Increased for better readability */
    font-size: 1.1rem;
    /* Slightly larger base font for academic reading */
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.85rem;
    line-height: 1.4;
}

a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   4. Header & Navigation (V4 Creative Layout)
   ========================================================================== */
.site-header {
    background-color: var(--bg-header);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

/* Header Container */
.header-main {
    padding: 15px 0 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: var(--bg-header);
    transition: background-color var(--transition);
}

/* -----------------------------------------
   NEW: Transparent Overlay Header for Home
-------------------------------------------- */
.absolute-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background: transparent !important;
    box-shadow: none !important;
}

.absolute-header .header-main {
    background-color: transparent !important;
}

.absolute-header .main-navigation a {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.absolute-header .main-navigation a:hover {
    color: var(--color-secondary) !important;
}

/* Ensure dropdown menus (and their items) remain dark blue even when header is absolute */
.absolute-header .main-navigation ul ul a {
    color: var(--color-primary-dark) !important;
    text-shadow: none !important;
}
.absolute-header .main-navigation ul ul a:hover {
    color: var(--color-secondary) !important;
    background: rgba(41, 128, 185, 0.05);
}

.absolute-header .site-description {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.absolute-header .mobile-menu-toggle span {
    background-color: #ffffff;
}

/* World Map Watermark inside Body */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('assets/images/world-map.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.05; 
    pointer-events: none;
    z-index: -1;
}

.site-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    margin-bottom: 15px;
}

.site-logo {
    max-width: 250px;
}

.site-logo img {
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

.site-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.5;
    font-weight: 600;
}

/* Desktop Navigation */
.main-navigation-wrapper {
    position: relative;
    z-index: 2;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 25px;
    align-items: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    color: var(--text-main);
    font-weight: 700;
    padding: 10px 0;
    font-size: 1.1rem;
    position: relative;
    transition: color var(--transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--color-primary);
}

/* Dots Removed per user request */

/* Hide descriptions/excerpts in menu */
.main-navigation .menu-item-description {
    display: none !important;
}

/* Submenu/Dropdowns */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-surface);
    min-width: 240px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--color-primary);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    padding: 10px 0;
    z-index: 10000;
}

.main-navigation li:hover > ul {
    display: block;
    animation: fadeInDown 0.2s ease forwards;
}

.main-navigation ul ul li {
    border-bottom: 1px solid var(--border-color);
}

.main-navigation ul ul li:last-child {
    border-bottom: none;
}

.main-navigation ul ul a {
    color: var(--text-main);
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
}

.main-navigation ul ul a::after {
    display: none; /* Hide dots in dropdown */
}

.main-navigation ul ul a:hover {
    color: var(--color-primary);
    background: rgba(52, 152, 219, 0.05); /* Very light blue */
    padding-right: 25px; /* RTL inset effect */
}

/* Mobile Hamburger Menu Container */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    background: transparent;
    border: none;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--color-primary);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger Animation classes added via JS later */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* Sub-sub menus */
.main-navigation ul ul ul {
    top: 0;
    right: 100%;
    border-radius: var(--border-radius);
    border-top: none;
    border-right: 3px solid var(--color-secondary);
}

/* ==========================================================================
   5. Hero Section & Main Content
   ========================================================================== */
.site-content {
    padding: 50px 0;
    min-height: 60vh;
}

/* Section Title */
.section-title {
    position: relative;
    font-size: 2rem;
    color: var(--color-primary-dark);
    margin-bottom: 30px;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 4px;
    background: var(--color-secondary);
    border-radius: 2px;
}

/* -----------------------------------------
   NEW: Hero Banner Section
-------------------------------------------- */
.hero-banner-section {
    position: relative;
    width: 100%;
    height: 85vh; /* Large majestic height */
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* Change to fixed for parallax if desired */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -100px; /* Pull up under the absolute header (approx header height) */
    padding-top: 100px; /* Offset the content back down */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(21, 67, 96, 0.85) 0%, rgba(41, 128, 185, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 50px; /* Increased top margin for separation from menus */
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-block;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 30px;
    transition: all var(--transition);
    text-transform: uppercase;
}

.hero-btn.primary-btn {
    background-color: var(--color-secondary);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(212, 172, 13, 0.4);
}

.hero-btn.primary-btn:hover {
    background-color: var(--color-secondary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 172, 13, 0.6);
}

.hero-btn.secondary-btn {
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff !important;
}

.hero-btn.secondary-btn:hover {
    background-color: #ffffff;
    color: var(--color-primary-dark) !important;
    transform: translateY(-3px);
}

/* ==========================================================================
   6. Post Grid System & Standardized Images
   ========================================================================== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.article-card {
    background: var(--bg-surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(41, 128, 185, 0.2);
}

.article-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    /* Standardized Aspect Ratio for all featured images */
    background: #f1f2f6;
    /* Placeholder color before load */
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Forces all images to act like background-cover */
    transition: transform 0.4s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.08);
    /* Micro-animation */
}

/* Category Badge */
.article-category {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.article-category a {
    display: inline-block;
    background: var(--color-secondary);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.article-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-title a {
    color: var(--color-primary);
}

.article-title a:hover {
    color: var(--color-accent);
}

.article-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-read-more {
    margin-top: auto;
    font-weight: 700;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 2px;
    align-self: flex-start;
}

.article-read-more:hover {
    color: var(--color-secondary);
    padding-left: 5px;
    /* RTL nudge right (visually left in code) */
}

/* ==========================================================================
   7. Sidebar (Glassmorphic)
   ========================================================================== */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.sidebar-widget {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--color-secondary);
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
}

.sidebar-widget ul li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.sidebar-widget ul li:last-child {
    border-bottom: none;
}

.sidebar-widget a {
    color: var(--text-main);
    display: block;
    font-weight: 600;
}

.sidebar-widget a:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   8. Single Post View
   ========================================================================== */
.single-post-container {
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.single-header {
    margin-bottom: 30px;
}

.single-title {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 15px;
    line-height: 1.3;
}

.single-meta {
    font-size: 1rem;
    color: var(--text-muted);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.single-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-main);
    word-break: break-word;
    overflow-wrap: break-word;
}

.single-content p {
    margin-bottom: 1.5rem;
}

.single-content h2,
.single-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.single-content img {
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   9. Footer
   ========================================================================== */
.site-footer {
    background-color: var(--color-primary);
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget-title {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   10. A4 Magazine Issues Grid
   ========================================================================== */
.magazine-issues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.magazine-issue-card {
    text-align: center;
}

.magazine-cover {
    width: 100%;
    aspect-ratio: 1 / 1.414; /* A4 Ratio */
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
    background: var(--bg-surface);
    display: block;
    border: 1px solid var(--border-color);
}

.magazine-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.magazine-cover:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.magazine-issue-title {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 700;
}

.magazine-issue-title a {
    color: var(--text-main);
}
.magazine-issue-title a:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   11. Information Sections (About, Scope, Board)
   ========================================================================== */
.info-section {
    background: var(--bg-surface);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

.info-section h2 {
    color: var(--color-primary-dark); /* Changed to blue as requested */
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* ==========================================================================
   12. WP Core & Gutenberg Block Styles Support
   ========================================================================== */
/* Alignments */
.alignnone {
    margin: 5px 20px 20px 0;
}
.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}
.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}
.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}
a img.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}
a img.alignnone {
    margin: 5px 20px 20px 0;
}
a img.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}
a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%; /* Image does not overflow the content area */
    padding: 5px 3px 10px;
    text-align: center;
}
.wp-caption.alignnone, .wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}
.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}
.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}
.wp-caption p.wp-caption-text {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    padding: 0 4px 5px;
    color: var(--text-muted);
}
/* Basic Gutenberg Block formatting fix within our single content */
.single-content figure.wp-block-image {
    max-width: 100%;
}
.single-content figure.wp-block-image img {
    height: auto;
    max-width: 100%;
    margin-bottom: 0;
}
.single-content .wp-block-image.aligncenter {
    text-align: center;
}
.single-content .wp-block-image.alignfull img,
.single-content .wp-block-image.alignwide img {
    width: 100%;
}
.single-content .has-text-align-center {
    text-align: center;
}
.single-content .has-text-align-right {
    text-align: right;
}
.single-content .has-text-align-left {
    text-align: left;
}
.single-content .has-text-align-justify {
    text-align: justify;
}
.single-content ul, .single-content ol {
    margin-bottom: 1.5rem;
    padding-right: 2rem; /* RTL padding for lists */
}
.single-content li {
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   13. Mobile Responsiveness
   ========================================================================== */
@media (max-width: 991px) {
    /* Absolute header mobile overrides to fix white-on-white menus */
    .absolute-header .main-navigation a {
        color: var(--color-primary-dark) !important;
        text-shadow: none !important;
    }

    /* Adjust Hero for Mobile to prevent overlapping */
    .hero-title {
        font-size: 1.8rem;
        margin-top: 80px; /* Push down away from logo further */
    }
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    .hero-banner-section {
        height: auto;
        min-height: 80vh;
        padding-top: 140px; /* Extra padding for absolute header */
        padding-bottom: 40px;
    }

    .main-layout {
        grid-template-columns: 1fr;
    }
    .header-main {
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 0;
    }
    .site-branding {
        flex-direction: row;
        margin-bottom: 0;
        gap: 10px;
    }
    .site-description {
        display: none; /* Hide tagline on strict mobile to save space */
    }
    
    /* Reveal Mobile Toggle */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide Desktop Nav initially */
    .main-navigation-wrapper {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--border-color);
        display: none; /* Hidden by default */
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .main-navigation-wrapper.active {
        display: block;
        animation: fadeInDown 0.3s ease forwards;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
    }

    .main-navigation a {
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-navigation a::after {
        display: none;
    }

    .main-navigation ul ul {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        background: rgba(0, 0, 0, 0.02);
        padding: 0;
        min-width: 100%;
    }
    
    .main-navigation ul ul a {
        padding-right: 40px;
    }
    
    .magazine-issues-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ==========================================================================
   11. Gutenberg Core Block Styles
   ========================================================================== */

/* Alignments */
.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

/* Wide / Full Alignments */
.alignwide {
    margin-left: -10vw;
    margin-right: -10vw;
    max-width: 100vw;
    width: auto;
}

.alignfull {
    margin-left: calc( -100vw / 2 + 100% / 2 );
    margin-right: calc( -100vw / 2 + 100% / 2 );
    max-width: 100vw;
    width: auto;
}

/* Clearfix for alignments */
.entry-content::after {
    clear: both;
    content: '';
    display: block;
}

/* Lists and Typography within content */
.entry-content ul {
    list-style-type: disc;
    margin-bottom: 1.5rem;
    padding-right: 2.5rem; /* RTL padding */
}

.entry-content ol {
    list-style-type: decimal;
    margin-bottom: 1.5rem;
    padding-right: 2.5rem; /* RTL padding */
}

.entry-content li {
    margin-bottom: 0.5rem;
}

/* Quotes */
.entry-content blockquote {
    border-right: 5px solid var(--color-secondary); /* RTL border */
    margin: 1.5em 0;
    padding: 1em 2em 1em 1em; /* RTL padding */
    background: var(--bg-surface);
    font-style: italic;
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius);
}

.entry-content blockquote cite {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 1em;
}

/* PDF & File Blocks */
.wp-block-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
    padding: 15px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.wp-block-file a {
    color: var(--text-main);
    font-weight: 700;
    text-decoration: none;
}

.wp-block-file .wp-block-file__button {
    background: var(--color-secondary);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.wp-block-file .wp-block-file__button:hover {
    background: var(--color-secondary-dark);
    transform: translateY(-2px);
}

/* Captions */
.wp-element-caption,
figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ==========================================================================
   12. Gutenberg Core Block Styles - V2 PDF Embed Fixes
   ========================================================================== */
.wp-block-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* Hide the broken WP PDF Preview object (the big grey block) */
.wp-block-file__embed {
    display: none !important;
}

/* Style the download button to be prominent and beautiful */
.wp-block-file .wp-block-file__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--color-primary, #0a7a51);
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(10, 122, 81, 0.2);
    min-width: 250px;
    margin: 20px auto;
}

.wp-block-file .wp-block-file__button::before {
    content: '\f316'; /* Dashicons download icon */
    font-family: "dashicons";
    font-weight: 400;
    font-size: 1.2rem;
    margin-left: 8px; /* RTL spacing */
}

.wp-block-file .wp-block-file__button:hover {
    background: var(--color-secondary, #da251d);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(218, 37, 29, 0.3);
}

/* ==========================================================================
   13. Scroll to Top Button
   ========================================================================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--color-primary);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.scroll-to-top:hover {
    background: var(--color-secondary);
    color: #fff;
    transform: translateY(-5px) scale(1.05);
}

.scroll-to-top.show-scroll {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   14. Sticky Header Anim / Shrink
   ========================================================================== */
.site-header {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.site-header.scrolled .header-main {
    padding-top: 5px !important;
}

.site-header.scrolled .site-logo img {
    max-height: 55px;
    transition: max-height 0.3s ease;
}

.absolute-header.scrolled {
    position: fixed !important;
    background: var(--bg-header) !important;
    box-shadow: var(--shadow-md) !important;
    animation: fadeInDown 0.3s ease forwards;
}

.absolute-header.scrolled .main-navigation a {
    color: var(--text-main) !important;
    text-shadow: none !important;
}

.absolute-header.scrolled .main-navigation a:hover {
    color: var(--color-primary) !important;
}

.absolute-header.scrolled .mobile-menu-toggle span {
    background-color: var(--color-primary);
}

.absolute-header.scrolled .site-description {
    color: var(--text-muted);
    text-shadow: none;
}

