<%- include("websitepartials/header") %>
<main class="main">
  <!-- Page Title -->
  <div
    class="page-title dark-background"
    style="
      background-image: url(website-assets/img/gallery/Dr-Basilia-Igbokwe3.jpg);
    "
  >
    <div class="container position-relative">
      <h1>About</h1>
      <p>History of the Federal Polytechnic, Nekede</p>
      <nav class="breadcrumbs">
        <ol>
          <li><a href="/">Home</a></li>
          <li class="current">About</li>
        </ol>
      </nav>
    </div>
  </div>
  <!-- End Page Title -->

  <!-- Admissions Section -->
  <section id="admissions" class="admissions section">
    <div class="container" data-aos="fade-up" data-aos-delay="100">
      <div class="row gy-5 g-lg-5">
        <div class="col-lg-6">
          <div class="admissions-info" data-aos="fade-up">
            <h2>History of the Federal Polytechnic, Nekede</h2>
            <p>
              The Federal Polytechnic, Nekede is a federal government-owned
              higher institution located in Nekede, Owerri West local government
              area in Imo State, South-Eastern Nigeria.
            </p>
            <p>
              It was established on a temporary site at the premise of
              Government Technical College by the Imo State government in 1978
              as College of Technology, Owerri before it was moved to its
              present location in Nekede.
            </p>
            <p>
              On 7 April 1993, the polytechnic was changed to a federal
              government institution and was renamed “The Federal Polytechnic,
              Nekede”.
            </p>

            <div class="admissions-steps mt-5">
              <h3>
                The Federal Polytechnic, Nekede offers National Diploma and
                Higher National Diploma courses at undergraduate levels.
              </h3>
              <div class="steps-wrapper mt-4">
                <div class="step-item" data-aos="fade-up" data-aos-delay="100">
                  <div class="step-number">1</div>
                  <div class="step-content">
                    <h4
                      onclick="location.href='/faculty-staff'"
                      style="cursor: pointer"
                    >
                      School of Engineering Technology (SET)
                    </h4>
                  </div>
                </div>

                <div class="step-item" data-aos="fade-up" data-aos-delay="200">
                  <div class="step-number">2</div>
                  <div class="step-content">
                    <h4
                      onclick="location.href='/faculty-staff'"
                      style="cursor: pointer"
                    >
                      School of Industrial and Applied Science (SIAS)
                    </h4>
                  </div>
                </div>

                <div class="step-item" data-aos="fade-up" data-aos-delay="300">
                  <div class="step-number">3</div>
                  <div class="step-content">
                    <h4
                      onclick="location.href='/faculty-staff'"
                      style="cursor: pointer"
                    >
                      School of Business Management Technology (SBMT)
                    </h4>
                  </div>
                </div>

                <div class="step-item" data-aos="fade-up" data-aos-delay="400">
                  <div class="step-number">4</div>
                  <div class="step-content">
                    <h4
                      onclick="location.href='/faculty-staff'"
                      style="cursor: pointer"
                    >
                      School of General Studies (SGS)
                    </h4>
                  </div>
                </div>

                <div class="step-item" data-aos="fade-up" data-aos-delay="400">
                  <div class="step-number">5</div>
                  <div class="step-content">
                    <h4
                      onclick="location.href='/faculty-staff'"
                      style="cursor: pointer"
                    >
                      School of Environmental Design and Technology (SEDT)
                    </h4>
                  </div>
                </div>

                <div class="step-item" data-aos="fade-up" data-aos-delay="400">
                  <div class="step-number">6</div>
                  <div class="step-content">
                    <h4
                      onclick="location.href='/faculty-staff'"
                      style="cursor: pointer"
                    >
                      School of Information and Communications Technology (SICT)
                    </h4>
                  </div>
                </div>
                <div class="step-item" data-aos="fade-up" data-aos-delay="400">
                  <div class="step-number">7</div>
                  <div class="step-content">
                    <h4
                      onclick="location.href='/faculty-staff'"
                      style="cursor: pointer"
                    >
                      School of Agriculture and Agricultural Technology (SAAT)
                    </h4>
                  </div>
                </div>

                <div class="step-item" data-aos="fade-up" data-aos-delay="400">
                  <div class="step-number">8</div>
                  <div class="step-content">
                    <h4
                      onclick="location.href='/faculty-staff'"
                      style="cursor: pointer"
                    >
                      School of Health and Related TEchnology. (SHRT)
                    </h4>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>

        <div class="col-lg-6">
          <div class="admissions-requirements" data-aos="fade-up">
            <h3>Historical Highlights</h3>
            <div class="requirements-list mt-4">
              <div
                class="requirement-item"
                data-aos="fade-up"
                data-aos-delay="100"
              >
                <div class="icon-box">
                  <i class="bi bi-mortarboard-fill"></i>
                </div>
                <div>
                  <h4>Founding Vision</h4>
                  <p>
                    Established with the mission to bridge the gap between
                    theoretical learning and practical skills, the institution
                    began with a focus on applied sciences and technology.
                  </p>
                </div>
              </div>

              <div
                class="requirement-item"
                data-aos="fade-up"
                data-aos-delay="200"
              >
                <div class="icon-box">
                  <i class="bi bi-file-earmark-text"></i>
                </div>
                <div>
                  <h4>Legal Foundation</h4>
                  <p>
                    Formally chartered by the Imo State Government, the school
                    gained official recognition to offer accredited diploma and
                    certificate programs.
                  </p>
                </div>
              </div>

              <div
                class="requirement-item"
                data-aos="fade-up"
                data-aos-delay="300"
              >
                <div class="icon-box">
                  <i class="bi bi-journal-richtext"></i>
                </div>
                <div>
                  <h4>Academic Milestones</h4>
                  <p>
                    From its first graduating class to the expansion into
                    multiple academic faculties, the institution has continued
                    to evolve with excellence.
                  </p>
                </div>
              </div>

              <div
                class="requirement-item"
                data-aos="fade-up"
                data-aos-delay="400"
              >
                <div class="icon-box">
                  <i class="bi bi-graph-up"></i>
                </div>
                <div>
                  <h4>Growth & Impact</h4>
                  <p>
                    Through sustained development, the institution now plays a
                    significant role in driving innovation and skill acquisition
                    across Nigeria.
                  </p>
                </div>
              </div>
            </div>
          </div>

          <div class="request-info mt-5" data-aos="fade-up">
            <div class="card">
              <div class="card-body">
                <h3 class="card-title">Learn More About Us</h3>
                <p>
                  Interested in exploring our journey, programs, or notable
                  achievements? Reach out to us for more detailed historical
                  insights and institutional records.
                </p>

                <form class="php-email-form mt-4">
                  <div class="mb-3">
                    <input
                      type="text"
                      name="fullName"
                      id="fullName"
                      class="form-control"
                      placeholder="Full Name"
                      required=""
                    />
                  </div>
                  <div class="mb-3">
                    <input
                      type="email"
                      name="email"
                      id="email"
                      class="form-control"
                      placeholder="Email Address"
                      required=""
                    />
                  </div>

                  <div class="mb-3">
                    <select
                      name="subject"
                      id="subject"
                      class="form-select"
                      required=""
                    >
                      <option value="" selected="" disabled="">
                        Area of Interest
                      </option>
                      <option value="Institutional History">
                        Institutional History
                      </option>
                      <option value="Milestones">Milestones</option>
                      <option value="Founding Principles">
                        Founding Principles
                      </option>
                      <option value="Programs Evolution">
                        Programs Evolution
                      </option>
                    </select>
                  </div>
                  <div class="mb-3">
                    <textarea
                      name="message"
                      id="message"
                      class="form-control"
                      rows="3"
                      placeholder="Questions or Comments"
                      required=""
                    ></textarea>
                  </div>

                  <div class="text-center">
                    <button type="submit" class="btn btn-primary btn-submit">
                      Submit Request
                    </button>
                  </div>
                </form>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="cta-wrapper mt-5" data-aos="fade-up">
        <div class="row g-0">
          <div class="col-md-6">
            <div class="cta-item tour">
              <i class="bi bi-building"></i>
              <h3>Explore Our Heritage</h3>
              <p>
                Take a walk through time—experience the milestones,
                achievements, and historical legacy that define our campus on
                our yourtube channel.
              </p>
              <a
                href="https://www.youtube.com/@OfficialUISTO"
                target="_blank"
                class="btn btn-secondary"
                >Campus History Tour</a
              >
            </div>
          </div>
          <div class="col-md-6">
            <div class="cta-item apply">
              <i class="bi bi-file-earmark-check"></i>
              <h3>Discover Our Legacy</h3>
              <p>
                Learn how our institution has evolved over the years to become a
                hub of innovation, learning, and societal impact.
              </p>
              <a
                href="https://en.wikipedia.org/wiki/Federal_Polytechnic,_Nekede"
                target="_blank"
                class="btn btn-primary"
                >Read Historical Timeline</a
              >
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
  <!-- /Admissions Section -->
</main>

<%- include("websitepartials/footer") %>

<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>

<script>
  document
    .querySelector(".php-email-form")
    .addEventListener("submit", async function (e) {
      e.preventDefault();

      const form = e.target;
      const fullName = document.getElementById("fullName").value.trim();
      const email = document.getElementById("email").value.trim();
      const subject = document.getElementById("subject").value.trim();
      const message = document.getElementById("message").value.trim();
      const submitBtn = document.querySelector(".btn-submit");

      // Basic validation
      if (!fullName || !email || !subject || !message) {
        return Swal.fire({
          icon: "warning",
          title: "Incomplete Form",
          text: "Please fill in all the fields before submitting.",
        });
      }

      // Prepare data
      const payload = {
        fullName,
        email,
        subject,
        message,
      };

      try {
        submitBtn.innerHTML = `SENDING... <i class="fas fa-spin fa-spinner"></i>`;
        submitBtn.disabled = true;
        const res = await fetch("/api/contact", {
          method: "POST",
          headers: {
            "Content-Type": "application/json",
          },
          body: JSON.stringify(payload),
        });

        if (res.ok) {
          Swal.fire({
            icon: "success",
            title: "Message Sent",
            text: "Your message has been sent successfully!",
          });
          form.reset(); // Clear form
          submitBtn.disabled = false;
          submitBtn.innerHTML = "SEND MESSAGE";
        } else {
          const err = await res.json();
          Swal.fire({
            icon: "error",
            title: "Failed to Send",
            text: err.message || "An error occurred. Please try again later.",
          });

          submitBtn.disabled = false;
          submitBtn.innerHTML = "SEND MESSAGE";
        }
      } catch (error) {
        Swal.fire({
          icon: "error",
          title: "Server Error",
          text: "Could not connect to the server. Please try again later.",
        });
        submitBtn.disabled = false;
        submitBtn.innerHTML = "SEND MESSAGE";
      }
    });
</script>
