:root {
  --primary-color: #0A2540;
  --secondary-color: #425466;
  --accent-color: #007BFF;
  --text-color: #F0F0F0;
  --bg-color-dark: #051424;
  --bg-color-light: #0a1f33;
  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Open Sans', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-secondary);
  background-color: var(--bg-color-dark);
  color: var(--text-color);
  background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://www.transparenttextures.com/patterns/subtle-noise.png');
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

header {
  background: transparent;
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease;
}

header.scrolled {
    background: rgba(10, 37, 64, 0.9);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--accent-color);
  font-size: 2rem;
}

nav ul {
  list-style: none;
  display: flex;
}

nav ul li {
  margin-left: 1.5rem;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  padding: 5px;
  border-bottom: 2px solid transparent;
}

nav a:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

#hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://placehold.co/1200x800/0A2540/F0F0F0?text=MRPST+School') no-repeat center center/cover;
  color: white;
  text-align: center;
  padding: 10rem 1rem 6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

#hero h2 {
  font-family: var(--font-primary);
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInDown 1s ease-in-out;
}

#hero p {
  font-size: 1.5rem;
  font-weight: 300;
  animation: fadeInUp 1s ease-in-out;
}

section {
  padding: 4rem 1rem;
  border-bottom: 1px solid var(--secondary-color);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

section:last-of-type {
  border-bottom: none;
}

h3 {
  font-family: var(--font-primary);
  color: var(--accent-color);
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 600;
}

.btn {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 0.8rem 1.8rem;
  text-decoration: none;
  border-radius: 50px;
  margin-top: 1rem;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  background-color: var(--bg-color-light);
  color: var(--secondary-color);
}

#scrollToTopBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 99;
  border: none;
  outline: none;
  background-color: var(--accent-color);
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 50%;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
  transition: background-color 0.3s, transform 0.3s;
}

#scrollToTopBtn:hover {
  background-color: #0056b3;
  transform: scale(1.1);
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media(max-width: 768px) {
  header .container {
    flex-direction: column;
  }
  nav ul {
    margin-top: 1rem;
  }
  #hero h2 {
    font-size: 3rem;
  }
  h3 {
    font-size: 2rem;
  }
}

/* Form Styles */
#apply form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

form label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

form input,
form textarea {
  background: var(--bg-color-light);
  border: 1px solid var(--secondary-color);
  border-radius: 5px;
  padding: 0.8rem;
  color: var(--text-color);
  font-family: var(--font-secondary);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

form .btn {
  width: 100%;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
}