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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar Styling */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #000000;
  height: 10vh;
  width: 100%;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 8;

}

.logo img {
  height: 50px;
}

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

.nav-links li a {
  text-decoration: none;
  color: #ffffff;
  font-weight: bold;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: #f9d342;
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background-color: #fff;
  border-radius: 3px;
}

.sidebar {
  width: 0;
  height: 0;
  visibility: hidden;
}


/*Hero section*/
.hero1 {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F8F9FA;
  position: relative;
  padding: 10px 20px;
  padding-bottom: -40px;
}

.container1 {
  max-width: 40rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #F8F9FA;
}

.subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  font-weight: 400;

}



.underline {
  width: 4rem;
  border-bottom: 4px solid #f59e0b;
  margin-bottom: 1.5rem;
}


.title {
  font-size: 2.25rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.3;

}

.quote {
  border: 1px solid #1e40af;
  color: #1e40af;
  font-style: italic;
  font-size: 1.125rem;
  font-weight: 500;
  padding: 1rem 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  box-shadow:
    0 0 5px #1e40af,
    0 0 10px #1e40af,
    0 0 20px #1e40af,
    0 0 40px #1e40af;
  animation: glow 2s ease-in-out infinite alternate;
  max-width: 28rem;
}

@keyframes glow {
  0% {
    box-shadow:
      0 0 2px #00f0ff,
      0 0 4px #00f0ff,
      0 0 8px #00f0ff,
      0 0 16px #00f0ff;
    border-color: #00f0ff;
  }

  100% {
    box-shadow:
      0 0 5px #f979f1,
      0 0 10px #f979f1,
      0 0 15px #f979f1,
      0 0 20px #f979f1;
    border-color: #f979f1;
  }
}

.description {
  font-size: 1rem;
  text-align: center;
  max-width: 28rem;
  margin-bottom: 2rem;
}

.button-wrapper {
  margin-bottom: 3rem;
}

.button-wrapper a {
  text-decoration: none;
}

.enroll-button {
  background-color: #FF6600;
  color: white;
  font-weight: 600;
  font-size: 16px;
  padding: 0.8rem 1.8rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.2s ease;
}

.enroll-button:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}


.floating-books .img1 {
  position: absolute;
  top: 10%;
  left: 20%;
  width: 80px;
  animation: floatAnim 5s ease-in-out infinite;
}

.floating-books .img2 {
  position: absolute;
  bottom: 10%;
  right: 20%;
  width: 80px;
  animation: floatAnim 5s ease-in-out infinite;
}

@keyframes floatAnim {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }

  100% {
    transform: translateY(0);
  }
}


/* Responsive for mobile */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    background-color: #000;
    width: 100%;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
  }

  .nav-links.active {
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .sidebar {
    width: 100vw;
    height: 100vh;
    position: fixed;
    z-index: 9;
    top: 0;
    right: 0;
    background-color: rgb(4, 4, 4);
    display: none;
    align-items: center;
    justify-content: center;
    visibility: visible;



  }

  .sidebar_links li {
    margin-bottom: 20px;
  }

  .sidebar_links a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 26px;

  }

  .close_sidebar {
    font-size: 50px;
    position: absolute;
    top: 10px;
    right: 20px;
    color: white;
    rotate: 45deg;
  }
}



@media (max-width: 768px) {

  .floating-books {
    display: none;
  }

  .floating-books .img1,
  .img2 {
    display: none;
    width: 0;
    height: 0;
  }


  .quote {

    font-size: 0.8rem;
    padding: 0.5rem 1.5rem;
    max-width: 21rem;
  }

  .title {
    font-size: 1.8rem;

  }

  .description {
    font-size: 1rem;
    text-align: center;

  }
}

/* Optimized about us section */
.about {
  padding: 20px 20px;
  background-color: #f9f9f9;
  scroll-margin-top: 60px;
  /* margin-top: 20px; */
}

.about-heading {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  font-weight: 700;
  color: #003366;
}

.about-heading span {
  color: #ff6600;
}

.about-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: nowrap;
}

.about-image {
  flex: 0 0 350px;
}

.about-image img {
  width: 100%;
  max-width: 350px;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.about-content {
  flex: 1;
  min-width: 300px;
}

.about-content p {
  margin-bottom: 20px;
  line-height: 1.6;
  color: #333;
}

.about-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}

.highlight-card {
  flex: 1;
  min-width: 150px;
  background-color: #fff;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.highlight-card:hover {
  transform: translateY(-5px);
}

.highlight-card i {
  font-size: 1.8rem;
  color: #ff6600;
  margin-bottom: 8px;
}

.highlight-card h4 {
  margin: 8px 0 5px;
  font-size: 1.1rem;
  color: #003366;
}

.about-btn {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 25px;
  background-color: #003366;
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.about-btn:hover {
  background-color: #ff6600;
}

/* Responsive */
@media (max-width: 768px) {
  .about-wrapper {
    flex-direction: column;
    text-align: center;
    align-items: center;

  }

  .about-image img {
    width: 100%;
    max-width: 300px;
  }

  .highlight-card {
    flex: 1 1 100%;
  }
}

/* Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards;
}

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

/* Why Join Us Section */
.why-join {
  padding: 60px 20px;
  background-color: #fff8f0;
  text-align: center;
}

.why-join h2 {
  font-size: 2.5rem;
  color: #003366;
  margin-bottom: 10px;
}

.why-join span {
  color: #ff6600;
}

.why-join .intro {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 40px;
}

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

.feature-card {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.feature-card img {
  width: 60px;
  margin-bottom: 15px;
}

.feature-card h3 {
  font-size: 1.25rem;
  color: #003366;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}

/* Gallery Section */
.gallery-section {
  padding: 60px 20px;
  background-color: #f9f9f9;
  text-align: center;
}

.gallery-section h2 {
  font-size: 2.5rem;
  color: #003366;
  margin-bottom: 10px;
}

.gallery-section h2 span {
  color: #ff6600;
}

.gallery-section .subtext {
  color: #666;
  font-size: 1rem;
  margin-bottom: 40px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 0 20px;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

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

.gallery-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}

.caption {
  position: absolute;
  bottom: 12px;
  left: 20px;
  color: white;
  font-size: 1rem;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

@media (max-width: 768px) {
  .gallery-grid {
    padding: 0;
    /* remove left/right padding on small screens */
  }

  .gallery-item img {
    height: auto;
    /* allow natural height on smaller screens */
  }
}

#map-section iframe {
  width: 100%;
  height: 450px;
  border: 0;
}

@media (max-width: 600px) {
  #map-section iframe {
    height: 300px;
  }
}

/* ✅ Optimized & Animated Contact Section Styles */
.contact-section {
  padding: 60px 20px;
  background-color: #fdfdfd;
  text-align: center;
}

.contact-section h2 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 20px;
  font-weight: 700;
  animation: fadeInDown 1s ease-in-out;
}

.contact-section h2 span {
  color: #ff6600;
}

.contact-section .subtext {
  color: #666;
  font-size: 1rem;
  margin-bottom: 40px;
  animation: fadeIn 1.5s ease-in-out;
}

#contactForm {
  max-width: 800px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 1s ease-in-out;
}

.form-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.form-field {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-field label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 0.95rem;
}

.form-field input,
.form-field select,
textarea {
  padding: 12px 15px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

button[type="submit"] {
  background-color: #27ae60;
  color: white;
  border: none;
  padding: 14px 25px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

button[type="submit"]:hover {
  background-color: #219150;
}

.error-msg {
  color: red;
  font-size: 0.85rem;
  display: none;
  margin-top: 5px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

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

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }

  .form-field {
    flex: 1 1 100%;
  }

  .contact-section h2 {
    font-size: 2rem;
  }
}