/* =============================
   Volunteer Fire Department
   Starter CSS Stylesheet
   ============================= */

/* -------- CSS Reset / Base -------- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #f4f4f4;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: #b11226; /* fire-service red */
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

/* -------- Accessibility -------- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 12px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* -------- Header -------- */
header {
    background-color: #111;
    color: #fff;
    border-bottom: 5px solid #b11226;
}

.branding {
    padding: 1.5rem 1rem 0.5rem;
    text-align: center;
}

.branding h1 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: 1px;
}

.tagline {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: #ddd;
}

/* -------- Navigation -------- */
nav {
    background-color: #1c1c1c;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #fff;
    font-weight: 600;
}

nav a:hover,
nav a:focus {
    background-color: #b11226;
    text-decoration: none;
}

/* -------- Main Layout -------- */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

section {
    background-color: #fff;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-left: 5px solid #b11226;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

section h2 {
    margin-top: 0;
    color: #111;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.25rem;
}

/* -------- Hero Section -------- */
#hero {
    background-color: #b11226;
    color: #fff;
    border-left: none;
}

#hero h2 {
    color: #fff;
    border-bottom: none;
}

#hero p {
    font-size: 1.1rem;
}

/* -------- Services List -------- */
#services ul {
    padding-left: 1.25rem;
}

#services li {
    margin-bottom: 0.4rem;
}

/* -------- Location -------- */
address {
    font-style: normal;
    margin-bottom: 1rem;
}

.map-placeholder {
    background-color: #e9e9e9;
    border: 2px dashed #bbb;
    padding: 2rem;
    text-align: center;
    color: #666;
}

/* -------- Contact Section -------- */
#contact ul {
    list-style: none;
    padding: 0;
}

#contact li {
    margin-bottom: 0.5rem;
}

form {
    margin-top: 1.5rem;
}

fieldset {
    border: 1px solid #ccc;
    padding: 1rem;
}

legend {
    font-weight: 600;
    padding: 0 0.5rem;
}

label {
    display: block;
    margin-top: 0.75rem;
    font-weight: 600;
}

input,
textarea {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.25rem;
    border: 1px solid #bbb;
    border-radius: 3px;
}

textarea {
    min-height: 120px;
}

button {
    margin-top: 1rem;
    background-color: #b11226;
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

button:hover,
button:focus {
    background-color: #8e0e1e;
}

/* -------- Footer -------- */
footer {
width: 100%;           /* full width of the viewport */
    background-color: #111; /* same as current */
    color: #ccc;
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.9rem;
    /* optional: make sure it always spans across the screen */
    box-sizing: border-box;
}

footer p {
    margin: 0.25rem 0;
}

/* -------- Responsive Adjustments -------- */
@media (max-width: 600px) {
    nav ul {
        flex-direction: column;
    }

    nav a {
        text-align: center;
        border-top: 1px solid #333;
    }
}

/* -------- Recruitment Section -------- */
#recruitment h3 {
    margin-top: 1.25rem;
    color: #b11226;
}

#recruitment ul {
    padding-left: 1.25rem;
}

#recruitment li {
    margin-bottom: 0.4rem;
}

#recruitment {
    background-color: #fff;
    border-left: 5px solid #b11226; /* visual distinction from hero */
}

/* -------- Download Button -------- */
.download-button {
    display: inline-block;
    margin-top: 1rem;
    background-color: #b11226;
    color: #fff;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    border-radius: 3px;
}

.download-button:hover,
.download-button:focus {
    background-color: #8e0e1e;
    text-decoration: none;
}

/* -------- Hero Background Image -------- */
.hero-with-image {
    position: relative;
    background-image: url("images/truck.jpg");
    background-size: cover;
    background-position: center;
    min-height: 320px;
    display: flex;
    align-items: center;
}

/* Dark overlay for readability */
.hero-with-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
}

/* Text content */
.hero-overlay {
    position: relative;
    padding: 2rem;
    max-width: 700px;
}

.hero-overlay h2,
.hero-overlay p {
    color: #fff;
}

/* -------- Map Embed Styling -------- */
.map-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border: 2px solid #bbb;
    border-radius: 4px;
    margin-top: 1rem;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

body {
    display: grid;
    grid-template-rows: 1fr auto; /* main content grows, footer auto */
    min-height: 100vh;
}

main {
    padding-bottom: 1rem; /* optional spacing from footer */
}

/* -------- Location Section Layout -------- */
.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.location-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Stack on mobile */
@media (max-width: 600px) {
    .location-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .location-content {
        grid-template-columns: 1fr;
    }

    .location-image img {
        max-height: 260px;
    }
}

.services-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.services-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.services-image img {
    width: 100%;
    height: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* -------- Header with Dual Logos -------- */
.site-header {
    background-color: #111;
    color: #fff;
    border-bottom: 5px solid #b11226;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
}

.header-title {
    text-align: center;
}

.header-title h1 {
    margin: 0;
    font-size: 2rem;
}

.header-title .tagline {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: #ddd;
}

.header-logo {
    height: 80px;
    width: auto;
}

/* -------- Responsive Behavior -------- */
@media (max-width: 768px) {
    .header-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .header-logo {
        display: none; /* hide patches on mobile */
    }

    .header-title h1 {
        font-size: 1.6rem;
    }
}

/* -------- Page Hero (Reusable) -------- */
.page-hero {
    position: relative;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-bottom: 2rem;
}

/* Background image */
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(20%);
    z-index: 1;
}

/* Dark overlay for readability */
.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 2;
}

/* Text container */
.page-hero-overlay {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 2rem 1.5rem;
}

.page-hero h2 {
    margin-top: 0;
    font-size: 2.2rem;
}

.page-hero p {
    font-size: 1.05rem;
    line-height: 1.7;
}

.members-hero::before {
    background-image: url("images/members.jpg");
}

@media (max-width: 600px) {
    .page-hero {
        min-height: 220px;
    }

    .page-hero h2 {
        font-size: 1.8rem;
    }
}

/* Ensure hero text stays readable */
.page-hero h2,
.page-hero p {
    color: #fff;
}

.resources-hero::before {
    background-image: url("images/stat2.jpeg");
}