/* ================= ROOT VARIABLES ================= */
:root {
  --primary-blue: #2563eb;
  --primary-dark: #1e40af;

  --bg-dark: #0f172a;   /* Dark page background */
  --bg-card: #1e293b;   /* Card background */
  --bg-footer: #020617; /* Footer background */

  --text-main: #f8fafc; /* Light text for dark mode */
  --text-muted: #94a3b8;

  --accent-green: #22c55e;
  --danger-red: #dc3545;
  --danger-red-dark: #b02a37;
  --white: #ffffff;
}

a {
  color: var(--primary-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ================= PROFILE SECTION ================= */
#profileSection, 
.profile-section {
  max-width: 950px;
  margin: 10px auto;
  padding: 25px 30px;
  border-radius: 12px;
  background-color: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

#profileSection h3,
.profile-section h2 {
  text-align: center;
  margin-bottom: 25px;
  color: var(--primary-blue);
  font-size: 1.5rem;
  border-bottom: 2px solid var(--primary-blue);
  padding-bottom: 5px;
}

#profileSection p,
.profile-card .profile-item span.value {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text-main);
}

#profileSection p strong,
.profile-card .profile-item span.label {
  color: var(--primary-blue);
  font-weight: bold;
}

/* ================= PROFILE CARD DETAILS ================= */
.profile-card {
  background-color: var(--bg-dark);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.profile-card .profile-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.profile-card .profile-item span.label {
  font-weight: bold;
  color: var(--text-main);
}

.profile-card .profile-item span.value {
  color: var(--text-muted);
}

/* ================= BUTTONS ================= */
#profileSection button,
#logoutBtn,
.btn-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

#profileSection button {
  background-color: var(--danger-red);
  color: var(--white);
}

#profileSection button:hover {
  background-color: var(--danger-red-dark);
}

#logoutBtn {
  background-color: var(--danger-red);
  color: var(--white);
  margin-top: 15px;
}

#logoutBtn:hover {
  background-color: var(--danger-red-dark);
}

.btn-submit {
  background-color: var(--accent-green);
  color: var(--white);
}

.btn-submit:hover {
  background-color: #1fa34b;
}

/* ================= STATUS MESSAGE ================= */
#profileSection #status {
  margin-top: 15px;
  text-align: center;
  font-weight: bold;
  color: var(--danger-red);
}

/* ================= SECTIONS ================= */
.section {
  background-color: var(--bg-card);
  padding: 20px;
  margin: 10px auto;
  border-radius: 10px;
  max-width: 950px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.section h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-main);
  border-bottom: 2px solid var(--primary-blue);
  padding-bottom: 5px;
}

/* ================= CARD STYLING ================= */
.card, .course-card, .module-card, .progress-card, .review-card, .request-card {
  background-color: var(--bg-dark);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card h3, .course-info h3, .module-card h4, .review-title {
  color: var(--text-main);
}

.card p, .course-info p, .module-card ul li, .review-content p {
  color: var(--text-muted);
}

/* ================= MODULES & LESSONS ================= */
.module-card ul {
  margin-left: 15px;
  list-style: disc;
}

/* ================= PROGRESS / REVIEWS ================= */
.progress-card {
  border-left: 4px solid var(--accent-green);
}

.review-card {
  border-left: 4px solid #f97316;
}

.request-card span.status.pending { background: #facc15; color: black; }
.request-card span.status.approved { background: var(--accent-green); color: black; }
.request-card span.status.rejected { background: var(--danger-red); color: white; }

/* ================= LAYOUT GRIDS ================= */
#enrollmentsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

#progressContainer,
#reviewsContainer {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
}

/* ================= COURSE CARDS ================= */
.course-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background-color: #1e293b;
}

.course-info h3 {
  margin-bottom: 10px;
}

.badge {
  padding: 5px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  #profileSection, .profile-section {
    padding-left: 2px;
    margin: 1rem;
  }

  #profileSection h3, .profile-section h2 {
    font-size: 1.3rem;
  }

  #profileSection p, .profile-card .profile-item span.value {
    font-size: 0.95rem;
    margin-left: 1rem;
  }

  #profileSection button, .btn-submit, #logoutBtn {
    padding: 10px;
    font-size: 0.95rem;
  }

  .profile-card .profile-item {
    flex-direction: column;
    gap: 5px;
  }

  .section {
  background-color: var(--bg-card);
  padding: 20px;
  margin: 1rem;
  border-radius: 10px;
  max-width: 950px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

 .section h2 {
    font-size: 1.3rem;
    margin-left: 1rem; /* This adds the indent you need */
    padding-left: 0;   /* Optional: adjust padding if it feels too pushed over */
  }
}