/* =============== GLOBAL STYLES =============== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #f9fafb;
  color: #222;
  overflow-x: hidden;
}

/* =============== NAVBAR =============== */
.navbar {
  background-color: #004aad;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none; /* لإزالة أي underline لو الرابط */
}

.logo {
  height: 50px;
}

.site-name {
  font-size: 1.5em;
  font-weight: bold;
  color: white; /* نفس اللون الأزرق */
  text-decoration: none; /* نشيل الخط */
}
nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

nav a:hover,
nav a.active {
  color: #ff8c00;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    background-color: #004aad;
    position: absolute;
    top: 70px;
    right: 0;
    width: 200px;
    text-align: right;
    padding: 10px;
    border-radius: 10px 0 0 10px;
  }

  nav ul.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

/* =============== COURSES SECTION =============== */
.courses-section {
  text-align: center;
  padding: 80px 20px;
}

.courses-section h2 {
  color: #004aad;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.courses-section p {
  color: #555;
  font-size: 1.1rem;
  margin-bottom: 40px;
}

/* GRID FOR CARDS */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  max-width: 1200px;
  margin: auto;
}

@media (max-width: 1024px) {
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .courses-grid {
    grid-template-columns: 1fr;
  }
}

/* =============== COURSE CARD =============== */
.course-card {
  position: relative;
  perspective: 1000px;
 
}

.course-inner {
  width: 100%;
  height: 280px;
  position: relative;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.course-card:hover .course-inner {
  transform: rotateY(180deg);
}

/* FRONT SIDE */
.course-front,
.course-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background: #fff;
  overflow: hidden;
}

.course-front {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: #004aad;
  transition: transform 0.3s ease;
}

.course-front i {
  font-size: 50px;
  color: #ff8c00;
  margin-bottom: 15px;
}

.course-front h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

/* BACK SIDE */
.course-back {
  background: linear-gradient(135deg, #89939f, #ff8c00);
  color: white;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 25px;
}

.course-back p {
  font-size: 0.95rem;
  margin-bottom: 15px;
  text-align: center;
}

.course-back button {
  background-color: white;
  color: #004aad;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.course-back button:hover {
  background-color: #ff8c00;
  color: white;
}

/* ================== FOOTER ================== */
footer {
  background: linear-gradient(90deg, #0056b3, #ff6600);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  max-width: 1200px;
  margin: auto;
}

.footer-logo img {
  height: 50px;
  margin-bottom: 10px;
}

.footer-logo h2 {
  font-size: 24px;
}


.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* يخلي الكل يبدأ من نفس الخط */
  gap: 8px; /* مسافة متساوية بين كل لينك */
}

.footer-links a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-size: 16px;
  transition: color 0.3s;
  padding-left: 2px; /* يخليهم كلهم بنفس البداية */
}

.footer-links a i {
  margin-right: 8px;
  width: 20px; /* يضمن إن الأيقونات تاخد نفس العرض */
  text-align: center;
}


.footer-links a:hover {
  color: #ffd9b3;
}

.footer-social a {
  color: white;
  font-size: 24px;
  margin: 0 10px;
  transition: 0.3s;
}

.footer-social a:hover {
  color: #ffd9b3;
}

footer hr {
  margin: 20px 0;
  border: none;
  border-top: 1px solid #ffffff44;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    background-color: #004aad;
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    text-align: center;
    padding: 20px 0;
    gap: 20px;
  }

  nav ul.show {
    display: flex;
  }

  .search-wrapper {
    display: none;
  }

  .about {
    flex-direction: column;
    padding: 40px 20px;
  }

  .videos video {
    width: 100%;
  }

  .course-list {
    flex-direction: column;
    align-items: center;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
