/*
Theme Name: MaFidia Pro 2.4.0
Theme URI: https://mafidia.com
Author: MaFidia
Author URI: https://mafidia.com
Description: قالب مخصص لموقع مافيديا مع لوحة تحكم للتحكم في الألوان، الهيدر، الفوتر، وأقسام الصفحة الرئيسية.
Version: 2.4.0
Text Domain: mafidia-pro
*/

:root {
    --mafidia-primary: #00b894;
    --mafidia-secondary: #0984e3;
    --mafidia-dark: #1e272e;
    --mafidia-light: #f5f6fa;
    --mafidia-radius: 16px;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #2d3436;
    line-height: 1.8;
    direction: rtl;
    text-align: right;
}

a {
    color: var(--mafidia-primary);
    text-decoration: none;
}

a:hover {
    opacity: 0.85;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #ecf0f1;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 0;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--mafidia-primary), var(--mafidia-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}

.site-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--mafidia-dark);
}

.site-description {
    font-size: 12px;
    color: #636e72;
}

.main-navigation {
    flex: 1;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.main-navigation a {
    font-size: 14px;
    font-weight: 500;
    color: #2d3436;
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: var(--mafidia-primary);
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-cta-btn {
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--mafidia-primary), var(--mafidia-secondary));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.35);
}

.header-cta-btn:hover {
    transform: translateY(-1px);
}

.hero {
    padding: 48px 0 32px;
    background: radial-gradient(circle at top right, rgba(0, 184, 148, 0.08), transparent),
                radial-gradient(circle at bottom left, rgba(9, 132, 227, 0.1), transparent);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 32px;
    align-items: center;
}

.hero-kicker {
    font-size: 13px;
    font-weight: 600;
    color: var(--mafidia-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 800;
    color: var(--mafidia-dark);
    margin: 8px 0 10px;
}

.hero-subtitle {
    font-size: 14px;
    color: #636e72;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.btn-primary {
    padding: 10px 22px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--mafidia-primary), var(--mafidia-secondary));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 184, 148, 0.4);
}

.btn-outline {
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid #dcdde1;
    background: #fff;
    color: #2d3436;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    font-size: 11px;
    color: #636e72;
}

.hero-badges span {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px dashed rgba(0, 184, 148, 0.4);
    background: rgba(0, 184, 148, 0.04);
}

.hero-card {
    background: #fff;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 18px 45px rgba(15, 52, 96, 0.12);
    border: 1px solid #ecf0f1;
}

.hero-card-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.hero-stat {
    padding: 10px 12px;
    border-radius: 14px;
    background: #f5f6fa;
    font-size: 12px;
}

.hero-stat strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.hero-mini-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
}

.hero-mini-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.section {
    padding: 24px 0;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--mafidia-dark);
}

.section-subtitle {
    font-size: 13px;
    color: #636e72;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.card {
    background: #fff;
    border-radius: var(--mafidia-radius);
    padding: 16px;
    border: 1px solid #ecf0f1;
    box-shadow: 0 8px 24px rgba(99, 110, 114, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #636e72;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--mafidia-dark);
}

.card-meta {
    font-size: 11px;
    color: #b2bec3;
}

.card-excerpt {
    font-size: 13px;
    color: #636e72;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: rgba(0, 184, 148, 0.08);
    color: var(--mafidia-primary);
    margin-right: 4px;
}

/* Footer */
.site-footer {
    margin-top: 32px;
    padding: 24px 0 18px;
    border-top: 1px solid #ecf0f1;
    background: #ffffff;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.footer-brand {
    max-width: 260px;
    font-size: 13px;
    color: #636e72;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid #dcdde1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: #b2bec3;
}

.footer-made {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-made span.heart {
    color: #e74c3c;
}

/* Blog / pages */
.site-main {
    padding: 24px 0;
}

.post-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #ecf0f1;
    margin-bottom: 16px;
    background: #fff;
}

.post-card-title {
    font-size: 18px;
    margin-bottom: 4px;
}

.post-card-meta {
    font-size: 11px;
    color: #b2bec3;
    margin-bottom: 10px;
}

.post-card-excerpt {
    font-size: 14px;
    color: #636e72;
}

/* Single content */
.post-content {
    max-width: 760px;
    margin: 0 auto;
    font-size: 15px;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    color: var(--mafidia-dark);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
}

.pagination a,
.pagination span {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #dcdde1;
    font-size: 13px;
}

/* Responsive – القائمة العلوية */

.main-navigation {
    flex: 1;
    display: none;            /* نخفي القائمة في الوضع العادي */
}

.main-navigation.toggled {
    display: block;           /* تظهر لما نضغط ☰ */
}

/* زر ☰ يشتغل على الموبايل و اللابتوب */
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #dcdde1;
    padding: 6px 10px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

/* ضبط شكل الهيدر في الشاشات الصغيرة */
@media (max-width: 768px) {
    .site-header-inner {
        flex-wrap: wrap;
    }

    .main-navigation {
        order: 3;
        width: 100%;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 0 12px;
    }

    .header-cta {
        order: 2;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-card {
        order: -1;
    }
}
