/*
Theme Name: El Quran Online School
Theme URI: https://elquranonlineschool.com
Author: El Quran Online School Development Team
Author URI: https://elquranonlineschool.com
Description: A premium WordPress theme for online Quran education platforms. Features Modern Islamic Minimalism design, full RTL support, bilingual (AR/EN), Elementor compatible, WooCommerce ready, WPML compatible. Built with WordPress Coding Standards, optimized for performance and SEO with Schema.org markup.
Version: 3.5.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eqos-quran
Domain Path: /languages
Tags: education, religion, multilingual, rtl-language-support, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready, e-commerce, blog
*/

/*--------------------------------------------------------------
# CSS Variables (Brand Identity)
--------------------------------------------------------------*/
:root {
    --eqos-primary: #0284C7;
    --eqos-secondary: #0C4A6E;
    --eqos-cta: #7DD3FC;
    --eqos-bg: #F1F5F9;
    --eqos-white: #FFFFFF;
    --eqos-text: #1A1A1A;
    --eqos-text-muted: #6B7280;
    --eqos-border: #E5E7EB;
    --eqos-success: #10B981;
    --eqos-danger: #EF4444;

    --eqos-font-ar-heading: 'IBM Plex Sans Arabic', 'Inter', 'Cairo', system-ui, sans-serif;
    --eqos-font-ar-body: 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif;
    --eqos-font-en-heading: 'Playfair Display', Georgia, serif;
    --eqos-font-en-body: 'Inter', system-ui, sans-serif;

    --eqos-radius-sm: 0.375rem;
    --eqos-radius-md: 0.75rem;
    --eqos-radius-lg: 1.25rem;
    --eqos-radius-xl: 2rem;

    --eqos-shadow-sm: 0 1px 2px rgba(12, 74, 110, 0.05);
    --eqos-shadow-md: 0 4px 12px rgba(12, 74, 110, 0.08);
    --eqos-shadow-lg: 0 12px 32px rgba(12, 74, 110, 0.12);
    --eqos-shadow-xl: 0 24px 60px rgba(12, 74, 110, 0.18);

    --eqos-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --eqos-container-max: 1280px;
}

/* الإعدادات الأساسية للهيكل لمنع الانزياح الأفقي */
html, body {
    max-width: 100%;
    overflow-x: hidden; 
}

/* حاوية متجاوبة لضبط المحتوى في المنتصف */
.eqos-container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    max-width: var(--eqos-container-max);
}

/*--------------------------------------------------------------
# WordPress Core Classes (Required)
--------------------------------------------------------------*/
.alignleft {
    display: inline;
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    display: inline;
    float: right;
    margin-left: 1.5rem;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignwide {
    max-width: 1100px;
}

.alignfull {
    max-width: 100%;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* RTL Adjustments */
.rtl .alignleft {
    float: right;
    margin-right: 0;
    margin-left: 1.5rem;
}

.rtl .alignright {
    float: left;
    margin-left: 0;
    margin-right: 1.5rem;
}

/* WordPress Block Editor Defaults */
.wp-caption {
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption .wp-caption-text {
    margin: 0.8em 0;
    font-size: 0.875rem;
    color: var(--eqos-text-muted);
    text-align: center;
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    -webkit-clip-path: none;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--eqos-primary);
    color: #fff;
    padding: 1rem 1.5rem;
    z-index: 999999;
    text-decoration: none;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* Sticky & Comments */
.sticky, .bypostauthor {
    display: block;
}

/* Gallery - Desktop Default */
.gallery {
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }

.gallery-item { margin: 0; }
.gallery-item img {
    border: 1px solid var(--eqos-border);
    max-width: 100%;
    height: auto;
    border-radius: var(--eqos-radius-sm);
}

.gallery-caption {
    display: block;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    color: var(--eqos-text-muted);
}


/*==============================================================
# Media Queries - إعدادات التجاوب مع أحجام الشاشات المختلفة
==============================================================*/

/* شاشات الجوال والأجهزة اللوحية (Max-width: 768px) */
@media screen and (max-width: 768px) {
    
    /* إلغاء الطفو (Float) في الجوال لتجنب تشوه النصوص */
    .alignleft, 
    .alignright,
    .rtl .alignleft,
    .rtl .alignright {
        float: none;
        display: block;
        margin: 0 auto 1.5rem auto;
        text-align: center;
    }

    /* جعل معرض الصور متجاوباً (أعمدة مرنة تتكيف مع حجم الشاشة) */
    .gallery,
    .gallery-columns-2, 
    .gallery-columns-4, 
    .gallery-columns-5, 
    .gallery-columns-6 {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }

    /* ضبط الحواف للأقسام العريضة في الجوال */
    .alignwide {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* شاشات الكمبيوتر والأجهزة الكبيرة (Min-width: 992px) */
@media screen and (min-width: 992px) {
    /* زيادة الهوامش الجانبية للحاوية في الشاشات الكبيرة لراحة العين */
    .eqos-container {
        padding-right: 2.5rem;
        padding-left: 2.5rem;
    }
}