/* Color Palette Variables */
:root {
  --space-cadet: #2B2D42;       /* Dark blue-gray */
  --slate-gray: #708090;        /* Medium gray-blue */
  --tan: #D2B48C;               /* Light brown/beige */
  --coffee: #6F4E37;            /* Dark brown */
  --caput-mortuum: #592720;     /* Dark reddish-brown */
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --dark-gray: #343a40;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--space-cadet);
  background-color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
  body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
  
  /* Improve scrolling performance on mobile */
  * {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Prevent text overflow on all elements */
  p, h1, h2, h3, h4, h5, h6, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Optimize animations for mobile */
  *, *::before, *::after {
    animation-duration: 0.3s !important;
    animation-delay: 0s !important;
    transition-duration: 0.3s !important;
    transition-delay: 0s !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  background: linear-gradient(to right, var(--space-cadet), #353854);
  padding: 1rem 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.logo-link:hover {
  opacity: 0.8;
}

.logo-img {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--tan);
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  color: var(--tan);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--white);
}

.donate-btn {
  background-color: var(--coffee) !important;
  color: var(--white) !important;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: background-color 0.3s ease;
}

.donate-btn:hover {
  background-color: var(--caput-mortuum) !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--tan);
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  min-height: 75vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
  padding-top: 80px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--space-cadet);
  margin-bottom: 1rem;
  line-height: 1.2;
  text-transform: lowercase;
}

.rotating-text {
  color: var(--coffee);
  font-weight: 400;
  display: inline-block;
  animation: fadeInOut 3s infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.hero-text p {
  font-size: 1.05rem;
  color: var(--slate-gray);
  margin-bottom: 1.25rem;
  line-height: 1.6;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.7rem 1.4rem;
  text-decoration: none;
  border-radius: var(--border-radius, 5px);
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: inline-block;
  text-align: center;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--coffee);
  color: var(--white);
  border-color: var(--coffee);
}

.btn-primary:hover {
  background-color: var(--caput-mortuum);
  border-color: var(--caput-mortuum);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover, 0 4px 20px rgba(0,0,0,0.15));
}

.btn-secondary {
  background-color: transparent;
  color: var(--space-cadet);
  border-color: var(--space-cadet);
}

.btn-secondary:hover {
  background-color: var(--space-cadet);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover, 0 4px 20px rgba(0,0,0,0.15));
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Carousel */
.carousel {
  position: relative;
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 2px solid var(--tan);
  background: var(--white);
  }

@supports (aspect-ratio: 1 / 1) {
  .carousel { aspect-ratio: 16 / 9; }
  .carousel::before { content: none; }
}
 
  .carousel-track {
  position: absolute;
  inset: 0;
  display: block;
  transition: transform 0.5s ease;
  z-index: 1;
}

/* 16:9 frame using aspect-ratio; fallback uses padding-top */
.carousel::before {
  content: "";
  display: block;
  padding-top: calc(9 / 16 * 100%);
}

/* Ensure controls and dots remain clickable */
.carousel-control, .carousel-dots { z-index: 5; }

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(43,45,66,0.6);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.carousel-control:hover {
  background: rgba(43,45,66,0.8);
}

.carousel-control.prev { left: 10px; }
.carousel-control.next { right: 10px; }

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(43,45,66,0.35);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.7);
}

.carousel-dot.active {
  background: var(--coffee);
}

.logo-showcase {
  text-align: center;
  background-color: var(--white);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 3px solid var(--tan);
}

.logo-showcase i {
  font-size: 4rem;
  color: var(--coffee);
  margin-bottom: 1rem;
  display: block;
}

.hero-logo {
  width: 200px;
  height: auto;
  margin-bottom: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.logo-showcase h2 {
  font-size: 2rem;
  color: var(--space-cadet);
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.logo-showcase p {
  color: var(--slate-gray);
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* Mission Section */
.mission {
  background-color: var(--tan);
  color: var(--space-cadet);
  padding: 3rem 0;
  text-align: center;
}

.mission h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.mission p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

/* About Section */
.about {
  padding: 3.5rem 0;
  background-color: var(--light-gray);
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.about-text h2 {
  font-size: 2.5rem;
  color: var(--space-cadet);
  margin-bottom: 1.5rem;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--slate-gray);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.stat {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--white);
  border-radius: var(--border-radius, 8px);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--coffee);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover, 0 4px 20px rgba(0,0,0,0.15));
}

.stat h3 {
  font-size: 2.5rem;
  color: var(--coffee);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

  .stat p {
    color: var(--slate-gray);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

.about-image {
  text-align: center;
}

.image-placeholder {
  background-color: var(--light-gray);
  border-radius: 15px;
  padding: 3rem;
  text-align: center;
  border: 3px solid var(--tan);
  transition: transform 0.3s ease;
}

.image-placeholder:hover {
  transform: scale(1.02);
}

.image-placeholder i {
  font-size: 4rem;
  color: var(--coffee);
  margin-bottom: 1.5rem;
  display: block;
}

.image-placeholder h3 {
  color: var(--space-cadet);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.image-placeholder p {
  color: var(--slate-gray);
  font-size: 1.1rem;
  line-height: 1.4;
}

/* Programs Section */
.programs {
  padding: 3.5rem 0;
  background-color: var(--light-gray);
}

.programs h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--space-cadet);
  font-size: 2.5rem;
  font-weight: 300;
}

.section-subtitle {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--slate-gray);
  font-size: 1.2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.program-card {
  background-color: var(--white);
  padding: 2.5rem 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border-top: 4px solid var(--tan);
}

.program-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  border-top-color: var(--coffee);
}

.program-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--coffee), var(--caput-mortuum));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: transform 0.3s ease;
}

.program-card:hover .program-icon {
  transform: scale(1.1);
}

.program-icon i {
  font-size: 2rem;
  color: var(--white);
}

.program-card h3 {
  color: var(--space-cadet);
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.program-card p {
  color: var(--slate-gray);
  line-height: 1.6;
  font-size: 1rem;
}

/* News Section */
.news {
  padding: 3.5rem 0;
  background-color: var(--light-gray);
}

.news h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--space-cadet);
  margin-bottom: 1.5rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.news-card {
  background-color: var(--white);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  transition: transform 0.3s ease;
}

.news-card:hover {
  transform: translateY(-3px);
}

.news-date {
  background-color: var(--coffee);
  color: var(--white);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  min-width: 80px;
  height: fit-content;
}

.news-date .month {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.news-date .day {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.news-content h3 {
  color: var(--space-cadet);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.news-content p {
  color: var(--slate-gray);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.read-more {
  color: var(--coffee);
  text-decoration: none;
  font-weight: 600;
}

.read-more:hover {
  color: var(--caput-mortuum);
}

/* Volunteer Section */
/* Take Action Section */
.volunteer {
  padding: 3.5rem 0;
  background: linear-gradient(135deg, var(--space-cadet) 0%, var(--slate-gray) 100%);
  color: var(--white);
}

.volunteer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.volunteer-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--tan);
  font-weight: 300;
}

.volunteer-text p {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
  opacity: 0.9;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.volunteer-stats {
  display: grid;
  gap: 2rem;
}

.volunteer-stat {
  background-color: rgba(255,255,255,0.1);
  padding: 1.5rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.volunteer-stat:hover {
  transform: translateY(-5px);
  background-color: rgba(255,255,255,0.15);
}

.volunteer-stat i {
  font-size: 2.5rem;
  color: var(--tan);
  margin-bottom: 1rem;
  display: block;
}

.volunteer-stat h3 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.volunteer-stat p {
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
  font-size: 0.95rem;
}

.volunteer-opportunities {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.opportunity {
  background-color: rgba(255,255,255,0.1);
  padding: 1.5rem;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.opportunity h4 {
  color: var(--tan);
  margin-bottom: 0.5rem;
}

.volunteer-form {
  background-color: rgba(255,255,255,0.1);
  padding: 2rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.volunteer-form h3 {
  color: var(--tan);
  margin-bottom: 1.5rem;
  text-align: center;
}

.volunteer-form input,
.volunteer-form select,
.volunteer-form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 8px;
  background-color: var(--white);
  color: var(--space-cadet);
}

.volunteer-form textarea {
  height: 100px;
  resize: vertical;
}

/* Donation Section */
.donate {
  padding: 3.5rem 0;
  background-color: var(--white);
}

.donate-content {
  text-align: center;
}

.donate h2 {
  font-size: 2.5rem;
  color: var(--space-cadet);
  margin-bottom: 1rem;
}

.donate p {
  font-size: 1.2rem;
  color: var(--slate-gray);
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.donate-embed-wrapper {
  margin: 2rem auto 0;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.donate-embed-wrapper iframe {
  width: 100%;
  height: 560px;
  border: 0;
  display: block;
}

@media (max-width: 768px) {
  .donate-embed-wrapper iframe {
    height: 520px;
  }
}

/* Fallback card style for donation when iframe is blocked */
.donate-embed-fallback {
  margin: 1.5rem auto 0;
  max-width: 680px;
  background-color: var(--light-gray);
  border: 2px dashed var(--tan);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  color: var(--space-cadet);
}

.donate-embed-fallback p {
  margin: 0.25rem 0;
}

.donate-embed-button {
  width: 250px;
  margin: 0 auto;
}


.donation-impact {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.impact-item {
  background-color: var(--light-gray);
  padding: 1.5rem;
  border-radius: 10px;
  min-width: 200px;
}

.impact-item h4 {
  font-size: 1.8rem;
  color: var(--coffee);
  margin-bottom: 0.5rem;
}

.donation-form {
  max-width: 500px;
  margin: 0 auto;
}

.amount-selection {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.amount-btn {
  padding: 1rem 1.5rem;
  border: 2px solid var(--coffee);
  background-color: transparent;
  color: var(--coffee);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.amount-btn:hover,
.amount-btn.active {
  background-color: var(--coffee);
  color: var(--white);
}

#custom-amount {
  padding: 1rem;
  border: 2px solid var(--coffee);
  border-radius: 8px;
  width: 150px;
}

.donation-frequency {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.donation-frequency label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* Contact Section */
.contact {
  padding: 3.5rem 0;
  background-color: var(--light-gray);
}

.contact h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--space-cadet);
  margin-bottom: 1.5rem;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: var(--white);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--coffee);
  margin-top: 0.5rem;
}

.contact-item h4 {
  color: var(--space-cadet);
  margin-bottom: 0.5rem;
}

.contact-item p {
  color: var(--slate-gray);
}

.contact-form {
  background-color: var(--white);
  padding: 1.25rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--coffee);
}

/* Footer */
.footer {
  background-color: var(--space-cadet);
  color: var(--white);
  padding: 2rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.footer-section h4 {
  color: var(--tan);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-section p {
  opacity: 0.9;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-section ul li a:hover {
  opacity: 1;
  color: var(--tan);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--coffee);
  color: var(--white);
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.social-links a:hover {
  background-color: var(--caput-mortuum);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--tan);
}

.footer-bottom p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin: 0;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--space-cadet);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    z-index: 999;
    height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: 1.5rem 0;
  }

  .nav-menu a {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    display: block;
    border-radius: 8px;
    margin: 0 1rem;
    transition: all 0.3s ease;
  }

  .nav-menu a:hover {
    background-color: rgba(255,255,255,0.1);
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  /* Enhanced mobile layout optimizations */
  .hero {
    min-height: 90vh;
    padding-top: 80px;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-text h1 {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
  }
  
  .hero-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
  }
  
  .hero-buttons {
    justify-content: center;
    gap: 0.75rem;
  }
  
  .btn {
    min-width: 120px;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
  }
  
  .logo-showcase {
    padding: 2rem;
    margin: 1rem;
  }
  
  .logo-showcase h2 {
    font-size: 1.5rem;
  }
  
  /* Sections padding optimization */
  section {
    padding: 3rem 0;
  }
  
  .mission {
    padding: 3rem 0;
  }
  
  .mission h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .mission p {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  .about-text {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  .about-text h2 {
    font-size: 2rem;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  .about-text p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
  }
  
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .stat {
    padding: 1rem;
  }
  
  .stat h3 {
    font-size: 2rem;
  }
  
  .image-placeholder {
    padding: 2rem;
    margin: 0 1rem;
  }
  
  .programs h2 {
    font-size: 2rem;
  }
  
  .programs-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .program-card {
    padding: 2rem 1.5rem;
    margin: 0 0.5rem;
  }
  
  .volunteer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .volunteer-text h2 {
    font-size: 2rem;
    text-align: center;
  }
  
  .action-buttons {
    justify-content: center;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact h2 {
    font-size: 2rem;
  }
  
  .donation-impact {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .impact-item {
    min-width: auto;
    width: 100%;
    max-width: 280px;
  }
  
  .amount-selection {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .amount-btn {
    flex: 1;
    min-width: 80px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  #custom-amount {
    width: 100%;
    margin-top: 0.5rem;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .news-card {
    margin: 0 0.5rem;
    padding: 1.25rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .footer-links {
    justify-content: center;
  }
  
  .social-links {
    justify-content: center;
  }
}

/* Tablet specific optimizations */
@media (max-width: 1024px) and (min-width: 769px) {
  .hero-content {
    gap: 3rem;
  }
  
  .stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
  
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .hero {
    padding: 90px 0 40px;
    min-height: 85vh;
  }
  
  .hero-text h1 {
    font-size: 1.8rem;
    line-height: 1.2;
    padding: 0 0.5rem;
  }
  
  .hero-text p {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
  
  .container {
    padding: 0 12px;
  }
  
  section {
    padding: 2.5rem 0;
  }
  
  .btn {
    padding: 12px 18px;
    font-size: 0.9rem;
    min-height: 44px; /* iOS touch target minimum */
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 250px;
  }
  
  .logo-showcase {
    padding: 1.5rem;
    margin: 0.5rem;
  }
  
  .logo-showcase i {
    font-size: 3rem;
  }
  
  .logo-showcase h2 {
    font-size: 1.3rem;
  }
  
  .mission h2 {
    font-size: 1.8rem;
  }
  
  .mission p {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
  
  .about-text h2,
  .programs h2,
  .volunteer-text h2,
  .contact h2,
  .donate h2,
  .news h2 {
    font-size: 1.8rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  .about-text p {
    font-size: 1rem;
    padding: 0 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: left;
  }
  
  .stats {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .stat {
    padding: 1.5rem 1rem;
  }
  
  .stat h3 {
    font-size: 1.8rem;
  }
  
  .program-card {
    padding: 1.5rem 1rem;
    margin: 0;
  }
  
  .program-icon {
    width: 60px;
    height: 60px;
  }
  
  .program-icon i {
    font-size: 1.5rem;
  }
  
  .program-card h3 {
    font-size: 1.2rem;
  }
  
  .news-card {
    flex-direction: column;
    text-align: center;
    margin: 0;
  }
  
  .news-date {
    margin-bottom: 1rem;
    align-self: center;
    min-width: 60px;
  }
  
  .volunteer-stat {
    padding: 1.5rem;
  }
  
  .volunteer-stat i {
    font-size: 2rem;
  }
  
  .contact-item {
    padding: 1rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .contact-form input,
  .contact-form textarea {
    padding: 12px;
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 44px;
  }
  
  .donation-form input,
  .donation-form button {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .amount-btn {
    min-height: 44px;
    font-size: 0.85rem;
  }
  
  .amount-selection {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .amount-btn {
    width: 100%;
  }
  
  .donation-frequency {
    gap: 1rem;
  }
  
  .donation-frequency label {
    font-size: 0.95rem;
  }
  
  .footer-content {
    text-align: left;
  }
  
  .footer-section {
    text-align: center;
  }
  
  .social-links a {
    width: 44px;
    height: 44px;
  }
  
  /* Improved touch targets */
  .nav-menu a {
    min-height: 44px;
    padding: 12px 1rem;
    font-size: 1rem;
  }
  
  .hamburger {
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
  }
  
  .read-more {
    display: inline-block;
    padding: 8px 12px;
    min-height: 44px;
    line-height: 1.4;
  }
}

/* Scroll to top button for mobile */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--coffee);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  z-index: 1000;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.scroll-to-top:hover {
  background-color: var(--caput-mortuum);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .scroll-to-top {
    width: 44px;
    height: 44px;
    font-size: 1rem;
    bottom: 15px;
    right: 15px;
  }
}

/* Additional mobile touch improvements */
@media (max-width: 768px) {
  /* Better tap targets for mobile */
  .program-card,
  .news-card,
  .stat,
  .contact-item,
  .volunteer-stat {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Improve text selection on mobile */
  p, h1, h2, h3, h4, h5, h6 {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
  }
  
  /* Remove focus outline on touch devices */
  button:focus,
  a:focus,
  input:focus,
  textarea:focus {
    outline: none;
  }
  
  /* Add focus visible for accessibility */
  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  textarea:focus-visible {
    outline: 2px solid var(--coffee);
    outline-offset: 2px;
  }
}

/* Contact Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
}

.contact-form input,
.contact-form textarea {
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background-color: var(--white);
  color: var(--space-cadet);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--coffee);
  box-shadow: 0 0 0 3px rgba(111, 78, 55, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* Team Preview Section */
.team-preview {
  background-color: var(--tan);
  color: var(--space-cadet);
  padding: 3rem 0;
  text-align: center;
}


.team-preview-text h2 {
  font-size: 2.5rem;
  color: var(--space-cadet);
  margin-bottom: 30px;
  font-weight: 700;
}

.team-preview-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.team-preview-showcase {
  display: grid;
  gap: 30px;
}

.team-highlight {
  background: var(--white);
  padding: 22px;
  border-radius: 15px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: all 0.3s ease;
}

.team-highlight:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.team-highlight i {
  font-size: 2.5rem;
  color: var(--coffee);
  margin-bottom: 20px;
}

.team-highlight h3 {
  font-size: 1.3rem;
  color: var(--space-cadet);
  margin-bottom: 15px;
  font-weight: 600;
}

.team-highlight p {
  color: var(--slate-gray);
  font-size: 1rem;
  line-height: 1.6;
}

/* Team Page Styles */
.team-hero {
  background: linear-gradient(135deg, var(--space-cadet) 0%, var(--slate-gray) 100%);
  color: var(--white);
  padding: 120px 0 80px;
  text-align: center;
}

.team-hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 30px;
  font-weight: 700;
}

.team-hero-content p {
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

.teams-section {
  padding: 60px 0;
  background-color: var(--light-gray);
}

/* Teams Controls */
.teams-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 50px;
  flex-wrap: wrap;
  gap: 20px;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sort-controls label {
  font-weight: 600;
  color: var(--space-cadet);
  font-size: 1rem;
}

.sort-select {
  padding: 12px 20px;
  border: 2px solid var(--tan);
  border-radius: 10px;
  background: var(--white);
  color: var(--space-cadet);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
}

.sort-select:focus {
  outline: none;
  border-color: var(--coffee);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.view-controls {
  display: flex;
  gap: 10px;
}

.view-btn {
  padding: 12px 15px;
  border: 2px solid var(--tan);
  background: var(--white);
  color: var(--coffee);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.view-btn:hover,
.view-btn.active {
  background: var(--coffee);
  color: var(--white);
  border-color: var(--coffee);
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.teams-grid.list-view {
  grid-template-columns: 1fr;
  max-width: 800px;
}

.teams-grid.list-view .team-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
}

.teams-grid.list-view .team-image {
  width: 200px;
  height: 140px;
  flex-shrink: 0;
}

.teams-grid.list-view .team-content {
  flex: 1;
  padding: 25px;
}

.teams-grid.list-view .team-stats {
  border-top: none;
  padding-top: 0;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .teams-grid.list-view .team-card {
    flex-direction: column;
  }
  
  .teams-grid.list-view .team-image {
    width: 100%;
    height: 160px;
  }
}

.team-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
  height: fit-content;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.team-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.team-card:hover .team-photo {
  transform: scale(1.05);
}

.team-icon-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.team-icon-overlay i {
  font-size: 1.5rem;
  color: var(--coffee);
}

.team-content {
  padding: 25px;
}

.team-content h3 {
  font-size: 1.4rem;
  color: var(--space-cadet);
  margin-bottom: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.team-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--slate-gray);
  margin-bottom: 20px;
}

.team-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.team-category {
  background: linear-gradient(135deg, var(--tan) 0%, rgba(210, 180, 140, 0.8) 100%);
  color: var(--coffee);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.team-size {
  color: var(--slate-gray);
  font-size: 0.9rem;
  font-weight: 500;
}

.team-responsibilities {
  border-top: 2px solid var(--tan);
  padding-top: 25px;
}

.team-responsibilities h4 {
  font-size: 1.1rem;
  color: var(--space-cadet);
  margin-bottom: 15px;
  font-weight: 600;
}

.team-responsibilities ul {
  list-style: none;
  padding: 0;
}

.team-responsibilities li {
  padding: 8px 0;
  color: var(--slate-gray);
  position: relative;
  padding-left: 20px;
  line-height: 1.6;
}

.team-responsibilities li::before {
  content: "✓";
  color: var(--coffee);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.join-team {
  background: linear-gradient(135deg, var(--coffee) 0%, var(--caput-mortuum) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.join-team-content h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  font-weight: 700;
}

.join-team-content p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.join-team-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Active navigation state */
.nav-menu a.active {
  color: var(--tan);
  font-weight: 600;
}

/* Responsive Design for Team Sections */
@media (max-width: 768px) {
  .team-preview-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .team-preview-text h2 {
    font-size: 2rem;
  }
  
  .team-hero {
    padding: 100px 0 60px;
  }
  
  .team-hero-content h1 {
    font-size: 2.5rem;
  }
  
  .team-hero-content p {
    font-size: 1.1rem;
  }
  
  .teams-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  
  .sort-controls {
    justify-content: center;
  }
  
  .view-controls {
    justify-content: center;
  }
  
  .teams-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
  }
  
  .team-image {
    height: 160px;
  }
  
  .team-content {
    padding: 20px;
  }
  
  .team-content h3 {
    font-size: 1.2rem;
  }
  
  .team-content p {
    font-size: 0.9rem;
  }
  
  .team-stats {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  
  .join-team-content h2 {
    font-size: 2rem;
  }
  
  .join-team-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .join-team-buttons .btn {
    width: 200px;
  }
}

@media (max-width: 480px) {
  .teams-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .team-image {
    height: 140px;
  }
  
  .team-content {
    padding: 15px;
  }
  
  .sort-select {
    min-width: auto;
    width: 100%;
  }
  
  .view-btn {
    flex: 1;
  }
  
  .team-highlight {
    padding: 20px;
  }
  
  .team-preview-text h2 {
    font-size: 1.8rem;
  }
  
  .team-hero-content h1 {
    font-size: 2rem;
  }
}

/* Mobile tweaks for larger logo and carousel */
@media (max-width: 768px) {
  .logo-img {
    height: 36px;
    max-width: 160px;
  }
  .carousel {
    max-width: 100%;
    margin: 0 8px;
  }
  .carousel-control {
    width: 44px;
    height: 44px;
  }
  .carousel-control.prev { left: 6px; }
  .carousel-control.next { right: 6px; }
  .carousel-caption h3 { font-size: 1rem; }
  .carousel-caption p {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .team-preview-showcase {
    display: none;
  }
}

/* Our Work Section */
.our-work {
  padding: 3.5rem 0;
  background: linear-gradient(135deg, var(--space-cadet) 0%, var(--slate-gray) 100%);
  color: var(--white);
}

.our-work h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--tan);
  margin-bottom: 0.5rem;
}

.our-work .section-subtitle {
  text-align: center;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.25rem;
}

/* Bigger carousel for Our Work */
.work-carousel {
  max-width: 1000px;
  margin: 0 auto;
}

/* Caption overlay for Our Work carousel */
.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 12px 16px;
  z-index: 3;
  pointer-events: none;
}

.carousel-caption h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
  font-weight: 600;
}

.carousel-caption p {
  font-size: 0.95rem;
  margin: 0;
}

/* Bank transfer card */
.bank-transfer {
  margin: 2rem auto 0;
  max-width: 680px;
  text-align: left;
}

.bank-transfer h3 {
  color: var(--space-cadet);
  margin-bottom: 0.75rem;
}

.bank-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
}

.bank-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
}

.bank-row:last-child {
  border-bottom: none;
}

.bank-row .label {
  color: var(--slate-gray);
  font-weight: 600;
}

.bank-row .value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: var(--space-cadet);
}

.bank-card .copy-btn {
  margin-left: 0.5rem;
}

.bank-note {
  margin-top: 0.75rem;
  color: var(--slate-gray);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .bank-row {
    grid-template-columns: 120px 1fr;
  }
  .bank-card .copy-btn {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 0.5rem;
  }
}

.hero, .mission, .about, .our-work, .team-preview, .donate, .contact, .footer, .teams-section, .join-team {
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}
