/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: 'Inter', sans-serif;
  background-color: #020064;
  color: #284D67;
  height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  transition: opacity 0.3s ease-in-out;
}

:root {
  --primary-color: #020064;
  --secondary-color: #CD9933;
  --font-family: 'Segoe UI', sans-serif;
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary-color);
  color: #fff;
  padding: 1.25rem;
  text-align: center;
  font-family: var(--font-family);
  font-size: 1rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  animation: slideUp 0.6s ease-out;
}

#cookie-banner span {
  display: block;
  margin-bottom: 0.75rem;
}

#accept-cookies {
  background-color: var(--secondary-color);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#accept-cookies:hover {
  background-color: #e0a84d;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}



/* Layout container */
.page-frame {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 10px solid #020064;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 0 20px rgba(2, 0, 100, 0.1);
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #020064;
  color: #ffffff;
  padding: 1rem;
  flex-wrap: wrap;
}

.header-logo {
  height: 65px;
  margin-right: 1.25rem;
}

.header-title {
  font-size: 1.5rem;
  font-weight: bold;
  flex-grow: 1;
  margin-bottom: 0.5rem;
}

.header-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.nav-button {
  background-color: #CD9933;
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease;
  width: 180px;
  text-align: center;
  margin-top: 1rem;
}

.nav-button:hover {
  background-color: #020064;
  outline: 2px solid #CD9933;
}

/* Main content */
.book-container {
  flex-grow: 1;
  margin: 1rem;
  height: 100%;
  padding: 2rem;
  border: 3px solid #020064;         /* Blue inner border */
  outline: 6px solid #CD9933;        /* Gold outer frame */
  border-radius: 12px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.05); /* Soft inner shadow */
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  transition: opacity 0.5s ease;
  color: #284D67;
  scroll-padding-bottom: 100px;
  animation: fadeIn 0.4s ease-in-out;
}

.book-container > * {
  max-width: 100%;
  overflow-wrap: break-word;
}

#welcome-text {
  text-align: center;
}

#toc-header {
  text-align: center;
  margin-bottom: 1rem;
}

/* TOC list as button group */
.toc {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Button-like links */
.toc li a {
  display: block;
  padding: 1rem 1.5rem;
  background-color: #020064;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1rem;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.toc li a:hover,
.toc li a:focus {
  background-color: #CD9933;
  transform: scale(1.02);
}

.toc-wrapper {
  display: flex;
  justify-content: center;   /* Horizontal centering */
  align-items: center;       /* Vertical centering */
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.logo {
  display: block;
  margin: 0 auto 1rem;
  max-width: 100%;
  filter: drop-shadow(0 6px 12px rgba(0, 51, 102, 0.5)) 
}

/* Navigation areas */
.nav-area {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
}

.nav-center {
  text-align: center;
  margin-top: 1rem;
}

/* Footer */
.footer {
  background-color: #020064;
  color: #ffffff;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* Form styles */
.contact-grid {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 40px;
  margin-top: 20px;
  align-items: flex-start;
}

.contact-details {
  flex: 1;
}

.contact-map {
  flex: 1.2;
}

.enrolment-form {
  flex: 1 1 300px;
}

.contact-details h3,
.enrolment-form h3 {
  color: #020064;
  margin-bottom: 0.5rem;
}

      :root {
  --primary-color: #020064;
  --secondary-color: #CD9933;
  --input-border-color: #284D67;
  --input-bg-color: #fefefe;
}

.enrolment-section {
  padding: 2rem;
  /*background-color: #f9f9f9;*/
  color: var(--primary-color);
}

.contact-details,
.enrolment-form {
  flex: 1 1 300px;
}

.contact-details h3,
.enrolment-form h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.contact-details p,
.enrolment-form label {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
}

.enrolment-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.enrolment-form input,
.enrolment-form select,
.enrolment-form textarea {
  padding: 0.75rem;
  border: 2px solid var(--input-border-color);
  border-radius: 8px;
  background-color: var(--input-bg-color);
  color: var(--primary-color);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.enrolment-form input:focus,
.enrolment-form select:focus,
.enrolment-form textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(205, 153, 51, 0.2);
}

.enrolment-form small {
  font-size: 0.85rem;
  color: #666;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

.captcha-wrapper {
  margin-top: 1rem;
}

.contact-support {
  margin-top: 1rem;
  font-size: 0.95rem;
  opacity: 0.8;
}

.neurodivergent-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: #020064;
}

.checkbox-group input[type="checkbox"] {
  accent-color: #CD9933;
  transform: scale(1.2);
}

#neuro_other {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #284D67;
  border-radius: 8px;
  background-color: #fefefe;
  color: #020064;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#neuro_other:focus {
  border-color: #CD9933;
  box-shadow: 0 0 0 2px rgba(205, 153, 51, 0.2);
  outline: none;
}

.contact-support {
  margin-top: 1rem;
  font-size: 0.95rem;
  opacity: 0.8;
}

.captcha-wrapper {
  margin-top: 1rem;
}

.map-frame {
  margin-top: 1rem;
  border-radius: 8px;
  border: 3px solid #CD9933;
  box-shadow: 0 6px 12px rgba(0, 51, 102, 0.5);
  overflow: hidden;
}

.whatsapp-float {
  position: fixed;
  bottom: 15px;
  right: 15px;
  z-index: 1000;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float img {
  width: 30px;
  height: 30px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.teacher-card {
  background: #fff;
  padding: 1rem;
  border: 3px solid #CD9933;
  box-shadow: 0 0 12px rgba(0, 51, 102, 0.5); /* Navy glow */
  text-align: center;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.teacher-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 18px rgba(0, 51, 102, 0.7);
}

.teacher-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.teacher-card h3 {
  margin: 0.5rem 0 0.25rem;
  color: #003366;
}

.teacher-card p {
  font-weight: 500;
  color: #444;
  margin-bottom: 0.5rem;
}

.teacher-card blockquote {
  font-style: italic;
  color: #666;
  margin: 0;
  padding: 0 0.5rem;
}

.remedial-wrapper {
  display: grid;
  grid-template-columns: 1.5fr 1fr; /* 60% text, 40% image */
  align-items: center;
  gap: 40px;
}

#neuro-image {
  width: 100%; /* Image will now fill its 40% grid column perfectly */
  height: auto;
}

.external-link {
  color: #003366;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.external-link:hover {
  color: #CD9933;
}

.faq-section,
.about-section,
.curriculum-section {
    height: auto;
    width: 800px;
    margin-top: 1rem;
}

/*FAQs Styles*/
.faq-section {
  margin-top: 2rem;
}

.faq-item {
  border: 2px solid #CD9933;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem;
  background-color: #f0f6ff;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: #004080;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.arrow {
  border: solid #004080;
  border-width: 0 3px 3px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
}

.arrow.up {
  transform: rotate(-135deg);
  -webkit-transform: rotate(-135deg);
}

.faq-question:hover {
  background-color: #e0ecff;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  background-color: #ffffff;
  padding: 0 1rem;
  color: #333;
}

.faq-answer p {
  margin: 1rem 0;
}

.faq-answer.show {
  max-height: 500px; /* Enough to show full content */
}

.planner-thumb {
  width: 300px;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(0, 51, 102, 0.5);
  transition: transform 0.3s ease;
}
.planner-thumb:hover {
  transform: scale(1.03);
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.8);
}
.modal-content {
  position: relative;
  margin: 5% auto;
  width: 90%; height: 90%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
.close {
  position: absolute;
  top: 10px; right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-title {
    margin-top: 0.5rem;
  }

  .nav-area {
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
  }

  .nav-button {
    flex: 1 1 auto;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    min-width: 80px;
    text-align: center;
  }

  body, html {
    height: auto;
    overflow-y: auto;
  }

  .page-frame {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .book-container {
    height: auto;
    max-height: none;
    overflow: visible;
    margin: 1rem 0;
    padding: 1rem;
  }

  .book-container h1 {
    text-align: center;
  }

  #neuro-image {
    max-width: 100%;
    width: 100%;
    margin-top: 1rem;
  }

  .remedial-wrapper {
    grid-template-columns: 1fr;
  }

  .remedial-section {
    width: 100%;
  }

  .toc li a {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
  }

  .nav-button {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }

  .contact-grid {
        flex-direction: column;
    }
    
  .contact-map {
      width: 100%;
  }
}