:root {
    --ink: #17211d;
    --muted: #5d6d66;
    --line: #d9e4df;
    --paper: #fbfdfc;
    --soft: #eef6f2;
    --green: #0f7a4f;
    --green-dark: #07583a;
    --red: #b4232a;
    --gold: #c3953c;
    --blue: #1d5d8f;
    --shadow: 0 18px 50px rgba(15, 55, 38, .12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1.75;
}

body[dir="ltr"] {
    font-family: Arial, Tahoma, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.topbar {
    background: #101b17;
    color: #eaf4ef;
    font-size: 13px;
}

.topbar-inner,
.topbar-links,
.header-inner,
.header-actions,
.hero-actions,
.footer-bottom {
    display: flex;
    align-items: center;
}

.topbar-inner {
    min-height: 36px;
    justify-content: space-between;
    gap: 18px;
}

.topbar-links {
    gap: 16px;
    flex-wrap: wrap;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 253, 252, .94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(15, 122, 79, .16);
}

.header-inner {
    min-height: 84px;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
}

.brand-emblem {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 16px;
    color: var(--green-dark);
}

.brand small {
    max-width: 280px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-inline: auto;
}

.main-nav a {
    padding: 10px 9px;
    border-radius: 6px;
    color: #26352f;
    font-size: 14px;
    white-space: nowrap;
}

.main-nav a:hover {
    background: var(--soft);
    color: var(--green-dark);
}

.header-actions {
    gap: 9px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.btn-primary {
    background: var(--green);
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 122, 79, .22);
}

.btn-primary:hover {
    background: var(--green-dark);
}

.btn-soft {
    background: #fff;
    color: var(--green-dark);
    border-color: var(--line);
}

.btn-light {
    background: rgba(255, 255, 255, .92);
    color: var(--green-dark);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
}

.hero {
    position: relative;
    min-height: 620px;
    display: grid;
    align-items: end;
    overflow: hidden;
    background: #10231b;
}

.hero-media {
    position: absolute;
    inset: 0;
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(9, 31, 23, .88), rgba(9, 31, 23, .48), rgba(9, 31, 23, .82)),
        linear-gradient(0deg, rgba(9, 31, 23, .82), rgba(9, 31, 23, .12) 55%);
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    padding: 96px 0 86px;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--gold);
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.section-heading h2,
.section-copy h2,
.cta-inner h2 {
    margin: 0;
    line-height: 1.25;
    letter-spacing: 0;
}

.hero h1 {
    max-width: 850px;
    font-size: 46px;
}

.hero p {
    max-width: 690px;
    margin: 20px 0 28px;
    color: #ecf8f3;
    font-size: 19px;
}

.hero-actions {
    gap: 12px;
    flex-wrap: wrap;
}

.stats-band {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 22px 0;
}

.stat-card {
    min-height: 118px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.stat-card strong {
    display: block;
    color: var(--green-dark);
    font-size: 36px;
    line-height: 1;
}

.stat-card span {
    color: var(--muted);
    font-weight: 700;
}

.section {
    padding: 82px 0;
}

.section-muted {
    background: var(--soft);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
    gap: 44px;
    align-items: center;
}

.section-copy h2,
.section-heading h2,
.page-hero h1 {
    font-size: 34px;
}

.section-copy p,
.section-heading p,
.page-hero p,
.prose p {
    color: var(--muted);
    font-size: 18px;
}

.text-link {
    display: inline-flex;
    margin-top: 10px;
    color: var(--green-dark);
    font-weight: 800;
    border-bottom: 2px solid rgba(15, 122, 79, .28);
}

.image-mosaic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.image-mosaic img,
.image-panel img,
.article-image {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.image-mosaic img {
    height: 340px;
}

.image-mosaic img:nth-child(2) {
    margin-top: 54px;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.service-grid,
.content-grid,
.people-grid,
.partners-grid {
    display: grid;
    gap: 18px;
}

.service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.content-card,
.person-card,
.partner-card,
.donation-card,
.contact-card,
.contact-form {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.service-card {
    min-height: 178px;
    padding: 24px;
    border-top: 4px solid var(--green);
}

.service-card:nth-child(2n) {
    border-top-color: var(--blue);
}

.service-card:nth-child(3n) {
    border-top-color: var(--red);
}

.service-card h3,
.content-card h3,
.person-card h3,
.partner-card h3,
.donation-card h3 {
    margin: 0 0 9px;
    font-size: 21px;
}

.service-card p,
.content-card p,
.person-card p,
.partner-card p,
.donation-card p {
    margin: 0;
    color: var(--muted);
}

.timeline {
    position: relative;
    display: grid;
    gap: 16px;
}

.timeline::before {
    content: "";
    position: absolute;
    inset-inline-start: 34px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background: linear-gradient(var(--green), var(--red), var(--blue));
}

body[dir="ltr"] .timeline::before {
    left: 34px;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 18px;
    align-items: start;
}

.timeline-item > span {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--green);
    color: var(--green-dark);
    font-size: 24px;
    font-weight: 900;
}

.timeline-item div {
    min-height: 96px;
    padding: 20px 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(16, 45, 33, .06);
}

.timeline-item h3 {
    margin: 0 0 6px;
}

.timeline-item p {
    margin: 0;
    color: var(--muted);
}

.people-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.people-grid-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.person-card {
    overflow: hidden;
}

.person-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.person-card div {
    padding: 20px;
}

.person-title {
    color: var(--green-dark) !important;
    font-weight: 800;
}

.content-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-card {
    overflow: hidden;
}

.content-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.content-card div {
    padding: 20px;
}

.tag {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(15, 122, 79, .1);
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 800;
}

.partners-highlight {
    grid-template-columns: minmax(0, 1fr) 320px;
}

.partner-logo,
.partner-card {
    display: grid;
    place-items: center;
    min-height: 230px;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.partner-logo img,
.partner-card img {
    max-height: 115px;
    object-fit: contain;
}

.partners-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.partner-card {
    text-align: center;
}

.page-hero {
    padding: 92px 0 76px;
    background:
        linear-gradient(135deg, rgba(15, 122, 79, .95), rgba(23, 33, 29, .96)),
        url("../media/صور من المركز/0K6A8990.JPG.jpeg") center / cover;
    color: #fff;
}

.page-hero-inner {
    max-width: 850px;
}

.page-hero p {
    color: #e8f4ef;
}

.prose {
    max-width: 820px;
}

.image-panel img {
    aspect-ratio: 4 / 3;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.filter-tabs a {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--muted);
    font-weight: 800;
}

.filter-tabs a.active,
.filter-tabs a:hover {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

.article-layout {
    max-width: 900px;
}

.article-image {
    aspect-ratio: 16 / 9;
    margin-bottom: 28px;
}

.donation-card {
    padding: 24px;
}

.donation-card strong {
    display: block;
    margin: 18px 0;
    padding: 12px;
    border-radius: 7px;
    background: var(--soft);
    color: var(--green-dark);
    font-size: 20px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
}

.contact-card,
.contact-form {
    padding: 24px;
}

.contact-card a,
.site-footer a,
.site-footer span {
    display: block;
    color: inherit;
    margin-bottom: 8px;
}

.contact-form {
    display: grid;
    gap: 14px;
}

.contact-form label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-weight: 800;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 12px 14px;
    font: inherit;
    background: #fff;
}

.form-success {
    padding: 12px 14px;
    border-radius: 7px;
    background: #e6f6ef;
    color: var(--green-dark);
    font-weight: 800;
}

.form-error,
.empty-state {
    color: var(--red);
    font-weight: 800;
}

.cta-band {
    padding: 52px 0;
    background: #101b17;
    color: #fff;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.cta-inner h2 {
    max-width: 680px;
    font-size: 30px;
}

.cta-inner div {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.site-footer {
    background: #07130f;
    color: #dbe9e3;
    padding: 54px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr .8fr .8fr;
    gap: 34px;
}

.footer-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    margin-bottom: 14px;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 12px;
    color: #fff;
}

.site-footer p {
    color: #b8cbc2;
}

.footer-bottom {
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s ease, transform .55s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 1020px) {
    .header-actions {
        display: none;
    }

    .main-nav {
        position: absolute;
        inset-inline: 16px;
        top: 92px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-toggle {
        display: block;
        margin-inline-start: auto;
    }

    .hero h1 {
        font-size: 36px;
    }

    .stats-grid,
    .service-grid,
    .content-grid,
    .people-grid,
    .partners-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split,
    .partners-highlight,
    .contact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 8px 0;
    }

    .brand small {
        max-width: 190px;
    }

    .hero {
        min-height: 560px;
    }

    .hero-content {
        padding: 72px 0 64px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 29px;
    }

    .hero p,
    .section-copy p,
    .section-heading p,
    .page-hero p,
    .prose p {
        font-size: 16px;
    }

    .section {
        padding: 58px 0;
    }

    .stats-grid,
    .service-grid,
    .content-grid,
    .people-grid,
    .partners-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        inset-inline-start: 24px;
    }

    .timeline-item {
        grid-template-columns: 52px 1fr;
        gap: 12px;
    }

    .timeline-item > span {
        width: 52px;
        height: 52px;
        font-size: 19px;
    }

    .timeline-item div {
        padding: 16px;
    }

    .image-mosaic {
        grid-template-columns: 1fr;
    }

    .image-mosaic img:nth-child(2) {
        margin-top: 0;
    }

    .cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
