/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: #1a5c3a;
}

h3 {
  font-size: 1.5rem;
  color: #2d8659;
}

p {
  margin-bottom: 1rem;
}

/* Colors */
:root {
  --primary-color: #2d8659;
  --primary-dark: #1a5c3a;
  --primary-light: #4a9b6d;
  --secondary-color: #f9f9f9;
  --text-color: #333;
  --text-light: #666;
  --white: #fff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.logo-icon {
  font-size: 2rem;
  margin-right: 10px;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 10px 15px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color);
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
  background-color: var(--text-color);
}

/* Hero Section */
.hero {
  height: 100vh;
  background: linear-gradient(135deg, #2d8659 0%, #1a5c3a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 20px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://picsum.photos/seed/palm-oil-plantation/1920/1080.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  z-index: -1;
}

.hero-container {
  max-width: 800px;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(30px);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  transform: translateY(30px);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(30px);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--white);
  color: var(--primary-color);
}

.btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Sections */
.section {
  padding: 80px 0;
}

.bg-light {
  background-color: var(--secondary-color);
}

.section-title {
  opacity: 0;
  transform: translateY(20px);
}

/* Cards */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--white);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background-color: rgba(45, 134, 89, 0.1);
  border-radius: 50%;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

/* Grid Items */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.grid-item {
  background-color: var(--white);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}

.grid-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.grid-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Timeline */
.timeline-container {
  max-width: 900px;
  margin: 0 auto;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background-color: var(--primary-light);
}

.timeline-item {
  position: relative;
  padding: 2rem 0;
  width: 50%;
  opacity: 0;
  transform: translateY(20px);
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 4rem;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 4rem;
}

.timeline-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-icon {
  right: -25px;
}

.timeline-item:nth-child(even) .timeline-icon {
  left: -25px;
}

.timeline-content {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Accordion */
.accordion-container {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  background-color: var(--white);
  border-radius: 10px;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
}

.accordion-header {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.accordion-header:hover {
  background-color: rgba(45, 134, 89, 0.05);
}

.accordion-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
}

.accordion-header h3 {
  margin: 0;
  flex-grow: 1;
}

.accordion-toggle {
  transition: transform 0.3s ease;
}

.accordion-toggle svg {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
}

.accordion-item.active .accordion-toggle {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1.5rem;
}

.accordion-item.active .accordion-content {
  max-height: 300px;
  padding: 0 1.5rem 1.5rem;
}

/* Sustainability Section */
.sustainability-content {
  margin-bottom: 3rem;
}

.sustainability-item {
  margin-bottom: 2rem;
}

.sustainability-item h3 {
  margin-bottom: 0.5rem;
}

/* Image Gallery */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.gallery-item {
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.05);
}

.gallery-caption {
  padding: 1.5rem;
}

.gallery-caption h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.gallery-caption p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Contact Section */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  opacity: 0;
  transform: translateX(-20px);
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(45, 134, 89, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  margin-right: 1rem;
  flex-shrink: 0;
}

.contact-details h3 {
  margin-bottom: 0.25rem;
  color: var(--primary-color);
}

.contact-details p {
  color: var(--text-light);
}

.contact-form {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(20px);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  background-color: var(--white);
  margin: 5% auto;
  padding: 0;
  border-radius: 10px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  animation: slideIn 0.3s ease;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1;
  transition: color 0.3s ease;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--primary-color);
}

.modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

.modal-body img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.modal-text {
  text-align: center;
  max-width: 600px;
}

.modal-text h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.modal-text p {
  color: var(--text-color);
  line-height: 1.6;
  font-size: 1rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive Modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
    max-height: 85vh;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-body img {
    max-width: 100%;
  }

  .modal-text h3 {
    font-size: 1.3rem;
  }

  .modal-text p {
    font-size: 0.95rem;
  }
}

/* Footer */
.footer {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.footer-content p {
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-style: italic;
  opacity: 0.8;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.scroll-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll.animated {
  animation: fadeInUp 0.8s ease forwards;
}

/* Stagger animation for cards */
.animate-on-scroll.animated {
  animation-fill-mode: both;
}

/* Responsive */
@media (max-width: 992px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 80px;
    padding-right: 0;
    text-align: left;
  }

  .timeline-item:nth-child(even) {
    left: 0;
  }

  .timeline-icon {
    left: 5px !important;
  }

  .sustainability-container {
    grid-template-columns: 1fr;
  }

  .sustainability-image {
    order: 2;
  }

  .sustainability-content {
    order: 1;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 200px;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 15px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .card,
  .grid-item {
    padding: 1.5rem;
  }

  .timeline-item {
    padding-left: 70px;
  }
}
