@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

/* CSS النظيف والمحسن */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    scroll-padding-top: 100px;
}

/* قاعدة عامة للتمرير السلس */
html {
    scroll-behavior: smooth;
}

/* إعدادات الجسم */
body {
    font-family: 'Tajawal', sans-serif;
    background-color: #eeeeee;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: auto;
    padding: 0 20px;
}

/* الألوان الأساسية */
:root {
    --mainColor: #000D31;
    --fontColor: #0d1b5b;
    --accentColor: #4DA3F2;
    --lightColor: #ffffff;
    --darkColor: #333333;
}

::selection {
    background-color: var(--mainColor);
    color: white;
}

/* التنسيقات العامة للرأس */
header nav {
    width: 95%;
    height: 80px;
    background-color: var(--mainColor);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-radius: 50px;
    transition: all 0.6s ease-in-out;
    padding: 0 40px;
    margin: 20px auto 0;
}

header nav .logo {
    height: 115px;
    cursor: pointer;
}

header nav .options {
    display: flex;
    gap: 20px;
}
.options li a .arrow {
    vertical-align: middle;
    font-size: 0.9em;
}
header nav .options li {
    list-style: none;
}

header nav .options li a {
    color: white;
    padding: 0 20px;
    text-decoration: none;
    transition: 0.3s;
    font-size: 18px;
    line-height: 1;
    align-items: center;
}

header nav .options li a:hover {
    font-size: 20px;
    color: var(--accentColor);
}

header nav .lang {
    list-style: none;
    display: flex;
    align-items: center;
}

header nav .lang .flag {
    width: 35px;
    margin-left: 20px;
    transition: 0.3s;
}

header nav .lang .flag:hover {
    width: 50px;
}

/* القائمة المنسدلة */
nav .dropdown {
    position: relative;
}

nav .dropdown .arrow {
    margin-right: 6px;
    font-size: 20px;
}

.dropdown:hover .mega-menu {
    display: flex;
}

.mega-menu.clean-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #c3c5c4;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    width: 210px;
    direction: rtl;
    z-index: 100;
    color: var(--fontColor);
    max-height: 300px; 
    overflow-y: auto;
}

.mega-menu .column {
    display: flex;
    flex-direction: column;
}

.mega-menu .column a {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    color: #002f6c;
    transition: 0.3s;
    font-size: 17px;
}

.mega-menu .column a:hover {
    font-size: 18px;
    color: var(--fontColor);
}

/* أيقونة القائمة (برجر) */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    width: 30px;
    height: 25px;
}

.burger-menu span {
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 2px;
    transition: 0.3s;
}

/* قائمة الموبايل الجانبية */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 13, 49, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: right 0.4s ease-in-out;
    z-index: 9998;
    text-align: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu ul li a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid var(--mainCOlor);
    display: block;
}

.mobile-menu ul li a:hover {
    background-color: var(--mainCOlor);
    color: #fff;
    transform: scale(1.05);
}

.mobile-extras {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 400px;
}

.home-btn {
    text-decoration: none;
    color: white;
    font-size: 16px;
    background-color: var(--mainCOlor);
    padding: 10px 20px;
    border-radius: 10px;
    transition: 0.3s ease;
    border: 1px solid white;
    width: 100%;
    text-align: center;
}

.home-btn:hover {
    background-color: white;
    color: var(--mainCOlor);
}

.language-options {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.language-options .flag {
    width: 35px;
    height: 25px;
    transition: 0.3s ease;
    border-radius: 5px;
    border: 2px solid white;
}

.language-options .flag:hover {
    transform: scale(1.2);
    border-color: var(--mainCOlor);
}

/* عند التمرير */
header.scrolled nav {
    background-color: rgba(0, 13, 49, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease-in-out;
    border-radius: 50px;
}

header.scrolled nav .options li a {
    color: white;
}

header.scrolled nav .options .clean-menu .column a {
    color: var(--mainCOlor);
}

header.scrolled nav .options li a:hover {
    color: #4DA3F2;
}

/* السلايدر الرئيسي */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* نقاط التحكم بالسلايدر */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 5;
}

.dot {
    width: 14px;
    height: 14px;
    background-color: white;
    opacity: 0.6;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active,
.dot:hover {
    background-color: var(--mainColor);
    opacity: 1;
    transform: scale(1.2);
}

/* الشريط الأزرق المتحرك */
.blue-bar-animated {
    width: 100%;
    height: 8px;
    background: linear-gradient(270deg, var(--mainColor), #0b2564, var(--mainColor));
    background-size: 200% auto;
    animation: gradientMove 5s ease infinite;
    overflow: hidden;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* قسم من نحن */
.info {
    display: flex;
    flex-direction: column;
}

.who-We-Are {
    width: 100%;
    height: auto;
    background: url(../images/who\ we\ are\ ..jpg);
    background-size: cover;
    background-attachment: fixed;
    padding: 40px;
    color: var(--fontColor);
    line-height: 1.7;
}

.who-title {
    font-size: clamp(28px, 6vw, 50px);
    background-color: var(--fontColor);
    color: white;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    transition: 0.5s;
    margin-bottom: 30px;
    font-family: 'Tajawal', sans-serif;
}

.who-title:hover {
    color: var(--fontColor);
    background-color: #ddd;
}

.sub-title {
    font-size: 28px;
    margin-bottom: 20px;
}

.description, .second-para, .third-para {
    font-size: 19px;
    font-weight: 500;
    transition: 0.5s;
    margin-bottom: 20px;
    width: 70%;
}

.description:hover, .second-para:hover, .third-para:hover {
    font-size: 20px;
}

.divider {
    width: 400px;
    height: 2px;
    background: white;
    border: none;
    border-radius: 90%;
    margin: 20px 200px;
}

/* تنسيقات قسم رسالتنا البسيط المطابق للصورة */
.our-massege {
    width: 100%;
    height: auto;
    background: url(../images/mosque.jpg);
    background-size: cover;
    padding: 40px;
    border-radius: 12px;
    border-top: 10px solid var(--mainColor);
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}

.massege-title {
    font-size: clamp(28px, 6vw, 50px);
    background-color: var(--fontColor);
    color: white;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    transition: 0.5s;
    margin-bottom: 30px;
    margin-right: 60%;
    font-family: 'Tajawal', sans-serif;
    text-align: center;
    width: 20%;
}

.massege-title:hover {
    background-color: #ddd;
    color: var(--fontColor);
}

.massege-content {
    direction: rtl;
    text-align: right;
}

.massege-list-simple {
    list-style: disc;
    padding: 0;
    margin: 0;
}

.massege-list-simple li {
    padding: 12px 15px 12px 30px;
    margin-bottom: 10px;
    font-size: 17px;
    border-radius: 5px;
    position: relative;
    color: var(--mainColor);
    margin-right: 60%;
    transition: .5s ;
    border-bottom: 1px solid white;
}

.massege-list-simple li:hover{
    font-size:18px ;
    width: 600px;
}

/* تنسيقات للاستجابة على الأجهزة المختلفة */
@media (max-width: 768px) {
    .our-massege {
        padding: 25px;
        background: var(--mainColor);
    }

    .massege-title{
      width: 150px;
      margin-right: 0%;
    }
    
    .massege-list-simple li {
        font-size: 16px;
        padding: 10px 10px 10px 25px;
        margin-right: 10px;
        color: white;
        border-right: 1px solid white ;
    }
}

@media (max-width: 480px) {
    .our-massege {
        padding: 20px 15px;
    }
    
    .massege-list-simple li {
        font-size: 15px;
        padding: 8px 8px 8px 20px;
    }
    
    .massege-list-simple li:before {
        right: 5px;
        font-size: 18px;
    }
}

/* قسم الخدمات */
.services-header {
    background-color: var(--mainColor);
    color: white;
    text-align: center;
    padding: 20px;
    font-size: clamp(24px, 5vw, 36px);
    font-weight: bold;
    position: relative;
    z-index: 2;
    margin-top: 5px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 20%);
    gap: 100px;
    padding: 30px 0;
    background-color: #f7f9fc;
    justify-content: center;
}

.service-box {
    background-color: var(--fontColor);
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    height: 265px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    color: white;
}

.service-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.service-title {
    font-size: 20px;
    padding-bottom: 15px;
    position: relative;
}

.service-title::after {
    content: ' ';
    width: 200px;
    height: 0.5px;
    background-color: white;
    position: absolute;
    top: 120%;
    right: 14%;
}

.service-title img {
    width: 30px;
    margin-right: 20px;
    position: relative;
    top: 10px;
}

.service-description {
    font-size: 15px;
    margin: 30px 0;
    flex-grow: 1;
    text-align: center;
    width: 100%;
}

.more-btn {
    width: 100px;
    padding: 10px 18px;
    background-color: var(--fontColor);
    color: white;
    border: 1px solid white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    transition: background-color 0.3s ease;
    margin: 0 auto;
}

.more-btn:hover {
    background-color: white;
    color: var(--fontColor);
}

/* تعديلات للاستجابة على الشاشات المتوسطة */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-box {
        width: 150px;
        height: 150px;
    }
}

/* تعديلات للاستجابة على الشاشات الصغيرة */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column; /* لأنك تريد العناصر واحداً فوق الآخر */
        align-items: center; /* يجعل العناصر في المنتصف أفقياً */
        justify-content: center; 
        gap: 20px;
        
    }
    
    .service-box {
        width: 90%;
        width: 350px;
        height: 300px;
        /*margin-right: 12%;*/
        margin: 0 auto;
    }
    
    .service-title {
        font-size: 16px;
    }

    .service-title::after {
        content: '';
        height: 20px;
        width: 200px;
        background-color: white;
        position: absolute;
        top: 20px;
        right: 30px;
    }    
    
    .service-description {
        font-size: 13px;
    }
}
/* الفاصل بين الأقسام */
.section-divider {
    width: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.divider-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-top: 5px solid var(--fontColor);
}

/* شركاؤنا */
.section-title {
    background-color: var(--mainColor);
    padding: 40px 0;
    text-align: center;
    color: white;
    font-size: clamp(24px, 5vw, 36px);
    font-weight: bold;
}

.partners-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    background-color: #f9f9f9;
    text-align: center;
}

.partner-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.partner-card:hover {
    transform: translateY(-5px);
}

.partner-card img {
    max-width: 80%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 10px;
}

.partner-button {
    display: inline-block;
    background-color: var(--mainColor);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.partner-button:hover {
    color: var(--mainColor);
    background-color: white;
    text-decoration: none;
    border: 1px solid var(--mainColor);
}

/* اتصل بنا */
.modern-contact-section {
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
    padding: 60px 20px;
    background: var(--mainColor);
}

.contact-card {
    display: flex;
    max-width: 1300px;
    margin: 20px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

.contact-info {
    flex: 1;
    padding: 60px;
    background: var(--mainColor);
}

.contact-title {
    font-size: 40px;
    margin-bottom: 30px;
    color: white;
    position: relative;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 18px;   
    color: white;
    transition: .5s;
}

.contact-item:hover{
    color: #153597;
}

.contact-item i {
    color: white;
    font-size: 18px;
    width: 24px;
    transition: 1s;
}

.contact-item:hover.contact-item i{
    color: #153597;
}

.contact-item a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #153597;
}

.contact-map {
    width: 600px;
    min-height: 400px;
    flex:1;
    border-radius: 20px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border-radius: 20px;
}

/* الفوتر */
.footer {
    background-color: var(--mainColor);
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 16px;    
}

/* نافذة الإشعارات */
.notification-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    width: 90%;
    max-width: 400px;
    display: none;
}

.popup-content {
    position: relative;
    text-align: center;
}

.close-btn {
    position: absolute;
    top: -15px;
    left: -15px;
    background-color: var(--mainColor);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
}

/* وسائط الاستجابة */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .contact-card {
        flex-direction: column;
    }
    
    .contact-map {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    header nav {
        width: 95%;
        height: 70px;
        padding: 0 20px;
        margin: 10px auto 0;
    }
    
    header nav .logo {
        height: 80px;
    }
    
    header nav .options {
        display: none;
    }
    
    .burger-menu {
        display: flex;
    }

    .who-We-Are .divider{
      margin-right: 0;
    }

    .who-We-Are{
      background: #ddd;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-slider {
        height: 30vh;
    }
    
    .info {
        flex-direction: column;
    }
    
    .who-We-Are, .our-massege {
        padding: 20px;
    }
    
    .divider {
        width: 100%;
    }
    
    .service-title::after {
        display: none;
    }
    
    .partners-section {
        grid-template-columns: 1fr;
    }

    .contact-map {
            width: 100%;
            height: 1000px;
            flex: 1;
    }

    .contact-map iframe {
        width: 100%;
        height: 150%;
    }
}

@media (max-width: 560px) {
    header nav {
        height: 60px;
        padding: 0 15px;
    }
    
    header nav .logo {
        height: 60px;
    }
    
    .lang .flag {
        width: 25px;
    }
    
    .hero-slider {
        height: 27vh;
    }
    
    .who-title, .massege {
        font-size: 24px;
        padding: 8px 16px;
    }
    
    .our-massege li{
        border-right: none;
    }

    .sub-title {
        font-size: 20px;
    }
    
    .description, .second-para, .third-para, .massege-list li {
        font-size: 16px;
    }
    
    .service-box {
        height: auto;
        min-height: 240px;
    }
    
    .service-title {
        font-size: 18px;
    }
    
    .service-description {
        font-size: 14px;
    }
    
    
    .partners-section {
        grid-template-columns: 1fr;
    }

    .contact-map {
        width: 320px;
    }
    
    .contact-map iframe {
        width: 90%;
        border: none;
        height: 300px;
        position: absolute;
    }
}

/* تحسينات لقائمة الموبايل */
.no-scroll {
    overflow: hidden;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.burger-menu span {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* منع التمرير عند فتح القائمة */
body.no-scroll {
    overflow: hidden;
    height: 100%;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .mobile-menu {
        overflow-y: auto;
    }
    
    .burger-menu {
        z-index: 10000;
        position: relative;
    }
}

/* إخفاء الأعلام في الشريط العلوي في حالة الجوال */
@media (max-width: 768px) {
    header nav .lang {
        display: none; /* إخفاء الأعلام في الشريط العلوي */
    }
    
    /* إظهار الأعلام في قائمة البرجر فقط */
    .mobile-menu .language-option {
        display: block; /* التأكد من إظهارها في القائمة */
    }
}

/* التأكد من إظهار الأعلام في الشريط العلوي في الشاشات الكبيرة */
@media (min-width: 769px) {
    header nav .lang {
        display: flex; /* إظهار الأعلام في الشريط العلوي */
    }
    
    /* إخفاء خيارات اللغة من قائمة البرجر في الشاشات الكبيرة */
    .mobile-menu .language-option {
        display: none;
    }
    
    /* إظهار خيارات اللغة في الجزء السفلي للقائمة في الشاشات الكبيرة إذا needed */
    .mobile-extras .language-options {
        display: flex;
    }
}