@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* Swapped to a live, high-tech abstract network background from Unsplash */
  background-image: url("/assets/markaz-academy-bg-image.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  color: white;
  font-family: "Poppins", sans-serif;
  position: relative;
  overflow-x: hidden;
}

/* Dynamic overlay that adds depth without wiping out the image details */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: inherit;
  background-size: inherit;
  background-position: inherit;
  background-attachment: inherit;
  /* Reduced blur so the complex data stars/lines are beautifully visible */
  filter: blur(2px) brightness(0.4); 
  z-index: -1;
  transform: scale(1.02); /* Prevents white edges caused by blurring */
}

/* Subtle animated light leak overlay to make the page feel truly "dynamic" */
body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(0, 240, 255, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 10% 80%, rgba(0, 114, 255, 0.1) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
  animation: pulseGlow 10s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Background Blur Layer */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: inherit;
  background-size: inherit;
  background-position: inherit;
  background-attachment: inherit;
  filter: blur(6px);
  z-index: -1;
  transform: scale(1.05);
}

/* ==================== PREMIUM NAVIGATION ==================== */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 85px;
  background: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo {
  cursor: pointer;
  display: flex;
  align-items: center;
  height: 50px;
}

.nav-logo img {
  height: 100%;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
  align-items: center;
}

.nav-menu li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  padding: 8px 0;
  position: relative;
}

/* Modern continuous line hover effect */
.nav-menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #00f0ff;
  transition: width 0.3s ease;
}

.nav-menu li a:hover {
  color: #ffffff;
}

.nav-menu li a:hover::after {
  width: 100%;
}

#enroll-btn {
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  color: #050b14;
  padding: 12px 26px;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

#enroll-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
  background: #00f0ff;
  color: #050b14;
}

/* Hamburger Icon Structure */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 100%;
  height: 2px;
  background-color: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left center;
}

/* Hamburger Active Transformations */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(-2px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(2px);
}

/* ==================== MOBILE NAVIGATION OVERLAY ==================== */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ==================== HERO SECTION ==================== */
#hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 85px);
  text-align: center;
  padding: 40px 5%;
}

.cohort-badge {
  display: inline-flex;
  padding: 8px 20px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 9999px;
  color: #00f0ff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

#headline {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(90deg, #00f0ff, #54b2ff, #00f0ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  to { background-position: 200% center; }
}

#introduction-paragraph {
  max-width: 600px;
  line-height: 1.7;
  margin: 0 auto 35px;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.75);
}

#hero-buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

#explore-courses-btn, #how-it-works-btn {
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 36px;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#explore-courses-btn {
  background: linear-gradient(90deg, #00c6ff, #0072ff);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 198, 255, 0.3);
}

#explore-courses-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 198, 255, 0.5);
}

#how-it-works-btn {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#how-it-works-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ==================== CLEAN COURSES SECTION ==================== */
#courses-section {
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 5%;
}

#featured-programs {
  color: #00f0ff;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 12px;
}

#courses-tagline {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 45px;
}

#courses-tagline-left h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
}

#meet-the-instructors {
  color: #00f0ff;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

#meet-the-instructors:hover {
  opacity: 0.8;
}

/* Dynamic Grid Layout */
#courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

/* ==================== GLASSMORPHIC COURSE CARDS ==================== */
.course-card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 240, 255, 0.05);
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* Perfect 16:9 Aspect Ratio */
  overflow: hidden;
}

.card-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.course-card:hover .card-image-wrapper img {
  transform: scale(1.05);
}

.card-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(10, 15, 30, 0.75);
  backdrop-filter: blur(4px);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
  color: #ffffff;
}

.card-content p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.instructor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.instructor-info text {
  display: block;
}

.instructor-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
}

.instructor-role {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ==================== GLOBAL RESPONSIVE MEDIA QUERIES ==================== */
@media (max-width: 992px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 100px 40px;
    gap: 30px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-cta {
    margin-top: 20px;
    width: 100%;
  }
  
  .nav-menu .nav-cta {
    display: block; /* Moves CTA cleanly inside drawer menu on mobile viewports */
  }
  
  nav > .nav-cta {
    display: none; /* Hides raw desktop variant */
  }
}

@media (max-width: 768px) {
  #courses-tagline {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  #courses-grid {
    grid-template-columns: 1fr; /* Drops smoothly to stacked single elements */
  }
}