:root {
  --primary-color: #0a1c2e;  /* Deep red - school color */
  --primary-light: rgba(76, 0, 0, 0.1);
  --secondary-color:  #06121f;
  --text-color: #333;
  --text-color-light: #666;
  --text-c-highlight: #3399ff;  /* Gold highlight */
  --white: #fff;
  --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
  --border-radius: 16px;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --accent-c-2: #f1f1f1;
  --spacing-lg: 2rem;
}

body {
  margin: 0;
  padding: 0;
  background-color: #fff6ec;
  color: var(--text-color);
  line-height: 1.6;
}

/* Main Content */
main {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  padding: var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 65px;
}

.section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.section:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.15);
}

h2 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-lg);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  position: relative;
  padding-bottom: 0.75rem;
}

h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 80px;
  height: 3px;
  background-color: var(--text-c-highlight);
  transform: translateX(-50%);
  border-radius: 3px;
}

.centered-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
}

.centered-image img {
  max-width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  object-fit: cover;
  height: 240px;
  width: 100%;
}

.centered-image img:hover {
  transform: scale(1.02);
}

.centered-image .caption {
  margin-top: 1.5rem;
  padding: 0.5rem 1.5rem;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(76, 0, 0, 0.25);
}

/* Content styling */
.section p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section ul {
  margin: 1.5rem auto;
  padding-left: 2rem;
  max-width: 800px;
  text-align: left;
}

.section li {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 0.5rem;
}

/* Buttons */
.buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.buttons a {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(76, 0, 0, 0.25);
  transition: var(--transition);
  border: 2px solid var(--primary-color);
  letter-spacing: 0.5px;
}

.buttons a:hover {
  background-color: transparent;
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Footer */
footer {
  background-color: var(--primary-color);
  background-image: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: var(--white);
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
}

footer p {
  margin: 0;
  font-size: 1rem;
}

footer a {
  color: var(--text-c-highlight);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  width: 90%;
  max-width: 600px;
  box-shadow: var(--box-shadow);
  animation: modalFadeIn 0.3s ease-out forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.close-btn {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  margin-top: 1.5rem;
  transition: var(--transition);
  border: 2px solid var(--primary-color);
}

.close-btn:hover {
  background-color: transparent;
  color: var(--primary-color);
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

th,
td {
  padding: 1rem;
  text-align: left;
  border: none;
}

th {
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

tr:nth-child(odd) {
  background-color: rgba(76, 0, 0, 0.04);
}

tr:hover {
  background-color: rgba(76, 0, 0, 0.08);
}

/* Responsive Styles */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.8rem;
  }

  nav {
    gap: 0.5rem;
  }

  nav a {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
  }

  .section {
    padding: 1.5rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .centered-image img {
    height: 180px;
  }

  .section p {
    font-size: 1rem;
  }

  .buttons a {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

/* Add specific styling for page title headers to ensure exact vertical alignment */
.page-header,
.page-title,
main > h1:first-child,
main > h2:first-child,
.content-wrapper > h1:first-child,
.container > h1:first-child,
.content-area > h1:first-child,
.section-title:first-child {
  margin-top: 3.5rem !important; /* Force consistent distance from navbar */
  padding-top: 1.5rem !important; /* Additional padding for visual separation */
  position: relative;
  display: block;
} /* Reset CSS for consistent base layout */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body and main container fixes */
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden; /* Prevents horizontal scrolling */
}

/* Main content container with consistent spacing from navbar */
.container,
main,
.content-wrapper {
  width: 100%;
  max-width: 1200px; /* Adjust based on your design needs */
  margin: 0 auto; /* Centers the container */
  padding: 0 2rem; /* Consistent padding on left and right */
}

/* Consistent top spacing for page titles and headers */
.page-content,
main > section:first-child,
.content-wrapper > section:first-child,
.container > section:first-child,
.page-content > section:first-child,
main > .section-title:first-child,
.content-wrapper > .section-title:first-child,
.container > .section-title:first-child,
.page-content > .section-title:first-child,
main > h1:first-child,
main > h2:first-child,
.content-wrapper > h1:first-child,
.content-wrapper > h2:first-child,
.page-title,
h1.title,
.main-title {
  margin-top: 3.5rem; /* Fixed exact distance from navbar */
  padding-top: 1.5rem; /* Additional padding for consistency */
}

/* Section styling with consistent spacing */
section {
  padding: 2rem 0;
  width: 100%;
}

/* CSS for section title with consistent centering and spacing */
.section-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 1rem;
  font-weight: 600;
  /* Ensure consistent margins for centering */
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--text-c-highlight)
  );
  border-radius: 2px;
}

/* Ensure consistent heading alignment across all pages */
h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.heading {
  text-align: center;
  padding-left: 0;
  padding-right: 0;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem; /* Consistent bottom spacing for headings */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container,
  main,
  .content-wrapper {
    padding: 0 1rem; /* Slightly reduced padding on smaller screens */
  }

  /* Adjust top spacing for mobile */
  .page-content,
  main > section:first-child,
  .content-wrapper > section:first-child,
  .container > section:first-child,
  .page-content > section:first-child,
  main > .section-title:first-child,
  .content-wrapper > .section-title:first-child,
  .container > .section-title:first-child,
  .page-content > .section-title:first-child,
  main > h1:first-child,
  main > h2:first-child,
  .content-wrapper > h1:first-child,
  .content-wrapper > h2:first-child,
  .page-header,
  .page-title {
    margin-top: 3rem !important; /* Consistent spacing on mobile */
    padding-top: 1rem !important; /* Proportional padding for mobile */
  }
}

@media (max-width: 600px) {
  /* Further adjust for even smaller screens */
  .container,
  main,
  .content-wrapper {
    padding: 0 0.75rem; /* Even smaller padding for tiny screens */
  }

  .page-content,
  main > section:first-child,
  .content-wrapper > section:first-child,
  .container > section:first-child,
  .page-content > section:first-child,
  main > .section-title:first-child,
  .content-wrapper > .section-title:first-child,
  .container > .section-title:first-child,
  .page-content > .section-title:first-child,
  main > h1:first-child,
  main > h2:first-child,
  .content-wrapper > h1:first-child,
  .content-wrapper > h2:first-child,
  .page-header,
  .page-title {
    margin-top: 5.5rem !important; /* Smaller but still consistent for smallest screens */
    padding-top: 0.75rem !important; /* Minimal padding for smallest screens */
  }
}

/* Scroll Animation for reveal effect */
.reveal {
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
