/* Box Model Hack */
* {
  box-sizing: border-box;
}


/* Clear fix hack */
.clearfix:after {
  content: ".";
  display: block;
  clear: both;
  visibility: hidden;
  line-height: 0;
  height: 0;
}

.clear {
  clear: both;
}


/******************************************
/* BASE STYLES
/*******************************************/

body {
  margin: 0;
  color: #161f2a;
  background: white;
  font-family: "Roboto", Arial, sans-serif;
  line-height: 1.5;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1, h2 {
  font-family: "Oswald", Arial, sans-serif;
}

/* Keeps most page content centered while still allowing the colored sections themselves to stretch across the screen. */

.inner-container {
  width: 86%;
  max-width: 1100px;
  margin: 0 auto;
}

/******************************************
/* LAYOUT
/*******************************************/

/* HEADER + HERO */

/* The dark transparent layer will keep the photograph muted so the hero still resembles the blue-gray reference and the white text remains easy to read. */

.hero {
  min-height: 470px;
  color: white;
  background-color: #66768a;
  background-image: linear-gradient(rgba(102, 118, 138, 0.88), rgba(102, 118, 138, 0.88)), url("../img/level-ground-hero.jpg");
  background-size: cover;
  background-position: center;
}

/* Flexbox distributes the left navigation, centered logo, and Donate button across one row. */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.nav-left, .logo-link, .nav-right {
  width: 33.333%;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-left a {
  font-family: "Oswald", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.logo-link {
  text-align: center;
}

/* The downloaded logo is dark; this filter makes it white like the logo in the reference. */

.logo-link img {
  width: 50px;
  filter: brightness(0) invert(1);
}

.nav-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.donate-button {
  padding: 11px 18px;
  color: #66768a;
  background: white;
  border-radius: 3px;
  font-family: "Oswald", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
}

/* Hidden on desktop -- becomes visible only at the smallest breakpoint */
.mobile-menu {
  display: none;
}

/* HERO CONTEXT */

.hero-content {
  width: 86%;
  max-width: 1000px;
  margin: 48px auto 0;
  padding-bottom: 55px;
  text-align: center;
}

.hero-content h1 {
  margin-bottom: 24px;
  font-size: 54px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 1px;
}

.hero-content p {
  max-width: 790px;
  margin: 0 auto 28px;
  font-size: 18px;
  line-height: 1.55;
}

.video-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  color: #e7eaed;
}

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid #e7eaed;
  border-radius: 50%;
  font-size: 11px;
}


/* WHY SECTION */

.why-section {
  padding: 88px 7% 92px;
  text-align: center;
  background: white;
}

.why-section h2 {
  margin-bottom: 18px;
  font-size: 34px;
  font-weight: 500;
}

.why-section p {
  max-width: 610px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.55;
}

/* PROGRAM SECTION */

.programs-section {
  padding: 88px 7% 96px;
  background: #dfe3e6;
}

/* The desktop reference has the two program areas side by side; flexbox creates that two-column structure. */

.programs-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 76px;
}

/* REMEMBER: width: calc(50% - 38px); sets an element's width to exactly half of its parent container's width minus 38 pixels. This rule is ideal for creating two-column layouts with fixed gaps or margins. */

.program-card {
  width: calc(50% - 38px);
  max-width: 420px;
  text-align: center;
}

/* These rectangles appear to be intentionally imitating image placeholders (in wireframe). */

.program-image {
  width: 100%;
  /* height: 175px; */
  height: 200px;
  margin-bottom: 28px;
  background: #66768a;
  box-shadow: 0 2px 7px rgba(22, 31, 42, 0.2);
}

.program-card h2 {
  margin-bottom: 15px;
  font-size: 27px;
  font-weight: 500;
}

.program-card p {
  min-height: 150px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.55;
}

/* BUTTONS */

.outline-button {
  display: inline-block;
  min-width: 150px;
  padding: 13px 20px;
  border: 1px solid #9ba3aa;
  font-family: "Oswald", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
}


/* VOLUNTEER SECTION */

.volunteer-section {
  padding: 92px 7% 100px;
  text-align: center;
  background: white;
}

.volunteer-section h2 {
  margin-bottom: 18px;
  font-size: 35px;
  font-weight: 500;
}

.volunteer-section p {
  max-width: 610px;
  margin: 0 auto 28px;
  font-size: 16px;
  line-height: 1.55;
}


/* FOOTER */

footer {
  padding: 42px 0 18px;
  color: white;
  background: #161f2a;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-left {
  width: 52%;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.social-links img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* This keeps the social graphics consistent in look. */

.social-links img {
  filter: brightness(0) invert(1);
}

/* Stack footer link groups */
.footer-link-groups {
  display: flex;
  flex-direction: column;
  /* gap: 10px; */
  gap: 12px;
  margin-top: 24px;
}

.footer-link-group h3 {
  margin-bottom: 4px;
  color: #8290a0;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
}

.footer-link-group p {
  margin-bottom: 0;
}

.footer-link-group a {
  margin-right: 20px;
  font-size: 13px;
  font-weight: 700;
}

.footer-address {
  width: 28%;
  font-style: normal;
  font-size: 13px;
  line-height: 1.45;
}

.footer-address strong {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
}

.footer-address p {
  margin-bottom: 0;
}

/* To soften footer contact details  */
.footer-address p, .footer-address p a {
    color: #c5ccd3;
    font-weight: 400;
}

.footer-divider {
  margin-top: 34px;
  border-top: 1px solid #7a8490;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 13px;
}

.footer-bottom p {
  margin-bottom: 0;
  font-size: 11px;
  font-weight: 500;
}

.footer-bottom img {
  width: 42px;
  filter: brightness(0) invert(1);
}


/******************************************
/* ADDITIONAL STYLES
/*******************************************/


/* BREAKPOINT 1: COMPACT DESKTOP/LARGE TABLET */

/* The original desktop layout begins getting crowded here. Preserving the structure but reducing spacing and type size.  */


@media screen and (max-width: 1050px) {
  
  .inner-container {
    width: 90%;
  }

  .nav-left {
    gap: 20px;
  }

  .hero-content h1 {
    font-size: 48px;
  }
  
  .programs-wrapper {
    gap: 42px;
  }

  .program-card {
    width: calc(50% - 21px);
  }

  .footer-left {
    width: 58%;
  }

  .footer-address {
    width: 30%;
  }
}

/* BREAKPOINT 2: TABLET */

/* The two program cards become too narrow at this size, so now they stack. The footer also gets more room to wrap. */

@media screen and (max-width: 780px) {

  .hero {
    min-height: 450px;
  }

  .hero-content {
    margin-top: 42px;
  }

  .hero-content h1 {
    font-size: 44px;
  }

  .hero-content p {
    font-size: 17px;
  }

  .why-section {
    padding-top: 76px;
    padding-bottom: 78px;
  }

  .programs-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 68px;
  }

  .program-card {
    width: 80%;
    max-width: 520px;
  }

  .program-image {
    height: 205px;
  }

  .program-card p {
    min-height: 0;
  }

  .footer-top {
    flex-wrap: wrap;
    gap: 40px;
  }

  .footer-left {
    width: 58%;
  }

  .footer-address {
    width: 34%;
  }
}

/* BREAKPOINT 3: MOBILE  */

/* Prioritizing the logo + Donate CTA and replacing the desktop navigation links with visual hamburger. */

@media screen and (max-width: 560px) {

  .inner-container {
    width: 88%;
  }

  .hero {
    min-height: 440px;
  }

  .site-nav {
    padding: 17px 0;
  }
  
  /* The two text links are hidden because they no longer fit comfortably beside the logo and Donate button. */
  .nav-left {
    display: none;
  }

  .logo-link {
    width: auto;
    margin-right: auto;
    text-align: left;
  }

  .logo-link img {
    width: 44px;
  }

  .nav-right {
    width: auto;
    gap: 12px;
  }
  
  /* Keeping Donate visible because it's the organization's most important CTA. */
  .donate-button {
    padding: 9px 13px;
    font-size: 12px;
  }
  
  /* Visual-only hamburger */

  .mobile-menu {
    display: flex;
    width: 37px;
    height: 37px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .mobile-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
  }

  .hero-content {
    width: 88%;
    margin-top: 44px;
  }

  .hero-content h1 {
    margin-bottom: 20px;
    font-size: 38px;
    line-height: 1.08;
  }

  .hero-content p {
    font-size: 15px;
    line-height: 1.55;
  }

  .video-link {
    font-size: 15px;
  }

  .why-section {
    padding: 65px 7%;
  }

  .why-section h2 {
    font-size: 30px;
  }

  .why-section p {
    font-size: 15px;
  }

  .programs-section {
    padding: 68px 7%;
  }

  .program-card {
    width: 100%;
  }

  .program-image {
    height: 175px;
  }

  .program-card h2 {
    font-size: 25px;
  }

  .program-card p {
    font-size: 15px;
  }

  .volunteer-section {
    padding: 70px 7% 76px;
  }

  .volunteer-section h2 {
    font-size: 30px;
  }

  .volunteer-section p {
    font-size: 15px;
  }
  
  
  /* Footer columns stack vertically so nothing becomes cramped or produces horizontal overflow on a phone. */
 
  .footer-top {
    flex-direction: column;
  }

  .footer-left, .footer-address {
    width: 100%;
  }

  .footer-link-groups {
    gap: 40px;
  }

  .footer-bottom {
    align-items: flex-end;
    gap: 20px;
  }

  .footer-bottom p {
    max-width: 82%;
  }
}
