/* ================================================================
   POST 58: Veteran resource links and footer social media
   This is a separate stylesheet, so the existing styles.css and
   events.css files do not need to be replaced.
   ================================================================ */

/* Keep the whole section centered and approximately 75% of the
   original full-width row. On a large screen, limit it to 1030px. */
.home-contact .resource-section {
  width: 75%;
  max-width: 1030px;
  margin: 0 auto;
  padding: 0 0 32px;
}

/* A modest title above the resource tiles; the gold edge ties it
   visually to the site's American Legion theme. */
.home-contact .resource-heading {
  margin: 0 0 14px;
  padding-left: 13px;
  border-left: 4px solid #d7ac55;
  color: #ffffff;
  font-size: clamp(19px, 2.1vw, 24px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .01em;
}

/* Two columns: a prominent Be the One tile on the left, and two
   smaller resources stacked on the right. */
.home-contact .resource-links {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  grid-template-rows: 164px 164px;
  gap: 12px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
}

/* Give all three tiles the same finished edges and preserve their
   logo/image proportions without cropping the text. */
.home-contact .resource-links .resource-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
  padding: 9px;
  border-radius: 7px;
  text-decoration: none;
}

.home-contact .resource-links .resource-link img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* Keep the entire image visible. */
}

/* Left tile spans both grid rows. */
.home-contact .resource-links .resource-be-one {
  grid-column: 1;
  grid-row: 1 / 3;
  background: #ffffff;
}

/* Upper-right tile. */
.home-contact .resource-links .resource-legion {
  grid-column: 2;
  grid-row: 1;
  background: #ffffff;
}

/* Lower-right tile. */
.home-contact .resource-links .resource-va {
  grid-column: 2;
  grid-row: 2;
  background: #204e7b;
}

/* Visible focus indication for keyboard users. */
.home-contact .resource-links .resource-link:focus-visible,
footer .footer-facebook:focus-visible {
  outline: 3px solid #f3c66d;
  outline-offset: 3px;
}

/* Footer: a small social-media link rather than a large image tile. */
footer .footer-social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

footer .footer-social-label {
  color: #f0d18f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

footer .footer-facebook {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #d9ecff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

footer .footer-facebook:hover { text-decoration: underline; }

footer .footer-facebook svg {
  display: block;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
}

/* On tablets: show Be the One across the top, then the two
   resource logos side by side. */
@media (max-width: 760px) {
  .home-contact .resource-section {
    width: calc(100% - 40px);
    max-width: 600px;
    padding-bottom: 27px;
  }
  .home-contact .resource-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto 128px;
    gap: 10px;
  }
  .home-contact .resource-links .resource-be-one {
    grid-column: 1 / -1;
    grid-row: 1;
    height: auto;
  }
  .home-contact .resource-links .resource-be-one img {
    height: auto;
    max-height: 320px;
  }
  .home-contact .resource-links .resource-legion {
    grid-column: 1;
    grid-row: 2;
  }
  .home-contact .resource-links .resource-va {
    grid-column: 2;
    grid-row: 2;
  }
}

/* On narrow phones, stack each tile so the VA and Legion logos stay
   legible instead of squeezing into two half-width boxes. */
@media (max-width: 490px) {
  .home-contact .resource-links {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 105px 105px;
  }
  .home-contact .resource-links .resource-be-one {
    grid-column: 1;
    grid-row: 1;
  }
  .home-contact .resource-links .resource-legion {
    grid-column: 1;
    grid-row: 2;
  }
  .home-contact .resource-links .resource-va {
    grid-column: 1;
    grid-row: 3;
  }
}
