/* ===== CSS RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
  color: #2d3748;
  background-color: #f8f9fa;
  overflow-x: hidden;
}

/* ===== CSS VARIABLES ===== */
:root {
  --primary-color: #1a365d;
  --secondary-color: #d4af37;
  --accent-color: #2c5282;
  --text-dark: #2d3748;
  --text-light: #718096;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary-color);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 3rem;
}

/* ===== 3D HEADER EFFECT ===== */
.header-3d {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transform: perspective(1000px) rotateX(15deg);
  transform-origin: top;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.floating-nav {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--accent-color) 100%
  );
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--secondary-color);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  height: 50px;
  width: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-medium);
}

.org-name {
  font-size: 1.2rem;
  color: var(--white);
  font-weight: 600;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

/* ===== 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: -2;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0% 0% 5% 0%);
}

.hero-content {
  text-align: center;
  color: var(--white);
  z-index: 1;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.6s both;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--secondary-color);
  color: var(--primary-color);
  box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-heavy);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--primary-color);
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
}

/* ===== WAVE DIVIDER ===== */
.wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 1;
}

.wave-divider svg {
  width: 100%;
  height: 100%;
  fill: var(--secondary-color);
}

/* ===== SECTIONS ===== */
section {
  position: relative;
  padding: 5rem 0;
  overflow: hidden;
}

.section-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.section-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.section-header {
  margin-bottom: 4rem;
}

/* ===== LAYERED CARD SYSTEM ===== */
.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.about-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: var(--shadow-medium);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.card-layer-1 {
  z-index: 1;
  transform: translateY(0);
}

.card-layer-2 {
  z-index: 2;
  transform: translateY(-10px);
}

.card-layer-3 {
  z-index: 3;
  transform: translateY(-20px);
}

.about-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-heavy);
}

.card-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--white);
  font-size: 2rem;
}

.about-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.about-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== LEGACY SECTION ===== */
.legacy-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.legacy-story {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.story-image {
  width: 100%;
  height: 300px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.story-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0% 0% 5% 5%);
}

.story-text h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.story-text p {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.impact-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stat-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow-medium);
  border-left: 5px solid var(--secondary-color);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-light);
  font-weight: 600;
}

/* ===== COMMUNITY SUPPORT SECTION ===== */
.support-programs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.program-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: var(--shadow-medium);
  text-align: center;
  transition: all 0.3s ease;
  border-top: 5px solid var(--secondary-color);
}

.program-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

.program-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--secondary-color), #f4d03f);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--white);
  font-size: 1.8rem;
}

.program-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.program-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== SUBSCRIBE SECTION ===== */
.subscribe-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
}

.subscribe-form,
.donation-info {
  background: var(--white);
  padding: 3rem;
  border-radius: 15px;
  box-shadow: var(--shadow-medium);
  text-align: center;
}

.subscribe-form h3,
.donation-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.subscribe-form p,
.donation-info p {
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.newsletter-form {
  margin-top: 2rem;
}

.form-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group input {
  flex: 1;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--secondary-color);
}

.donation-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== CONTACT SECTION ===== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
}

.contact-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow-medium);
  text-align: center;
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--white);
  font-size: 1.5rem;
}

.contact-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.contact-card p {
  color: var(--text-light);
  line-height: 1.5;
}

.map-container {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow-medium);
}

.map-container h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  text-align: center;
}

.map-wrapper {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.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;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--secondary-color);
}

.wave-divider-top {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 1;
}

.wave-divider-top svg {
  width: 100%;
  height: 100%;
  fill: var(--primary-color);
}

.footer-bottom {
  padding-top: 1rem;
  text-align: center;
  color: var(--text-light);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0% {
    background: linear-gradient(
      45deg,
      var(--primary-color),
      var(--secondary-color)
    );
  }
  50% {
    background: linear-gradient(
      45deg,
      var(--secondary-color),
      var(--primary-color)
    );
  }
  100% {
    background: linear-gradient(
      45deg,
      var(--primary-color),
      var(--secondary-color)
    );
  }
}

/* ===== DYNAMIC BACKGROUND GRADIENT ===== */
.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  opacity: 0.8;
  z-index: -1;
  animation: gradientShift 10s ease-in-out infinite;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .section-title {
    font-size: 2rem;
  }

  .legacy-content,
  .subscribe-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .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 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .about-card,
  .program-card,
  .contact-card {
    padding: 1.5rem;
  }

  .subscribe-form,
  .donation-info {
    padding: 2rem;
  }
}

/* ===== 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,
  .floating-nav,
  .hero-buttons,
  .wave-divider {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  .section-title {
    font-size: 18pt;
  }
}
