/* ===================================
   Police and Fire: The Fallen Heroes
   Modern CSS Stylesheet
   =================================== */

/* CSS Variables for Brand Colors */
:root {
    --brand-red: #b91419;
    --brand-blue: #173471;
    --text-grey: #4a4a4a;
    --text-light-grey: #6b6b6b;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-grey);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--brand-blue);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--brand-red), var(--brand-blue));
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--brand-red);
}

p {
    margin-bottom: 1rem;
    color: var(--text-grey);
}

a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--brand-red);
}

ul {
    list-style: none;
}

/* Sticky Header */
.site-header {
    position: sticky;
    top: 0;
    background: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo img {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--brand-blue);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.main-nav ul {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.main-nav a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--brand-blue);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.main-nav a:hover {
    background: var(--bg-light);
    color: var(--brand-red);
}

.btn-donate {
    background: var(--brand-red) !important;
    color: var(--white) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(185, 20, 25, 0.3);
}

.btn-donate:hover {
    background: var(--brand-blue) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 52, 113, 0.4);
}

/* Hero Banner */
.hero-banner {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(23, 52, 113, 0.85), rgba(185, 20, 25, 0.75));
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-title {
    color: var(--white);
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    padding: 2rem;
}

/* Card Sections */
.card {
    padding: 4rem 0;
}

.card:nth-child(even) {
    background: var(--bg-light);
}

/* Mission Card */
.mission-card {
    text-align: center;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-red)) !important;
    color: var(--white);
}

.mission-card h2 {
    color: var(--white);
}

.mission-card h2::after {
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
}

.mission-statement {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 400;
    max-width: 900px;
    margin: 0 auto;
    color: var(--white);
    line-height: 1.8;
}

/* Mission Card */
.mission-card {
    text-align: center;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-red));
    color: var(--white);
}

.mission-card h2 {
    color: var(--white);
}

.mission-card h2::after {
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
}

.mission-statement {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 400;
    max-width: 900px;
    margin: 0 auto;
    color: var(--white);
    line-height: 1.8;
}

/* About Card */
.about-card {
    background: var(--white);
}

.about-content {
    max-width: 900px;
}

.about-content h3 {
    margin-top: 2rem;
}

.about-content ul {
    list-style: disc;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.about-content ul li {
    margin-bottom: 0.5rem;
    color: var(--text-grey);
}

.promise {
    background: var(--bg-light);
    padding: 1.5rem;
    border-left: 4px solid var(--brand-red);
    margin: 2rem 0;
    font-size: 1.1rem;
}

.closing-statement {
    font-style: italic;
    font-weight: 700;
    color: var(--brand-blue);
    font-size: 1.35rem;
}

/* Impact Card */
.impact-card {
    background: var(--bg-light);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.impact-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.impact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-hover);
}

.impact-item h3 {
    margin-bottom: 1rem;
}

/* How We Help Card */
.help-card {
    background: var(--white);
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.help-item {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background: var(--bg-light);
    transition: all 0.3s ease;
}

.help-item:hover {
    background: var(--white);
    box-shadow: 0 8px 30px var(--shadow-hover);
    transform: translateY(-5px);
}

.help-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--brand-red);
    opacity: 0.2;
    margin-bottom: 1rem;
    line-height: 1;
}

.help-item h3 {
    margin-bottom: 1rem;
}

.help-item p {
    font-size: 0.95rem;
}

/* Donate Card */
.donate-card {
    background: var(--bg-light);
    text-align: center;
}

.donate-intro {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

.donate-list {
    list-style: none;
    max-width: 500px;
    margin: 2rem auto;
    text-align: left;
}

.donate-list li {
    padding: 0.75rem 0 0.75rem 2.5rem;
    position: relative;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--brand-blue);
}

.donate-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--brand-red);
    font-weight: 900;
    font-size: 1.5rem;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: 1rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--brand-red);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(185, 20, 25, 0.3);
}

.btn-primary:hover {
    background: var(--brand-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(23, 52, 113, 0.4);
    color: var(--white);
}

.btn-secondary {
    background: var(--brand-blue);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(23, 52, 113, 0.3);
}

.btn-secondary:hover {
    background: var(--brand-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(185, 20, 25, 0.4);
    color: var(--white);
}

/* Partners Section */
.partners-section {
    padding: 4rem 0;
    background: var(--white);
}

.partners-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
    margin-bottom: 3rem;
}

.partners-grid img {
    max-width: 180px;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partners-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.partners-cta {
    text-align: center;
    margin-top: 3rem;
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, var(--brand-blue), #0d1f3f);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    max-width: 200px;
    height: auto;
    padding: 1.5rem;
    background: radial-gradient(circle, rgba(248, 249, 250, 0.15) 0%, transparent 70%);
    border-radius: 12px;
    /* FOOTER LOGO VERTICAL ALIGNMENT: Moved up 20px to account for transparent space in image */
    /* If further adjustment needed, modify the margin-top value below */
    margin-top: -40px;
}

.footer-text,
.footer-contact {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 0.9rem;
}

.footer-contact a {
    color: var(--white);
    text-decoration: underline;
}

.footer-contact a:hover {
    color: var(--brand-red);
}

.footer-badges {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.footer-badges img {
    max-width: 120px;
    height: auto;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
}

.copyright {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-links a {
    color: var(--white);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: var(--brand-red);
    transform: translateY(-3px);
}

.social-links svg {
    width: 24px;
    height: 24px;
}

/* Horizontal Rules */
hr {
    border: none;
    height: 3px;
    background: linear-gradient(to right, var(--brand-red), var(--brand-blue));
    margin: 2rem 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 4px 10px var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .main-nav.active {
        max-height: 400px;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }

    .main-nav li {
        width: 100%;
        border-bottom: 1px solid var(--bg-light);
    }

    .main-nav li:last-child {
        border-bottom: none;
    }

    .main-nav a {
        display: block;
        padding: 1rem 1.5rem;
        width: 100%;
        text-align: justify center;
    }

    .btn-donate {
        border-radius: 4px !important;
        margin: 0.5rem 1rem !important;
    }

    .hero-banner {
        height: 300px;
    }

    .card {
        padding: 2rem 0;
    }

    .impact-grid,
    .help-grid {
        grid-template-columns: 1fr;
    }

    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    h2::after {
        left: 0;
        transform: none;
    }

    .mission-card h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    .main-nav ul {
        gap: 0.25rem;
    }

    .main-nav a {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .hero-banner {
        height: 250px;
    }

    .partners-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .btn-primary,
    .btn-secondary,
    .btn-donate {
        display: none;
    }
}
