/* ===== CSS RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette */
  --primary-blue: #1a365d;
  --secondary-blue: #2c5282;
  --accent-gold: #d4af37;
  --accent-green: #2d5016;
  --light-gray: #f7fafc;
  --dark-gray: #2d3748;
  --white: #ffffff;
  --text-dark: #1a202c;
  --text-light: #718096;

  /* Typography */
  --font-primary: "Playfair Display", serif;
  --font-secondary: "Source Sans Pro", sans-serif;
  --font-decorative: "Dancing Script", cursive;

  /* Spacing */
  --section-padding: 80px 0;
  --container-padding: 0 20px;
  --card-padding: 30px;

  /* Shadows */
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.2);

  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --transition-slow: 0.8s ease;
}

body {
  font-family: var(--font-secondary);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--light-gray);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding);
}

/* ===== 3D HEADER EFFECT (Innovation #1) ===== */
.header-3d {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transform: perspective(1000px) rotateX(5deg);
  transform-origin: top;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--secondary-blue) 100%
  );
  transition: var(--transition-medium);
}

.header-3d:hover {
  transform: perspective(1000px) rotateX(0deg);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.floating-nav {
  padding: 15px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-gold);
  box-shadow: var(--shadow-medium);
}

.org-name {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 15px;
  border-radius: 25px;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: var(--transition-fast);
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ===== HERO SECTION ===== */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
}

.hero-content {
  text-align: center;
  color: var(--white);
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-family: var(--font-primary);
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 40px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.6s both;
}

/* ===== BUTTON STYLES ===== */
.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #f4d03f);
  color: var(--primary-blue);
  box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-heavy);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--primary-blue);
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.btn-outline:hover {
  background: var(--primary-blue);
  color: var(--white);
  transform: translateY(-3px);
}

/* ===== LAYERED CARD DESIGN (Innovation #2) ===== */
.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 60px;
}

.about-card {
  background: var(--white);
  padding: var(--card-padding);
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.card-layer-1 {
  z-index: 3;
  transform: translateZ(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-layer-2 {
  z-index: 2;
  transform: translateZ(10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.card-layer-3 {
  z-index: 1;
  transform: translateZ(0px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.about-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-heavy);
}

.card-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(
    135deg,
    var(--primary-blue),
    var(--secondary-blue)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2rem;
  box-shadow: var(--shadow-medium);
}

.about-card h3 {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-blue);
}

.about-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== DYNAMIC BACKGROUND GRADIENT (Innovation #3) ===== */
.about-section,
.community-impact-section,
.support-services-section,
.subscribe-section,
.contact-section {
  position: relative;
  padding: var(--section-padding);
  overflow: hidden;
}

.section-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(
    45deg,
    var(--primary-blue),
    var(--secondary-blue),
    var(--accent-gold),
    var(--accent-green)
  );
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

.section-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.1;
  filter: blur(1px);
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ===== INTERACTIVE BUTTON HOVER (Innovation #4) ===== */
.service-card,
.contact-card,
.story-card {
  background: var(--white);
  padding: var(--card-padding);
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.service-card::before,
.contact-card::before,
.story-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 175, 55, 0.1),
    transparent
  );
  transition: var(--transition-medium);
}

.service-card:hover::before,
.contact-card:hover::before,
.story-card:hover::before {
  left: 100%;
}

.service-card:hover,
.contact-card:hover,
.story-card:hover {
  transform: translateY(-8px) rotateX(5deg);
  box-shadow: var(--shadow-heavy);
}

.service-icon,
.contact-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent-gold), #f4d03f);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  box-shadow: var(--shadow-medium);
  transition: var(--transition-fast);
}

.service-card:hover .service-icon,
.contact-card:hover .contact-icon {
  transform: scale(1.1) rotate(360deg);
}

/* ===== WATERFALL LAYOUT (Innovation #5) ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 60px;
}

.services-grid .service-card:nth-child(odd) {
  transform: translateY(20px);
}

.services-grid .service-card:nth-child(even) {
  transform: translateY(-10px);
}

.services-grid .service-card:nth-child(3n) {
  transform: translateY(30px);
}

.services-grid .service-card:hover {
  transform: translateY(-15px) !important;
  z-index: 10;
}

/* ===== SECTION STYLES ===== */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 15px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== ABOUT STORY SECTION ===== */
.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 80px;
  align-items: center;
}

.story-image {
  position: relative;
}

.story-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow-medium);
  clip-path: inset(0% 0% 5% 5%);
  transition: var(--transition-medium);
}

.story-img:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-heavy);
}

.story-text h3 {
  font-family: var(--font-primary);
  font-size: 2rem;
  color: var(--primary-blue);
  margin-bottom: 20px;
}

.story-text p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

/* ===== IMPACT STORIES ===== */
.impact-stories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.story-card {
  display: flex;
  gap: 20px;
  text-align: left;
  align-items: center;
}

.story-card .story-image {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
}

.story-card .story-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  clip-path: inset(0% 0% 5% 5%);
}

.story-content h3 {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  color: var(--primary-blue);
  margin-bottom: 10px;
}

.story-content p {
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== IMPACT STATS ===== */
.impact-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 60px;
}

.stat-card {
  background: var(--white);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.stat-number {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 10px;
}

.stat-label {
  color: var(--text-light);
  font-weight: 500;
}

/* ===== SUBSCRIBE SECTION ===== */
.subscribe-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 60px;
}

.subscribe-form,
.donation-info {
  background: var(--white);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow-light);
  text-align: center;
}

.subscribe-form h3,
.donation-info h3 {
  font-family: var(--font-primary);
  font-size: 1.8rem;
  color: var(--primary-blue);
  margin-bottom: 15px;
}

.subscribe-form p,
.donation-info p {
  color: var(--text-light);
  margin-bottom: 30px;
  line-height: 1.6;
}

.newsletter-form {
  margin-top: 30px;
}

.form-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.form-group input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.donation-options {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== CONTACT SECTION ===== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 60px;
}

.contact-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.map-container {
  background: var(--white);
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow-light);
}

.map-container h3 {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  color: var(--primary-blue);
  margin-bottom: 20px;
  text-align: center;
}

.map-wrapper {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.map-wrapper iframe {
  border-radius: 15px;
}

/* ===== WAVE DIVIDERS ===== */
.wave-divider,
.wave-divider-top {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider-top {
  top: 0;
  bottom: auto;
}
.wave-divider{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}

.wave-divider svg,
.wave-divider-top svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

.wave-divider svg path,
.wave-divider-top svg path {
  fill: var(--light-gray);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary-blue);
  color: var(--white);
  padding: 60px 0 30px;
  position: relative;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
  font-family: var(--font-primary);
  margin-bottom: 20px;
  color: var(--accent-gold);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: var(--white);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-section ul li a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .nav-menu {
    flex-direction: column;
    gap: 10px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-blue);
    padding: 20px;
    box-shadow: var(--shadow-medium);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-medium);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .about-story {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .impact-stories {
    grid-template-columns: 1fr;
  }

  .story-card {
    flex-direction: column;
    text-align: center;
  }

  .subscribe-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }

  .form-group {
    flex-direction: column;
  }

  .donation-options {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .section-padding {
    padding: 60px 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .header-3d,
  .hero-section,
  .footer {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .section-background {
    display: none;
  }
}
