:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #ea580c;
  --secondary-hover: #c2410c;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f3f4f6;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 24px;
}

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

html {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary-color);
  letter-spacing: -0.025em;
}

.logo svg {
  width: 32px;
  height: 32px;
  fill: var(--secondary-color);
}

.nav__list {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav__link {
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
  font-size: 1rem;
}

.nav__link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__link:hover,
.nav__link.active {
  color: var(--primary-color);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  transition: var(--transition);
  font-size: 1rem;
}

.btn--primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.39);
}

.btn--primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.23);
}

.btn--secondary {
  background-color: var(--secondary-color);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.39);
}

.btn--secondary:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-2px);
}

.btn--outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn--outline:hover {
  background-color: var(--primary-color);
  color: white;
}

.burger-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  z-index: 60;
}

.burger-menu span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-dark);
  transition: var(--transition);
}

.burger-menu.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1120px) {
  .burger-menu {
    display: flex;
  }
  
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 55;
    padding: 100px 2rem 2rem;
    overflow-y: auto;
  }
  
  .nav.active {
    right: 0;
  }
  
  .nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  
  .nav__link {
    font-size: 1.25rem;
  }
  
  .header__actions {
    display: none;
  }
  
  .nav .header__actions {
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
    align-items: stretch;
  }
}

.footer {
  background-color: #111827;
  color: #f9fafb;
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__col h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: white;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__link {
  color: #9ca3af;
  font-size: 0.95rem;
}

.footer__link:hover {
  color: var(--primary-color);
  padding-left: 0.5rem;
}

.footer__contact {
  color: #9ca3af;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.contact-item svg {
  width: 20px;
  height: 20px;
  fill: var(--primary-color);
  flex-shrink: 0;
  margin-top: 2px;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #1f2937;
  transition: var(--transition);
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.social-link:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer__bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.payment-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.payment-icons svg {
  height: 24px;
  width: auto;
  fill: #9ca3af;
}

.copyright {
  color: #9ca3af;
  font-size: 0.875rem;
}

.section {
  padding: 5rem 0;
}

.section--bg {
  background-color: var(--bg-light);
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-dark);
  line-height: 1.2;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal__content {
  background-color: var(--bg-white);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 500px;
  position: relative;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}

.modal.active .modal__content {
  transform: translateY(0);
}

.modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: #f3f4f6;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal__close svg {
  width: 20px;
  height: 20px;
  fill: var(--text-dark);
}

.modal__close:hover {
  background-color: #e5e7eb;
  transform: rotate(90deg);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-white);
  color: var(--text-dark);
  transition: var(--transition);
  font-size: 1rem;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  width: 100%;
}

.success-message {
  display: none;
  text-align: center;
  padding: 2rem 0;
}

.success-message svg {
  width: 64px;
  height: 64px;
  fill: #10b981;
  margin: 0 auto 1.5rem;
}

.success-message h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.success-message p {
  color: var(--text-light);
}

.cookie-banner {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  background-color: var(--text-dark);
  color: white;
  padding: 1.5rem;
  z-index: 90;
  transition: var(--transition);
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.cookie-banner.active {
  bottom: 0;
}

.cookie-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  max-width: 1280px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .cookie-banner__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.cookie-banner p a {
  color: var(--primary-color);
  text-decoration: underline;
}

.ai-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 80;
}

.ai-widget__btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  position: relative;
}

.ai-widget__btn::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 50%;
  z-index: -1;
  animation: pulse 2s infinite;
}

.ai-widget__btn svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.ai-widget__btn:hover {
  transform: scale(1.1);
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.ai-chatbot {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 320px;
  background-color: white;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  transition: var(--transition);
}

.ai-chatbot.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ai-chatbot__header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chatbot__header h4 {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-chatbot__close {
  color: white;
}

.ai-chatbot__close svg {
  fill: white;
  width: 16px;
  height: 16px;
}

.ai-chatbot__body {
  height: 300px;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #f9fafb;
}

.chat-msg {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-md);
  font-size: 0.9rem;
  line-height: 1.4;
}

.chat-msg--bot {
  background-color: #e0f2fe;
  color: #0c4a6e;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.chat-msg--user {
  background-color: var(--primary-color);
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.ai-chatbot__input {
  display: flex;
  padding: 0.75rem;
  border-top: 1px solid var(--border-color);
  background: white;
}

.ai-chatbot__input input {
  flex: 1;
  border: none;
  padding: 0.5rem;
  font-size: 0.9rem;
}

.ai-chatbot__input button {
  color: var(--primary-color);
  padding: 0.5rem;
  font-weight: 600;
}

.hero-bg-slider { background: #000; }
.hero-bg-slider .slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.5s ease-in-out; filter: brightness(0.5); }
.hero-bg-slider .slide.bg-active { opacity: 1; }



.school-hero-grid { grid-template-columns: 1fr; }
@media(min-width:768px){ .school-hero-grid { grid-template-columns: 1fr 1fr; } }


html, body { max-width: 100%; overflow-x: hidden; }
.nav { max-width: 100vw !important; box-sizing: border-box; }

@media (max-width: 380px) {
  .ai-chatbot {
    width: calc(100vw - 40px);
    right: -20px; 
  }
  .modal__content {
    padding: 1.5rem;
  }
  .section-title {
    font-size: 1.7rem;
  }
  .nav {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .container {
    padding: 0 10px;
  }
}

/* Critical Mobile Popup Fix */
@media (max-width: 500px), (max-height: 700px) {
  .ai-widget {
    bottom: 1rem;
    right: 1rem;
  }
  .ai-chatbot {
    bottom: 70px;
    right: 0;
    width: calc(100vw - 32px);
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
  }
  .ai-chatbot__body {
    height: auto;
    flex: 1;
    overflow-y: auto;
  }
}
