@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap' );

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
      overflow-x: hidden;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background: #0f172a;
    color: #333;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ============ HEADER ============ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: #ffffff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
}

.header .logo-section {
    display: flex;
    align-items: center;
}

.logo-top {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.header .search-section {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 550px;
    margin: 0 40px;
}

.center-search {
    position: relative;
    flex: 1;
}

.center-search input {
    width: 100%;
    padding: 12px 15px 12px 50px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    text-align: right;
}

.center-search input:focus {
    outline: none;
    border-color: #cbd5e0;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.center-search i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 18px;
}

.header .left-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.account-wrapper {
    position: relative;
    order: 1;
}

.account {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 10px 22px;
    border-radius: 12px;
    cursor: pointer;
    color: #4a5568;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.account:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.lang {
    border: 1px solid #e2e8f0;
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    color: #4a5568;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    order: 2;
}

.lang:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: #ffffff;
    border-radius: 14px;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 16px 22px;
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #2d3748;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    flex: 1; /* يخلي القسم يتمدد ويأخذ المساحة المتبقية */
    background: url('/images/Duall.gif') center/cover no-repeat fixed; /* صورة خلفية + توسيط + تغطية + ثابتة */
    display: flex; /* تفعيل flex */
    flex-direction: column; /* ترتيب العناصر عمودي */
    align-items: center; /* توسيط أفقي */
    justify-content: center; /* توسيط عمودي */
    position: relative; /* لتمكين العناصر المطلقة داخله */
    overflow: hidden; /* إخفاء أي عناصر خارجة */
    padding: 60px 5%; /* مسافة داخلية */
}

/* طبقة شفافة فوق الخلفية */
.background-lines {
    position: absolute; /* يتموضع فوق الخلفية */
    inset: 0; /* يغطي كامل العنصر */
    background: rgba(15, 23, 42, 0.3); /* لون شفاف داكن */
    z-index: 1; /* فوق الخلفية */
    pointer-events: none; /* ما يمنع الضغط على العناصر */
}

/* المحتوى الرئيسي */
.hero-content {
    position: relative; /* لتحديد الطبقة */
    z-index: 2; /* فوق الخلفية الشفافة */
    width: 100%; /* عرض كامل */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============ CARDS CONTAINER ============ */
.cards-container {
    display: flex; /* ترتيب أفقي */
    justify-content: center; /* توسيط */
    align-items: flex-start; /* محاذاة من الأعلى */
    width: 100%;
    gap: 190px; /* مسافة بين الكروت */
    flex-wrap: wrap; /* ينزل سطر جديد عند الحاجة */
    position: relative;
}

/* الكروت الجانبية */
.cards-side {
    display: flex;
    flex-direction: column; /* ترتيب عمودي */
    gap: 80px; /* مسافة بين الكروت */
    flex: 0 1 360px; /* عرض مرن */
    align-items: center;
}

/* الكرت الأوسط */
.cards-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    flex: 0 1 400px; /* عرض أكبر شوي */
    order: 2; /* موقعه بالنص */
    margin-top: 75px; /* نزوله تحت النص */
}

/* الكروت اليمين */
.cards-side:first-of-type {
    order: 1; /* يظهر أول */
    margin-top: -250px; /* رفع للأعلى */
    margin-right: 5px; /* تحريكه لليمين */
}

/* الكروت اليسار */
.cards-side:last-of-type {
    order: 3; /* يظهر آخر */
    margin-top: -250px; /* رفع للأعلى */
    margin-left: 5px; /* تحريكه لليسار */
}

/* ============ اللوقو والنص ============ */
.logo-section-center {
    text-align: center; /* توسيط النص */
    margin-bottom: 0;
    margin-top: 100px; /* نزول القسم */
}

/* اللوقو */
.main-logo {
    height: 120px; /* حجم اللوقو */
    width: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 25px rgba(56, 189, 248, 0.4)); /* ظل جميل */
    animation: logoFloat 3s ease-in-out infinite; /* حركة */
}

/* حركة اللوقو */
@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); } /* الوضع الطبيعي */
    50% { transform: translateY(-15px); } /* يطلع لفوق */
}

/* صندوق النص */
.logo-text-box {
    color: #fff; /* لون أبيض */
    max-width: 800px; /* عرض محدود */
}

/* عنوان */
.logo-text-box h2 {
    font-size: 30px;
    font-weight: 800; /* ثقيل */
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* ظل للنص */
}

/* الوصف */
.logo-text-box p {
    font-size: 16px;
    line-height: 1.8; /* مسافة بين السطور */
    color: #e2e8f0;
    font-weight: 400;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* ============ الكروت ============ */
.card-wrapper {
    perspective: 1000px; /* يعطي عمق 3D */
    width: 100%;
    max-width: 360px;
    height: 240px;
    cursor: pointer; /* شكل اليد */
    text-decoration: none;
    margin: 0 auto;
    position: relative;
}

/* الهالة حول الكرت */
.card-highlight {
    position: absolute;
    inset: -5px; /* أكبر شوي من الكرت */
    border-radius: 35px;
    opacity: 0; /* مخفية */
    transition: all 0.4s ease;
    z-index: -1; /* خلف الكرت */
    filter: blur(20px); /* ضبابية */
}

/* داخل الكرت */
.card-inner {
    position: relative;
    width: 90%;
    height: 90%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); /* حركة ناعمة */
    transform-style: preserve-3d; /* يدعم 3D */
}

/* عند المرور */
.card-wrapper:hover .card-inner {
    transform: rotateY(180deg); /* قلب الكرت */
}

/* وجه الكرت */
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* يخفي الوجه الخلفي */
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

/* الوجه الأمامي */
.card-front {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8ecf108 50%);/* الوان الكروت وشفافيتها  */
    color: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* الوجه الخلفي */
.card-back {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    transform: rotateY(180deg); /* مقلوب */
    border: 2px solid rgba(56, 189, 248, 0.5);
}

/* أيقونة */
.icon-box {
    width: 75px;
    height: 75px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 35px;
    transition: all 0.5s ease;
}

/* حركة عند hover */
.card-wrapper:hover .card-front {
    transform: translateY(-12px); /* يطلع لفوق */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* تكبير الأيقونة */
.card-wrapper:hover .icon-box {
    transform: scale(1.25) translateY(-15px);
}

/* عنوان الكرت */
.card-front h3 {
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    color: #1e293b;
}

/* وصف الكرت */
.card-back p {
    font-size: 15px;
    line-height: 1.7;
    text-align: center;
}


/* ============ HIGHLIGHT COLORS FOR EACH CARD ============ */
.card-home .card-highlight { background: #48bb78; box-shadow: 0 0 40px #48bb78; }
.card-home:hover .card-highlight { opacity: 0.7; }

.card-search .card-highlight { background: #f56565; box-shadow: 0 0 40px #f56565; }
.card-search:hover .card-highlight { opacity: 0.7; }

.card-briefcase .card-highlight { background: #ecc94b; box-shadow: 0 0 40px #ecc94b; }
.card-briefcase:hover .card-highlight { opacity: 0.7; }

.card-users .card-highlight { background: #4299e1; box-shadow: 0 0 40px #4299e1; }
.card-users:hover .card-highlight { opacity: 0.7; }

.card-agency .card-highlight { background: #d946ef; box-shadow: 0 0 40px #d946ef; }
.card-agency:hover .card-highlight { opacity: 0.7; }

/* ============ ICON BOX COLORS ============ */
.card-home .icon-box { background: #dcfce7; color: #166534; }
.card-search .icon-box { background: #fee2e2; color: #991b1b; }
.card-briefcase .icon-box { background: #fef9c3; color: #854d0e; }
.card-users .icon-box { background: #e0f2fe; color: #075985; }
.card-agency .icon-box { background: #f3e8ff; color: #6b21a8; }
/* ============ RESPONSIVE: TABLET (1200px to 992px) ============ */
@media (max-width: 1200px) {
    .cards-container { gap: 30px; }
    .cards-side:first-of-type { margin-right: 20px; margin-top: -120px; }
    .cards-side:last-of-type { margin-left: 20px; margin-top: -120px; }
    .cards-side, .cards-center { flex: 0 1 300px; }
    .card-wrapper { height: 220px; }
    .main-logo { height: 100px; }
    .logo-text-box h2 { font-size: 26px; }
}

/* ============ RESPONSIVE: SMALL TABLET / LARGE MOBILE (991px to 768px) ============ */
@media (max-width: 991px) {
    .main-content { padding: 40px 20px; }
    .logo-section-center { margin-top: 40px; }
    .cards-container { 
        flex-direction: column; 
        align-items: center; 
        gap: 30px; 
        margin-top: 30px;
    }
    .cards-side, .cards-center { 
        flex: 1; 
        width: 100%; 
        max-width: 450px; 
        margin: 0 !important; 
    }
    .cards-center { order: 3; } 
    .cards-side:first-of-type { order: 1; }
    .cards-side:last-of-type { order: 2; }
    
    .card-wrapper { max-width: 100%; height: 210px; }
    .main-logo { height: 90px; }
    .logo-text-box h2 { font-size: 24px; }
}

/* ============ RESPONSIVE: MOBILE (767px and below) ============ */
@media (max-width: 767px) {
    .header { height: auto; padding: 10px 15px; flex-direction: column; gap: 10px; }
    .header .search-section { margin: 10px 0; width: 100%; }
    .main-content { padding: 30px 15px; }
    .logo-section-center { margin-top: 20px; }
    .main-logo { height: 80px; }
    .logo-text-box h2 { font-size: 22px; }
    .logo-text-box p { font-size: 14px; }
    
    .cards-container { gap: 20px; }
    .card-wrapper { height: 190px; }
    .card-front, .card-back { padding: 20px; border-radius: 24px; }
    .icon-box { width: 60px; height: 60px; font-size: 28px; margin-bottom: 15px; }
    .card-front h3 { font-size: 18px; }
}

/* تثبيت الفوتر أسفل الصفحة */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

.footer {
    background: #ffffff;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.footer-bottom p {
    color: #64748b;
    font-size: 14px;
}