/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styling */
body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

/* Header */
header {
  background: linear-gradient(135deg, #8B0000, #00008B);
  color: #fff;
  padding: 20px;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
header .logo h1 {
  font-size: 24px;
}

/* Drawer Toggle (Hamburger Icon) */
.drawer-toggle {
  font-size: 28px;
  cursor: pointer;
  color: #fff;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1001;
  /* Original: display: none; */
  /* We remove 'display: none;' here so we can control it in the media queries */
}

/* Drawer Menu (Remains hidden off-screen by default for ALL screens) */
header nav {
  position: fixed;
  top: 0;
  right: -100%;
  height: 100%;
  width: 250px;
  background-color: #fff;
  padding: 80px 20px;
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header nav.open {
  right: 0;
}

header nav ul {
  list-style: none;
  width: 100%;
  text-align: center;
}

header nav ul li {
  margin: 20px 0;
}

header nav ul li a {
  color: #00008B;
  font-size: 18px;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

header nav ul li a:hover {
  color: #8B0000;
}

/* Overlay */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  display: none;
}

.drawer-overlay.active {
  display: block;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 20px;
  background-color: #fff;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.hero.revealed {
  opacity: 1;
  transform: translateY(0);
}

.hero h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #8B0000;
}

.hero p {
  font-size: 18px;
  margin-bottom: 20px;
}

/* Gradient Button with Shadow */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, #8B0000, #00008B);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}

/* Section Styling */
section {
  padding: 40px 20px;
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

section.revealed {
  opacity: 1;
  transform: translateY(0);
}

section h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #00008B;
}

section p {
  max-width: 700px;
  margin: 0 auto 20px;
}

section.contents-preview {
  text-align: justify;
}

div.director_of_studies {
text-align: center;
}

div.director_of_studies img {
width: 300px;
border-radius: 30px 0;
margin-bottom: 20px;
}

/* FIX 2: List styling for index.html & about.html lists (ul.why) */
section ul.why {
  margin: 20px auto; /* Added top/bottom margin, set auto for left/right centering */
  max-width: 700px; /* Constrains the width of the list */
  text-align: left; /* Aligns the text inside the list to the left */
  list-style-position: outside; /* Bullet points outside the text block */
  padding: 0 20px; /* Adds padding on the sides for mobile/desktop spacing */
}

section ul.why li {
    margin-bottom: 10px;
    padding-left: 0; /* Ensures the padding doesn't stack */
}
/* END FIX 2 */

/* FIX 1: Ensure lists within course cards have appropriate spacing and alignment (ul.reasons) */
.course-card h2 {
  /* Added padding to the card itself to push content away from edges */
  padding: 10px 10px;
  color: #00008B;
}

.course-card ul.reasons {
  list-style-type: disc;
  text-align: left; /* Aligns the bullet points to the left */
  margin-left: auto;
  margin-right: auto;
  max-width: 600px; /* Constrains the width of the list on wide screens */
  padding-left: 20px; /* Ensures the bullets have space from the card's padding */
}

.course-card ul.reasons li {
  margin-bottom: 5px;
}
/* END FIX 1 */


/* Divider Line */
.divider {
  height: 4px;
  background: linear-gradient(135deg, #8B0000, #00008B);
  margin: 20px auto;
  border-radius: 2px;
}

/* Footer */
footer {
  background: linear-gradient(135deg, #8B0000, #00008B);
  color: #fff;
  text-align: center;
  padding: 20px;
  box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.2);
}

footer .socials a {
  color: #fff;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

footer .socials a:hover {
  color: #FFD700;
}

/* * Responsive Design - UPDATED 
 * We use two media queries to ensure the .drawer-toggle is ALWAYS visible 
 * regardless of the screen size, keeping the hamburger effect active on desktop.
*/

/* Media query for mobile (<= 768px) */
@media (max-width: 768px) {
  .drawer-toggle {
    display: block; /* Make hamburger visible on mobile */
  }

  header .logo {
    margin-left: 10px;
  }
}

/* Media query for desktop (> 768px) */
@media (min-width: 769px) {
  .drawer-toggle {
    display: block; /* Make hamburger visible on desktop */
  }
}

/* --- Contact/Message Form Styles (New) --- */

.message-card {
    /* Reusing card structure similar to .portal-card */
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 30px;
    margin: 30px auto;
    max-width: 500px; /* Constrain width for a better look */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left; /* Aligns text within the card */
}

section input.form-input {
  width: 100%;
  padding: 10px;
}

section textarea.form-textarea {
  width: 100%;
  padding: 10px;
  min-width: 100px;
}


/* --- Student Portal Styles (New) --- */

/* Card for the login/portal content - matches the 'course-card' look */
.portal-card {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 30px;
    margin: 30px auto;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left; /* Aligns text within the card */
}

.portal-card h4 {
    color: #00008B; /* Dark Blue for headings */
    text-align: center;
    margin-bottom: 20px;
}

.portal-card label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
    color: #333;
}

.portal-card input[type="email"], 
.portal-card input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Ensures padding doesn't affect total width */
}

/* Style the button container to center the button */
.portal-card button[type="submit"] {
    display: block;
    width: 100%; /* Full width button */
    margin-top: 25px;
    cursor: pointer;
}

/* General error message style */
.error-message {
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
}

#course-materials-list h5 {
    color: #8B0000; /* Dark Red for section heading */
    margin-bottom: 15px;
}
/* --- END Student Portal Styles --- */---

/* Style for TOC lists in the portal */
#course-materials-list ul {
    margin-left: 20px;
    margin-bottom: 15px;
    list-style-type: disc;
}

#course-materials-list li {
    margin-bottom: 5px;
    font-size: 0.95em;
    color: #444;
}

#course-materials-list b {
    display: block;
    margin-top: 10px;
    color: #00008B; /* Dark blue like the PDF header */
}