/* ========= 1. VARIABLES ========= */
:root {
  --green: #2e7d32; 
  --green-light: #7bed67; 
  --green-dark: #228B22; 
  --red: #f92424;
  
  --black: #212121; 
  --white: #FFFFFF;
  
  /* NEW WARM COLORS - less white, more AgriHope */
  --bg-main: #f6fdf7;      /* very light mint - main background */
  --bg-section: #fffaf3;   /* very light earth/beige - alternate sections */
  --gray-bg: #eef8f0;      /* soft green-gray instead of pure gray */
  
  --shadow: 0 8px 20px rgba(0,0,0,0.08);
  --radius: 8px; 
  --container: 1200px; 
  --font: Arial, sans-serif;
}

/* ========= 2. RESET + BASE ========= */
body { 
  display: flex; 
  flex-direction: column; 
  min-height: 100vh; 
  font-family: var(--font); 
  color: var(--black); 
  background: var(--bg-main); /* CHANGED: was var(--white) */
  line-height: 1.7; 
}
/* ========= 3. TYPOGRAPHY ========= */
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; }
h2 { font-size: clamp(1.8rem, 4vw, 2.2rem); text-align: center; color: var(--green); margin-bottom: 20px; }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); color: var(--green-dark); margin-bottom: 10px; }
p { max-width: 75ch; margin: 0 auto 1rem auto; }

/* ========= 4. LAYOUT ========= */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section--gray { background: var(--bg-section); }
.grid-auto {display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  justify-content: center;
}
@media (max-width: 900px) {
  .grid-auto {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-auto {
    grid-template-columns: 1fr;
  }
}

/* ========= 5. BUTTONS ========= */
.btn { padding: 14px 28px; border-radius: 6px; text-decoration: none; display: inline-block; margin: 10px 5px; font-weight: bold; transition: 0.3s; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--green-light); color: var(--black); border-color: var(--green-light); }
.btn-primary:hover { background: var(--green); color: var(--white); }
.btn-secondary { background: transparent; border-color: var(--white); color: var(--white); }
.btn-secondary:hover { background: var(--white); color: var(--green); }
.read-more-btn { margin-top: 15px; }

/* ========= 6. CARDS ========= */
.card, .mvv-card, .role-card { 
  background: var(--white); 
  padding: 30px; 
  border-radius: var(--radius); 
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.1); /* CHANGED: greener shadow */
  border-top: 4px solid var(--green-light);
  transition: 0.3s ease;
  overflow: hidden;
}
.card:hover, .mvv-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(46, 125, 50, 0.18); }
/* NEW: Standardize all images inside cards */
.card img,
.mvv-card img,
.role-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.05);
}

/* HERO IMAGE - if you have one outside cards */
.hero-img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .card img,
  .mvv-card img,
  .role-card img {
    height: 180px; /* smaller on phones */
  }
  .hero-img {
    height: 280px;
  }
}
/* NEWS / ARTICLES / STORIES CARDS (news-grid, articles-grid, success-grid) */
.news-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.1);
  border-top: 4px solid var(--green-light);
  overflow: hidden;
  transition: 0.3s ease;
  display: flex;
  flex-direction: column;
  max-width: 380px; /* caps individual card width even in a wide empty row */
  width: 100%;
  margin: 0 auto;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(46, 125, 50, 0.18);
}

.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.news-card:hover img {
  transform: scale(1.05);
}

.news-content {
  padding: 20px;
}
.news-content h3 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 8px;
}

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

.news-date {
  color: var(--green-dark);
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

/* Mobile */
@media (max-width: 768px) {
  .news-card img {
    height: 180px;
  }
}

.card-summary {
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 12px;
  font-size: 1.05rem;
}
/* ========= 7. HEADER + NAV ========= */
header { 
  background: var(--green-light); /* CHANGED: was var(--white) */
  color: var(--black); 
  padding: 15px 0; 
  position: sticky; 
  top: 0; 
  width: 100%; 
  z-index: 1000; 
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15); /* greener shadow */
}

.nav-container { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}

.logo img { 
  height: 80px; 
  width: auto; 
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1)); /* helps logo pop on green */
}

.nav-links { 
  display: flex; 
  gap: 25px; 
}

.nav-links a { 
  color: var(--black); /* black text on light green = readable */
  text-decoration: none; 
  font-weight: bold; 
  font-size: 1.2rem; 
  transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active { 
  color: var(--red); /* darker green on hover */
}
.menu-btn { 
  display: none; /* hide on desktop */
  background: none; 
  border: none; 
  cursor: pointer; 
  padding: 5px;
}
.menu-btn span { 
  display: block; 
  width: 28px; 
  height: 3px; 
  background: var(--black); /* black hamburger on green */
  margin: 6px 0; 
}

/* ========= 8. HERO SLIDER ========= */
.hero { position: relative; height: 90vh; overflow: hidden; color: var(--white); text-align: center; }
.hero-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.5s ease-in-out, transform 6s ease-out; z-index: 1; }
.hero-slide::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.55); z-index: 2; }
.hero-slide.active { opacity: 1; z-index: 3; transform: scale(1.05); }
.hero-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 4; width: 90%; max-width: 900px; }
.hero-content h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 1.8rem; color: var(--green-light); text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.hero-content p { font-size: 1.2rem; margin-bottom: 2.5rem; color: var(--white); }
.hero-dots { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; }
.dot.active { background: var(--green-light); transform: scale(1.3); }

/* ========= 8B. ACTIVITY MINI-SLIDERS IN CARDS ========= */
.activity-mini-slider {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: 0;
}

.activity-mini-slides img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.activity-mini-slides img.active {
  opacity: 1;
}

/* Override default card img so slider works */
.card.activity-mini-slider img {
  height: 100%;
  margin-bottom: 0;
  border-radius: 0;
}

/* ========= 9. PAGE HERO FOR INNER PAGES ========= */
.page-section { position: relative; height: 50vh; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); background-size: cover; background-position: center; }
.page-section::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1; }
.hero-overlay { position: relative; z-index: 2; padding: 0 1rem; }
.hero-overlay h2 { font-size: clamp(2.2rem, 5vw, 3.5rem); color: var(--green-light); margin-bottom: 1rem; }
.hero-overlay p { font-size: 1.2rem; max-width: 700px; margin: 0 auto; color: var(--white); }

/* PAGE BACKGROUNDS */
.about-bg { background-image: url('images/sitepics/hero_about.jpg'); }
.programs-bg { background-image: url('images/sitepics/hero_programs.jpg'); }
.impact-bg { background-image: url('images/sitepics/hero_impact.jpg'); }
.contact-bg { background-image: url('images/sitepics/hero_contact.jpg'); }
.get_involved-bg { background-image: url('images/sitepics/hero_involved.jpg');}
.donate-bg { background-image: url('images/sitepics/hero_donate.jpg'); }
.partner-bg { background-image: url('images/sitepics/hero_partner.jpg'); }
.volunteer-bg { background-image: url('images/sitepics/hero_volunteer.jpg'); }
.news-bg { background-image: url('images/sitepics/hero_news.jpg'); }
.articles-bg { background-image: url('images/sitepics/hero_articles.jpg'); }

/* ========= 10. ABOUT PAGE SPECIFIC ========= */
.about-mvv { padding: 5rem 1rem; background: var(--gray-bg); display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; max-width: var(--container); margin: 0 auto; }
.mvv-card { text-align: center; }
.mvv-card h3 { color: var(--green-dark); margin-bottom: 1rem; font-size: 1.5rem; }

.about-team { padding: 5rem 1rem; text-align: center; max-width: var(--container); margin: 0 auto; }
.about-team h2 { color: var(--green-dark); }
.team-intro { max-width: 700px; margin: 0 auto 2.5rem; color: #555; }
.team-group-photo { width: 100%; max-width: 900px; border-radius: 12px; margin: 0 auto 3rem; box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.team-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.role-card { background: #FFF8E1; border-left: 4px solid var(--green-light); border-top: none; text-align: left; }

.about-partners {
  padding: 5rem 1rem;
  background: var(--gray-bg);
  text-align: center;
}

.partners-intro {
  margin-bottom: 2.5rem;
  color: #555;
}

.partners-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4rem;              /* wider gap so 3 logos feel deliberate, not cramped */
  max-width: 700px;       /* narrower container frames fewer logos nicely */
  margin: 0 auto;
}

.partners-logos img {
  max-height: 70px;       /* slightly bigger than before (was 60px) */
  filter: grayscale(100%);
  opacity: 0.75;
  transition: 0.3s;
}

.partners-logos img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05); /* subtle lift on hover, adds polish */
}

.partners-logos a {
  display: inline-flex;
  text-decoration: none;
}

/* Mobile: stack a bit tighter */
@media (max-width: 600px) {
  .partners-logos {
    gap: 2.5rem;
  }
  .partners-logos img {
    max-height: 55px;
  }
}

/* ========= 11. FORMS ========= */
.Agrihope-form, .contact-form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; background: #fff; padding: 30px; border-radius: 12px; box-shadow:var(--shadow); }
.Agrihope-form input,.contact-form input,.contact-form textarea { padding: 12px; border: 2px solid #ddd; border-radius: 8px; font-size: 1rem; font-family: var(--font); }
.Agrihope-form input:focus,.contact-form input:focus { border-color: var(--green-light); outline: none; }

/* ========= 12. FOOTER ========= */
footer { background: var(--black); color: #ddd; padding: 4rem 1rem 1.5rem; text-align: center; } /* 1. center everything on mobile */

.footer-container { 
  max-width: var(--container); 
  margin: 0 auto; 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
  gap: 2.5rem; 
  padding-bottom: 2rem; 
  border-bottom: 1px solid #333; 
  margin-bottom: 1.5rem; 
} 

/* 2. Center Logo */
.footer-logo img {
  max-width: 180px;
  margin: 0 auto 1rem;
  display: block;
  background: var(--white);
  padding: 10px;
  border-radius: 8px;
}
.footer-logo p {
  font-size: 0.95rem;
  opacity: 0.8;
}

.footer-links h4,.footer-contact h4,.footer-social h4 { 
  color: var(--red); 
  margin-bottom: 1.2rem; 
}
.footer-links a,.footer-contact a { 
  color: #ddd; 
  text-decoration: none; 
  display: block; 
  margin-bottom: 0.8rem; 
  transition: 0.3s; 
}
.footer-links a:hover { 
  color: var(--green-light); 
  padding-left: 5px; 
}

/* 3. Center Social Icons */
.social-icons { display: flex; gap: 1.8rem; margin-top: 1rem; justify-content: center; }
.social-icons a {
  color: #ddd;
  font-size: 1.6rem;
  text-decoration: none;
  transition: all 0.3s ease;
}
.social-icons a:hover {
  transform: scale(1.2) translateY(-3px);
  color: var(--green-light);
}
.footer-bottom { 
  text-align: center; 
  font-size: 0.92rem; 
  color: #aaa; 
}

/* Desktop: left align again */
@media (min-width: 768px) {
  footer { text-align: left; }
  .footer-logo img { margin: 0 0 1rem; } /* left align logo */
  .social-icons { justify-content: flex-start; } /* left align icons */
}

/* ========= 13. MOBILE ========= */
@media (max-width: 768px) {
 .grid-2 { grid-template-columns: 1fr; }
 .menu-btn { display: block; }
 
 .nav-links { 
   display: none; 
   position: absolute; 
   top: calc(100% + 8px); /* little space below header */
   left: 15px;            /* CHANGED: was 0 */
   width: calc(100% - 30px); /* CHANGED: was 100% */
   background: var(--green-dark); /* CHANGED: was var(--green-light) */
   flex-direction: column; 
   align-items: center; 
   padding: 20px 0; 
   gap: 15px; 
   box-shadow: 0 8px 20px rgba(0,0,0,0.15); 
   border-top: none; /* CHANGED: was 3px solid var(--red) */
   border-radius: 14px; /* NEW: roundy edges */
   z-index: 999; 
 }

 /* NEW: make text readable on dark green */
 .nav-links a {
   color: var(--white);
 }
 .nav-links a:hover,
 .nav-links a.active {
   color: var(--red);
 }
 
 .nav-links.show { display: flex; }
 .footer-container { text-align: center; }
}
/* IMPACT STATS BIG NUMBERS */
.card h3[id$="-impact"] {
  font-size: 2.8rem;
  color: var(--green-light);
  margin-bottom: 5px;
}
/* ========= CONTACT PAGE ========= */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  align-items: start;
}
.contact-info h2, .contact-form h2 {
  color: var(--green-dark);
  text-align: left;
  margin-bottom: 1.5rem;
}
.info-item { margin-bottom: 1.5rem; }
.info-item strong { color: var(--green); }
.info-item a { color: var(--green); text-decoration: none; }
.info-item a:hover { text-decoration: underline; }
.social-links { display: flex; gap: 15px; margin-top: 5px; }
.social-links a { font-weight: bold; }
.map { margin-top: 1rem; }
.contact-form .btn { width: 100%; margin-top: 10px; }

/* Add a date badge on images */
.card p strong {
  color: var(--green-dark);
  font-weight: 700;
}
/* ========= ACTIVITY SLIDER ========= */
.activity-slider {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.slides {
  position: relative;
}

.slide {
  display: none;
  position: relative;
}

.slide.active {
  display: block;
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: var(--white);
  padding: 40px 30px 30px;
}

.slide-caption h3 {
  color: var(--green-light);
  margin-bottom: 8px;
}

.slide-caption p {
  margin: 0;
  color: var(--white);
  max-width: 100%;
}

.slider-dots {
  text-align: center;
  padding: 20px 0;
  background: var(--white);
}

.slider-dots.dot {
  height: 12px;
  width: 12px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: 0.3s;
}

.slider-dots.dot.active {
  background-color: var(--green);
  transform: scale(1.3);
}

/* Mobile */
@media (max-width: 768px) {
 .slide img { height: 280px; }
 .slide-caption { padding: 25px 15px 15px; }
 .slide-caption h3 { font-size: 1.2rem; }
}

/* SINGLE POST ARTICLE STYLING */
.post-container {
  max-width: 800px;
}

.post-container #backBtn {
  display: inline-block;
  margin-bottom: 20px;
}

#single-post img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
}

#single-post .news-date {
  color: var(--green);
  font-weight: bold;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

#single-post h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.3;
  color: var(--black);
  margin-bottom: 25px;
  text-align: left;
}

#single-post > div {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #444;
}

#single-post > div p {
  margin-bottom: 1.4rem;
}

#single-post > div h2,
#single-post > div h3 {
  text-align: left;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* ========= ACTIVITY MODAL ========= */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  overflow-y: auto;
  padding: 40px 20px;
}

.modal-content {
  background: var(--white);
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  border-radius: var(--radius);
  position: relative;
}

.modal .close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  font-weight: bold;
  color: var(--black);
  cursor: pointer;
  line-height: 1;
}

.modal .close:hover {
  color: var(--red);
}

@media (max-width: 768px) {
  .modal-content {
    padding: 20px;
  }
}
.btn-view-all {
  background: var(--green-light);
  color: var(--black);
  border-color: var(--green-light);
}

.btn-view-all:hover {
  background: var(--green);
  color: var(--white);
}