/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: auto;
    background-color: #ffffff;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: Arial, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; color: #4CAF50; }
h2 { font-size: 1.8rem; color: #4CAF50; }
h3 { font-size: 1.4rem; color: #4CAF50; }

p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #333;
}

/* HEADER */
header {
    background-color: #b30000;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 { margin: 0; }
.logo img { height: 100px; }

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 0.5rem 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav a:hover,
nav a.active {
    background-color: #4CAF50;
}

/* BANNER SECTIONS */
.hero, 
.about-banner, 
.programs-bg, 
.gallery-banner, 
.get-involved-bg, 
.contact-banner {
    position: relative;
    /* increased height so a larger portion of hero photos is visible */
    height: 600px;
    overflow: hidden;
    text-align: center;
    padding: 0;
    max-width: 1200px;
    margin: 2rem auto;
    border-radius: 8px;
}

.hero {
    min-height: 600px;
    background-color: #000; /* fallback during transitions to avoid grey gap */
}

.hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    -webkit-animation: heroFade 32s ease-in-out infinite;
    animation: heroFade 32s ease-in-out infinite;
    will-change: opacity;
    border-radius: inherit;
}

.hero-slide:nth-child(1) {
    animation-delay: 0s;
}

.hero-slide:nth-child(2) {
    animation-delay: 8s;
}

.hero-slide:nth-child(3) {
    animation-delay: 16s;
}

.hero-slide:nth-child(4) {
    animation-delay: 24s;
}

@keyframes heroFade {
    /* Timeline per slide (relative to its own animation):
       - stay hidden during pre-delay (0% -> small percent)
       - fade in quickly, remain visible, then fade out
       This prevents slides from being visible during their animation-delay. */
    0% { opacity: 0; }
    5% { opacity: 1; }
    30% { opacity: 1; }
    35% { opacity: 0; }
    100% { opacity: 0; }
}

/* BANNER BACKGROUND IMAGES */
.hero, 
.about-banner, 
.programs-bg, 
.gallery-banner, 
.get-involved-bg, 
.contact-banner {
    background-size: cover;
    /* center the focal point so more of the photo is visible */
    background-position: center center;
    background-repeat: no-repeat;
}

/* Responsive hero heights */
@media (max-width: 1366px) {
    .hero,
    .about-banner,
    .programs-bg,
    .gallery-banner,
    .get-involved-bg,
    .contact-banner {
        height: 600px;
        min-height: 600px;
    }
}

@media (max-width: 1024px) {
    .hero,
    .about-banner,
    .programs-bg,
    .gallery-banner,
    .get-involved-bg,
    .contact-banner {
        height: 480px;
        min-height: 480px;
    }
}

@media (max-width: 768px) {
    .hero,
    .about-banner,
    .programs-bg,
    .gallery-banner,
    .get-involved-bg,
    .contact-banner {
        height: 360px;
        min-height: 360px;
        border-radius: 6px;
    }
}

/* BANNER IMAGE (for pages where images are in HTML, remove absolute images) */

/* BANNER OVERLAY */
.hero .hero-overlay,
.about-banner .overlay,
.programs-bg .overlay,
.gallery-banner .overlay,
.get-involved-bg .overlay,
.contact-banner .overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.35);
    z-index: 1;
    border-radius: 8px;
    display: flex;
    align-items: center; /* vertical center */
    justify-content: center; /* horizontal center */
    padding: 1rem;
}

/* BANNER TEXT */
.hero-text,
.about-banner > *:not(img):not(.overlay),
.programs-bg > *:not(img):not(.overlay),
.gallery-banner > *:not(img):not(.overlay),
.get-involved-bg > *:not(img):not(.overlay),
.contact-banner > *:not(img):not(.overlay) {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    max-width: 900px;
    margin: auto;
    padding: 1rem;
}

/* Specifically force white text for home page hero-text */
.hero-text h1,
.hero-text p {
    color: white !important;
}

.banner {
    text-align: center;
    padding-top: 20px;
    background-color: #4CAF50;
}

/* BUTTONS */
.btn,
.theme-btn {
    background-color: blue;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover,
.theme-btn:hover {
    background-color: #388e3c;
}

/* BUTTON CONTAINERS */
.banner-button-container,
.center-btn {
    text-align: center;
    margin-top: 2rem;
}

/* CONTENT SECTIONS */
.intro {
    padding: 3rem 2rem;
    text-align: center;
}

.initial-intro {
    padding: 3rem 2rem;
    text-align: left;
}

.initial-intro h2 {
    text-align: center;
}

.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    background-color: #f9f9f9;
    justify-items: center;
}

.highlight-box {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    width: 300px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out;
}

.highlight-box:hover {
    transform: translateY(-10px);
}

/* GALLERY GRID */
.gallery-section {
    padding: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gallery-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}

.gallery-item img {
    width: 100%;
    display: block;
}

.gallery-item p {
    padding: 0.5rem;
}

/* SUPPORT A CHILD GRID */
.support-section {
  padding: 2rem;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr; /* One profile per row */
  gap: 2rem;
}

/* Each profile becomes a two-column layout */
.support-item {
  display: grid;
  grid-template-columns: 1fr 2fr; /* Image + Text */
  background: white;
  border-radius: 8px;
  overflow: hidden;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
}

/* Image styling */
.profile-photo {
  width: 80%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

/* Text styling */
.profile-text {
  text-align: left;
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
}

/* Responsive stacking on small screens */
@media (max-width: 768px) {
  .support-item {
    grid-template-columns: 1fr;
  }
}
/* CONTACT FORM */
.contact-section {
    max-width: 100%;
    margin: 2rem auto;
    padding: 1rem;
}

.contact-section p {
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    border: wheat solid;
    margin-top: 50px;
}

.contact-card label {
    font-weight: bold;
    margin-top: 20px;
}

.contact-card h2 {
    text-align: center;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.contact-form button {
    background-color: #4CAF50;
    color: white;
    font-size: 1.1em;
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.contact-form button:hover {
    background-color: #388e3c;
}



/* FOOTER */
footer {
    background-color: #b30000;
    color: white;
    text-align: center;
    padding: 15px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }
    .highlight-box {
        width: 90%;
    }
    .hero, 
    .about-banner, 
    .programs-bg, 
    .gallery-banner, 
    .get-involved-bg, 
    .contact-banner {
        height: 200px;
        padding: 1rem;
        margin-left: 0;
        margin-right: 0;
    }

    .get-in-touch {
    width: 100%;
    flex-direction: column;
    text-align: center;
    }
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: auto;
}

.get-in-touch {
    margin:auto;
    width: 50%;
    text-align: center;
}

/* Social Media Hover Effects */
a img {
  transition: transform 0.3s ease, filter 0.3s ease;
}

a img:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 5px #388e3c) brightness(1.2);
}

/* ===============================
   Newsletters & Circulars
================================ */

.newsletter-section {
  margin-bottom: 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
  background-color: #f9f9f9;
  visibility: visible;
  opacity: 1;
}

.newsletter-card {
  text-align: left;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-date {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 10px;
}

/* Newsletter-specific override */
.newsletter-card {
    text-align: left;
}

.newsletter-card p {
    margin-bottom: 10px;
}

.newsletter-card img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 1rem;
    border-radius: 8px;
}

.newsletter-card a.btn {
    display: inline-block;
    margin-top: 0.5rem;
}

/* WebKit-prefixed keyframes for better Safari support */
@-webkit-keyframes heroFade {
    0% { opacity: 0; }
    5% { opacity: 1; }
    30% { opacity: 1; }
    35% { opacity: 0; }
    100% { opacity: 0; }
}

/* Respect user's reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        -webkit-animation: none;
        animation: none;
        opacity: 1; /* show first slide statically */
    }
}