:root {
  --primary-color: #2c5f2d;
  --secondary-color: #97c15e;
  --accent-color: #f7941d;
  --text-dark: #333333;
  --text-light: #666666;
  --bg-light: #f8f9fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

/* Header Styles */
.top-bar {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 0;
  font-size: 14px;
}

.top-bar a {
  color: white;
  text-decoration: none;
  margin-right: 15px;
}

.top-bar a:hover {
  color: var(--accent-color);
}

.navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
  max-height: 50px;
}

.navbar-nav .nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  padding: 10px 15px !important;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
  transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  border-bottom: 2px solid var(--primary-color);
}

/* Dropdown Menu */
.dropdown-menu {
  border: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 10px 0;
  margin-top: 10px;
}

.dropdown-item {
  padding: 10px 20px;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background-color: var(--primary-color);
  color: white;
  padding-left: 25px;
}

.dropdown-divider {
  border-color: var(--secondary-color);
  opacity: 0.3;
}

.dropdown-toggle::after {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.nav-item.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}

/* Hero Slider */
.carousel-item {
  height: 500px;
  position: relative;
}

.carousel-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
}

.carousel-caption {
  background: rgba(44, 95, 45, 0.8);
  padding: 20px;
  border-radius: 10px;
  bottom: 50px;
}

/* Page Header Styles */
.page-header .lead {
  color: #ffffff;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.page-header h1 {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Section Styles */
.section-padding {
  padding: 80px 0;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 15px;
  text-align: center;
}

.section-title.text-start {
  text-align: left;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--accent-color);
}

.section-title.text-start:after {
  left: 0;
  transform: translateX(0);
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 40px;
  text-align: center;
  line-height: 1.8;
}

/* Improved typography */
p {
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.lead {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.7;
}

/* Better color contrast */
.bg-light {
  background-color: #f8f9fa !important;
}

.text-muted {
  color: #6c757d !important;
}

/* Card Styles */
.cause-card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
}

.cause-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cause-card img {
  height: 250px;
  object-fit: cover;
}

.cause-card .card-body {
  padding: 25px;
}

.cause-card .card-title {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 20px;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: scale(1.05);
}

.btn-donate {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-donate:hover {
  background-color: #e07d0a;
  border-color: #e07d0a;
}

/* Secretary Message Section */
.secretary-section {
  background-color: var(--bg-light);
}

.secretary-img {
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  height: auto;
}

/* Legal Documents Section */
.document-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.document-card:hover {
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
  transform: translateX(5px);
}

.document-card i {
  color: var(--accent-color);
  font-size: 24px;
  margin-right: 15px;
}

/* Footer Styles */
footer {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 50px 0 20px;
}

footer h5 {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 20px;
}

footer h6 {
  color: var(--accent-color);
  font-weight: 500;
  margin-bottom: 15px;
}

footer a {
  color: #cccccc;
  text-decoration: none;
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--accent-color);
  padding-left: 5px;
}

.footer-links {
  margin-top: 10px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  display: inline-block;
}

.social-icons a {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  margin-right: 10px;
  transition: all 0.3s ease;
  padding: 0 !important;
}

.social-icons a:hover {
  background-color: var(--accent-color);
  transform: scale(1.1) rotate(5deg);
}

.copyright {
  background-color: #0f0f0f;
  padding: 15px 0;
  margin-top: 30px;
}

/* Contact Page */
.contact-info-box {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  text-align: center;
  transition: all 0.3s ease;
}

.contact-info-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

.contact-info-box i {
  font-size: 40px;
  color: var(--accent-color);
  margin-bottom: 15px;
}

.contact-form {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(44, 95, 45, 0.25);
}

.form-control,
.form-select {
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Donation Form */
.donation-tabs .nav-link {
  color: var(--text-dark);
  border: 2px solid var(--primary-color);
  margin-right: 10px;
  border-radius: 10px;
  font-weight: 600;
}

.donation-tabs .nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

.amount-options button {
  margin: 10px;
  padding: 15px 30px;
  border: 2px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.amount-options button:hover,
.amount-options button.active {
  background-color: var(--primary-color);
  color: white;
}

/* Responsive */
@media (max-width: 991.98px) {
  /* Mobile & Tablet Portrait */
  .carousel-item {
    height: 300px;
  }

  .section-padding {
    padding: 50px 0;
  }

  .section-title {
    font-size: 28px;
  }

  .navbar-collapse {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Tablet Landscape / Small Laptops */
  .navbar-expand-lg .navbar-nav .nav-link {
    padding-right: 0.5rem !important;
    padding-left: 0.5rem !important;
    font-size: 0.9rem;
  }

  .btn-donate {
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

/* Statistics Counter */
.stats-box {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  padding: 40px 20px;
  border-radius: 15px;
  color: white;
  text-align: center;
  margin-bottom: 30px;
}

.stats-box h3 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 10px;
}

.stats-box p {
  font-size: 18px;
  margin: 0;
}

/* Timeline */
.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline:before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--primary-color);
}

.timeline-item {
  margin-bottom: 40px;
  position: relative;
}

.timeline-content {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
  /* Typography Scaling */
  h1,
  .display-4 {
    font-size: 2.5rem !important;
  }

  h2,
  .section-title {
    font-size: 2rem !important;
  }

  h3 {
    font-size: 1.75rem !important;
  }

  .lead {
    font-size: 1rem !important;
  }

  /* Structural Adjustments */
  .section-padding {
    padding: 40px 0 !important;
  }

  /* Hero Slider Mobile */
  .carousel-item {
    height: auto !important;
    min-height: 400px;
  }

  .carousel-item img {
    height: auto !important;
    min-height: 400px; /* Ensure minimum visibility */
    object-fit: cover;
  }

  .carousel-caption {
    position: absolute;
    right: 15%;
    bottom: 20px;
    left: 15%;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    background: rgba(
      0,
      0,
      0,
      0.6
    ) !important; /* Always show background on mobile */
    border-radius: 10px;
    display: block !important; /* Force show */
  }

  .carousel-caption h2 {
    font-size: 1.5rem !important; /* Smaller heading */
    margin-bottom: 5px;
  }

  .carousel-caption p {
    font-size: 0.9rem !important;
    margin-bottom: 10px;
    display: none; /* Hide long description on very small screens if needed, or keep short */
  }

  .carousel-caption .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  /* Governing Body Mobile */
  .member-row {
    text-align: center !important;
  }

  .member-row h3 {
    margin-top: 15px;
    font-size: 1.5rem;
  }

  .member-img {
    width: 200px !important;
    height: 200px !important;
    margin: 0 auto;
    border-width: 3px !important;
  }

  .order-lg-1,
  .order-lg-2 {
    order: unset !important; /* Reset visual order to DOM order (Image then Content) */
  }

  .page-header {
    padding: 60px 0 !important; /* Reduce banner height */
  }
}

/* Specific Utilities */
.hero-img-responsive {
  object-fit: cover;
  width: 100%;
  height: 600px; /* Desktop default */
}
