/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background-color: #f4f4f4;
  color: #333;
}

html, body {
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

header {
  background-color: #2c3e50;
  color: #fff;
  padding: 20px;
  text-align: center;
}

/* Category Grid */
.category-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 30px;
}

.category-card {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  text-align: center;
}

.category-card:hover {
  transform: scale(1.05);
}

.category-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.category-card h3 {
  padding: 15px;
  font-size: 18px;
}

/* Main Layout */
.course-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: #ecf0f1;
  padding: 20px;
  border-right: 1px solid #ccc;
  overflow-y: auto;
  transition: left 0.3s ease;
  z-index: 1000;
}

.sidebar h2 {
  margin-bottom: 20px;
}

/* Accordion */
.accordion-toggle {
  background-color: #3498db;
  color: white;
  padding: 10px;
  border: none;
  width: 100%;
  text-align: left;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s;
}

.accordion-toggle:hover {
  background-color: #2980b9;
}

.panel {
  display: none;
  background-color: #f9f9f9;
  padding: 10px;
}

.panel ul {
  list-style: none;
  padding-left: 0;
}

.panel ul li {
  margin-bottom: 8px;
}

.panel ul li a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s;
}

.panel ul li a:hover {
  color: #2980b9;
}


/*Video content css*/
.video-wrapper {
  width: 100%;
  max-width: 1200px; /* or whatever max width */
  margin: 0 auto;
  /* No height or padding trick */
}

.video-wrapper video {
  width: 100%;
  max-width: 100%;
}


.video-content {
  flex: 1;
  padding: 30px;
  background-color: #fff;
}



.video-content h1 {
  margin-bottom: 20px;
  font-size: 24px;
}

.video-description {
  margin-top: 15px;
  font-size: 16px;
  color: #555;
}

/* Mobile Header (Hamburger) */
.mobile-header {
  display: none;
  background-color: #2c3e50;
  color: white;
  padding: 15px;
  align-items: center;
  justify-content: space-between;
  position:sticky;
}

#menu-toggle {
  background: none;
  border: none;
  font-size: 26px;
  color: white;
  cursor: pointer;
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 900;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .course-layout {
    flex-direction: column; /* ✅ Changed from row to column */
    position: relative;
    width: 100%;             /* ✅ Ensures no overflow */
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    height: 100%;
    border-right: none;
    border-bottom: 1px solid #ccc;
  }

  .sidebar.active {
    left: 0;
  }

	.video-wrapper {
	  width: 100%;
	  aspect-ratio: 16 / 9;
	}

	.video-wrapper video {
	  width: 100%;
	  height: 100%;
	  object-fit: contain;
	}

	/* before css:.video-content {
		flex: 1;
		padding: 20px;
		margin-left: 0;
	  }*/

  .video-content {
    flex: 1;
    padding: 20px;
    margin-left: 0;
    width: 100%; /* ✅ Added to prevent layout issues */
  }

  .mobile-header {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1001;
    background-color: #2c3e50;
  }

  body.sidebar-open {
    overflow: hidden;
  }
}

/*added for the sake of vujs expansion of div in mobiel view*/

@media (max-width: 768px) {
  .video-wrapper {
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
  }

  .video-wrapper video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
  }
}
