@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Outfit:wght@400;700&display=swap');

:root {
  /* Core Premium Purple Palette */
  --primary-color: #6c5ce7;       /* Vibrant royal violet/indigo */
  --secondary-color: #e84393;     /* Rich magenta-pink for warm, energetic contrast */
  --accent-lavender: #a29bfe;     /* Soft pastel lavender for subtle borders/hover markers */
  
  /* Layout & Utility Colors */
  --bg-color: #f8f7ff;            /* Clean light background with extremely light lavender tint */
  --text-dark: #2d3436;           /* Crisp off-black for main copy readability */
  --text-light: #636e72;          /* Slate gray for supporting text/captions */
  
  /* Premium Glassmorphism styling */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(108, 92, 231, 0.15); /* Tinted purple border for glass panels */
  --glass-shadow: 0 8px 32px 0 rgba(108, 92, 231, 0.08); /* Glow-effect violet shadow */
  
  /* Gradient Specifications */
  --gradient-logo: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  --gradient-btn: linear-gradient(45deg, var(--primary-color), #8b7ef8);
  --gradient-btn-hover: linear-gradient(45deg, #5a4ad1, var(--primary-color));
  
  /* Shadow variables */
  --btn-shadow: 0 4px 15px rgba(108, 92, 231, 0.35);
  --btn-hover-shadow: 0 6px 20px rgba(108, 92, 231, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  --hero-fade: .12;
  background-image: linear-gradient(rgba(248, 247, 255, var(--hero-fade)), rgba(248, 247, 255, var(--hero-fade))), var(--site-hero-image);
  background-size: 105% auto;
  background-repeat: no-repeat;
  background-position: center top;
  background-attachment: fixed;
}

/* Background blob animations for modern feel */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
  animation: float 10s infinite ease-in-out alternate;
  pointer-events: none; /* Ensure blobs do not intercept clicks */
}

body::before {
  width: 400px;
  height: 400px;
  background: var(--primary-color);
  top: -100px;
  left: -100px;
}

body::after {
  width: 500px;
  height: 500px;
  background: var(--accent-lavender);
  bottom: -150px;
  right: -100px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 50px) scale(1.1); }
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
}

header {
  padding: 1.5rem 5%;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-dark);
  font-weight: 600;
  position: relative;
  padding-bottom: 5px;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 5%;
  min-height: calc(100vh - 200px);
}

.hero {
  text-align: center;
  padding: 6rem 2rem;
  min-height: clamp(460px, 36vw, 560px);
  display: grid;
  place-content: center;
  margin: -3rem -5% 3rem;
  background: transparent;
  animation: fadeIn 1s ease-out;
}

.hero h1 {
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: white;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .5);
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto 2rem;
  color: white;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}

.donate-banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 5%; background: #dff3fb; color: #214a5a; border-bottom: 1px solid #b7dfec; }
.donate-banner div { display: flex; flex-wrap: wrap; gap: .75rem; align-items: baseline; }
.donate-banner strong { font-family: 'Outfit', sans-serif; font-size: 1.1rem; }
.donate-button[disabled] { opacity: .7; cursor: not-allowed; box-shadow: none; }
.section-heading { text-align: center; max-width: 700px; margin: 0 auto 2rem; }
.eyebrow, .story-source, .team-role { color: var(--primary-color); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.stories-grid, .team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.25rem; }
.story-card { padding: 0; overflow: hidden; margin-bottom: 0; }
.story-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.story-card__body, .gallery-card__body { padding: 1.25rem; }
.story-card h3 { margin: .35rem 0 .6rem; font-size: 1.15rem; }
.story-card p { color: var(--text-light); }
.story-card a { display: inline-block; margin-top: 1rem; font-weight: 700; }
.involvement-hero { text-align: center; max-width: 850px; margin: 0 auto 2rem; }
.involvement-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.involvement-hero > p:last-child { max-width: 680px; margin: 0 auto; color: var(--text-light); font-size: 1.1rem; }
.opportunities-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.25rem; }
.opportunity-card { margin: 0; display: flex; flex-direction: column; align-items: flex-start; }
.opportunity-card h2 { font-size: 1.35rem; margin-bottom: .6rem; }
.opportunity-card p { color: var(--text-light); flex-grow: 1; }
.opportunity-icon { font-size: 2rem; margin-bottom: .75rem; }
.opportunity-card .btn { margin-top: 1.25rem; font-size: .9rem; padding: 10px 18px; }
.involvement-next-step { margin-top: 2rem; text-align: center; }
.involvement-next-step .btn { margin: .5rem; }
.story-detail { max-width: 850px; margin: 0 auto; }
.story-detail__image { width: 100%; max-height: 420px; object-fit: cover; border-radius: 14px; margin-bottom: 2rem; }
.story-detail h1 { margin-bottom: .75rem; }
.story-detail__summary { font-size: 1.2rem; color: var(--text-light); margin-bottom: 2rem; }
.story-detail__content { font-size: 1.05rem; }
.story-detail__content p { margin-bottom: 1.2rem; }
.story-detail__source { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--glass-border); }
.story-detail__source--top { margin: 0 0 1rem; padding: 0; border-top: 0; }
.event-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.25rem; margin-top: 2rem; }
.event-gallery figure { margin: 0; }
.event-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; display: block; }
.event-gallery figcaption { color: var(--text-light); font-size: .9rem; margin-top: .5rem; }
.team-grid { margin: 0 0 2rem; }
.team-card { margin-bottom: 0; }
.team-card h3 { margin-bottom: .25rem; }
.profile-image, .profile-image-placeholder { width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 1.25rem; display: block; object-fit: cover; }
.profile-image-placeholder { border: 2px dashed var(--accent-lavender); background: rgba(162, 155, 254, .08); }
.gallery-card { padding: 0; overflow: hidden; margin-bottom: 0; }
.gallery-card > a { display: block; overflow: hidden; }
.gallery-card img { width: 100%; height: 220px; object-fit: cover; display: block; transition: transform .3s ease; }
.gallery-card > a:hover img { transform: scale(1.04); }
.gallery-card--home, .gallery-card--home img { height: 180px; }
.gallery-card__body { display: flex; flex-direction: column; gap: .5rem; }
.gallery-card__body h3 { font-size: 1.05rem; margin: 0; }
.gallery-card__body span { align-self: flex-start; padding: 4px 10px; background: rgba(108, 92, 231, .1); color: var(--primary-color); font-size: .8rem; border-radius: 20px; font-weight: 600; }
a:focus-visible, button:focus-visible { outline: 3px solid #f0a; outline-offset: 3px; }

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--gradient-btn);
  color: white;
  border-radius: 30px;
  font-weight: 600;
  box-shadow: var(--btn-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px);
  background: var(--gradient-btn-hover);
  box-shadow: var(--btn-hover-shadow);
  color: white;
}

.btn-secondary {
  background: linear-gradient(45deg, var(--secondary-color), #fd79a8);
  box-shadow: 0 4px 15px rgba(232, 67, 147, 0.4);
}
.btn-secondary:hover {
  box-shadow: 0 6px 20px rgba(232, 67, 147, 0.6);
}
.hero .btn { width: min(100%, 600px); justify-self: center; text-align: center; margin-top: .35rem; display: flex; align-items: center; justify-content: center; gap: .5rem; }
.hero .btn:first-of-type { margin-top: 1.35rem; }
.hero .btn-secondary { margin-left: 0 !important; }
.button-icon { display: inline-block; flex: 0 0 1.15rem; width: 1.15rem !important; height: 1.15rem !important; max-width: 1.15rem; max-height: 1.15rem; margin-right: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.btn-instagram { background: linear-gradient(45deg, #833ab4, #fd1d1d 52%, #fcb045); box-shadow: 0 4px 15px rgba(131, 58, 180, .35); }
.btn-instagram:hover { background: linear-gradient(45deg, #6f2c98, #df1717 52%, #e69b34); box-shadow: 0 6px 20px rgba(131, 58, 180, .5); }
.instagram-icon { display: inline-block; flex: 0 0 1.15rem; width: 1.15rem !important; height: 1.15rem !important; max-width: 1.15rem; max-height: 1.15rem; margin-right: 0; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: middle; }
.instagram-icon circle:last-child { fill: currentColor; stroke: none; }
.btn-email { background: linear-gradient(45deg, #238b8b, #53c7b8); box-shadow: 0 4px 15px rgba(35, 139, 139, .3); }
.btn-email:hover { background: linear-gradient(45deg, #1b7070, #42ad9f); box-shadow: 0 6px 20px rgba(35, 139, 139, .45); }
.contact-note { color: var(--text-light); font-size: .92rem; }

/* Grid for projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  transition: transform 0.3s ease;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card h3 {
  margin-bottom: 0.5rem;
}

.project-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

footer {
  text-align: center;
  padding: 3rem 5%;
  background: rgba(255,255,255,0.9);
  border-top: 1px solid rgba(0,0,0,0.05);
  margin-top: auto;
}

/* Contact Form */
.form-group {
  margin-bottom: 1.5rem;
}

input, textarea {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.8);
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Image styling */
.content-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  display: block;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-dark);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Hamburger animations when active */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 8rem 2rem 2rem;
    transition: right 0.3s ease;
    z-index: 105;
  }

  nav.active {
    right: 0;
  }

  .donate-banner { align-items: flex-start; flex-direction: column; }

  nav ul {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }
  
  header {
    padding: 1rem 5%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
