:root {
  --black: #262626;
  --red: #c32630;
  --white: #fff;
  --green: #118c4f;
  --navbar-height: 100px;
}

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

html {
  scroll-behavior: smooth;
  font-family: "Montserrat", sans-serif;
}

header {
  background-color: var(--black);
  color: var(--white);
}

/* Logo */
.logo-img {
  width: 100px;
  height: 100px;
  cursor: pointer;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2rem;
  position: fixed;
  z-index: 999;
  width: 100%;
  background-color: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.7);
}

.invisibility {
  display: none;
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 0 4.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--black);
  font-size: 1.3rem;
}

.nav-links a:hover {
  background-color: var(--red);
  padding: 0.5rem;
}

.nav-links.active {
  text-align: center;
}

/* Hamburger icon */
.hamburger {
  visibility: hidden;
  font-size: 1.8rem;
  color: var(--black);
  cursor: pointer;
}

/* Donate button- disappear in devices greater than tablet */
.visibility {
  visibility: visible;
}

/* Hero Section */
#hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--black);
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-container {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  padding: 1rem;
}

.hero-services {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 600px;
}

.hero-services i {
  font-size: 2rem;
}

.title-center {
  display: flex;
  flex-direction: column;
}

/* About, Services, and Impact Sections */
#about,
#services,
#impact,
#contact,
#donate {
  scroll-margin-top: var(--navbar-height);
}

/* Flex box */
.flex {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  width: 100%;
  padding: 3rem;
  text-align: center;
}

.flex-row {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.flex-column-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.flex-content {
  margin: 0;
  line-height: 1.5;
  text-align: left;
  width: 100%;
}

.flex-content p {
  max-width: 600px;
}

.flex-content ul {
  padding-left: 30px;
}

.text-center {
  flex: 1 1 100%;
  text-align: center;
}

/* Hero - Get Support */
.support {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  color: var(--white);
  margin-top: 8rem;
  position: relative;
  text-align: left;
}

.support .hero-services {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  max-width: 350px;
  position: absolute;
}

.support span {
  font-size: 30px;
}

.hero-services a {
  text-decoration: none;
}

/* Hero - Resources */
.resources,
.testimonial {
  background-color: var(--white);
  font-size: 20px;
}

.resources,
.statistics {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2rem;
}

/* Hero - Statistics */
.statistics {
  background-color: var(--black);
  color: var(--white);
}

.statistics .hero-services {
  font-size: 2rem;
}

.statistics .hero-services p {
  font-size: 1.3rem;
}

/* Hero - Testimonials */
.testimonial {
  background-color: var(--red);
  color: var(--white);
  font-size: 2rem;
}

/* Donate Modal Section */
.btn-reuse a {
  text-decoration: none;
  color: var(--white);
}

#openDonate:hover {
  background-color: var(--black);
}

/* Modal background */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: var(--black);
  padding-top: 2rem;
}

/* Modal box */
.modal-content {
  background: #fff;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  box-shadow: 0 4px 20px var(--black);
  overflow-y: auto;
}

.flex-column-container p {
  text-align: left;
}

.modal .flex {
  padding: 0;
  text-align: left;
}

/* Close button */
.close {
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}

.card {
  flex: 1 1 100%;
  max-width: 400px;
  text-align: center;
}

.card h3 {
  margin-top: 1rem;
}

.card ul {
  text-align: left;
  padding-left: 30px;
}

#donate .img-style,
#intake .img-style {
  aspect-ratio: 0;
  width: 300px;
}

/* About Us Section */
#about {
  background-color: var(--white);
  color: var(--black);
}

/* About Us Cards */
.flex p {
  line-height: 1.6;
}

/* Services Section */
#services {
  background-color: var(--black);
  color: var(--white);
}

.card p {
  margin-top: 0.5rem;
  text-align: left;
}

/* Our Impact Section */
#impact {
  background-color: var(--white);
  color: var(--black);
}

#impact .flex-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 3rem;
}

#impact .img-style {
  width: 50%;
  max-width: 400px;
  object-fit: cover;
  border-radius: 8px;
}

/* Text column */
#impact .flex-column-container {
  flex: 1 1 50%;
}

/* Image style */
.img-style {
  border-radius: 8px;
  width: 100%;
  max-width: 450px;
  aspect-ratio: 1/1;
  object-fit: cover;
}

/* Contact Section */
#contact {
  background-color: var(--black);
  color: var(--white);
}

#contact .flex-row {
  display: flex;
  align-items: space-between;
  justify-content: center;
  gap: 3rem;
}

.contact-wrapper {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Form */
input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid;
  border-radius: 4px;
  box-sizing: border-box;
  margin-top: 6px;
  margin-bottom: 16px;
  resize: vertical;
}

/* Form column */
.contact-container {
  flex: 1 1 400px;
  max-width: 600px;
  text-align: left;
}

/* Image */
.img-column {
  flex: 1 1 300px;
  max-width: 400px;
}

/* Form buttons alignment */
.form-btns {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

#formMessage {
  text-align: center;
  margin-top: 15px;
  font-size: 16px;
  font-weight: bold;
}

/* Footer */
#footer {
  background-color: var(--white);
}

#footer article {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Button */
.btn-reuse {
  cursor: pointer;
  background-color: var(--red);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.btn-reuse:hover {
  background-color: var(--white);
  color: var(--black);
}

.cancel-btn {
  background-color: var(--white);
  color: var(--black);
}

.cancel-btn:hover {
  background-color: var(--black);
  color: var(--white);
}

/* Stripe Redirect Page */
.confirmation {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  line-height: 2;
  padding: 1rem;
}

/* Intake Form Modal */
.intake-content,
.close {
  color: var(--black);
}

.intake-modal-content {
  height: 250px;
  overflow-y: hidden;
}

/* Responsive Mobile Styling */
@media (max-width: 768px) {
  :root {
    --navbar-height: 120px;
  }

  main {
    padding-top: 7rem;
  }

  /* Navigation Bar */
  .navbar {
    justify-content: space-between;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 105px;
    right: 0;
    width: 200px;
    background-color: var(--black);
    padding: 20px 0;
    opacity: 0.9;
  }

  .nav-links a {
    color: var(--white);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a:hover {
    background-color: var(--red);
  }

  /* Hamburger Menu */
  .hamburger {
    display: block;
    visibility: visible;
  }

  .flex {
    padding: 2rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .flex .support {
    text-align: left;
  }

  /* Hero Section */
  .hero-container {
    display: flex;
    flex-direction: column;
    /* padding-top: 4rem; */
  }

  .header-img {
    width: 100%;
  }

  .hero-overlay {
    position: inherit;
    padding: 0;
  }

  .support .hero-services {
    position: static;
    margin: 1rem auto;
    align-items: center;
  }

  .hero-services h1 span {
    font-size: 35px;
  }

  .support {
    gap: 2rem;
    margin-top: 0;
    text-align: center;
  }

  .support span {
    font-size: 22px;
  }

  .resources,
  .statistics {
    flex-direction: column;
  }

  .testimonial {
    font-size: 25px;
    text-align: center;
  }

  /* About Us Section */
  .text-center {
    text-align: center;
  }

  #about p {
    font-size: 0.95rem;
  }

  #services .card {
    flex: 1 1 100%;
  }

  /* Impact Section */
  #impact .flex-row {
    flex-direction: column;
    align-items: center;
  }

  #impact .flex-column-container,
  #impact img {
    flex: 1 1 100%;
  }

  #impact .img-style {
    width: 100%;
  }

  /* Contact Us Section */
  #contact .flex-row {
    flex-direction: column;
    align-items: center;
    text-align: left;
    gap: 0;
  }

  .contact-wrapper {
    flex-direction: column;
    align-items: center;
  }

  /* Image above form on mobile */
  .img-column {
    order: -1;
    width: 100%;
  }

  .contact-container {
    width: 100%;
  }

  .img-column .img-style {
    margin-bottom: 1rem;
  }

  /* Center the form buttons */
  .form-btns {
    flex-wrap: wrap;
  }

  /* Donate Section */
  .visibility {
    visibility: hidden;
  }

  .invisibility {
    display: inline;
  }

  .flex-row {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 100%;
  }

  .img-style {
    max-width: 400px;
    max-height: auto;
  }

  #donate .img-style,
  #intake .img-style {
    width: 200px;
  }

  .disappear {
    display: none;
  }

  .confirmation {
    text-align: center;
  }

  /* Intake Form */
  .intake-modal-content {
    height: auto;
  }
}

/* ===== Scroll Animations ===== */

/* Hidden state before scroll */
.fade-in,
.fade-in-down {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Visible state when scrolled into view */
.show {
  opacity: 1;
  transform: translateY(0);
}

/* Specific fade-in (no drop) */
.fade-in {
  transform: none;
}

/* For better performance */
[data-animate] {
  will-change: opacity, transform;
}