:root {
    --bg: #f4f7f6;
    --surface: #ffffff;
    --ink: #102320;
    --muted: #5f6d69;
    --primary: #1e6f5c;
    --primary-dark: #165847;
    --accent: #d9efe5;
    --danger: #b83f3f;
    --border: #d8e2de;
    --shadow: 0 10px 25px rgba(16, 35, 32, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.site-header {
    background: #0f3b2f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: static;
    z-index: 20;
}

.nav-shell {
    padding: 0.6rem 0;
}

.desktop-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
}

.nav-group {
    display: flex;
    gap: 1.6rem;
}

.nav-left {
    justify-content: space-evenly;
}

.nav-right {
    justify-content: space-evenly;
}

.brand-center,
.brand-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.brand-center img {
    width: 108px;
    height: 108px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #d5e9e1;
    background: #fff;
}

.brand-mobile img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #d5e9e1;
    background: #fff;
}

.nav-group a,
.main-nav a {
    color: #e8f4ef;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.01em;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
}

.nav-group a.active,
.nav-group a:hover,
.main-nav a.active,
.main-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.nav-toggle {
    display: none;
}

.mobile-nav-wrap {
    display: none;
    align-items: center;
    justify-content: space-between;
}

.call-btn {
    text-decoration: none;
}

.mobile-action {
    border: 1px solid rgba(255, 255, 255, 0.45);
    padding: 0.55rem 0.95rem;
    border-radius: 10px;
    background: #14513f;
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-width: 112px;
}

.btn-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.main-nav {
    display: none;
}

.hero {
    min-height: 75vh;
    background-image: linear-gradient(rgba(10, 31, 26, 0.25), rgba(10, 31, 26, 0.68)), url('../../uploads/banner.webp');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    min-height: inherit;
    display: grid;
    place-items: center;
}

.hero-content {
    color: #f3f8f5;
    text-align: left;
    padding: 4rem 0;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.hero p {
    max-width: 720px;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.section {
    padding: 4rem 0;
}

.emergency-band {
    background: #e7f5ef;
    border-top: 1px solid #cde3d9;
    border-bottom: 1px solid #cde3d9;
}

.emergency-band-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
}

.emergency-band p {
    margin: 0;
}

.counter-card {
    background: linear-gradient(135deg, #e7f5ef, #f6fbf9);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 1.4rem;
    text-align: center;
}

.rescue-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.rescue-strip img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.counter-label {
    margin: 0;
    font-weight: 600;
    color: var(--muted);
}

.counter-value {
    margin: 0.2rem 0 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--primary-dark);
}

.page-hero {
    padding-bottom: 1.5rem;
}

.muted {
    background: linear-gradient(180deg, #edf6f2, #f4f7f6);
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin-top: 0;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: 0;
    padding: 0.75rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-small {
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
    border: 1px solid var(--primary);
}

.btn-danger {
    background: var(--danger);
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.3rem;
    box-shadow: var(--shadow);
}

.icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary-dark);
    display: grid;
    place-items: center;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.gallery-grid {
    display: grid;
    gap: 0.9rem;
}

.home-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.updates-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-item {
    border: 0;
    background: var(--surface);
    text-align: left;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    padding: 0;
}

.gallery-item img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.gallery-item span,
.gallery-item small {
    display: block;
    padding: 0.45rem 0.8rem;
}

.gallery-item small {
    color: var(--muted);
    padding-top: 0;
}

.site-footer {
    background: #102320;
    color: #dce9e3;
    padding-top: 2.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.site-footer h3 {
    margin-bottom: 0.6rem;
}

.site-footer p,
.site-footer a,
.site-footer label {
    color: #dce9e3;
}

.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-links a {
    text-decoration: none;
}

.social-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(220, 233, 227, 0.12);
    border: 1px solid rgba(220, 233, 227, 0.35);
    color: #dce9e3;
}

.social-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.newsletter-form,
.form-card {
    display: grid;
    gap: 0.6rem;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.7rem;
    font: inherit;
}

.form-wrap {
    display: grid;
    place-items: center;
}

.form-card {
    width: min(780px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: var(--shadow);
}

.form-card.narrow {
    width: min(420px, 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat-card p {
    font-size: 1.8rem;
    margin: 0.5rem 0 0;
    font-weight: 700;
    color: var(--primary-dark);
}

.admin-updates-list {
    display: grid;
    gap: 0.8rem;
}

.admin-update-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.8rem;
    display: grid;
    grid-template-columns: 130px 1fr auto;
    gap: 0.8rem;
    align-items: center;
}

.admin-update-item img {
    width: 130px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    align-items: start;
}

.media-column {
    display: grid;
    gap: 1rem;
}

.content-fill {
    width: 100%;
}

.side-page-image {
    width: 100%;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: #f9fcfb;
    padding: 0.35rem;
}

.story-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    align-items: start;
}

.story-card,
.mission-aside {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.2rem;
}

.story-card p {
    margin-bottom: 1rem;
}

.mission-aside .btn {
    margin-top: 0.5rem;
}

.certificate-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.donate-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.2rem;
}

.qr-box {
    margin-top: 1rem;
    border: 1px dashed #a7cabb;
    border-radius: 12px;
    padding: 1rem;
    background: #f7fcf9;
    max-width: 330px;
}

.qr-box img {
    width: 100%;
    border-radius: 8px;
}

.contact-card {
    width: min(780px, 100%);
    background: #eef8f3;
    border: 1px solid #cde3d9;
    border-radius: 12px;
    padding: 1.1rem;
}

.contact-card a {
    color: var(--primary-dark);
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.86);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 1rem;
    z-index: 100;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-height: 75vh;
    max-width: min(900px, 95vw);
    border-radius: 8px;
}

.lightbox p {
    color: #fff;
    max-width: min(900px, 95vw);
}

.lightbox-close {
    align-self: flex-end;
    margin-bottom: 0.8rem;
    background: #fff;
    border: 0;
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
}

.flash {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
}

.flash-success {
    background: #e8f7ed;
    color: #164e2e;
}

.flash-error {
    background: #fbeceb;
    color: #7a1f1b;
}

.note,
.empty-state,
small {
    color: var(--muted);
}

.copyright {
    margin: 1.2rem 0 0;
    text-align: center;
    padding: 0.8rem;
    border-top: 1px solid rgba(220, 233, 227, 0.2);
}

.whatsapp-float {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 110;
    background: #23a455;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.whatsapp-float:hover {
    background: #1a8b48;
}

.whatsapp-float svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

@media (max-width: 960px) {
    .cards,
    .footer-grid,
    .stats-grid,
    .content-grid,
    .updates-grid {
        grid-template-columns: 1fr 1fr;
    }

    .story-section {
        grid-template-columns: 1fr;
    }

    .page-grid {
        grid-template-columns: 1fr;
    }

    .rescue-strip {
        grid-template-columns: 1fr;
    }

    .home-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-update-item {
        grid-template-columns: 90px 1fr;
    }

    .admin-update-item form {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }

    .mobile-nav-wrap {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 0.7rem;
    }

    .nav-toggle {
        display: inline-flex;
        justify-self: start;
    }

    .brand-mobile {
        justify-self: center;
    }

    .call-btn {
        justify-self: end;
    }

    .main-nav {
        background: #0f3b2f;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 0.5rem;
        padding: 0.7rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .main-nav.open {
        display: flex;
    }
}

@media (max-width: 720px) {

    .emergency-band-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cards,
    .footer-grid,
    .stats-grid,
    .content-grid,
    .updates-grid {
        grid-template-columns: 1fr;
    }

    .home-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero {
        min-height: 52vh;
    }

    .side-page-image {
        height: auto;
        max-height: none;
    }
}
