@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&display=swap');

/* Global Styles */
* {
    box-sizing: border-box;
    border: none;
    outline: none;
    text-decoration: none;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
   
        font-family: 'Tajawal', sans-serif;
    }


html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background-color: #1f242d;
    color: #fff;
    
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}
/* Header */
.header {
    display: flex;
    align-items: center; /* إضافة: لمحاذاة العناصر عمودياً بشكل أفضل */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 3rem;
    background-color: #1c222c;
    z-index: 1;
    justify-content: space-between;
    
    /* ----- التعديل الأساسي ----- */
    direction: ltr; /* تغيير الاتجاه ليتناسب مع اللغة العربية */
}

.header.sticky {
    border-bottom: .1rem solid rgba(10, 18, 31, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
    cursor: default;
}

.logo img {
    height: 40px;
    /* margin-right بدلاً من استخدام الخاصية المنطقية التالية */
    margin-inline-end: 10px; 
}

.navbar {
    position: relative;
    z-index: 2;
    transition: 0.2s all ease-in-out;
    align-content: center;
}

.navbar a {
    display: inline-flex; /* لتحسين محاذاة الأيقونة والنص */
    align-items: center;  /* لمحاذاة الأيقونة والنص عمودياً */
    font-size: 1.7rem;
    color: #fff;
    
    /* margin-left بدلاً من استخدام الخاصية المنطقية التالية */
    margin-inline-start: 3rem; 
}

.navbar a:hover
{
    color: #00d5ff;
}

.navbar i {
    font-size: 18px;
    /* بدلاً من تحديد الهامش هنا، سنستخدم خاصية gap على الرابط نفسه */
    margin-inline-end: 8px; /* margin-right بدلاً من */
}

#menu-icon {
    font-size: 3.6rem;
    color: #fff;
    display: none;
    align-content: center;
}

/* Home Section */

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: justify;
}

.home-img img {
    width: 45vh;
    height: 45vh;
    margin-left: 100px;
    transition: transform 0.2s ease-out;
 
  
    border-radius: 50%;
    object-fit: cover;
    display: block;

}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content p {
    font-size: 1.9rem;
}

span {
    color: #00d5ff;
}

/* Social Media */
.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid #00d5ff;
    border-radius: 50%;
    font-size: 2.5rem;
    color: #00d5ff;
    margin: 3rem 1.5rem 3rem 0;
    transition: .5s ease-in-out;
}

.social-media a:hover {
    background-color: #00d5ff;
    color: #323846;
    box-shadow: 0 0 1rem #00d5ff;
}

/* Project Section */
.project {
    background: #323846;
}

.project h2 {
    margin-bottom: 4rem;
}

.project-container {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.project-box {
    width: calc(33.33% - 2.5rem);
    height: 200px;
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem #1f242d;
    overflow: hidden;
    display: flex;
    object-fit: cover;
}

.project-box img {
    width: 100%;
    transition: .5s ease;
}

.project-box:hover img {
    transform: scale(1.1);
}

.project-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(180deg, rgba(0, 45, 59, 0.8) 0%, rgba(0, 115, 191, 0.8) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(0); /* جعل الطبقة ظاهرة بشكل ثابت */
    transition: none; /* إزالة تأثير الحركة */
}

.project-layer h4 {
    font-size: 3rem;
}

.project-layer p {
    font-size: 1.6rem;
    margin: .3rem 0 1rem;
}

.project-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background-color: #fff;
    border-radius: 50%;
}

.project-layer a i {
    font-size: 2rem;
    color: #323846;
}

/* Error Message */
.error {
    color: #9d3025;
    font-size: 16px;
    display: none;
}

/* About Section */
.about {
    text-align: justify;
    gap: 3rem;
    background-color: #1f242d;
}

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 100px;
}

.heading {
    text-align: center;
    font-size: 4.5rem;
}

.about-content h2 {
    line-height: 1.2;
    text-align: left;
}

.about-content h3 {
    font-size: 2.6rem;
}

.about-content p {
    font-size: 1.6rem;
    margin-top: 1rem;
}

.contact-email,
.contact-number {
    font-size: 2rem;
    margin: 2rem 0;
}

.contact-number a {
    color: inherit;
    text-decoration: none;
}

.contact-span {
    font-weight: 600;
    color: #00d5ff;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #00d5ff;
    border-radius: 4rem;
    
    font-size: 1.6rem;
    color: #323846;
    font-weight: 600;
    transition: .4s ease-in-out;
}

.btn:active {
    transform: scale(0.9);
}

.btn:hover {
    box-shadow: none;
}

.btn i {
    margin-right: 0.5rem;
}

/* Footer */
.footer {
    display: flex;
    height: 70px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background-color: #323846;
}

.footer-text p {
    font-size: 1.6rem;
}

.footericonTop {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: #00d5ff;
    border-radius: .8rem;
    font-weight: 700;
}

.footericonTop a i {
    font-size: 2.4rem;
    color: #323846;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: #00d5ff;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #007c6c;
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 55%;
    }

    .header {
        padding: 2.5rem 3%;
    }
    
    section {
        padding: 10rem 3% 2rem;
    }
    
    .footer {
        padding: 2rem 3%;
    }

    #menu-icon {
        display: block;
    }
    
    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        transform: translateX(200%);
        width: 100%;
        z-index: -1;
        padding: 1rem 3%;
        background: #1f242d;
        border-top: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        text-align: left;
    }
    
    .navbar.current {
        transform: translateX(0);
    }
    
    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 2rem 0;
    }
    
    .home {
        flex-direction: column;
    }
    
    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h2 {
        font-size: 5rem;
    }
    
    .home-img {
        display: flex;
        justify-content: center;
        width: 100%;
    }
    
    .home-img img {
        width: 65%;
        height: auto;
        margin-left: 0;
        transition: transform 0.1s ease-out;
    }
    
    .about-content {
        margin-top: 20px;
        flex-direction: column; 
        gap: 10px;
    }
    
    dotlottie-player {
        width: 350px !important;
        height: 350px !important;
    }
    
    .contact-number {
        text-decoration: none;
        color: #fff;
    }

    .project-container {
        flex-direction: column;
        gap: 2rem 0;
    }
    
    .project-box {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 400px) {
    html {
        font-size: 50%;
    }
}

.footer-heading {
    font-size: 13px;
    margin: 0;
    color: #fff;
      direction: ltr;
    text-transform: none;
}

.footer-heading a {
    color: #00d5ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* عنوان القسم */
.subjects-title {
  color: #00d5ff;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 2rem;
  text-align: center;
}

/* الحاوية الرئيسية */
.subjects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1000px;
  margin: auto;
}

/* عنصر كل مادة */
.subject-box {
  background-color: #2a2f3a;
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  font-size: 2rem;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: white;
}

.subject-box:hover {
  background-color: #00d5ff;
  color: black;
  transform: translateY(-5px);
}

/* صورة الأيقونة */
.subject-box img {
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
}


.subject-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
  }
.modal-content {
  background-color: rgba(42, 47, 58, 0.96);
  padding: 30px;
  border-radius: 16px;
  max-width: 700px; /* الحجم الجديد */
  width: 90%;       /* حتى تتكيف مع الشاشات الصغيرة */
  color: white;
  font-size: 14px;
  position: relative;
  animation: popIn 0.3s ease;
}
  .close {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
  }
  .modal-content table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
  }
  .modal-content th, .modal-content td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #444;
  }
  .download-btn {
    background-color: #00d5ff;
    color: black;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
  }
  .download-btn:hover {
    background-color: #00c2e0;
  }

  @keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
  }

  .fade-in {
    animation: fadeIn 0.3s forwards;
  }

  .fade-out {
    animation: fadeOut 0.3s forwards;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
  }

  #backButton {
    position: fixed;
    bottom: 20px; /* المسافة من الأسفل */
    left: 20px;  /* المسافة من اليمين */
    background-color: #00d5ff;
    color: #1f242d;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
     font-size: 28px; /* حجم الأيقونة */
    font-size: 24px;
    cursor: pointer;
    /* هذه تساعد على تمركز الأيقونة بدقة */
  line-height: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
    z-index: 1000;
  }

  #backButton:hover {
    background-color: #008bbf;
  }

  .icon-container {
      display: flex;
      justify-content: center; /* يضمن توسيط المحتوى داخل الحاوية */
      align-items: center;
      gap: 15px;
      background-color: #1f242d;
      padding: 18px 10px;
      border-radius: 16px;
      
      direction: ltr; /* مهم لتفادي التحيز لليسار في flex عند استخدام RTL */
      margin: 20PX;
    
    }

    .icon-container a img {
      width: 50px;
      height: 50px;
      transition: transform 0.2s;
    }

    .icon-container a img:hover {
      transform: scale(1.1);
    }
  
       .custom-text {
     
      text-align: center;
    }

    /* لتوسيط العنصر في الصفحة */
.scroll-down-container {
  position: absolute;
  left: 50%;
  bottom: 30px; /* يمكنك تعديل المسافة من الأسفل */
  transform: translateX(-50%);
  text-align: center;
  color: #333; /* لون النص */
  cursor: pointer;
  transition: opacity 0.5s ease; /* تأثير التلاشي عند الإخفاء */
  z-index: 1000;
}

/* تصميم النص */
.scroll-down-container span {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  font-family: sans-serif; /* نوع الخط */
}

/* تصميم السهم */
.arrow {
  width: 15px;
  height: 15px;
  border: 2px solid #afafaf; /* لون وسمك السهم */
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
  margin: 0 auto;
}

/* إضافة الحركة للسهم (صعود وهبوط) */
.arrow {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) rotate(-45deg);
  }
  40% {
    transform: translateY(-15px) rotate(-45deg);
  }
  60% {
    transform: translateY(-8px) rotate(-45deg);
  }
}