<!DOCTYPE html>
<html lang="en" class="light">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="icon" type="image/jpg" href="favicon.jpg">
  <title>Legetafo Innovative Boarding Academy</title>
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet"/>
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet"/>
  <script src="https://cdn.tailwindcss.com"></script>
  <script src="https://www.google.com/recaptcha/api.js" async defer></script>
  <script>
    // Tailwind Dark Mode Configuration
    tailwind.config = {
      darkMode: 'class',
      theme: {
        extend: {
          colors: {
            dark: {
              bg: '#1a1a1a',
              card: '#2d2d2d',
              text: '#e5e5e5'
            }
          }
        }
      }
    }
  </script>
  <style>
    html {
      scroll-behavior: smooth;
    }
    
    body {
      font-family: 'Roboto', sans-serif;
      margin: 0;
      padding: 0;
      transition: background-color 0.3s ease, color 0.3s ease;
    }

    .dark body {
      background-color: #1a1a1a;
      color: #e5e5e5;
    }

    .animate-spin {
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    .hero-bg {
      background-image: url('LIBA web background.jpg');
      background-size: cover;
      background-position: center;
    }

    .fade-in {
      opacity: 0;
      transform: translateY(20px);
      animation: fadeIn 0.8s ease forwards;
    }

    @keyframes fadeIn {
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .hover-scale {
      transition: transform 0.3s ease;
    }

    .hover-scale:hover {
      transform: scale(1.05);
    }

    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0, 0, 0, 0.75);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 100;
      opacity: 0;
      transition: opacity 0.3s ease-in-out;
    }

    .modal-overlay.active {
      display: flex;
      opacity: 1;
    }

    .modal-content {
      background-color: white;
      padding: 2rem;
      border-radius: 0.5rem;
      max-width: 800px;
      width: 90%;
      max-height: 90vh;
      overflow-y: auto;
      position: relative;
      transform: translateY(-20px);
      transition: transform 0.3s ease-in-out, background-color 0.3s ease;
    }

    .dark .modal-content {
      background-color: #2d2d2d;
      color: #e5e5e5;
    }

    .modal-overlay.active .modal-content {
      transform: translateY(0);
    }

    .modal-close {
      position: absolute;
      top: 1rem;
      right: 1rem;
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: #4B5563;
      transition: color 0.3s ease;
    }

    .dark .modal-close {
      color: #e5e5e5;
    }

    .modal-close:hover {
      color: #1F2937;
    }

    .dark .modal-close:hover {
      color: #ffffff;
    }

    .gallery-modal {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0, 0, 0, 0.9);
      z-index: 1000;
      display: none;
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .gallery-modal.active {
      display: flex;
      opacity: 1;
    }

    .gallery-content {
      width: 90%;
      max-width: 1200px;
      margin: auto;
      position: relative;
    }

    .gallery-main-image {
      width: 100%;
      height: 70vh;
      object-fit: contain;
    }

    .gallery-thumbnails {
      display: flex;
      gap: 1rem;
      overflow-x: auto;
      padding: 1rem 0;
      scrollbar-width: thin;
      scrollbar-color: #4B5563 #1F2937;
    }

    .gallery-thumbnail {
      width: 100px;
      height: 60px;
      object-fit: cover;
      cursor: pointer;
      opacity: 0.6;
      transition: opacity 0.3s ease;
    }

    .gallery-thumbnail:hover,
    .gallery-thumbnail.active {
      opacity: 1;
    }

    .theme-toggle {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      z-index: 50;
      padding: 1rem;
      border-radius: 50%;
      background-color: #3B82F6;
      color: white;
      cursor: pointer;
      transition: background-color 0.3s ease;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .theme-toggle:hover {
      background-color: #2563EB;
    }

    .dark .theme-toggle {
      background-color: #4B5563;
    }

    .dark .theme-toggle:hover {
      background-color: #374151;
    }

    .dark .bg-white {
      background-color: #2d2d2d;
      color: #e5e5e5;
    }

    .dark .bg-gray-50 {
      background-color: #1a1a1a;
    }

    .dark .bg-gray-100 {
      background-color: #1f1f1f;
    }

    .dark .text-gray-600 {
      color: #d1d1d1;
    }

    .dark .text-gray-700 {
      color: #e5e5e5;
    }

    .dark .text-gray-800 {
      color: #f3f3f3;
    }

    .dark .text-gray-900 {
      color: #ffffff;
    }

    .dark .shadow-lg {
      box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    }

    .dark input, .dark textarea {
      background-color: #3d3d3d;
      border-color: #4a4a4a;
      color: #e5e5e5;
    }

    .dark input::placeholder, .dark textarea::placeholder {
      color: #9ca3af;
    }

    .dark .bg-gray-800 {
      background-color: #3d3d3d;
    }

    .dark .border-gray-700 {
      border-color: #4a4a4a;
    }
  </style>
</head>
<body>
  <header class="bg-white shadow-md fixed w-full top-0 z-40">
    <div class="container mx-auto px-4 py-5 flex justify-between items-center">
      <div class="flex items-center space-x-3">
        <!-- School Logo -->
        <div class="w-12 h-12 relative">
          <img src="logo.jpg" alt="School Logo" class="w-full h-full object-cover" />
           
            <path d="M6 12v5c3 3 9 3 12 0v-5"/>
          </svg>
 
        </div>
        <div class="text-xl md:text-2xl font-bold text-yellow-500 fade-in">
          Legetafo Innovative Boarding Academy
        </div>
      </div>
      <nav class="hidden md:flex space-x-6">
        <a href="#about" class="text-gray-700 hover:text-blue-600 transition-colors duration-300 hover-scale">About Us</a>
        <a href="#information" class="text-gray-700 hover:text-blue-600 transition-colors duration-300 hover-scale">Information</a>
        <a href="#contact" class="text-gray-700 hover:text-blue-600 transition-colors duration-300 hover-scale">Contact Us</a>
      </nav>
      <button class="md:hidden" onclick="toggleMobileMenu()">
        <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
        </svg>
      </button>
    </div>
  </header>

  <!-- Rest of your existing HTML code remains exactly the same -->
  <!-- Your mobile menu -->
  <div id="mobileMenu" class="fixed inset-0 bg-white z-50 md:hidden hidden">
    <div class="p-4">
      <button onclick="toggleMobileMenu()" class="absolute top-4 right-4 text-gray-500 hover:text-gray-700">
        <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
        </svg>
      </button>
      <nav class="mt-12">
        <a href="#about" class="block py-3 text-lg text-gray-700 hover:text-blue-600 transition-colors duration-300" onclick="toggleMobileMenu()">About Us</a>
        <a href="#information" class="block py-3 text-lg text-gray-700 hover:text-blue-600 transition-colors duration-300" onclick="toggleMobileMenu()">Information</a>
        <a href="#contact" class="block py-3 text-lg text-gray-700 hover:text-blue-600 transition-colors duration-300" onclick="toggleMobileMenu()">Contact Us</a>
      </nav>
    </div>
  </div>

  <div class="h-20"></div>

  <!-- Your hero section -->
  <section class="relative h-[600px] flex items-center justify-center text-white hero-bg">
    <div class="absolute inset-0 bg-gradient-to-r from-blue-800 to-blue-600 opacity-20"></div>
    <div class="relative text-center px-4 max-w-4xl mx-auto fade-in">
      <h1 class="text-4xl md:text-6xl font-bold mb-6">Welcome to Legetafo Innovative Boarding Academy</h1>
      <p class="text-xl md:text-2xl mb-8">Where tomorrow begins!</p>
      <div class="flex flex-col sm:flex-row gap-4 justify-center">
        <button onclick="openGallery()" class="bg-yellow-500 text-gray-900 px-8 py-3 rounded-full font-semibold hover:bg-yellow-400 transition-colors duration-300 hover-scale">
          Visual Tour
        </button>
      </div>
    </div>
  </section>

  <!-- Your information section -->
  <section class="py-20 bg-gray-50" id="information">
    <div class="container mx-auto px-4">
      <h2 class="text-3xl md:text-4xl font-bold text-center mb-12 fade-in">Meet Our Experienced Teachers</h2>
      <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
        <div class="bg-white rounded-lg overflow-hidden shadow-lg hover:shadow-xl transition-shadow duration-300 fade-in">
          <div class="relative h-64 overflow-hidden">
            <img src="Abel Bulcha.jpg" alt="Abel Bulcha" class="w-full h-full object-cover hover:scale-110 transition-transform duration-300">
          </div>
          <div class="p-6">
            <h3 class="text-xl font-semibold mb-2">Abel Bulcha</h3>
            <p class="text-blue-600 mb-2">Mathematics Teacher</p>
            <p class="text-gray-600">Over 50 years of experience in teaching Mathematics and SAT.</p>
          </div>
        </div>
        <div class="bg-white rounded-lg overflow-hidden shadow-lg hover:shadow-xl transition-shadow duration-300 fade-in" style="animation-delay: 0.2s">
          <div class="relative h-64 overflow-hidden">
            <img src="https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80" alt="Jane Smith" class="w-full h-full object-cover hover:scale-110 transition-transform duration-300">
          </div>
          <div class="p-6">
            <h3 class="text-xl font-semibold mb-2">Jane Smith</h3>
            <p class="text-blue-600 mb-2">Architecture Specialist</p>
            <p class="text-gray-600">8 years of experience in architectural design and education.</p>
          </div>
        </div>
        <div class="bg-white rounded-lg overflow-hidden shadow-lg hover:shadow-xl transition-shadow duration-300 fade-in" style="animation-delay: 0.4s">
          <div class="relative h-64 overflow-hidden">
            <img src="https://images.unsplash.com/photo-1519389950473-47ba0277781c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80" alt="Michael Brown" class="w-full h-full object-cover hover:scale-110 transition-transform duration-300">
          </div>
          <div class="p-6">
            <h3 class="text-xl font-semibold mb-2">Michael Brown</h3>
            <p class="text-blue-600 mb-2">Computer Science Teacher</p>
            <p class="text-gray-600">Expert in computer science with a passion for teaching programming.</p>
          </div>
        </div>
      </div>
    </div>
  </section>

  <!-- Your testimonials section -->
  <section class="py-20 bg-gray-100">
    <div class="container mx-auto px-4">
      <h2 class="text-3xl md:text-4xl font-bold text-center mb-12 fade-in">What People Say About Us</h2>
      <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
        <div class="bg-white p-6 rounded-lg shadow-lg fade-in">
          <div class="mb-4">
            <svg class="w-8 h-8 text-yellow-500" fill="currentColor" viewBox="0 0 24 24">
              <path d="M14.017 21v-7.391c0-5.704 3.731-9.57 8.983-10.609l.995 2.151c-2.432.917-3.995 3.638-3.995 5.849h4v10h-9.983zm-14.017 0v-7.391c0-5.704 3.748-9.57 9-10.609l.996 2.151c-2.433.917-3.996 3.638-3.996 5.849h3.983v10h-9.983z" />
            </svg>
          </div>
          <p class="text-gray-600 mb-4">"Legetafo Innovative Boarding Academy has provided my child with an excellent education and a supportive environment."</p>
          <div>
            <p class="font-semibold">Parent</p>
            <p class="text-sm text-gray-500">Parent of Grade 8 Student</p>
          </div>
        </div>
        <div class="bg-white p-6 rounded-lg shadow-lg fade-in" style="animation-delay: 0.2s">
          <div class="mb-4">
            <svg class="w-8 h-8 text-yellow-500" fill="currentColor" viewBox="0 0 24 24">
              <path d="M14.017 21v-7.391c0-5.704 3.731-9.57 8.983-10.609l.995 2.151c-2.432.917-3.995 3.638-3.995 5.849h4v10h-9.983zm-14.017 0v-7.391c0-5.704 3.748-9.57 9-10.609l.996 2.151c-2.433.917-3.996 3.638-3.996 5.849h3.983v10h-9.983z" />
            </svg>
          </div>
          <p class="text-gray-600 mb-4">"The teachers here are amazing and really care about our success."</p>
          <div>
            <p class="font-semibold">Student</p>
            <p class="text-sm text-gray-500">Current Student, Grade 10</p>
          </div>
        </div>
        <div class="bg-white p-6 rounded-lg shadow-lg fade-in" style="animation-delay: 0.4s">
          <div class="mb-4">
            <svg class="w-8 h-8 text-yellow-500" fill="currentColor" viewBox="0 0 24 24">
              <path d="M14.017 21v-7.391c0-5.704 3.731-9.57 8.983-10.609l.995 2.151c-2.432.917-3.995 3.638-3.995 5.849h4v10h-9.983zm-14.017 0v-7.391c0-5.704 3.748-9.57 9-10.609l.996 2.151c-2.433.917-3.996 3.638-3.996 5.849h3.983v10h-9.983z" />
            </svg>
          </div>
          <p class="text-gray-600 mb-4">"I have seen significant improvement in my child's academic performance since joining this school."</p>
          <div>
            <p class="font-semibold">Parent</p>
            <p class="text-sm text-gray-500">Parent of Grade 11 Student</p>
          </div>
        </div>
      </div>
    </div>
  </section>

  <!-- Your location section -->
  <div style="color: white; text-align: center; padding: 20px; background-color: #333;">
    <h2 style="font-size: 2.5em; font-family: 'Arial', sans-serif; font-weight: bold; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 2px;">
      Our Location
    </h2>
    <div style="width: 100%; height: 500px; border: none; box-shadow: 0 8px 10px rgba(0, 0, 0, 0.5);">
      <iframe 
        src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2872.764733947307!2d38.90322117328938!3d9.082737590980752!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x164b96ac91555555%3A0x687cf8fcaf0ac80!2sLegetafo%20International%20Boarding%20Academy!5e1!3m2!1sen!2set!4v1733102334227!5m2!1sen!2set"
        style="width: 100%; height: 100%; border: 0;"
        allowfullscreen=""
        loading="lazy"
        referrerpolicy="no-referrer-when-downgrade">
      </iframe>
    </div>
  </div>

  <!-- Your footer section -->
  <footer class="bg-gray-900 text-white py-16" id="contact">
    <div class="container mx-auto px-4">
      <div class="grid grid-cols-1 md:grid-cols-3 gap-12">
        <div class="fade-in">
          <h3 class="text-xl font-semibold mb-6">Contact Us</h3>
          <div class="space-y-4">
            <p class="flex items-center">
              <i class="fas fa-phone mr-3 text-blue-400"></i>
              +1 303 4020 43
            </p>
            <p class="flex items-center">
              <i class="fas fa-phone mr-3 text-blue-400"></i>
              +1 303 4020 42
            </p>
            <p class="flex items-center">
              <i class="fas fa-envelope mr-3 text-blue-400"></i>
              info@legetafoacademy.com
            </p>
            <p class="flex items-center">
              <i class="fas fa-map-marker-alt mr-3 text-blue-400"></i>
              Legetafo, Ethiopia
            </p>
            <div class="flex space-x-4 mt-6">
              <a href="#" class="hover:text-blue-400 transition-colors duration-300">
                <i class="fab fa-facebook-f"></i>
              </a>
              <a href="#" class="hover:text-blue-400 transition-colors duration-300">
                <i class="fab fa-twitter"></i>
              </a>
              <a href="#" class="hover:text-blue-400 transition-colors duration-300">
                <i class="fab fa-linkedin-in"></i>
              </a>
            </div>
          </div>
        </div>
        
        <div class="fade-in" style="animation-delay: 0.2s">
          <h3 class="text-xl font-semibold mb-6">Quick Links</h3>
          <ul class="space-y-3">
            <li>
              <a href="#" class="hover:text-blue-400 transition-colors duration-300 flex items-center">
                <span class="mr-2">→</span>
                About Us
              </a>
            </li>
            <li>
              <a href="#" class="hover:text-blue-400 transition-colors duration-300 flex items-center">
                <span class="mr-2">→</span>
                Our Teachers
              </a>
            </li>
            <li>
              <a href="#" class="hover:text-blue-400 transition-colors duration-300 flex items-center">
                <span class="mr-2">→</span>
                Academic Programs
              </a>
            </li>
            <li>
              <a href="#" class="hover:text-blue-400 transition-colors duration-300 flex items-center">
                <span class="mr-2">→</span>
                Admissions
              </a>
            </li>
            <li>
              <a href="#" class="hover:text-blue-400 transition-colors duration-300 flex items-center">
                <span class="mr-2">→</span>
                Campus Life
              </a>
            </li>
            <li>
              <a href="#" class="hover:text-blue-400 transition-colors duration-300 flex items-center">
                <span class="mr-2">→</span>
                FAQs
              </a>
            </li>
          </ul>
        </div>

        <div class="fade-in" style="animation-delay: 0.4s">
          <h3 class="text-xl font-semibold mb-6">Contact Form</h3>
          <form onsubmit="return handleSubmit(event)" class="space-y-4">
            <div>
              <input
                type="text"
                name="name"
                placeholder="Your Name"
                required
                class="w-full px-4 py-2 rounded bg-gray-800 border border-gray-700 focus:outline-none focus:border-blue-500 transition-colors duration-300"
              />
            </div>
            <div>
              <input
                type="email"
                name="email"
                placeholder="Your Email"
                required
                class="w-full px-4 py-2 rounded bg-gray-800 border border-gray-700 focus:outline-none focus:border-blue-500 transition-colors duration-300"
              />
            </div>
            <div>
              <textarea
                name="message"
                placeholder="Your Message"
                required
                rows="4"
                class="w-full px-4 py-2 rounded bg-gray-800 border border-gray-700 focus:outline-none focus:border-blue-500 transition-colors duration-300"
              ></textarea>
            </div>
            <div class="g-recaptcha" data-sitekey="6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"></div>
            <button
              type="submit"
              class="w-full px-6 py-3 rounded font-semibold bg-blue-600 hover:bg-blue-700 transition-colors duration-300 hover-scale"
            >
              Send Message
            </button>
          </form>
        </div>
      </div>
      
      <div class="mt-12 pt-8 border-t border-gray-800 text-center text-gray-400">
        <p>© <script>document.write(new Date().getFullYear())</script> Legetafo Innovative Boarding Academy. All rights reserved.</p>
      </div>
    </div>
  </footer>

  <!-- Gallery Modal -->
  <div id="galleryModal" class="gallery-modal">
    <button class="modal-close text-white" onclick="closeGallery()" style="position: fixed; top: 1rem; right: 1rem; z-index: 1001;">×</button>
    <div class="gallery-content">
      <img id="mainImage" class="gallery-main-image" src="" alt="School Tour">
      <button class="gallery-nav gallery-prev" onclick="navigateGallery(-1)">❮</button>
      <button class="gallery-nav gallery-next" onclick="navigateGallery(1)">❯</button>
      <div class="gallery-thumbnails" id="thumbnailContainer"></div>
    </div>
  </div>

  <!-- Theme Toggle Button -->
  <button class="theme-toggle" onclick="toggleTheme()" aria-label="Toggle theme">
    <i class="fas fa-moon dark:hidden"></i>
    <i class="fas fa-sun hidden dark:inline"></i>
  </button>

  <script>
    // Gallery Images
    const galleryImages = [
      {
        url: 'https://images.unsplash.com/photo-1580582932707-520aed937b7b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80',
        caption: 'Modern Library'
      },
      {
        url: 'https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80',
        caption: 'School Building'
      },
      {
        url: 'https://images.unsplash.com/photo-1519389950473-47ba0277781c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80',
        caption: 'Computer Lab'
      },
      {
        url: 'https://images.unsplash.com/photo-1577896851231-70ef18881754?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80',
        caption: 'Sports Facilities'
      },
      {
        url: 'https://images.unsplash.com/photo-1509062522246-3755977927d7?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80',
        caption: 'Science Lab'
      }
    ];

    let currentImageIndex = 0;

    // Gallery Functions
    function openGallery() {
      const modal = document.getElementById('galleryModal');
      modal.classList.add('active');
      document.body.style.overflow = 'hidden';
      
      const thumbnailContainer = document.getElementById('thumbnailContainer');
      thumbnailContainer.innerHTML = '';
      
      galleryImages.forEach((image, index) => {
        const thumb = document.createElement('img');
        thumb.src = image.url;
        thumb.alt = image.caption;
        thumb.className = 'gallery-thumbnail';
        thumb.onclick = () => showImage(index);
        thumbnailContainer.appendChild(thumb);
      });
      
      showImage(0);
    }

    function closeGallery() {
      const modal = document.getElementById('galleryModal');
      modal.classList.remove('active');
      document.body.style.overflow = '';
    }

     function showImage(index) {
      currentImageIndex = index;
      const mainImage = document.getElementById('mainImage');
      mainImage.src = galleryImages[index].url;
      mainImage.alt = galleryImages[index].caption;
      
      document.querySelectorAll('.gallery-thumbnail').forEach((thumb, idx) => {
        thumb.classList.toggle('active', idx === index);
      });
    }

    function navigateGallery(direction) {
      let newIndex = currentImageIndex + direction;
      if (newIndex >= galleryImages.length) newIndex = 0;
      if (newIndex < 0) newIndex = galleryImages.length - 1;
      showImage(newIndex);
    }

    // Theme Management
    function toggleTheme() {
      const html = document.documentElement;
      const isDark = html.classList.contains('dark');
      
      if (isDark) {
        html.classList.remove('dark');
        localStorage.setItem('theme', 'light');
      } else {
        html.classList.add('dark');
        localStorage.setItem('theme', 'dark');
      }
    }

    // Initialize theme from localStorage
    function initializeTheme() {
      const savedTheme = localStorage.getItem('theme') || 'light';
      if (savedTheme === 'dark') {
        document.documentElement.classList.add('dark');
      }
    }

    // About Content
    const aboutContent = {
      mission: {
        title: "Our Mission",
        content: "At Legetafo Innovative Boarding Academy, we are dedicated to nurturing future leaders through comprehensive education that combines academic excellence with character development. Our mission is to provide a supportive and challenging environment where students can discover their potential and develop the skills needed for success in the 21st century."
      },
      vision: {
        title: "Our Vision",
        content: "To be the leading educational institution in Ethiopia, recognized for innovative teaching methods, academic excellence, and the development of well-rounded individuals who contribute positively to society."
      },
      values: {
        title: "Our Core Values",
        list: [
          "Academic Excellence - Striving for the highest standards in education",
          "Innovation - Embracing new ideas and methods in teaching",
          "Character Development - Building strong moral and ethical foundations",
          "Cultural Diversity - Celebrating and respecting different backgrounds",
          "Community Service - Encouraging social responsibility and civic engagement"
        ]
      },
      history: {
        title: "Our History",
        content: "Founded in 2015, Legetafo Innovative Boarding Academy has grown from a small local school to a prestigious institution known for its innovative approach to education. Our journey has been marked by continuous improvement and adaptation to meet the evolving needs of our students."
      }
    };

    function createAboutModal() {
      const modal = document.createElement('div');
      modal.className = 'modal-overlay';
      modal.id = 'aboutModal';
      
      const content = document.createElement('div');
      content.className = 'modal-content';
      
      content.innerHTML = `
        <button class="modal-close" onclick="closeAboutModal()">×</button>
        <h2 class="text-3xl font-bold text-gray-900 mb-8">About Legetafo Innovative Boarding Academy</h2>
        
        <div class="space-y-8">
          <div class="fade-in">
            <h3 class="text-2xl font-semibold text-gray-800 mb-4">${aboutContent.mission.title}</h3>
            <p class="text-gray-600 leading-relaxed">${aboutContent.mission.content}</p>
          </div>
          
          <div class="fade-in" style="animation-delay: 0.2s">
            <h3 class="text-2xl font-semibold text-gray-800 mb-4">${aboutContent.vision.title}</h3>
            <p class="text-gray-600 leading-relaxed">${aboutContent.vision.content}</p>
          </div>
          
          <div class="fade-in" style="animation-delay: 0.4s">
            <h3 class="text-2xl font-semibold text-gray-800 mb-4">${aboutContent.values.title}</h3>
            <ul class="list-disc list-inside text-gray-600 leading-relaxed space-y-2">
              ${aboutContent.values.list.map(value => `<li>${value}</li>`).join('')}
            </ul>
          </div>
          
          <div class="fade-in" style="animation-delay: 0.6s">
            <h3 class="text-2xl font-semibold text-gray-800 mb-4">${aboutContent.history.title}</h3>
            <p class="text-gray-600 leading-relaxed">${aboutContent.history.content}</p>
          </div>
        </div>
      `;
      
      modal.appendChild(content);
      document.body.appendChild(modal);
    }

    function showAboutModal() {
      const modal = document.getElementById('aboutModal') || createAboutModal();
      modal.classList.add('active');
      document.body.style.overflow = 'hidden';
    }

    function closeAboutModal() {
      const modal = document.getElementById('aboutModal');
      if (modal) {
        modal.classList.remove('active');
        document.body.style.overflow = '';
      }
    }

    function toggleMobileMenu() {
      const menu = document.getElementById('mobileMenu');
      menu.classList.toggle('hidden');
    }

    function handleSubmit(event) {
      event.preventDefault();
      
      // Verify reCAPTCHA
      const recaptchaResponse = grecaptcha.getResponse();
      if (!recaptchaResponse) {
        alert('Please complete the reCAPTCHA verification');
        return false;
      }

      const form = event.target;
      const button = form.querySelector('button');
      const originalText = button.textContent;
      
      button.disabled = true;
      button.textContent = 'Sending...';

      setTimeout(() => {
        const success = Math.random() > 0.5;
        if (success) {
          alert('Message sent successfully!');
          form.reset();
          grecaptcha.reset();
        } else {
          alert('Failed to send message. Please try again.');
        }
        button.disabled = false;
        button.textContent = originalText;
      }, 1500);

      return false;
    }

    // Initialize functionality
    document.addEventListener('DOMContentLoaded', () => {
      // Initialize theme
      initializeTheme();

      // Handle About Us links
      document.querySelectorAll('a[href="#about"]').forEach(link => {
        link.addEventListener('click', (e) => {
          e.preventDefault();
          showAboutModal();
        });
      });

      // Close modal when clicking outside content
      document.addEventListener('click', (e) => {
        const modal = document.getElementById('aboutModal');
        if (modal && e.target === modal) {
          closeAboutModal();
        }
      });

      // Handle escape key
      document.addEventListener('keydown', (e) => {
        if (e.key === 'Escape') {
          closeAboutModal();
          closeGallery();
        }
        if (e.key === 'ArrowLeft' && document.getElementById('galleryModal').classList.contains('active')) {
          navigateGallery(-1);
        }
        if (e.key === 'ArrowRight' && document.getElementById('galleryModal').classList.contains('active')) {
          navigateGallery(1);
        }
      });

      // Intersection Observer for fade-in animations
      const observer = new IntersectionObserver((entries) => {
        entries.forEach(entry => {
          if (entry.isIntersecting) {
            entry.target.style.opacity = '1';
            entry.target.style.transform = 'translateY(0)';
          }
        });
      }, {
        threshold: 0.1
      });

      document.querySelectorAll('.fade-in').forEach(element => {
        observer.observe(element);
      });
    });
  </script>
</body>
</html>