@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

/* Clean and enhanced CSS for English version */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    scroll-padding-top: 100px;
}

/* General rule for smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Body settings */
body {
    font-family: var(--mainFont);
    background-color: #eeeeee;
    overflow-x: hidden;
    direction: ltr; /* Change direction to left-to-right */
    text-align: left; /* Align text to left */
}

.container {
    max-width: 1400px;
    margin: auto;
    padding: 0 20px;
}

/* Primary colors */
:root {
    --mainColor: #000D31;
    --fontColor: #0E1E63;
    --accentColor: #4DA3F2;
    --lightColor: #ffffff;
    --darkColor: #333333;
    --mainFont:'Tajawal', sans-serif;
}

::selection {
    background-color: var(--mainColor);
    color: white;
}

/* General header styles */
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;
}

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-right: 20px; /* Changed from margin-left to margin-right */
    transition: 0.3s;
}

header nav .lang .flag:hover {
    width: 50px;
}

/* Dropdown menu */
nav .dropdown {
    position: relative;
}

nav .dropdown .arrow {
    margin-left: 6px; /* Changed from margin-right to margin-left */
    font-size: 18px;
}

.dropdown:hover .mega-menu {
    display: flex;
}

.mega-menu.clean-menu {
    display: none;
    position: absolute;
    left: 0; /* Changed from right: 0 to left: 0 */
    top: 100%;
    background: #c3c5c4;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    width: 210px;
    direction: ltr; /* Changed from rtl to ltr */
    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.5s;
    font-size: 15px;
}

.mega-menu .column a:hover {
    font-size: 17px;
    color: var(--fontColor);
}

/* Burger icon - Hidden on desktop */
.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;
    margin: -5px;
}

.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;
    display: inline;
    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;
}

/* Main slider */
.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 control dots */
.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);
}

/* Animated blue bar */
.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%; }
}

/* About Us section */
.info {
    display: flex;
    flex-direction: column;
}

.who-We-Are {
    width: 100%;
    height: auto;
    background: url(../images/wh-are-we-en.jpg);
    background-size: cover;
    background-attachment: fixed;
    background-position: -500px;
    padding: 40px;
    color: var(--fontColor);
    line-height: 1.7;
}

.who-title {
    font-size: clamp(28px, 6vw, 40px);
    background-color: var(--fontColor);
    color: white;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    transition: 0.5s;
    margin-bottom: 30px;
    font-family: var(--mainFont);
}

.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 0; /* Changed from margin: 20px 200px */
}

/* Our Message section */
.our-massege {
    width: 100%;
    height: auto;
    background: url(../images/mosque-en.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, 40px);
    background-color: var(--fontColor);
    color: white;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    transition: 0.5s;
    margin-bottom: 30px;
    margin-left: 60%; 
    font-family: var(--mainFont);
    text-align: center;
    width: 20%;
}

.massege-title:hover {
    background-color: #ddd;
    color: var(--fontColor);
}

.massege-content {
    direction: ltr; /* Changed from rtl to ltr */
    text-align: left; /* Changed from right to left */
}

.massege-list-simple {
    list-style: disc;
    padding: 0;
    margin: 0;
}

.massege-list-simple li {
    padding: 12px 30px 12px 15px; /* Changed padding order */
    margin-bottom: 10px;
    font-size: 16px;
    border-radius: 5px;
    position: relative;
    color: var(--mainColor);
    margin-left: 59%; 
    transition: .5s;
    border-bottom: 1px solid white;
}

.massege-list-simple li:hover{
    font-size:18px ;
    width: 590px;
}
/* Services section */
.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;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 300px);
    gap: 50px;
    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: 16px;
    padding-bottom: 15px;
    position: relative;
}

.service-title::after {
    content: ' ';
    width: 200px;
    height: 0.5px;
    background-color: white;
    position: absolute;
    top: 120%;
    left: 14%; /* Changed from right to left */
}

.service-title img {
    width: 30px;
    margin-left: 20px; /* Changed from margin-right to margin-left */
    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;
}

.spiecal .more-btn{
    margin-top: -50px;
}

.more-btn:hover {
    background-color: white;
    color: var(--fontColor);
}

/* Section divider */
.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);
}

/* Our Partners */
.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);
}

/* Contact Us */
.modern-contact-section {
    direction: ltr; /* Changed from rtl to ltr */
    font-family: var(--mainFont);
    padding: 60px 20px;
    background: var(--mainColor);
}

.contact-card {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.contact-info {
    flex: 1;
    padding: 40px;
    background-color:var(--mainColor) ;
}

.contact-title {
    font-size: 28px;
    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: 16px;
    color: white;
    transition: .5s;
}

.contact-item i {
    color: white;
    font-size: 18px;
    width: 24px;
    transition: .5s;
}

.contact-item :hover{
    color: #153597;
}

.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 {
    flex: 1;
    min-height: 400px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
.footer {
    background-color: var(--mainColor);
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 16px;
}

/* Notification popup */
.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;
    right: -15px; /* Changed from left: -15px to right: -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;
}

/* Mobile menu improvements */
.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;
}

/* Prevent scrolling when menu is open */
body.no-scroll {
    overflow: hidden;
    height: 100%;
    position: fixed;
    width: 100%;
}

/* Responsive media */
@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;
    }
}

/* Mobile styles */
@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;
        background: #ddd;
    }
    
    .divider {
        width: 100%;
    }
    
    .service-title::after {
        display: none;
    }
    
    .partners-section {
        grid-template-columns: 1fr;
    }

    .contact-map iframe {
    width: 100%;
    min-height: 400px;
    border: none;
}
    
    /* Hide flags in top bar in mobile */
    header nav .lang {
        display: none !important;
    }
    
    /* Show mobile menu */
    .mobile-menu {
        display: flex;
    }
}

@media (max-width: 560px) {
    header nav {
        height: 60px;
        padding: 0 15px;
    }
    
    header nav .logo {
        height: 60px;
    }
    
    .lang .flag {
        width: 25px;
    }
    
    .hero-slider {
        height: 27vh;
    }

    .our-massege{
        background: var(--mainColor);
    }

    .our-massege li{
        border-left:none;
    }
    
    .massege-title {
        font-size: 24px;
        padding: 20px 16px;
        width:200px;
        margin-left: 0;
    }

    .massege-list-simple{
        width:10%;
        list-style: disc;
    }

    .massege-list-simple li{
        width: 300px;
        color: white;
    }
    
    .sub-title {
        font-size: 20px;
    }
    
    .description, .second-para, .third-para, .massege-list-simple li {
        font-size: 16px;
    }
    
    .service-box {
        height: auto;
        min-height: 240px;
        width: 300px;
        margin: 0px auto;
        gap: -200px;
    }
    
    .service-title {
        font-size: 18px;
    }
    
    .service-description {
        font-size: 14px;
    }
    
    /* Improve mobile menu */
    .mobile-menu {
        padding: 30px 15px;
    }
    
    .mobile-menu ul {
        gap: 25px;
    }
    
    .mobile-menu ul li a {
        font-size: 18px;
        padding: 12px 20px;
    }
    
    .mobile-menu .language-link {
        padding: 10px 15px;
    }
    
    .mobile-menu .language-link .flag {
        width: 25px;
        height: 16px;
    }
    
    .mobile-menu .language-link span {
        font-size: 14px;
    }
}

/* Ensure flags are shown in top bar on large screens */
@media (min-width: 769px) {
    header nav .lang {
        display: flex !important;
    }
    
    /* Hide burger menu on desktop */
    .burger-menu {
        display: none !important;
    }
    
    /* Hide mobile menu on desktop */
    .mobile-menu {
        display: none !important;
    }
}