/*
 * Theme Name: Astra Child — Concord KSA
 * Description: القالب الابن لموقع كونكورد للوقود - الإصدار 3.0 المتكامل لجميع الصفحات والشاشات
 * Template: astra
 * Version: 3.0.0
 * Text Domain: astra-child
 */

/* =============================================
   1. متغيرات الألوان والهوية الرسمية
   ============================================= */
:root {
    --concord-primary:      #000000;
    --concord-accent:       #4f96ce;
    --concord-accent-hover: #357cae;
    --concord-text:         #333333;
    --concord-bg:           #ffffff;
    --concord-border:       #e2e8f0;
    --concord-transition:   0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}


/* حماية شاملة لجميع الصور (الرئيسية، المدونة، المشاريع، الشركاء) */
img,
.attachment-post-thumbnail,
.post-thumb img,
.wp-post-image,
.ast-blog-featured-section img,
.entry-content img,
.elementor-widget-image img {
    max-width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}


/* =============================================
   4. زر الوضع الليلي في رأس الصفحة (الهيدر)
   ============================================= */
.concord-header-dark-wrap {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0 8px;
    z-index: 9999;
}

.concord-header-dark-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all var(--concord-transition);
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.concord-header-dark-btn:hover {
    color: var(--concord-accent);
    border-color: var(--concord-accent);
    transform: scale(1.08);
}

.concord-header-dark-btn .concord-icon-sun {
    display: block;
}

.concord-header-dark-btn .concord-icon-moon {
    display: none;
}

/* عند تفعيل الوضع الليلي */
body.concord-dark-mode .concord-header-dark-btn {
    background: #1e2430;
    color: #f6e05e;
    border-color: #475569;
}

body.concord-dark-mode .concord-header-dark-btn .concord-icon-sun {
    display: none;
}

body.concord-dark-mode .concord-header-dark-btn .concord-icon-moon {
    display: block;
}

/* على الجوال: يظهر بجانب زر القائمة (أبو ثلاث خطوط) */
@media (max-width: 921px) {
    .site-header-primary-section-right {
        display: flex !important;
        align-items: center !important;
        flex-direction: row-reverse !important;
        gap: 6px !important;
    }

    .concord-header-dark-wrap {
        margin: 0 4px !important;
    }

    .concord-header-dark-btn {
        width: 36px;
        height: 36px;
    }
}

/* =============================================
   5. أزرار التواصل الثابتة على يسار الشاشة (اتصال + واتساب)
   ============================================= */
.concord-floating-buttons {
    position: fixed !important;
    left: 20px !important;
    right: auto !important;
    bottom: 85px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    z-index: 99999 !important;
}

.concord-float-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: all var(--concord-transition);
    position: relative;
    outline: none;
}

.concord-float-btn::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    animation: concord-pulse-wave 2.4s infinite;
    z-index: -1;
}

/* زر الاتصال */
.concord-call-btn {
    background: linear-gradient(135deg, #4f96ce, #2974ad) !important;
}

.concord-call-btn::before {
    background: rgba(79, 150, 206, 0.35);
}

.concord-call-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 25px rgba(79, 150, 206, 0.5);
}

/* زر الواتساب */
.concord-whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #128c3e) !important;
}

.concord-whatsapp-btn::before {
    background: rgba(37, 211, 102, 0.35);
}

.concord-whatsapp-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
}

/* تلميح الزر (Tooltip) يظهر لليمين لأن الأزرار في اليسار */
.concord-float-btn::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 12px);
    right: auto;
    top: 50%;
    transform: translateY(-50%) scale(0.85);
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.concord-float-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

@keyframes concord-pulse-wave {
    0%   { transform: scale(1);   opacity: 0.8; }
    70%  { transform: scale(1.35); opacity: 0;   }
    100% { transform: scale(1.35); opacity: 0;   }
}

/* =============================================
   6. أيقونات السوشل ميديا في الفوتر: ألوان واقعية 3D مع أنيميشن
   ============================================= */
.ast-footer-social-wrap .ast-builder-social-element,
.ast-builder-social-element.footer-social-item,
.elementor-widget-social-icons .elementor-social-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 4px 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    border: none !important;
}

.ast-builder-social-element.ast-facebook,
.elementor-social-icon-facebook {
    background: linear-gradient(135deg, #1877F2, #0d5ec4) !important;
    --background-color: #1877F2 !important;
}
.ast-builder-social-element.ast-facebook svg { fill: #ffffff !important; }

.ast-builder-social-element.ast-twitter,
.elementor-social-icon-twitter,
.elementor-social-icon-x-twitter {
    background: linear-gradient(135deg, #000000, #1da1f2) !important;
    --background-color: #000000 !important;
}
.ast-builder-social-element.ast-twitter svg { fill: #ffffff !important; }

.ast-builder-social-element.ast-youtube,
.elementor-social-icon-youtube {
    background: linear-gradient(135deg, #FF0000, #c40000) !important;
    --background-color: #FF0000 !important;
}
.ast-builder-social-element.ast-youtube svg { fill: #ffffff !important; }

.ast-builder-social-element.ast-linkedin,
.elementor-social-icon-linkedin {
    background: linear-gradient(135deg, #0A66C2, #004182) !important;
    --background-color: #0A66C2 !important;
}
.ast-builder-social-element.ast-linkedin svg { fill: #ffffff !important; }

.ast-builder-social-element.ast-behance,
.ast-builder-social-element[aria-label="WhatsApp"],
.elementor-social-icon-whatsapp {
    background: linear-gradient(135deg, #25D366, #128c3e) !important;
    --background-color: #25D366 !important;
}
.ast-builder-social-element.ast-behance svg,
.ast-builder-social-element[aria-label="WhatsApp"] svg { fill: #ffffff !important; }

/* أنيميشن عند تمرير الفأرة */
.ast-builder-social-element:hover,
.elementor-social-icon:hover {
    transform: translateY(-6px) scale(1.15) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

/* =============================================
   7. إطار وبرواز أنيق للخريطة
   ============================================= */
iframe[src*="google.com/maps"],
.elementor-widget-google_maps iframe,
.map-container {
    border-radius: 18px !important;
    border: 3px solid var(--concord-accent) !important;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12), 0 0 0 6px rgba(79, 150, 206, 0.1) !important;
    transition: all var(--concord-transition) !important;
    overflow: hidden !important;
    max-width: 100% !important;
}

/* =============================================
   8. كريدت المصمم مهند البحيري في الفوتر
   ============================================= */
.concord-designer-credit {
    width: 100%;
    padding: 14px 20px;
    background: #080a0d;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    text-align: center;
    box-sizing: border-box;
}

.concord-credit-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    color: #94a3b8;
}

.concord-credit-sep {
    color: #475569;
}

.concord-credit-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--concord-accent) !important;
    text-decoration: none;
    font-weight: 600;
}

.concord-credit-phone:hover {
    color: #7ab5e0 !important;
}

/* =============================================
   9. معالجة وتجاوب الجوال الشامل لجميع الصفحات
   ============================================= */
@media (max-width: 768px) {
    .concord-floating-buttons {
        left: 14px !important;
        bottom: 75px !important;
        gap: 10px !important;
    }

    .concord-float-btn {
        width: 46px;
        height: 46px;
    }

    .concord-float-btn::after {
        display: none !important;
    }

    .ast-container,
    .site-content,
    .elementor-container,
    .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .goal-card,
    .elementor-column {
        max-width: 100% !important;
        width: 100% !important;
        flex: 1 1 100% !important;
    }

    .concord-designer-credit {
        font-size: 11px;
        padding: 10px 14px;
    }
}
