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

body {
  font-family: Arial, sans-serif;
}

/* Menubar container */
.menubar {
  width: 100%;
  background-color: #15803d; /* Green Earth theme */
  padding: 10px 40px;
}

/* Navbar layout */
.menubar nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.menubar .logo a {
  text-decoration: none;
  font-size: 1.5em;
  font-weight: bold;
  color: #ffffff;
}

/* Menu links */
.menubar .menu-links {
  display: flex;
  gap: 25px;
}

.menubar .menu-links a {
  text-decoration: none;
  color: #ffffff;
  font-size: 1em;
  transition: color 0.3s ease;
}

.menubar .menu-links a:hover {
  color: #facc15; /* Yellow highlight on hover */
}

/* Plant a Tree button */
.menubar .btn-plantATree button {
  background-color: #facc15; /* Bright yellow */
  color: #15803d;
  border: none;
  padding: 8px 16px;
  font-size: 1em;
  font-weight: bold;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.menubar .btn-plantATree button:hover {
  background-color: #FFBF00;
  color: #15803d;
  transform: scale(1.05);
}



/* Hero Grid Layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  justify-items: center;
  background-color: #f0fdf4;
  padding: 80px 40px;
}

/* Leaf Images */
.hero-leaf img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Center Content */
.hero-content {
  text-align: center;
  max-width: 600px;
}

.hero-content h1 {
  font-size: 3em;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.2em;
  color: #374151;
  margin-bottom: 30px;
  line-height: 1.6;
}

/* Button Styling */
.btn-hero {
  background-color: #facc15;
  color: #15803d;
  border: none;
  padding: 14px 28px;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-hero:hover {
  background-color: #FFBF00;
  color: #15803d;
  transform: scale(1.05);
}




/* tree shop header */

.tree-shop-header-container {
  text-align: center;
  background-color: #f0fdf4;
  padding: 20px 0;
}

.tree-shop-header {
  font-size: 3em;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 20px;
}

/* Layout */
.tree-shop {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  gap: 40px;
  padding: 40px 60px;
  background-color: #f0fdf4;
  font-family: Arial, sans-serif;
}

/* Sidebar */
.sidebar h3 {
  margin-bottom: 20px;
  color: #15803d;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar ul li {
  padding: 10px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.3s ease;
  font-weight: 500;
  color: #065f46;
}

.sidebar ul li:hover,
.sidebar ul li.active {
  background-color: #d1fae5;
  font-weight: bold;
}

/* Tree List */
.tree-list h2 {
  margin-bottom: 30px;
  color: #15803d;
  font-size: 2em;
}

.tree-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

/* Tree Card */
.tree-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tree-card img {
  width: 100%;          /* full card width */
  height: 200px;        /* fixed height for consistency */
  object-fit: cover;    /* crop/scale image nicely */
  border-radius: 8px;
  margin-bottom: 15px;
}


.tree-card h4 {
  margin-bottom: 10px;
  color: #15803d;
  font-size: 1.3em;
}

.tree-card .tag {
  display: inline-block;
  background-color: #d1fae5;
  color: #065f46;
  font-size: 0.9em;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.tree-card p {
  font-size: 0.95em;
  color: #374151;
  margin-bottom: 20px;
}

.tree-card .tree-name {
  color: #15803d;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
}

.tree-card .tree-name:hover {
  color: #22c55e;        /* lighter green on hover */
  transform: scale(1.05); /* subtle zoom effect */
  text-decoration: underline; /* optional underline */
}


.price-cart {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-weight: bold;
  color: #15803d;
  font-size: 1.1em;
}

.tree-card button {
  background-color: #22c55e;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tree-card button:hover {
  background-color: #15803d;
  transform: scale(1.05);
}

/* Loading Spinner */


.spinner {
  border: 6px solid #f3f3f3;       /* Light grey */
  border-top: 6px solid #22c55e;   /* Green accent */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none;
}


/* Cart Summary */
.cart-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.cart-card h3 {
  margin-bottom: 16px;
  color: #15803d;
  font-size: 1.2rem;
}

#cart-items {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

#cart-items li {
  padding: 12px 0;
  border-bottom: 1px dashed #e5e7eb;
}

#cart-items li:last-child {
  border-bottom: none;
}

.item-name {
  font-weight: 600;
  color: #065f46;
  display: block;
  margin-bottom: 4px;
}

.item-meta {
  color: #374151;
  font-size: 0.95em;
}

.total {
  font-weight: 700;
  font-size: 1.1rem;
  color: #15803d;
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.cart-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item-name {
  font-weight: 600;
  color: #065f46;
}

.item-meta {
  font-size: 0.95em;
  color: #374151;
}

.remove-btn {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 20px;
  transition: transform 0.2s ease;
}

.remove-btn:hover {
  transform: scale(1.2);
}




/* modal styling */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  position: relative;
  text-align: center;
}

.modal-content img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 20px;
}

.modal-content .close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
}

/* Modal Add to Cart Button */
#modal-add {
  background-color: #22c55e;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
}

#modal-add:hover {
  background-color: #15803d;
  transform: scale(1.05);
}


/* Modal transition */
.modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}






/* Section container */
section {
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: #f0fdf4;;
}

.campaign {
    padding: 0px 150px;
}

/* Header styling */
.about-campaign-header {
  text-align: center;
  padding: 40px 0;
}

.about-campaign-header h2 {
  font-size: 2.8em;
  color: #15803d;
}

/* Campaign layout */
.about-campaign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
}

/* Left image block */
.campaign-image {
  background-color: #f0fdf4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.campaign-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Right text block */
.campaign-text {
  background-color: #f0fdf4; /* soft green background */
  color: #1f2937; /* dark gray text */
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.campaign-text h2 {
  font-size: 2.5em;
  color: #facc15; /* yellow heading */
  margin-bottom: 20px;
}

.campaign-text p {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
}

.campaign-text ul {
  list-style-type: disc;
  padding-left: 20px;
}

.campaign-text ul li {
  margin-bottom: 10px;
  font-size: 1em;
}



/* Impact Section */
.impact-section {
  background-color: #d1fae5; /* light green background */
  padding: 80px 40px;
  text-align: center;
  font-family: Arial, sans-serif;
}

.impact-section h2 {
  font-size: 2.8em;
  color: #15803d;
  margin-bottom: 60px;
}

/* Grid layout */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

/* Individual box */
.impact-box {
  background-color: #ffffff;
  padding: 40px 20px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.impact-box h3 {
  font-size: 2.5em;
  color: #15803d;
  margin-bottom: 10px;
}

.impact-box p {
  font-size: 1.1em;
  color: #374151;
}




/* Donation Section */
.donation-section {
  background-color: #15803d; /* main green background */
  padding: 60px 20px;
  text-align: center;
  font-family: Arial, sans-serif;
}

/* Heading */
.donation-section h2 {
  font-size: 2.5em;
  color: #ffffff;
  margin-bottom: 40px;
}

/* Card container */
.donation-card {
  background-color: #ffffff;
  max-width: 600px; /* wider card */
  margin: 0 auto 40px;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Form Styling */
/* Card container */
.donation-card {
  background-color: #1a9245; /* green card background */
  max-width: auto;
  margin: 0 auto 40px;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Form inside the card */
.donation-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Input fields */
.donation-form input,
.donation-form select {
  padding: 14px 18px;
  font-size: 1em;
  border: none;
  border-radius: 6px;
  background-color: #ffffff; /* white inputs */
  color: #1f2937;
}

/* Dropdown appearance */
.donation-form select {
  appearance: none;
}


/* Button */
.donation-form button {
  background-color: #facc15; /* yellow button */
  color: #15803d;
  border: none;
  padding: 16px;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.donation-form button:hover {
  background-color: #FFBF00;
  transform: scale(1.05);
}

/* Footer */
.donation-footer {
  background-color: #065f46; /* deeper green */
  color: #ffffff;
  padding: 20px;
  font-size: 0.9em;
  text-align: center;
}




/* -------------------
   Mobile Responsiveness (≤768px)
------------------- */
@media (max-width: 768px) {
  /* Menubar */
  .menubar {
    padding: 10px 20px;
  }
  .menubar nav {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  .menubar .menu-links {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: center;
  }
  .menubar .menu-links a {
    width: 100%;
    text-align: center;
    padding: 8px 0;
  }
  .menubar .btn-plantATree {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .menubar .btn-plantATree button {
    width: 100%;
    max-width: 250px;
    padding: 10px;
    border-radius: 8px;
  }

  /* Hero Section */
  .hero-grid {
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }
  .hero-leaf {
    display: none; /* hide side leaves on mobile */
  }
  .hero-content h1 {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .hero-content p {
    font-size: 1em;
    margin-bottom: 20px;
  }
  .btn-hero {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border-radius: 8px;
  }

  /* Tree Shop */
  .tree-shop {
    grid-template-columns: 1fr; /* stack sidebar, grid, cart */
    gap: 20px;
    padding: 20px;
  }
  .tree-shop-header {
    font-size: 2em;
  }
  .tree-card img {
    height: 160px;
  }
  .tree-card h4 {
    font-size: 1.1em;
  }
  .tree-card p {
    font-size: 0.9em;
  }

  /* Cart */
  .cart-card {
    padding: 15px;
  }
  .cart-card h3 {
    font-size: 1.1rem;
  }
  .total {
    font-size: 1rem;
  }

  /* Campaign Section */
  .campaign {
    padding: 20px;
  }
  .about-campaign {
    grid-template-columns: 1fr; /* stack image and text */
  }
  .campaign-text {
    padding: 20px;
  }
  .campaign-text h2 {
    font-size: 1.8em;
  }
  .campaign-text p {
    font-size: 1em;
  }

  /* Impact Section */
  .impact-section {
    padding: 40px 20px;
  }
  .impact-section h2 {
    font-size: 2em;
    margin-bottom: 30px;
  }
  .impact-grid {
    grid-template-columns: 1fr; /* stack boxes */
    gap: 20px;
  }
  .impact-box h3 {
    font-size: 2em;
  }

  /* Donation Section */
  .donation-section h2 {
    font-size: 2em;
  }
  .donation-card {
    padding: 20px;
  }
  .donation-form input,
  .donation-form select,
  .donation-form button {
    font-size: 1em;
    padding: 12px;
  }

  /* Footer */
  .donation-footer {
    font-size: 0.8em;
    padding: 15px;
  }

  /* Modal */
  .modal-content {
    width: 95%;
    padding: 20px;
  }
  .modal-content img {
    height: auto;
    max-height: 200px;
  }
}




