@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html, body {
    width: 100%;
    overflow-x: hidden;
  }

/* قاعدة عامة للتمرير السلس */
html {
    scroll-behavior: smooth;
}

/* إعدادات الجسم */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
    background-color: #eeeeee;
    overflow-x: hidden;
}

/* الألوان الأساسية */
:root {
    --mainCOlor: #000D31;
    --fontColor: #0E1E63;
}

::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;
    box-sizing: border-box;
    margin: auto;
    margin-top: 20px;
}

header nav.blue-nav {
    background-color: var(--mainCOlor) !important;
    backdrop-filter: none !important;
}

header nav.transparent-nav {
    background-color: rgba(0, 13, 49, 0.4) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

header nav .logo {
    height: 115px;
    cursor: pointer;
}

header nav .options {
    display: flex;
    gap: 20px;
}

header nav .options li {
    list-style: none;
    padding-top: 0px;
}

/* header nav .options li a {
    color: white;
    padding: 0 20px 0;
    text-decoration: none;
    transition: 0.3s;
    border-bottom: 1px solid transparent;
    font-size: 18px;
}
 */

 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:#002fff99;
    
}

header nav .options .column a{
  font-size: 17px;
}



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;
  gap: 40px;
  direction: rtl;
  z-index: 100;
  color: var(--fontColor);
  max-height: 300px; 
  overflow-y:auto;
  scrollbar-width: noen;
  scrollbar-color: #919191 transparent ;
}

header nav .options .column a:hover{
    font-size: 18px;
    color: var(--fontColor);
}



.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;
}




 /* أيقونة البيرجر */
 .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 10px;
    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;
    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;
}
/* إظهار البيرجر وإخفاء القائمة الأصلية عند الشاشات الصغيرة */
@media (max-width: 768px) {
    header nav .options,
    header nav .lang {
        display: none;
    }

    .burger-menu {
        display: flex;
    }
}


.sub .photo{
    width: 100%;
    height: 620px;
    background-color: var(--fontColor);
    background-image: url(../images/auction.jpg);
    background-size: cover;
    background-position: -300px;
    border-bottom: 10px solid var(--mainCOlor);
}

.sub p{
    font-size: 20px;
    line-height: 2;
    width: 90%;
    margin: auto;
    margin-top: 50px;
    font-weight: 400;
    position: relative;
}

.sub  .second {
    margin-top:50px ;
    margin-bottom:40px;
}

.sub p::before{
    content: ' ';
    width: 10px;
    height: 10px;
    background: var(--mainCOlor);
    border: 1px solid var(--fontColor);
    position: absolute;
    top: 20px;
    right: -30px;
}

.sub h1 {
    margin: auto;
    width: 400px;
    font-size: 40px;
    font-weight: 700;
    text-align: right;
    margin-top: 40px;
}

.example{
    width: 100%;
    display: inline-flex;
    justify-content: center;
    justify-content: space-evenly;
    margin-bottom: 30px;
}

.card{
    width: 400px;
    height: 600px;
    background: var(--mainCOlor);
    border: 5px solid white;
    border-radius: 25px;
    box-shadow: 6px 10px 18px;
    transition: .5s;
}


.card h2{
    text-align: center;
    color: white;
    font-size: 18px;
    margin-top: 20px;
}

.card img{
    width: 350px;
    margin-right: 20px;
    margin-top: 20px;
}

.card:hover{
    margin-top: -10px;
}

  footer{
    width: 100%;
    height: 50px;
    background-color: var(--mainCOlor);
    margin-top: 10px;

}
  .card img {
  cursor: pointer;
  transition: transform 0.3s;
}

.card img:hover {
  transform: scale(1.03);
}

/* نافذة عرض الصور المكبرة */
.image-popup {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.image-popup img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
}

.image-popup .close-btn {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

/* =============== وسائط الاستجابة (Media Queries) =============== */

/* شاشات كبيرة (لابتوب/كمبيوتر) */
@media (max-width: 1200px) {
    header nav {
        padding: 0 20px;
    }
    
    header nav .options li a {
        padding: 0 15px 0;
        font-size: 16px;
    }
    
    .sub h1 {
        margin-right: 38%;
    }
    
    .sub .photo {
        background-position: -200px;
    }
    
    .example {
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .card {
        width: 350px;
        height: 550px;
    }
    
    .card img {
        width: 320px;
    }
}

/* شاشات متوسطة (لابتوب صغير/تابلت أفقي) */
@media (max-width: 992px) {
    header nav {
        width: 98%;
        padding: 0 15px;
        height: 70px;
    }
    
    header nav .logo {
        height: 90px;
    }
    
    header nav .options li a {
        font-size: 15px;
        padding: 0 10px 0;
    }
    
    .sub .photo {
        height: 500px;
        background-position: -150px;
    }
    
    .sub h1 {
        margin-right: 35%;
        width: 280px;
        font-size: 35px;
    }
    
    .sub p {
        font-size: 18px;
        width: 95%;
    }
    
    .card {
        width: 320px;
        height: 520px;
    }
    
    .card img {
        width: 290px;
    }
}

/* شاشات صغيرة (تابلت عمودي) */
@media (max-width: 768px) {
    header nav {
        height: 60px;
        border-radius: 30px;
        margin-top: 15px;
    }
    
    header nav .logo {
        height: 70px;
    }
    
    .sub .photo {
        height: 400px;
        background-position: center;
    }
    
    .sub h1 {
        margin-right: auto;
        margin-left: auto;
        width: 250px;
        font-size: 30px;
        margin-top: 30px;
        text-align: center;
    }
    
    .sub p {
        font-size: 16px;
        line-height: 1.8;
        margin-top: 70px;
    }
    
    .sub .second {
        margin-top: 40px;
        margin-bottom: 40px;
    }
    
    .sub p::before {
        right: -20px;
    }
    
    .mega-menu.clean-menu {
        width: 180px;
        padding: 15px;
    }
    
    .example {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    
    .card {
        width: 90%;
        max-width: 400px;
        height: auto;
        padding-bottom: 20px;
    }
    
    .card img {
        width: 90%;
        margin: 20px auto;
        display: block;
    }
}

/* شاشات جد صغيرة (موبايل) */
@media (max-width: 576px) {
    header nav {
        height: 55px;
        padding: 0 10px;
        margin-top: 10px;
    }
    
    header nav .logo {
        height: 60px;
    }
    
    .burger-menu {
        width: 25px;
    }
    
    .burger-menu span {
        height: 2.5px;
    }
    
    .sub .photo {
        height: 300px;
    }
    
    .sub h1 {
        width: 220px;
        font-size: 25px;
        margin-top: 20px;
    }
    
    .sub p {
        font-size: 15px;
        line-height: 1.7;
        width: 90%;
        margin-top: 50px;
    }
    
    .sub .second {
        margin-top: 30px;
        margin-bottom: 30px;
    }
    
    .sub p::before {
        width: 5px;
        height: 5px;
        top: 10px;
        right: -15px;
    }
    
    .mobile-menu ul {
        gap: 25px;
    }
    
    .mobile-menu ul li a {
        font-size: 18px;
        padding: 12px 20px;
    }
    
    .home-btn {
        font-size: 16px;
        padding: 10px 20px;
    }
    
    .language-options .flag {
        width: 35px;
        height: 25px;
    }
    
    .card {
        width: 95%;
        height: auto;
    }
    
    .card h2 {
        font-size: 16px;
    }
    
    .card img {
        width: 85%;
    }
    
    .image-popup .close-btn {
        top: 20px;
        right: 20px;
        font-size: 30px;
    }
}

/* شاشات ذات ارتفاع محدود (لضمان رؤية المحتوى) */
@media (max-height: 700px) {
    .sub .photo {
        height: 300px;
    }
    
    .mobile-menu {
        justify-content: flex-start;
        padding-top: 80px;
    }
    
    .card {
        height: auto;
        padding-bottom: 15px;
    }
}

/* دعم للأجهزة التي تستخدم اللمس */
@media (hover: none) and (pointer: coarse) {
    header nav .options li a:hover {
        font-size: 18px;
    }
    
    .mega-menu.clean-menu {
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    .card:hover {
        margin-top: 0;
    }
}

/* تحسينات للعرض على الشاشات الصغيرة جداً */
@media (max-width: 400px) {
    header nav {
        border-radius: 20px;
    }
    
    .sub h1 {
        font-size: 22px;
        width: 200px;
    }
    
    .sub p {
        font-size: 14px;
    }
    
    .mobile-menu ul li a {
        font-size: 16px;
    }
    
    .card h2 {
        font-size: 15px;
        margin-top: 15px;
    }
    
    .card img {
        width: 90%;
        margin-top: 15px;
    }
}

/* تحسينات للشاشات العريضة جداً */
@media (min-width: 1600px) {
    .sub .photo {
        height: 700px;
        background-position: -400px;
    }
    
    .sub p {
        font-size: 22px;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .example {
        justify-content: center;
        gap: 60px;
    }
    
    .card {
        width: 450px;
        height: 650px;
    }
    
    .card img {
        width: 400px;
    }
}

/* تحسينات للوضع الأفقي على الجوال */
@media (max-height: 500px) and (orientation: landscape) {
    .sub .photo {
        height: 250px;
    }
    
    .mobile-menu ul {
        gap: 15px;
    }
    
    .mobile-menu ul li a {
        padding: 8px 15px;
        font-size: 16px;
    }
    
    .example {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .card {
        width: 45%;
        height: auto;
    }
}

/* تحسينات خاصة لصورة الخلفية على الشاشات المختلفة */
@media (max-width: 480px) {
    .sub .photo {
        background-position: center;
    }
}

/* تحسينات للعناوين على الشاشات الصغيرة */
@media (max-width: 350px) {
    .sub h1 {
        font-size: 20px;
        width: 180px;
    }
    
    .sub p {
        font-size: 13px;
    }
    
    .card h2 {
        font-size: 14px;
    }
}

/* تحسينات للهواتف الذكية الحديثة ذات الشقوق */
@media (max-width: 390px) and (max-height: 844px) {
    .sub .photo {
        height: 280px;
    }
    
    .sub h1 {
        margin-top: 25px;
    }
    
    .sub p {
        margin-top: 45px;
    }
    
    .card {
        width: 92%;
    }
}

/* تحسينات للشاشات المتوسطة الدقة */
@media (min-width: 1400px) and (max-width: 1600px) {
    .sub .photo {
        height: 650px;
        background-position: -300px;
    }
}

/* تحسينات لأجهزة الآيباد المختلفة */
@media (width: 768px) and (height: 1024px) {
    .sub .photo {
        height: 450px;
    }
    
    .sub h1 {
        font-size: 32px;
        width: 280px;
    }
    
    .card {
        width: 85%;
    }
}

@media (width: 1024px) and (height: 768px) {
    .sub .photo {
        height: 400px;
        background-position: -100px;
    }
    
    .sub h1 {
        margin-right: 38%;
    }
    
    .example {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    .card {
        width: 45%;
        height: 550px;
    }
}

/* تحسينات للشاشات الصغيرة جداً مع محتوى البطاقات */
@media (max-width: 340px) {
    .card {
        width: 98%;
    }
    
    .card img {
        width: 95%;
        margin-right: 0;
    }
    
    .card h2 {
        font-size: 14px;
        padding: 0 10px;
    }
}

/* نافذة عرض الصور المكبرة */
.image-popup {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-popup img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.image-popup.active img {
    transform: scale(1);
}

.image-popup .close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.image-popup .close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* تأثير التكبير عند تمرير الماوس */
.card img {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card img:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* تحسينات للعرض على الجوال */
@media (max-width: 768px) {
    .image-popup .close-btn {
        top: 15px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .image-popup img {
        max-width: 95%;
        max-height: 80%;
    }
}