/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Fonts & Body */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f9f9f9;
  color: #222;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

/* Dark Mode */
body.dark {
  background: #111;
  color: #eee;
}

/* Header & Nav */
header.hero {
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  color: white;
  padding: 60px 20px 40px;
  text-align: center;
  position: relative;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav ul li a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}

nav ul li a::after {
  content: '';
  width: 0%;
  height: 2px;
  background: white;
  position: absolute;
  left: 0;
  bottom: -4px;
  transition: 0.3s;
}

nav ul li a:hover::after {
  width: 100%;
}

nav ul li a.active {
  text-decoration: underline;
}

#toggleDark {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: white;
  cursor: pointer;
}

/* Hero Text */
.hero-text h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero-text p {
  font-size: 1.1rem;
  color: #f0f0f0;
}

/* Courses Section */
.courses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 40px 20px;
}

.course-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark .course-card {
  background: #1e1e1e;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.1);
}

.course-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.course-card h2 {
  font-size: 1.4rem;
  margin: 15px;
}

.course-card p {
  font-size: 0.95rem;
  margin: 0 15px 15px;
  color: #555;
}

body.dark .course-card p {
  color: #ccc;
}

.course-card ul {
  font-size: 0.95rem;
  margin: 0 30px 30px;
  color: #555;
}

.enroll-btn {
  background: #4a00e0;
  color: white;
  border: none;
  margin: 0 15px 20px;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.enroll-btn:hover {
  background: #3800b8;
}

/* Testimonials */
.testimonial-preview {
  text-align: center;
  background: #f0f0f0;
  padding: 40px 20px;
}

body.dark .testimonial-preview {
  background: #181818;
}

.testimonial-preview h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.testimonial-preview p {
  font-style: italic;
  margin: 8px auto;
  max-width: 600px;
  color: #333;
}

body.dark .testimonial-preview p {
  color: #ccc;
}

/* Footer */
footer {
  background: #4a00e0;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #111;
  color: white;
  padding: 1em;
  display: none;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
}

.cookie-banner button {
  background: #f25c05;
  color: white;
  border: none;
  padding: 0.5em 1em;
  cursor: pointer;
}

/* Responsive */
@media screen and (max-width: 768px) {
  nav ul {
    display: none;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1rem;
  }
}
