/* المتغيرات والتنسيق العام */
:root {
  --primary: #0f4c81;
  --accent: #00bcd4;
  --dark: #121212;
  --light-bg: #f8fafc;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--light-bg);
  color: #334155;
  overflow-x: hidden;
}

/* الهيدر (الـ Hero) */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.95), rgba(0, 188, 212, 0.8)),
    url('../img/my_img.png');
  background-size: cover;
  background-position: center center; /*  أهم سطر */
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: white;
  padding: 190px 0 120px;
  overflow: hidden;
} 


/* تأثير الأمواج المتحركة */
.waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  min-height: 100px;
  max-height: 150px;
  z-index: 3;
}

.parallax>use {
  animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}

.parallax>use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 7s;
}

.parallax>use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
}

.parallax>use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 13s;
}

.parallax>use:nth-child(4) {
  animation-delay: -5s;
  animation-duration: 20s;
}

@keyframes move-forever {
  0% {
    transform: translate3d(-90px, 0, 0);
  }

  100% {
    transform: translate3d(85px, 0, 0);
  }
}

/* العناوين والبطاقات */
.section-title {
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 40px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 50px;
  height: 4px;
  background: var(--accent);
}

.info-card {
  background: white;
  border: none;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
  height: 100%;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* البطاقات الأكاديمية */
.edu-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: 0.4s;
  border-right: 6px solid #e2e8f0;
}

.edu-card:hover {
  transform: scale(1.02);
  border-right-color: var(--accent);
}

.edu-icon {
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: white;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(15, 76, 129, 0.3);
}

.grade-badge {
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-block;
}

/* الأبحاث العلمية */
.research-item {
  background: white;
  border-radius: 15px;
  border-right: 5px solid var(--accent);
  padding: 25px;
  transition: 0.3s;
  height: 100%;
  position: relative;
}

.research-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.research-icon {
  font-size: 2rem;
  color: var(--primary);
  opacity: 0.1;
  position: absolute;
  left: 20px;
  top: 20px;
}

/* المهارات والفوتر */
.skill-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 15px;
  border-radius: 8px;
  font-weight: 600;
font-size: 14px;
}

.nav-custom {
  background: rgba(15, 76, 129, 0.95) !important;
  backdrop-filter: blur(10px);
}

/* Modern Footer */
.footer {
  background: #0f4c81;
  color: #cbd5e1;
  padding: 60px 0 20px;
}

.footer-title {
  color: white;
  font-weight: 700;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}

.footer-link {
  color: #94a3b8;
  text-decoration: none;
  transition: 0.3s;
  display: block;
  margin-bottom: 10px;
}

.footer-link:hover {
  color: #fff;
  padding-right: 10px;
  font-weight: bold;
}

.social-circle {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  /* background: #fff;
  color: var(--accent); */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: 0.3s;
  margin-left: 10px;
  box-shadow: 0 3px 5px #000;
}

.social-circle:hover {
  background: #fff;
  transform: rotate(360deg);
  color: var(--accent);
  /* background: var(--accent); */
  /* color: #fff; */
}

/* ========================= RESPONSIVE IMPROVEMENTS ========================= */
/* تحسين عام للموبايل */
@media (max-width: 576px) {
  body {
    font-size: 14px;
  }

  .hero {
    padding: 90px 15px 70px;
    background-attachment: scroll;
    /* مهم جداً للموبايل */
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 16px !important;
  }

  .section-title {
    font-size: 20px;
    text-align: center;
    display: block;
  }

  .section-title::after {
    right: 50%;
    transform: translateX(50%);
  }

  .info-card,
  .edu-card,
  .research-item {
    padding: 20px !important;
  }

  .waves {
    height: 50px;
  }
}

/* التابلت */
@media (max-width: 768px) {
  .navbar-nav {
    text-align: right;
  }

  .hero {
    padding: 110px 20px 80px;
    background-attachment: scroll;
  }

  .display-3 {
    font-size: 2rem;
  }

  .edu-card {
    flex-direction: column !important;
    text-align: right;
  }

  .edu-icon {
    margin-bottom: 15px;
  }
}

/* الشاشات المتوسطة */
@media (max-width: 992px) {
  .hero {
    padding: 130px 20px 90px;
  }

  .info-card {
    margin-bottom: 20px;
  }

  .footer {
    text-align: center;
  }

  .footer-title::after {
    right: 50%;
    transform: translateX(50%);
  }
}

/* شاشات كبيرة جدًا */
@media (min-width: 1400px) {
  .container {
    max-width: 1200px;
  }
}


/* تحسين navbar في الموبايل */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(15, 76, 129, 0.98);
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
  }

  .nav-link {
    padding: 10px 0;
  }
}

/* تحسين النصوص الطويلة */
p,
li {
  word-break: break-word;
}

/* تحسين badges في الموبايل */
@media (max-width: 576px) {
  .badge {
    font-size: 12px;
    white-space: normal;
    text-align: center;
  }
}

/*--------------------------------------------------------------
# Scroll Top Button
--------------------------------------------------------------*/
:root {
  --primary: #0f4c81;
  --accent: #00bcd4;
  --dark: #121212;
  --light-bg: #f8fafc;
}

.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: 15px;
  z-index: 99999;
  background-color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  transition: all 0.4s;
  box-shadow: 0 3px 5px #000;
}

.scroll-top i {
  font-size: 24px;
  color: var(--light-bg);
  line-height: 0;
}

.scroll-top:hover {
  background-color: color-mix(in srgb, var(--primary), transparent 20%);
  color: var(--light-bg);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  background-color: var(--primary);
}


/* Chat */
/* تصميم زر واتساب */

/* زر الدردشة */
.chat-toggle {
  position: fixed;
  left: 30px;
  bottom: 10px;
  background: var(--primary);
  color: white;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px var(--primary);
  z-index: 9999;
  transition: 0.3s;
  box-shadow: 0 3px 5px #000;
  text-align: start;
}

.chat-toggle:hover {
  transform: scale(1.1);
}

/* صندوق الشات */
.chat-box {
  position: fixed;
  left: 30px;
  bottom: 70px;
  width: 250px;
  background: #fff;
  /* border-radius: 15px; */
  box-shadow: 0 5px 20px var(--primary);
  display: none;
  overflow: hidden;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
  box-shadow: 0 3px 5px #000;
}

/* هيدر */
.chat-header {
  background: var(--primary);
  color: #fff;
  padding: 12px;
  font-weight: bold;
}

/* البودي */
.chat-body {
  padding: 10px;
  background: #f5f7fa;
  max-height: 200px;
  overflow-y: auto;
}

/* الرسائل */
.message {
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  max-width: 80%;
  font-size: 14px;
}

/* رسالة البوت */
.message.bot {
  background: #e4e6eb;
  align-self: flex-start;
  color: #000;
}

/* الفوتر */
.chat-footer {
  padding: 10px;
  text-align: center;
}

/* زر واتساب */
.start-btn {
  background: #25d366;
  color: #fff;
  padding: 8px 12px;
  border-radius: 20px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
}
.start-btn:hover{
  color: var(--primary);
}

/* أنيميشن */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -----------------------//-------------- */
.text-justify{
  text-align: justify;
}
