/* Import Montserrat font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

/* Reset and Base Styling */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  font-family: 'Montserrat', sans-serif;
  background-color: #f5f7fa;
  color: #2d314c;
  line-height: 1.6;
  min-height: 100vh;
}
/* --- Sidebar Styling --- */
.sidebar {
  width: 220px; /* fixed width */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f8f9fa;
  padding-top: 20px;
  box-sizing: border-box;
  flex-shrink: 0;
}


/* Sidebar links consistent height and spacing */
.sidebar .nav-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  font-size: 16px;
  color: #333;
  text-decoration: none;
  margin: 0; /* remove excessive spacing */
  border-radius: 5px;
  min-height: 45px; /* consistent height */
  line-height: 1.2;
  box-sizing: border-box;
}

/* Hover & active states */
.sidebar .nav-link:hover {
  background-color: rgba(123, 145, 210, 0.25);
  color: #283B77;
}

/*.sidebar .nav-link:visited {*/
/*  background-color: #283B77;*/
/*  color: #fff;*/
/*}*/

.active-tab {
    background-color: #283B77;
    color: #fff;
}

/* Nested text alignment */
.sidebar .nav-link .link-text {
  flex-grow: 1;
}

/* Responsive sidebar links */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid #ddd;
  }
  .sidebar .nav-link {
    padding: 10px 15px;
    min-height: auto;
  }
}

/* --- Layout Flex Container --- */

.container {
  max-width: 80%; /* Give the form a max-width so it doesn't stretch too wide */
  margin: 4rem auto; /* Center the form on the page */
  padding: 2rem 6rem;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding-top: 4rem;
}

/* Container Title */
.container h1 {
  font-weight:600;
  text-align:center;
  margin-top: 0;
  border-bottom: 2px solid #eee;
  padding-top:0!important;
  padding-bottom: 2.5rem;
  margin-bottom: 2rem;
}

.container h2,
.container h3 {
  text-align: left;                /* keep title on top left */
  margin-top: 0;
  margin-bottom: 20px;
  font-weight: 700;
  color: #283B77;
}

/* Content area inside container */
.container-content {
  display: flex;
  justify-content: center;         /* center horizontally */
  align-items: center;             /* center vertically */
  flex: 1;
  text-align: center;
}


.page-container {
  display: flex;
  width: 100%;
}

.sidebar ul {
  list-style: none;
  padding: 8px;
  margin: 0;
  flex-shrink: 0;
  width: 220px;
  display: flex;
  flex-direction: column;
  padding-top: 20px;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Main content next to sidebar */
.sidebar-header {
  display: block; /* makes the link take full width */
  text-align: center; /* centers the text horizontally */
  font-weight: bold; /* makes the text bold */
  font-size: 1em; /* optional: adjust font size if needed */
  margin-bottom: 10px; /* optional: spacing below the header */
  color: #000; /* optional: sets text color */
  text-decoration: none; /* removes underline */
}

  /* Responsive adjustments for sidebar */
  @media (max-width: 768px) {
    .page-container {
      flex-direction: column;
    }

    .sidebar {
      width: 100%;
      min-height: auto;
      border-right: none;
      border-bottom: 1px solid #ddd;
    }

    .main-content {
      max-width: 100%;
      padding: 20px;
    }
  }

  /* Navigation */

  .top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
  }

  .top-nav-title {
    display: flex;
    align-items: center;
  }

  .top-nav form {
    display: flex;
    align-items: center;
    margin-left: 20px;
  }

  .top-nav-links {
    display: flex;
    gap: 15px;
  }

  div.header-nav-links a {
    text-decoration: none;
    color: #283B77;
  }

  li.disabled {
    visibility: hidden;
  }

  /* Typography */

  h1 {
    color: #283B77;
    margin-top: 20px;
    font-weight: bolder;
    padding: 10px;
  }

  h2 {
    font-size: 36px;
    font-weight: bold;
    color: #283B77;
    font-family: 'Montserrat', sans-serif;
  }

  p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
  }

  /* Buttons */

  .button {
    color: #fff;
    background-color: #283B77;
    border: 1px solid #283B77;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
  }

  .button:hover {
    background-color: #1e2e5c;
    border-color: #1e2e5c;
  }

  .button-lesson {
    color: #000;
    background-color: #fff;
    border: 1px solid #ededed;
    border-radius: 5px;
    padding: 10px;
    text-decoration: none;
  }

  .button-lesson:hover {
    color: #000;
    background-color: #ededed;
  }

  /* Images */

  img.img-fluid.small-image {
    width: 50% !important;
  }

  /* Layout */

  .users index content {
    padding-right: 100px;
  }

  .course-component {
    margin: 0 auto;
    max-width: 80%;
  }

  .course-heading {
    padding: 20px 0 0 0;
  }

  .course-heading-component .course-subheading-component {
    color: #283B77 !important;
  }

  /* Responsive text sizes */
  @media (min-width: 1200px) {
    .course-heading-component {
      font-size: 40px;
    }

    .course-subheading-component {
      font-size: 28px;
    }
  }

  /* Links & Navigation Hover */

  .side-nav a:hover {
    background-color: #283B77;
    color: #283B77;
  }

  /* Footer */

  .copyright-message {
    display: flex;
    justify-content: space-evenly;
  }

  /* Sticky Footer Solution */

  /*.main-content {*/
  /*  flex: 1;*/
  /*  padding: 40px;*/
  /*  background-color: #ffffff;*/
  /*  max-width: 1200px;*/
  /*  margin: 0 auto;*/
  /*}*/

  /*.main-content h1 {*/
  /*  font-size: 2.2em;*/
  /*  font-weight: 700;*/
  /*  text-align: center;*/
  /*  margin-bottom: 30px;*/
  /*  color: #2d314c;*/
  /*}*/

  /* Dashboard Section */

  .dashboard-content {
    margin-top: 30px;
  }

  .dashboard-content h4 {
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 600;
    text-align: center;
  }

  /* Layout Rows */

  .row {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
  }

  .first-row {
    gap: 30px;
    justify-content: center;
  }

  .user.row {
    justify-content: start;
  }

  .user.col-md-6 {
    max-width:100%;
    padding:0;
  }

  /* Cards / Boxes */

  .box {
    flex: 1 1 220px;
    max-width: 260px;
    min-width: 200px;
    height: 150px;
    border: 1.5px solid #2d314c;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin: 10px 0;
    text-align: center;
    transition: all 0.3s ease;
  }

  .box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  }

  .box p {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 0.95em;
    color: #555;
  }

  .box h2 {
    margin: 8px 0 0;
    font-weight: 600;
    font-size: 1.4em;
    color: #2d314c;
  }

  /* Icons & Text */

  .icon {
    font-size: 1.8em;
    margin-bottom: 5px;
    color: #2d314c;
  }

  .text {
    color: #000000;
  }

  /* Responsive Tables/Sections */

  .recent-orders, .popular-products {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin: 20px auto;
  }

  .recent-orders {
    max-width: 700px;
  }

  .popular-products {
    max-width: 500px;
  }

  .recent-orders-content, .popular-courses-content {
    width: 100%;
    overflow-x: auto;
  }

  /* Responsive Adjustments */
  @media (max-width: 1024px) {
    .main-content {
      padding: 20px;
    }

    .box {
      height: auto;
    }
  }

  @media (max-width: 768px) {
    .main-content h1 {
      font-size: 1.8em;
    }

    .dashboard-content h4 {
      font-size: 1.2em;
    }

    .box {
      flex: 1 1 100%;
      max-width: 100%;
    }
  }



/* ===== Registration Page Styling ===== */

/* Apply global font consistency */
body, input, select, textarea, button, label {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #212529;
  line-height: 1.5;
}


/* Paragraphs */
p {
  font-size: 14px;
  color: #495057;
}

/* Form fields */
.form-control {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #6c757d;
  margin-bottom: 15px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

/* Error messages */
.error-message {
  font-size: 13px;
  font-weight: 600;
  color: #dc3545;
  margin-top: 5px;
}

/* Password requirements */
.password-hints {
  font-size: 13px;
  margin-top: 5px;
  color: #6c757d;
}
.password-hints .requirement {
  margin-bottom: 3px;
}

.container.bg-white {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 2rem;
  max-width: 1100px;   /* keeps page from stretching too wide */
}

/* Profile image styling */
.profile-image-container {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #ddd;
  margin: 0 auto 15px auto;
  transition: border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-align: center;
}
.profile-image-container:hover {
  border-color: #2d314c;
}
.profile-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-3.py-5 {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem !important;
}

.p-3.py-5 .form-control {
  margin-bottom: 1rem;
}

#userForm .button {
  margin-top: 1rem;
  width: 100%;
}

.enrollment-record-container {
  max-height: 600px;
  overflow-y: auto;
}

.cartoon-card {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  transition: transform 0.2s ease-in-out;
}

.cartoon-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.cartoon-card-header {
  background: #f1f3f5;
  font-weight: 600;
}

.cartoon-card-title {
  color: #212529;
  text-decoration: none;
}

.cartoon-card-title:hover {
  text-decoration: underline;
}

/* File upload note */
.file-upload-requirements {
  font-size: 13px;
  text-align: left;
  color: #6c757d;
}

/*!* Buttons *!*/
/*.button {*/
/*  display: inline-block;*/
/*  padding: 12px 25px;*/
/*  font-size: 15px;*/
/*  font-weight: 600;*/
/*  text-align: center;*/
/*  color: #fff;*/
/*  background-color: #7d83a5;*/
/*  border-radius: 8px;*/
/*  border: none;*/
/*  cursor: pointer;*/
/*  transition: background-color 0.3s ease;*/
/*}*/
/*.button:hover {*/
/*  background-color: #2d314c;*/
/*}*/

/* Footer alignment */
.form-footer {
  margin-top: 30px;
}

/* Password eye toggle */
.eye-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 16px;
  color: #6c757d;
  cursor: pointer;
}
.eye-icon:hover {
  color: #2d314c;
}


/* ---------- Headings ---------- */
.course-heading-component {
  width: 85%;
  margin: auto;
  padding: 4px 0;
  word-break: break-word;
  color: #283B77;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
}

.course-subheading-component {
  width: 75%;
  margin: auto;
  padding: 4px 0;
  word-break: break-word;
  color: #283B77;
  font-size: 1.25rem;
  font-weight: 500;
  text-align: center;
}

.course-subheading-component a {
  color: #000;
  text-decoration: none;
}

.course-subheading-component a:hover {
  text-decoration: underline;
}

/* ---------- Video Section ---------- */
.myIframe {
  aspect-ratio: 8 / 5;
  width: 75%;
  display: block;
  margin: auto;
  border: none;
  border-radius: 6px;
}

/* ---------- Content Area ---------- */
.courseComponent .video-desc {
  width: 70%;
  margin: auto;
  padding: 8px 0;
  word-break: break-word;
  font-size: 16px;
}

.comments-section {
  width: 90%;
  margin: 40px auto;
}

.comments-section h3 {
  color: #283B77;
  font-weight: 600;
}

.comment-list .card {
  font-size: 0.95rem;
}

.comment-list .card strong {
  font-weight: 600;
}

/* ---------- Comment Form ---------- */
.add-comment textarea {
  resize: vertical;
  min-height: 80px;
  font-size: 1rem;
}

.add-comment button {
  margin-top: 8px;
}


.enrolment-container {
  max-width: 80%;
  margin: 4rem auto;
  padding: 2rem 6rem;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.enrolment-container label {
  font-size:2rem;
}

.enrolment-container h1 {
  font-weight:600;
  text-align:center;
  margin-top: 0;
  border-bottom: 2px solid #eee;
  padding-top:0!important;
  padding-bottom: 2.5rem;
  margin-bottom: 2rem;
}
