/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  background-color: #f0f8ff;
  color: #333;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Header Styling */
header {
  background-color: rgba(0, 100, 0, 0.9);
  color: #fff;
  padding: 20px 0;
  text-align: center;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

header h1 {
  margin-bottom: 10px;
  font-size: 3rem;
  animation: fadeInDown 1.5s ease-in-out;
}

nav ul {
  list-style-type: none;
  display: flex;
  justify-content: center;
  gap: 25px;
}

nav ul li {
  font-size: 1.2rem;
  position: relative;
}

nav ul li a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width .3s;
}

nav ul li a:hover::after {
  width: 100%;
}

/* Main Layout */
main {
  display: flex;
  justify-content: space-between;
  padding: 200px 20px 50px 20px; /* Adjusted padding-top for fixed header */
  animation: fadeInUp 1.5s ease forwards;
  flex-wrap: wrap;
}

article {
  flex: 1 1 60%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-right: 20px;
}

aside {
  flex: 1 1 35%;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 200px; /* Adjust based on header height */
  max-height: calc(100vh - 120px); /* Prevent overflow */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

aside h2 {
  font-size: 1.8rem;
  color: #006400;
  margin-bottom: 15px;
  text-align: center;
}

aside .gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center; /* Center items horizontally */
  width: 100%;
  margin-bottom: 15px;
}

aside .gallery img {
  width: calc(50% - 10px);
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.3s, box-shadow 0.3s;
}

aside .gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

aside p {
  text-align: center;
  font-size: 1rem;
  color: #555;
}

section {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

section:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

section h2 {
  font-size: 2rem;
  color: #006400;
  margin-bottom: 10px;
}

section p {
  text-align: justify;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

section img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
  object-fit: cover;
}

/* Footer Styling */
footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}

footer p {
  margin-bottom: 10px;
}

footer .social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

footer .social-icons a {
  color: #fff;
  font-size: 1.5rem;
  transition: color 0.3s;
}

footer .social-icons a:hover {
  color: #4CAF50;
}

/* Keyframe Animations */
@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsiveness */
@media (max-width: 1024px) {
  main {
    flex-direction: column;
    padding: 100px 20px 30px 20px;
  }

  article {
    margin-right: 0;
    flex: 1 1 100%;
  }

  aside {
    flex: 1 1 100%;
    position: static;
    margin-top: 20px;
    max-height: none;
    overflow-y: visible;
  }

  aside .gallery img {
    width: calc(33.333% - 10px);
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  nav ul {
    flex-direction: column;
    gap: 15px;
  }

  nav ul li {
    font-size: 1rem;
  }

  main {
    padding: 100px 10px 30px 10px;
  }

  aside h2 {
    font-size: 1.5rem;
  }

  aside .gallery img {
    width: calc(50% - 10px);
    height: 80px;
  }

  section h2 {
    font-size: 1.5rem;
  }

  section p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.8rem;
  }

  nav ul li {
    font-size: 0.9rem;
  }

  main {
    padding: 100px 5px 20px 5px;
  }

  aside .gallery img {
    width: 100%;
    height: 70px;
  }

  section h2 {
    font-size: 1.3rem;
  }

  section p {
    font-size: 0.9rem;
  }

  footer p {
    font-size: 0.9rem;
  }

  footer .social-icons a {
    font-size: 1.2rem;
  }
}
