* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

:root {
  --bg-color: #f5f8fa;
  --text-color: #1c2b36;
  --primary-color: #0f5c7a;
  --primary-dark: #0b4c66;
  --nav-bg: #e5fdff;
  --card-color: #ffffff;
  --subtitle-color: #5e6c75;
  --shadow: 0 10px 20px rgba(0,0,0,0.10);
}

body.dark-mode {
  --bg-color: #08131d;
  --text-color: #f3f8fc;
  --primary-color: #35a7d0;
  --primary-dark: #0d2d42;
  --nav-bg: #0b1823;
  --card-color: #10202d;
  --subtitle-color: #bfd0db;
  --shadow: 0 10px 20px rgba(0,0,0,0.35);
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* NAVBAR */
.logo {
  border-radius: 0;
  object-fit: cover;
}

.navbar {
  display: flex;
  justify-content: space-between;
  padding: 0 40px;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--nav-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.navbar nav a {
  text-decoration: none;
  color: var(--text-color);
  font-size: large;
  position: relative;
}

.navbar nav a:hover,
.navbar nav a.active {
  color: var(--primary-color);
}

.navbar nav a.active::after,
.navbar nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
}

.donate-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s ease;
}

.donate-btn:hover {
  background: var(--primary-dark);
  color: hsl(207, 22%, 90%);
  transform: translateY(-2px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
}

.theme-toggle,
.menu-toggle {
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  background: #edf7fb;
  font-size: 1rem;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  color: var(--text-color);
}

/* HERO */
.hero {
  min-height: 100vh;
  background: url('images/bp2.png');
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 0px;
  padding-top: 70px;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 60, 80, 0.7);
}

.hero-content {
  position: relative;
  color: white;
  padding: 20px 40px;
  max-width: 700px;
}

.animated-title {
  font-size: clamp(2.4rem, 6vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -1px;
  padding-top: 0px;
}

.hero span {
  color: #ffffff;
  font-family: Playfair;
}

.animated-title .highlight {
  color: #7ed1c6;
  font-family: 'Times New Roman', Times, serif;
}

.hero-content p {
  padding-top: 18px;
  max-width: 500px;
  font-size: clamp(0.98rem, 2vw, 1.08rem);
}

.buttons {
  padding-top: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.buttons button {
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
}

.primary {
  background: white;
  color: #0f5c7a;
  font-size: 18px;
  border: none;
}

.secondary {
  background: transparent;
  border: 1px solid rgb(255, 255, 255);
  color: white;
  font-size: 18px;
}

/* SERVICES */
.services {
  padding: 60px 20px;
  text-align: center;
  background-color: #f8feff;
}

.services h4 {
  color: #0f5c7a;
}

.services h2 {
  font-family: Playfair;
  font-size: 35px;
}

.subtitle {
  color: var(--subtitle-color);
}

.cards {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.card {
  background: hsl(183, 100%, 92%);
  padding: 20px;
  border-radius: 15px;
  width: min(100%, 340px);
  transition: all 0.6s ease;
  opacity: 0;
  transform: translateY(50px);
}

.card.show {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.card h3 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 20px;
  text-align: left;
  color: #0b4c66;
}

.card p {
  text-align: left;
  padding-top: 5px;
}

/* CTA */
.cta {
  background: #0f5c7a;
  color: white;
  text-align: center;
  padding: 60px 20px;
}

.cta h2 {
  font-size: clamp(2rem, 5vw, 35px);
  font-family: 'Times New Roman', Times, serif;
}

.cta .buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

/* FOOTER */
.footer {
  background: #0b4c66;
  color: white;
  padding: 70px 0 30px;
}

.footer-grid {
  width: min(1180px, 92%);
  margin: auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer h3,
.footer h4 {
  font-family: "Playfair Display", serif;
  margin-bottom: 20px;
  font-size: 1.9rem;
  color: #38c3ff;
}

.footer h4 {
  font-size: 1.4rem;
}

.footer p,
.footer li,
.footer a {
  color: rgba(255,255,255,0.85);
  line-height: 1.9;
  font-size: 1rem;
  text-decoration: none;
}

.footer ul {
  list-style: none;
}

.footer a:hover {
  color: white;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-bottom {
  width: min(1180px, 92%);
  margin: 40px auto 0;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 24px;
  text-align: center;
}

/* BACK TO TOP */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  width: 62px;
  height: 62px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #14a8e2, #1a6bf2);
  color: white;
  font-size: 1.3rem;
  box-shadow: 0 12px 25px rgba(17, 121, 200, 0.25);
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* ANIMATIONS */
.animated-title span {
  display: inline-block;
  opacity: 0;
  transform: translateX(-150px);
  animation: slideIn 1.5s forwards;
}

.animated-title span:nth-child(1) {
  animation-delay: 0.3s;
}

.animated-title span:nth-child(2) {
  animation-delay: 0.6s;
}

.animated-title span:nth-child(3) {
  animation-delay: 0.9s;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* DARK MODE */
body.dark-mode .navbar {
  background: rgba(10, 22, 34, 0.96);
}

body.dark-mode nav a,
body.dark-mode .theme-toggle,
body.dark-mode .menu-toggle {
  color: #e8f1ff;
}
body.dark-mode .primary{
  background-color: rgba(10, 22, 34, 0.96);
  color: hsl(197, 100%, 50%);
}
body.dark-mode .secondary{
    border: 2px solid rgba(10, 22, 34, 0.96) ;
    color: hsl(197, 100%, 50%);
}

body.dark-mode .services {
  background: #0d1b2a;
}

body.dark-mode .services h2,
body.dark-mode .cta h2,
body.dark-mode .card h3 {
  color: #e8f1ff;
}

body.dark-mode .subtitle,
body.dark-mode .card p {
  color: #bfd1e6;
}

body.dark-mode .card {
  background: #14283c;
}

body.dark-mode .cta {
  background: linear-gradient(135deg, #0d8cc0, #235ff0);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  nav {
    position: absolute;
    top: 82px;
    right: 4%;
    width: 260px;
    background: var(--nav-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: 0.3s ease;
  }

  nav.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  body.dark-mode nav {
    background: var(--nav-bg);
  }

  body.dark-mode .theme-toggle,
  body.dark-mode .menu-toggle {
    background: #14283c;
    color: #e8f1ff;
  }
}

@media (max-width: 700px) {
  .buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .buttons a,
  .buttons button {
    width: 100%;
  }

  .card {
    width: 100%;
    margin: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    width: 55px;
    height: 55px;
    right: 16px;
    bottom: 18px;
  }
  .hero {
    background-position: center;
    padding-top: 80px;
  }

  .hero-content {
    padding: 16px 18px;
  }
  .animated-title{
    font-size: 60px;
  }

}

@media (max-width: 480px) {
  nav {
    width: calc(100vw - 28px);
    right: 14px;
    top: 78px;
  }
}
