/* 
  ByteHub Main Stylesheet - Ultra-Premium Aesthetic
  Traditional Layout with Admin-Style Glassmorphism
*/

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

:root {
  --primary-color: #7f56da;
  --primary-glow: rgba(127, 86, 218, 0.4);
  --text-color: #ffffff;
  --secondary-text-color: #a0a0a0;
  --secondary-color: #291b49;
  --font-family-body: "Poppins", sans-serif;
  --background-color: #05050e;
  --surface-color: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --glass-border: 1px solid rgba(255, 255, 255, 0.06);
  --input-bg: rgba(0, 0, 0, 0.2);
  --header-height: 80px;
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-body);
  background-color: var(--background-color);
  background-image:
    radial-gradient(
      circle at 15% 25%,
      rgba(127, 86, 218, 0.15) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 85% 75%,
      rgba(51, 181, 229, 0.1) 0%,
      transparent 40%
    );
  color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Header & Navigation --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 6vw, 80px);
  z-index: 1000;
  background: rgba(5, 5, 14, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: var(--glass-border);
  transition: var(--transition);
}

.header-logo img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(127, 86, 218, 0.5));
}

.nav-main ul {
  display: flex;
  list-style: none;
  gap: clamp(20px, 3vw, 40px);
}

.nav-main a {
  color: var(--secondary-text-color);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  text-transform: lowercase;
}

.nav-main a:hover {
  color: white;
  text-shadow: 0 0 10px rgba(127, 86, 218, 0.5);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.btn-signin {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: var(--glass-border);
  transition: var(--transition);
}

.btn-signin:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* --- Hero Section --- */
.hero {
  padding: calc(var(--header-height) + 80px) clamp(20px, 8vw, 100px) 100px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero p {
  color: var(--secondary-text-color);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  max-width: 800px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 20px;
  margin-bottom: 80px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #6c4fb8 100%);
  color: white;
  padding: 16px 40px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 10px 20px rgba(127, 86, 218, 0.3);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 30px rgba(127, 86, 218, 0.4);
}

/* --- Stats Section (Summary Cards) --- */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  width: 100%;
  margin-bottom: 120px;
}

.summary-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.01)
  );
  border: var(--glass-border);
  border-radius: 28px;
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 24px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(127, 86, 218, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: var(--primary-color);
}

.card-info .amount {
  font-size: 2.2rem;
  font-weight: 700;
  display: block;
}

.card-info label {
  color: var(--secondary-text-color);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Courses Section --- */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 60px;
  padding: 0 60px;
}

.courses-grid {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 20px 0;
  scrollbar-width: none; /* Firefox */
}

.courses-grid::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.course-card {
  flex: 0 0 350px;
  scroll-snap-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: var(--glass-border);
  border-radius: 28px;
  overflow: hidden;
  text-align: left;
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
}

.course-img-top {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.course-img-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-content {
  padding: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.course-content h4 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: #fff;
}

.course-content p {
  color: var(--secondary-text-color);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

.btn-enroll {
  margin-top: auto;
  width: 100%;
  background: var(--primary-color);
  color: white;
  padding: 20px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  font-size: 1.1rem;
}

.btn-enroll:hover {
  background: var(--secondary-color);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: var(--glass-border);
  color: white;
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.carousel-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.prev-btn {
  left: 0;
}
.next-btn {
  right: 0;
}

/* --- Footer --- */
footer {
  padding: 60px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-top: var(--glass-border);
}

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

.footer-copyright {
  color: var(--secondary-text-color);
  font-size: 0.85rem;
  font-weight: 400;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: var(--secondary-text-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

/* --- Mobile Drawer & Overlay (Modal Style) --- */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

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

.modal-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 90%;
  max-width: 400px;
  z-index: 1002;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-drawer.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

.drawer-content {
  background: rgba(255, 255, 255, 0.02);
  border: var(--glass-border);
  border-radius: 40px;
  padding: 60px 30px 40px;
  position: relative;
  text-align: center;
}

.drawer-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.drawer-nav ul {
  list-style: none;
}

.drawer-nav li {
  margin-bottom: 20px;
}

.drawer-nav a {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  padding: 24px 30px; /* Increased padding */
  border-radius: 28px; /* Slightly rounder */
  font-size: 1.2rem; /* Increased font-size */
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.btn-signin-modal {
  display: block;
  margin-top: 24px;
  background: none;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  text-decoration: none;
  padding: 22px; /* Increased padding */
  border-radius: 28px;
  font-size: 1.2rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-signin-modal:hover {
  background: var(--primary-color);
  color: #fff;
}

@media (max-width: 768px) {
  .nav-main {
    display: none;
  }

  .hamburger {
    display: block;
  }

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

  .summary-card {
    padding: 30px;
  }

  .carousel-container {
    padding: 0 40px;
  }

  .course-card {
    flex: 0 0 calc(100vw - 112px);
  }
}
