/*
Theme Name: Al-Azhary Digital Agency
Theme URI: https://new.al-azhary.com
Author: Mohamed Al-Azhary
Version: 1.5
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

/* ==========================================================================
   1. CSS Variables & Reset
   ========================================================================== */
:root {
    --bg-dark: #0a1128; 
    --bg-light: #162a5c; 
    --brand-blue: #3269ff; 
    --brand-blue-hover: #2352d4; 
    --accent-yellow: #ffff99; 
    
    --glass-green: #00ff88;
    --glass-green-hover: #00cc6a;
    --glass-green-bg: rgba(0, 255, 136, 0.1);
    --glass-green-border: rgba(0, 255, 136, 0.5);
    --glass-green-shadow: rgba(0, 255, 136, 0.15);

    --text-main: #FFFFFF;
    --text-muted: #e2eafc; 
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 50% 20%, var(--bg-light) 0%, var(--bg-dark) 80%);
    color: var(--text-main);
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.8;
    overflow-x: hidden;
}

*, *::before, *::after { box-shadow: none; box-sizing: border-box; }

/* ==========================================================================
   2. الأزرار 
   ========================================================================== */
.btn-glass-green {
    background: var(--glass-green-bg);
    color: var(--glass-green);
    border: 1px solid var(--glass-green);
    padding: 12px 35px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.15);
}
.btn-glass-green:hover {
    background: var(--glass-green);
    color: var(--bg-dark);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
    transform: translateY(-3px);
}
.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.btn-secondary:hover { background-color: var(--glass-bg); border-color: var(--text-main); }
.highlight-green { color: var(--glass-green); }

/* ==========================================================================
   3. Header & Navigation (الكمبيوتر)
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    background: rgba(10, 17, 40, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.4s ease;
}
.site-header.scrolled { padding: 5px 0; background: rgba(10, 17, 40, 0.98); }

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}
.logo-wrapper a { display: flex; align-items: center; }
.site-logo { max-height: 45px; width: auto; }

/* تنسيق القائمة المنسدلة للكمبيوتر */
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; }
.main-navigation > ul > li { position: relative; }
.main-navigation ul li a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    display: block;
    transition: color 0.3s ease;
}
.main-navigation > ul > li > a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    right: 0;
    background-color: var(--brand-blue);
    transition: width 0.3s ease;
}
.main-navigation ul li a:hover { color: var(--brand-blue); }
.main-navigation > ul > li > a:hover::after { width: 100%; left: 0; }

/* ستايل الدروب داون للكمبيوتر */
.main-navigation ul ul.sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    flex-direction: column;
    padding: 10px 0;
}
.main-navigation ul li:hover > ul.sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.main-navigation ul ul.sub-menu li a {
    color: var(--bg-dark);
    padding: 10px 20px;
}
.main-navigation ul ul.sub-menu li a:hover { background: #f4f6f9; color: var(--brand-blue); }

.header-actions { display: flex; align-items: center; gap: 20px; }
.btn-header-outline {
    border: 1px solid var(--text-main);
    color: var(--text-main);
    padding: 8px 25px;
    border-radius: 30px; 
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.btn-header-outline:hover { background: var(--brand-blue); border-color: var(--brand-blue); }

/* زر الهامبرجر الدائري الأبيض (يظهر في الموبايل فقط) */
.mobile-menu-toggle {
    background: #ffffff;
    color: var(--bg-dark);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ==========================================================================
   4. القائمة الجانبية للموبايل (Off-Canvas Menu) المطابقة للصور
   ========================================================================== */
.mobile-offcanvas {
    position: fixed;
    top: 0;
    right: -100%; /* مخفية لليمين */
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: #ffffff; /* خلفية بيضاء */
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -5px 0 25px rgba(0,0,0,0.2);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.mobile-offcanvas.active { right: 0; }

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(3px);
}
.mobile-overlay.active { opacity: 1; visibility: visible; }

.offcanvas-header {
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}
.offcanvas-title {
    color: var(--brand-blue);
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
}
.close-menu-btn { background: transparent; border: none; cursor: pointer; color: var(--bg-dark); padding: 0; }

.offcanvas-body { padding: 20px 30px 40px; text-align: right; }

.mobile-navigation ul { list-style: none; padding: 0; margin: 0; }
.mobile-navigation > ul > li { border-bottom: 1px solid #f0f0f0; }
.mobile-navigation > ul > li:last-child { border-bottom: none; }

.mobile-navigation a {
    display: block;
    padding: 18px 0;
    color: #0a1128; /* كحلي غامق */
    font-size: 1.3rem;
    font-weight: 800;
    text-decoration: none;
}

/* الحالة النشطة (مثل الرئيسية في الصورة) */
.mobile-navigation > ul > li.current-menu-item > a {
    color: var(--brand-blue);
    border-bottom: 2px solid var(--brand-blue);
    padding-bottom: 16px; /* تعويض البوردر */
}

/* السهم الخاص بالقوائم المنسدلة */
.mobile-navigation .menu-item-has-children > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mobile-navigation .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-left: 2px solid #0a1128;
    border-bottom: 2px solid #0a1128;
    transform: rotate(-45deg); /* يشير لأسفل */
    transition: transform 0.3s ease;
}
.mobile-navigation .menu-item-has-children.open > a::after {
    transform: rotate(135deg); /* يشير لأعلى عند الفتح */
    border-color: var(--brand-blue);
}
.mobile-navigation .menu-item-has-children.open > a { color: var(--brand-blue); }

/* القائمة المنسدلة (الخلفية الرمادي الفاتح) */
.mobile-navigation .sub-menu {
    display: none;
    background: #f8f9fa; /* رمادي فاتح جداً */
    margin: 0 -30px; /* تمديد الخلفية لآخر الشاشة */
    padding: 0;
}
.mobile-navigation .sub-menu li { border-bottom: 1px solid #e9ecef; }
.mobile-navigation .sub-menu li:last-child { border-bottom: 2px solid var(--brand-blue); }
.mobile-navigation .sub-menu a {
    padding: 15px 30px; /* تعويض المارجن العكسي */
    font-size: 1.1rem;
    font-weight: 700;
    color: #0a1128;
}

/* البحث ومعلومات التواصل في القائمة */
.mobile-search { margin: 30px 0; }
.mobile-contact-info { margin-top: 40px; }
.mobile-contact-info h3 { color: var(--brand-blue); font-size: 1.4rem; font-weight: 800; margin-bottom: 15px; }
.mobile-contact-info p { color: #0a1128; font-size: 1.1rem; line-height: 1.6; margin-bottom: 10px; font-weight: 600; }
.mobile-contact-info .phone-number { font-size: 1.3rem; font-weight: 800; color: var(--brand-blue); }

/* إخفاء القائمة الأساسية وإظهار الزر الدائري في الشاشات الصغيرة */
@media (max-width: 1024px) { 
    .desktop-only { display: none !important; } 
    .mobile-menu-toggle { display: flex; }
}


/* ==========================================================================
   باقي الأقسام (Hero, Results, Services, Stats, Strategy, Blog, Footer) 
   -- (احتفظت بها كما هي لتعمل بكفاءة دون تغيير) --
   ========================================================================== */
.hero-section { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 140px 20px 60px; max-width: 1200px; margin: 0 auto; text-align: center; flex-direction: column; }
.hero-content { max-width: 800px; margin: 0 auto; }
.hero-subtitle-top { color: var(--accent-yellow); font-weight: 700; font-size: 1.2rem; display: block; margin-bottom: 15px; letter-spacing: 1px; }
.hero-title { font-size: 4.2rem; line-height: 1.3; margin-bottom: 25px; font-weight: 900; color: var(--text-main); }
.hero-description { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; }
.hero-actions { display: flex; gap: 20px; justify-content: center; flex-wrap: nowrap; }

.results-section, .strategy-section { padding: 100px 20px; }
.layout-split { display: flex; align-items: center; justify-content: space-between; gap: 60px; max-width: 1200px; margin: 0 auto; }
.split-text { flex: 1.2; text-align: right; }
.split-image { flex: 0.8; text-align: center; }
.split-image img { max-width: 100%; height: auto; border-radius: 15px; box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.results-title, .strategy-title { font-size: 2.5rem; font-weight: 900; margin-bottom: 25px; color: var(--text-main);}
.results-desc { color: var(--text-muted); font-size: 1.15rem; margin-bottom: 40px; }
.badge-white { background: #ffffff; color: var(--bg-dark); padding: 6px 15px; border-radius: 6px; font-weight: 800; font-size: 0.95rem; display: inline-block; margin-bottom: 20px; }
.strategy-list { list-style: none; padding: 0; margin: 30px 0; }
.strategy-list li { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 15px; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.icon-point { font-size: 1.2rem; }
.mt-30 { margin-top: 30px; }

.services-section { padding: 80px 20px 100px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header .sub-title { color: var(--accent-yellow); font-size: 1.1rem; font-weight: 800; display: block; margin-bottom: 15px; }
.section-header .section-title { font-size: 2.8rem; font-weight: 900; }
.section-bar { width: 60px; height: 4px; background: var(--brand-blue); margin: 20px auto 0; border-radius: 2px;}
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.service-card { background: var(--glass-bg); border: 1px solid var(--glass-border); padding: 40px 30px; border-radius: 12px; transition: all 0.4s ease; text-align: center; }
.service-icon { font-size: 2.8rem; margin: 0 auto 20px auto; display: flex; justify-content: center; align-items: center; width: 80px; height: 80px; background: rgba(255, 255, 255, 0.02); border-radius: 50%; border: 1px solid var(--glass-border); transition: all 0.4s ease; }
.service-card-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 15px; color: var(--text-main); }
.service-card-desc { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 25px; }
.service-link { color: var(--glass-green); text-decoration: none; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: gap 0.3s ease; text-shadow: 0 0 10px rgba(0, 255, 136, 0.4); }
.service-card:hover, .service-card:active { transform: translateY(-8px); border-color: var(--glass-green-border); background: rgba(0, 255, 136, 0.03); box-shadow: 0 15px 35px var(--glass-green-shadow); }
.service-card:hover .service-icon { border-color: var(--glass-green-border); box-shadow: 0 0 15px var(--glass-green-shadow); }
.service-card:hover .service-link { gap: 15px; }

.stats-section { padding: 100px 20px; background: rgba(0,0,0,0.2); border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); }
.stats-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; text-align: center; }
.stat-box { padding: 20px; }
.stat-number { font-size: 4rem; font-weight: 900; color: var(--text-main); display: inline-block; line-height: 1; }
.stat-plus { font-size: 3rem; color: var(--glass-green); font-weight: 800; text-shadow: 0 0 10px rgba(0,255,136,0.3);}
.stat-label { font-size: 1.15rem; color: var(--accent-yellow); margin-top: 15px; font-weight: 800; }

.blog-section { padding: 100px 20px; max-width: 1200px; margin: 0 auto; }
.blog-section .section-title { text-align: center; font-size: 2.8rem; font-weight: 900; margin-bottom: 60px; color: var(--text-main); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.blog-card { background: #ffffff; border-radius: 12px; overflow: hidden; transition: transform 0.3s ease; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.blog-card:hover { transform: translateY(-10px); }
.blog-img img { width: 100%; height: 240px; object-fit: cover; }
.blog-content { padding: 25px; text-align: right; }
.blog-tags { margin-bottom: 10px; font-size: 0.95rem; }
.blog-tags a { color: var(--brand-blue); text-decoration: none; font-weight: 800; }
.blog-title { margin-bottom: 20px; line-height: 1.5; }
.blog-title a { font-size: 1.3rem; color: var(--bg-dark); font-weight: 800; text-decoration: none; transition: color 0.3s; }
.blog-title a:hover { color: var(--brand-blue); }
.blog-read-more { color: var(--bg-dark); text-decoration: none; font-weight: 800; border-bottom: 2px solid var(--brand-blue); padding-bottom: 3px; transition: color 0.3s; }
.blog-read-more:hover { color: var(--brand-blue); }
.blog-footer-btn { text-align: center; margin-top: 50px; }

.site-footer { background: #060b19; padding: 150px 20px 30px; position: relative; border-top: 1px solid var(--glass-border); margin-top: 100px; }
.cta-overlap-wrapper { position: absolute; top: -80px; left: 0; width: 100%; display: flex; justify-content: center; padding: 0 20px; }
.cta-overlap-box { background: #ffffff; border-radius: 15px; padding: 40px 50px; max-width: 1100px; width: 100%; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.cta-overlap-box p { color: var(--bg-dark); font-size: 1.3rem; font-weight: 800; margin: 0; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; text-align: right; }
.footer-logo { max-height: 45px; margin-bottom: 20px; filter: brightness(0) invert(1); }
.footer-desc { color: var(--text-muted); font-size: 1rem; }
.footer-col h3 { color: var(--text-main); font-size: 1.3rem; font-weight: 800; margin-bottom: 25px; }
.footer-col.links-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col.links-col ul li { margin-bottom: 15px; }
.footer-col.links-col ul li a { color: var(--text-muted); text-decoration: none; font-weight: 600; transition: color 0.3s; }
.footer-col.links-col ul li a:hover { color: var(--brand-blue); }
.contact-col p { color: var(--text-muted); margin-bottom: 10px; font-size: 1rem; }
.mt-20 { margin-top: 20px; }
.social-icons { display: flex; gap: 15px; margin-top: 25px; }
.social-icons a { background: rgba(255,255,255,0.05); color: var(--text-main); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; transition: all 0.3s; }
.social-icons a:hover { background: var(--brand-blue); transform: translateY(-3px); }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 50px; padding-top: 25px; color: var(--text-muted); font-size: 0.95rem; }

/* Media Queries للتابلت والموبايل */
@media (max-width: 1024px) {
    .hero-title { font-size: 3.2rem; }
    .results-title, .section-header .section-title, .strategy-title, .blog-section .section-title { font-size: 2.4rem; }
}
@media (max-width: 992px) {
    .layout-split { flex-direction: column; text-align: center; }
    .split-text { text-align: center; }
    .strategy-list li { justify-content: center; text-align: right; }
    .reverse-mobile { flex-direction: column-reverse; }
    .cta-overlap-box { flex-direction: column; text-align: center; gap: 25px; padding: 30px; }
    .footer-container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .hero-section { padding-top: 180px; }
    .hero-title { font-size: 2.6rem; }
    .services-grid, .blog-grid { grid-template-columns: 1fr; }
    .results-title, .section-header .section-title, .strategy-title, .blog-section .section-title { font-size: 2rem; }
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-logo { margin: 0 auto 20px; }
    .social-icons { justify-content: center; }
    .site-footer { padding-top: 220px; } 
}
@media (max-width: 480px) {
    .hero-title { font-size: 2.2rem; }
    .hero-actions { flex-direction: row; width: 100%; gap: 10px; }
    .btn-glass-green, .btn-secondary { padding: 12px 15px; font-size: 0.95rem; flex: 1; text-align: center; justify-content: center; }
    .stat-number { font-size: 3rem; }
    .stat-plus { font-size: 2rem; }
}