/* ============================================================
   HUMANITY FIRST FOUNDATION — MAIN CSS
   Color palette: Purple #6A1B9A | Blue #1E88E5 | Pink #EC407A
   "Hands that Care, Hearts that Serve."
   ============================================================ */

/* --- CSS Variables (HFF Brand Palette) --- */
:root {
  /* ── Core Brand ── */
  --purple:        #8E24AA;
  --purple-light:  #B39DDB;
  --purple-dark:   #A85DB8;
  --purple-pale:   #F5EBFA;
  --purple-mid:    #E8D5F2;

  --blue:          #64B5F6;
  --blue-light:    #81C3F9;
  --blue-dark:     #42A5F5;
  --blue-pale:     #F0F7FF;
  --blue-mid:      #CBDFF8;

  --pink:          #F48FB1;
  --pink-light:    #F9C5D5;
  --pink-dark:     #F06292;
  --pink-pale:     #FDE8F1;
  --pink-mid:      #FBD1DC;

  /* ── Gradients ── */
  --grad-purple-blue:  linear-gradient(135deg, #A85DB8 0%, #64B5F6 100%);
  --grad-purple-pink:  linear-gradient(135deg, #A85DB8 0%, #F48FB1 100%);
  --grad-blue-purple:  linear-gradient(135deg, #64B5F6 0%, #A85DB8 100%);
  --grad-hero:         linear-gradient(135deg, #F5EBFA 0%, #F0F7FF 60%, #F5EBFA 100%);

  /* ── Neutrals ── */
  --white:         #FFFFFF;
  --off-white:     #F5F7FA;
  --gray-100:      #F0F0F5;
  --gray-200:      #E8E8EF;
  --gray-400:      #B0B0C0;
  --gray-600:      #6B6B80;
  --gray-800:      #3D3D52;
  --text-dark:     #2C2C2C;
  --text-medium:   #4A4A5A;
  --text-light:    #7A7A8C;

  /* ── Text Colors (Light Theme) ── */
  --text-primary:     #1F1F2E;     /* Dark gray-purple for main body text */
  --text-secondary:   #4A4A5A;     /* Medium gray for secondary text */
  --heading-color:    #2D1B4E;     /* Dark purple for headings */
  --link-color:       #8E24AA;     /* Brand purple for links */
  --button-text:      #FFFFFF;     /* White text on colored buttons */
  --button-dark-text: #2D1B4E;     /* Dark text for light buttons */

  /* ── Highlight ── */
  --highlight-bg:  #F0F7FF;

  /* ── Shadows ── */
  --shadow-sm:     0 2px 8px rgba(142,36,170,0.08);
  --shadow-md:     0 4px 24px rgba(142,36,170,0.14);
  --shadow-lg:     0 8px 48px rgba(142,36,170,0.20);
  --shadow-purple: 0 4px 20px rgba(142,36,170,0.25);
  --shadow-pink:   0 4px 20px rgba(244,143,177,0.25);
  --shadow-blue:   0 4px 20px rgba(100,181,246,0.20);

  /* ── Radii ── */
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;

  /* ── Motion ── */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Typography ── */
  --font-heading: 'Poppins', sans-serif;
  --font-body:    'Open Sans', sans-serif;
  --font-display: 'Playfair Display', serif;

  /* ── Layout ── */
  --container-max:   1200px;
  --section-padding: 80px 0;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--off-white);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading-color);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
p { line-height: 1.8; color: var(--text-primary); }

/* --- Container --- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

/* Primary — Purple (main brand actions) */
.btn-primary {
  background: var(--purple);
  color: var(--button-text);
  border-color: var(--purple);
  box-shadow: var(--shadow-purple);
}
.btn-primary:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(106,27,154,0.40);
}

/* Outline — Purple border */
.btn-outline {
  background: transparent;
  color: var(--link-color);
  border-color: var(--link-color);
}
.btn-outline:hover {
  background: var(--purple-pale);
  color: var(--heading-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-purple);
}

/* Donate — Pink gradient (CTA) */
.btn-donate {
  background: var(--grad-purple-pink);
  color: var(--button-text);
  border-color: transparent;
  padding: 10px 22px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-pink);
}
.btn-donate:hover {
  background: var(--pink-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(244,143,177,0.35);
}

/* White — for light backgrounds */
.btn-white {
  background: var(--white);
  color: var(--link-color);
  border-color: var(--gray-200);
  font-weight: 700;
}
.btn-white:hover {
  background: var(--purple-pale);
  border-color: var(--purple-dark);
  color: var(--heading-color);
  transform: translateY(-2px);
}

/* Secondary — Blue */
.btn-secondary {
  background: var(--blue);
  color: var(--button-text);
  border-color: var(--blue);
  box-shadow: var(--shadow-blue);
}
.btn-secondary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(100,181,246,0.35);
}

/* Sizes */
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-sm { padding: 8px 18px; font-size: 0.83rem; }

/* ============================================================
   SECTION COMMON
   ============================================================ */
section { padding: var(--section-padding); }
.section-header { max-width: 600px; margin-bottom: 48px; }
.section-header--center { text-align: center; margin: 0 auto 48px; }
.section-tag {
  display: inline-block;
  background: var(--purple-pale);
  color: var(--purple);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 12px;
  border: 1px solid var(--purple-mid);
}
.section-title { margin-bottom: 16px; color: var(--heading-color); }
.section-subtitle { color: var(--text-light); font-size: 1.05rem; }
.section-footer { text-align: center; margin-top: 48px; }

/* Accent heading color */
.section-title span { color: var(--purple); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(106,27,154,0.08);
  transition: var(--transition);
}
.navbar.scrolled {
  box-shadow: 0 4px 24px rgba(106,27,154,0.12);
}
.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;

  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.6rem; }
.logo-img { height: 64px; width: auto; object-fit: contain; }
.logo-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  white-space: nowrap;
}
.logo-sub {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.logo-accent { color: var(--purple); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 1;
  min-width: 0;
}
.nav-link {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-medium);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--purple);
  background: var(--purple-pale);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 26px; height: 2.5px;
  background: var(--purple);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   ORG CARDS
   ============================================================ */
.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}
.org-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}
.org-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.org-img-wrap { position: relative; height: 220px; overflow: hidden; }
.org-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.org-card:hover .org-img { transform: scale(1.05); }
.org-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--white);
  color: var(--text-dark);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
}
.org-body { padding: 24px; }
.org-name { font-size: 1.15rem; margin-bottom: 4px; }
.org-location { color: var(--text-light); font-size: 0.85rem; margin-bottom: 12px; }
.org-desc { font-size: 0.9rem; color: var(--text-medium); margin-bottom: 16px; }
.org-stats {
  display: flex; gap: 16px; padding: 12px 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 16px;
}
.org-stat { text-align: center; flex: 1; }
.org-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--purple);
}
.org-stat span { font-size: 0.75rem; color: var(--text-light); }
.org-actions { display: flex; gap: 10px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(106,27,154,0.10);
}
.form-control::placeholder { color: var(--gray-400); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 600; font-family: var(--font-heading);
}
.badge-purple  { background: var(--purple-pale); color: var(--purple); }
.badge-blue    { background: var(--blue-pale);   color: var(--blue-dark); }
.badge-pink    { background: var(--pink-pale);   color: var(--pink-dark); }
.badge-green   { background: #E8F5E9; color: #2E7D32; }
.badge-orange  { background: #FFF3E0; color: #E65100; }
.badge-brown   { background: #EFEBE9; color: #6D4C41; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 14px 20px; border-radius: var(--radius-sm);
  font-size: 0.9rem; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.alert-success { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.alert-error   { background: var(--pink-pale); color: var(--pink-dark); border: 1px solid var(--pink-mid); }
.alert-info    { background: var(--blue-pale);  color: var(--blue-dark);  border: 1px solid var(--blue-mid); }
.alert-purple  { background: var(--purple-pale); color: var(--purple-dark); border: 1px solid var(--purple-mid); }

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-header {
  background: var(--grad-purple-blue);
  padding: 128px 0 60px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-header h1 { color: var(--white); position: relative; }
.page-header p  { color: rgba(255,255,255,0.85); margin-top: 8px; position: relative; }
.breadcrumb {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 16px;
  font-size: 0.85rem; color: rgba(255,255,255,0.65);
  position: relative;
}
.breadcrumb a { color: rgba(255,255,255,0.85); }
.breadcrumb a:hover { color: var(--white); }

/* ============================================================
   LOADING (skeleton)
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: linear-gradient(180deg, #eb8ecf 0%, #2d032b 100%);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .nav-logo { margin-bottom: 16px; }
.footer-brand .logo-text { color: var(--white); }
.footer-tagline { font-size: 0.9rem; margin-bottom: 20px; line-height: 1.7; }
.footer-social { display: flex; flex-direction: column; gap: 10px; }
.social-link {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: var(--transition);
}
.social-link:hover { color: var(--pink-light); padding-left: 4px; }
.footer-links h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 16px; }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  transition: var(--transition);
}
.footer-links a:hover { color: var(--blue-light); padding-left: 4px; }
.footer-contact h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 16px; }
.contact-item { font-size: 0.875rem; margin-bottom: 10px; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.trust-badge {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
  color: rgba(255,255,255,0.75);
  font-size: 0.72rem; padding: 4px 10px;
  border-radius: 50px;
  font-family: var(--font-heading);
}
.footer-bottom {
  padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; font-size: 0.8rem;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: rgba(255,255,255,0.45); transition: var(--transition); }
.footer-legal a:hover { color: var(--white); }



/* ============================================================
   STICKY DONATE BAR
   ============================================================ */
.sticky-donate {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--grad-purple-pink);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 50px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 8px 40px rgba(106,27,154,0.40);
  z-index: 999;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideUp 0.5s ease 2s both;
  white-space: nowrap;
}
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}
.sticky-close {
  background: none; border: none;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem; cursor: pointer; padding: 0;
}
.sticky-close:hover { color: var(--white); }

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed; bottom: 90px; right: 24px;
  background: var(--white); border-radius: var(--radius-md);
  padding: 14px 20px; box-shadow: var(--shadow-lg);
  font-family: var(--font-heading); font-size: 0.88rem;
  display: flex; align-items: center; gap: 10px;
  border-left: 4px solid var(--purple);
  z-index: 9999; animation: toastIn 0.3s ease;
}
.toast--error { border-left-color: var(--pink); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .nav-link { padding: 7px 8px; font-size: 0.82rem; }
  .nav-container { gap: 12px; }
}
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links { gap: 0; }
  .nav-link { padding: 6px 6px; font-size: 0.8rem; }
  .btn-donate { padding: 8px 16px; font-size: 0.82rem; }
}
@media (max-width: 768px) {
  :root { --section-padding: 60px 0; }
  .nav-container { height: 70px; padding: 0 16px; }
  .logo-img { height: 50px; }
  .logo-text { display: none; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 4px;
    position: fixed;
    top: 70px;
    left: 0; right: 0;
    background: var(--white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-link { font-size: 0.95rem; padding: 10px 16px; }
  .hamburger { display: flex; }
  .btn-donate { padding: 10px 20px; font-size: 0.85rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .org-grid { grid-template-columns: 1fr; }
  .sticky-donate span { display: none; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .nav-container { height: 64px; padding: 0 12px; gap: 8px; }
  .logo-img { height: 44px; }
  .btn-donate { padding: 8px 14px; font-size: 0.8rem; }
  .btn-donate span { display: none; }
  .btn-lg { padding: 14px 24px; font-size: 0.9rem; }
}
