/*
Theme Name: Edu Learn Theme
Author: Your Name
Description: A modern programming education theme for WordPress, inspired by W3Schools design.
Version: 1.0
*/

/* -------------------------------
   🌈 Global Styles
--------------------------------*/
body {
  font-family: "Poppins", sans-serif;
  background-color: #f7f7fb;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.8;
}

a {
  color: #4527a0;
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: #311b92;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* -------------------------------
   🧭 Header & Navigation
--------------------------------*/
header {
      background-color: #4527a0;
    color: #fff;
    padding: 1rem 0;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
.course-header{
    margin: 20px 0;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    border-radius: 10px;
    
}
 
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo {
  font-size: 1.6rem;
  font-weight: 700;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

nav ul li a {
  color: #fff;
  font-weight: 500;
}

nav ul li a:hover {
  text-decoration: underline;
}

/* -------------------------------
   🎯 Hero Banner
--------------------------------*/
.hero {
  background: linear-gradient(135deg, #4527a0, #7e57c2);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
  border-bottom-left-radius: 3rem;
  border-bottom-right-radius: 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  margin-top: 0.8rem;
  color: #eee;
}

/* -------------------------------
   📘 Course Cards
--------------------------------*/
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.course-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: 0.3s;
  text-align: center;
  padding: 1rem;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.course-card img {
  width: 100%;
  border-radius: 1rem;
  height: 160px;
  object-fit: cover;
}

.course-title {
  font-size: 1.3rem;
  font-weight: 600;
  color:#fff;
  margin-top: 1rem;
}

.course-excerpt {
  font-size: 0.95rem;
  color: #555;
  margin-top: 0.5rem;
  min-height: 3rem;
}

.course-meta {
  font-size: 0.85rem;
  color: #777;
  margin-top: 0.8rem;
}

.course-meta span {
  margin: 0 5px;
}

/* -------------------------------
   📗 Lesson List (inside Course)
--------------------------------*/
.course-lessons {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: #f3f0fa;
  border-radius: 1rem;
}

.lesson-section-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #311b92;
  margin-bottom: 1rem;
}

.lesson-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lesson-item {
  margin-bottom: 0.8rem;
}

.lesson-item a {
  color: #4527a0;
  font-weight: 500;
}

.lesson-item a:hover {
  text-decoration: underline;
}

/* -------------------------------
   📄 Single Lesson Page
--------------------------------*/
.single-lesson {
  background: #fff; 
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-top: 2rem;
}

.lesson-title {
  font-size: 2rem;
  color: #fff !important;
  text-align: center;
}

.lesson-content {
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

.lesson-content pre {
  background: #f4f1fa;
  padding: 1rem;
  border-radius: 1rem;
  overflow-x: auto;
  border-left: 4px solid #4527a0;
}

.lesson-content code {
  background: #ede7f6;
  padding: 0.2rem 0.4rem;
  border-radius: 5px;
}

/* -------------------------------
   📍 Breadcrumb
--------------------------------*/
.breadcrumb {
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #666;
}

.breadcrumb a {
  color: #4527a0;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* -------------------------------
   💜 Buttons
--------------------------------*/
.btn-primary, .btn-back {
  display: inline-block;
  background: #4527a0;
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: 2rem;
  font-weight: 500;
  transition: 0.3s;
}

.btn-primary:hover, .btn-back:hover {
  background: #311b92;
}

/* -------------------------------
   ⚙️ Footer
--------------------------------*/
footer {
  background: #311b92;
  color: #fff;
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
   
}

footer p {
  margin: 0;
  font-size: 0.95rem;
}

/* -------------------------------
   📱 Responsive Design
--------------------------------*/
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    text-align: center;
  }

  nav ul {
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }
}
/* Menu Toggle (Mobile) */
.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.6rem;
  color: #fff;
}

.menu-toggle.open {
  color: #ffd740;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  nav ul {
    display: none;
    flex-direction: column;
    background: #4527a0;
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 0.5rem;
  }
  nav ul.active {
    display: flex;
  }
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 25px;
  background: #4527a0;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  transition: 0.3s;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
}

/* Dark Mode */
body.dark-mode {
  background-color: #1e1e2f;
  color: #eee;
}

body.dark-mode header {
  background-color: #311b92;
}

body.dark-mode .course-card {
  background: #2c2c3e;
  color: #eee;
}

body.dark-mode a {
  color: #c3a5ff;
}
