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

/* --------------------------------------------------
   BODY
-------------------------------------------------- */
body {
  font-family: 'Quicksand', sans-serif;
  line-height: 1.6;
  background-color: #8DECEC;
  color: #006356;
}

/* --------------------------------------------------
   HEADER
-------------------------------------------------- */
header {
  background: #8DECEC;
  color: #006356;
  padding: 1rem 2rem;
  position: relative;
  z-index: 1000;
}

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

header .logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

header .logo img {
  height: 150px;
  margin-right: 20px;
}

header .logo h1 {
  font-size: 2.5rem;
  color: #006356;
  white-space: nowrap;
}

/* --------------------------------------------------
   NAVIGATION
-------------------------------------------------- */
.main-nav {
  display: flex;
  align-items: center;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

.main-nav ul li a,
.dropdown-toggle {
  color: #006356;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  cursor: pointer;
}

.main-nav ul li a.active {
  border-bottom: 2px solid #006356;
  font-weight: bold;
}

/* --------------------------------------------------
   DROPDOWN (CLICK-TO-OPEN)
-------------------------------------------------- */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: 600;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  border: 1px solid #d0d7e2;
  border-radius: 8px;
  min-width: 160px;
  padding: 8px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  z-index: 1000;

  /* animation */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}

.dropdown-menu.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: #006356;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background: #e6f2ff;
}

/* --------------------------------------------------
   HAMBURGER MENU
-------------------------------------------------- */
.menu-toggle {
  background: none;
  border: none;
  font-size: 2rem;
  color: #006356;
  cursor: pointer;
  display: none;
  position: relative;
  z-index: 1001;
}

.menu-toggle .close {
  display: none;
}

/* --------------------------------------------------
   HERO SECTION
-------------------------------------------------- */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(to right, #00796b, #004d40);
  color: #3EC6C6;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
}

.hero .cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: #F47C20;
  color: #333;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}

/* --------------------------------------------------
   SUBJECTS GRID
-------------------------------------------------- */
.subjects {
  padding: 2rem;
  text-align: center;
}

.subjects h2 {
  background: #8DECEC;
  margin-bottom: 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.subject {
  background: #e0f2f1;
  padding: 1rem;
  border-radius: 8px;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.subject:hover {
  transform: scale(1.05);
  background: #b2dfdb;
}

/* --------------------------------------------------
   FOOTER
-------------------------------------------------- */
footer {
  background: #004d40;
  color: #3EC6C6;
  text-align: center;
  padding: 1rem;
}

/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .main-nav {
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease-in-out;
  }

  .main-nav.active {
    max-height: 500px;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul li {
    margin: 10px 0;
  }

  .main-nav ul li a,
  .dropdown-toggle {
    padding: 0.5rem 1rem;
    width: 100%;
    display: block;
  }

  /* Mobile dropdown */
  .dropdown-menu {
    position: static;
    width: 100%;
    border: none;
    box-shadow: none;
    background: #e0f2f1;
    transform: none;
  }

  .dropdown-menu.open {
    display: block;
    opacity: 1;
  }
}

/* --------------------------------------------------
   SPINNER (LOADING OVERLAY)
-------------------------------------------------- */
.spinner-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ccc;
  border-top: 6px solid #006356;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}