/* ===== MEET THE NEEDY CHILDREN - COMPLETE SELF-CONTAINED STYLESHEET ===== */

/* CSS Variables */
:root {
  --brand: #dc2626;
  --brand-dark: #b91c1c;
  --text: #1a1a1a;
  --text-light: #6b7280;
  --bg: #ffffff;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-large: 0 8px 25px rgba(0,0,0,0.15);
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font-primary);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  font-weight: 400;
}

/* Container System */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: hidden;
}

/* Row System (replacing Foundation) */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.row::after {
  content: "";
  display: table;
  clear: both;
}

/* Column System (replacing Foundation) */
.small-12, .medium-12, .large-12 {
  width: 100%;
  padding: 0 10px;
}

.small-6, .medium-6, .large-6 {
  width: 50%;
  padding: 0 10px;
}

.small-4, .medium-4, .large-4 {
  width: 33.333%;
  padding: 0 10px;
}

.small-3, .medium-3, .large-3 {
  width: 25%;
  padding: 0 10px;
}

@media (max-width: 768px) {
  .small-12, .medium-12, .large-12,
  .small-6, .medium-6, .large-6,
  .small-4, .medium-4, .large-4,
  .small-3, .medium-3, .large-3 {
    width: 100%;
    padding: 0 10px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .medium-12 { width: 100%; }
  .medium-6 { width: 50%; }
  .medium-4 { width: 33.333%; }
  .medium-3 { width: 25%; }
}

@media (min-width: 1025px) {
  .large-12 { width: 100%; }
  .large-6 { width: 50%; }
  .large-4 { width: 33.333%; }
  .large-3 { width: 25%; }
}

/* ===== HEADER STYLES ===== */
/* Donation Banner Styles */
.donation-banner {
  background: linear-gradient(135deg, var(--brand, #dc2626), var(--brand-dark, #b91c1c));
  color: white;
  padding: 0.75rem 0;
  border-bottom: 3px solid rgba(255,255,255,0.2);
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.banner-text {
  font-size: 0.95rem;
  font-weight: 500;
}

.banner-payment {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.payment-method {
  font-size: 0.85rem;
  background: rgba(255,255,255,0.15);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  white-space: nowrap;
  transition: all 0.2s ease;
  cursor: pointer;
}

.payment-method:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* Header Layout - Brand and Support on Top, Menu Below */
.site-header {
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.brand {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
}

.brand a {
  color: var(--brand, #dc2626);
  text-decoration: none;
  transition: color 0.2s ease;
}

.brand a:hover {
  color: var(--brand-dark, #b91c1c);
}

.support-btn {
  background: var(--brand, #dc2626);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.support-btn:hover {
  background: var(--brand-dark, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  color: white;
}

/* Navigation Bar */
.nav-bar {
  padding: 0.75rem 0;
}

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

.nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.nav li {
  margin: 0;
}

.nav a {
  color: var(--text, #1a1a1a);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav a:hover {
  background: rgba(220, 38, 38, 0.1);
  color: var(--brand, #dc2626);
}

.nav a.active {
  background: var(--brand, #dc2626);
  color: white;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--brand, #dc2626);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .nav a {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }
  
  .brand {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .banner-content {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .banner-payment {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  
  .payment-method {
    text-align: center;
    font-size: 0.8rem;
  }
  
  .top-bar {
    padding: 0.75rem 0;
  }
  
  .brand {
    font-size: 1.2rem;
  }
  
  .support-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-bar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--brand, #dc2626);
    transition: left 0.3s ease;
    z-index: 9999;
    padding: 2rem 1rem;
    margin: 0;
    overflow-y: auto;
  }
  
  .nav-bar.active {
    left: 0;
  }
  
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  
  .nav li {
    width: 100%;
  }
  
  .nav a {
    color: white;
    padding: 0.75rem 1rem;
    display: block;
    font-size: 1rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .nav a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
  }
  
  .nav a.active {
    background: rgba(255,255,255,0.2);
    color: white;
  }
}

/* ===== BUTTON STYLES ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--brand, #dc2626);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-dark, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  color: white;
}

.btn-accent {
  background: var(--brand, #dc2626);
  color: white;
}

.btn-accent:hover {
  background: var(--brand-dark, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  color: white;
}

/* ===== FOOTER STYLES ===== */
.site-footer {
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h5 {
  color: var(--brand, #dc2626);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-col a {
  color: #b3b3b3;
  text-decoration: none;
  display: block;
  padding: 0.25rem 0;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: var(--brand, #dc2626);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: white;
}

.social-links a:hover {
  background: var(--brand-dark, #b91c1c);
  transform: translateY(-2px);
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #444;
  background: #333;
  color: white;
  border-radius: 6px;
}

.newsletter-form input::placeholder {
  color: #999;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 1.5rem;
  text-align: center;
  color: #999;
}

.footer-bottom a {
  color: #b3b3b3;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: white;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--brand, #dc2626);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--brand-dark, #b91c1c);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* ===== BANNER AND PAGE STYLES ===== */
.banner-area {
  background: linear-gradient(135deg, var(--brand, #dc2626), var(--brand-dark, #b91c1c));
  color: white;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.header-text {
  position: relative;
  z-index: 2;
}

.hero-panel {
  text-align: center;
}

.hero-panel h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: white;
}

.hero-panel p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.page {
  padding: 3rem 0;
}

@media (max-width: 768px) {
  .hero-panel h1 {
    font-size: 2rem;
  }
  
  .hero-panel p {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* ===== CARD STYLES ===== */
.initiative-card-bg {
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  overflow: hidden;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.initiative-card-bg:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-large);
}

/* Image as background */
.card-image-bg {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5f5f5;
  border-radius: 20px 20px 0 0;
}

/* Fallback for when background image fails */
.card-image-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
  z-index: 0;
}

.card-image-bg[style*="background-image"]::before {
  opacity: 0;
}

/* Content area */
.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  color: var(--brand);
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  word-wrap: break-word;
}

.card-content p {
  color: var(--text-light);
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  word-wrap: break-word;
  flex: 1;
}

.card-content .btn-link {
  margin-top: auto;
  align-self: flex-start;
}

/* Grid containers */
.initiatives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

/* Ensure cards don't overflow */
.initiatives-grid > * {
  min-width: 0; /* Prevents flex/grid overflow */
  width: 100%;
  max-width: 100%;
}

/* Simple card fallback */
.simple-card {
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.simple-image {
  width: 100%;
  height: 200px;
  background: #f5f5f5;
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.simple-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.simple-content {
  padding: 1.5rem;
}

.simple-content h3 {
  color: var(--brand);
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.simple-content p {
  color: var(--text-light);
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ===== RESPONSIVE HELPERS ===== */
.hide-on-mobile {
  display: block;
}

@media (max-width: 768px) {
  .hide-on-mobile {
    display: none;
  }
}

.show-on-mobile {
  display: none;
}

@media (max-width: 768px) {
  .show-on-mobile {
    display: block;
  }
}

/* ===== FORM STYLES ===== */
form {
  margin: 0;
}

input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand, #dc2626);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* ===== ACCESSIBILITY ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== PRINT STYLES ===== */
@media print {
  .site-header, .site-footer, .mobile-menu-toggle, .back-to-top {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .container {
    max-width: none;
    padding: 0;
  }
}