body.public-site .bg-primary { background-color: var(--primary) !important; }
body.public-site .text-primary { color: var(--primary) !important; }
body.public-site .bg-accent { background-color: var(--accent) !important; }
body.public-site .text-accent { color: var(--accent) !important; }
body.public-site .bg-navy { background-color: var(--navy) !important; }
body.public-site .text-navy { color: var(--navy) !important; }

/* Atlas: an ink side rail, a paper page, and a framed editorial spread. */
body[data-template="atlas"] {
    background: #f3eee4;
    color: var(--navy);
    font-family: "Times New Roman", "Noto Naskh Arabic", Georgia, serif;
}
body[data-template="atlas"] .site-header {
    position: fixed;
    display: flex;
    flex-direction: column;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 268px;
    z-index: 60;
    background: var(--navy);
    color: #f6f1e7;
    border-inline-end: 0;
}
body[data-template="atlas"] .top-strip {
    order: 2;
    background: transparent;
    color: #f6f1e7;
    padding: 8px 18px 22px;
}
body[data-template="atlas"] .top-strip-inner { min-height: 0; align-items: flex-start; }
body[data-template="atlas"] .top-contacts { flex-direction: column; gap: 8px; }
body[data-template="atlas"] .top-strip a { color: #f6f1e7; }
body[data-template="atlas"] .navbar {
    flex: 1;
    height: auto;
    min-height: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}
body[data-template="atlas"] .navbar-inner {
    width: auto;
    margin: 0;
    height: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100%;
    padding: 28px 18px 12px;
    gap: 22px;
}
body[data-template="atlas"] .logo,
body[data-template="atlas"] .logo strong,
body[data-template="atlas"] .logo small { color: #f6f1e7; }
body[data-template="atlas"] .nav-panel {
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
}
body[data-template="atlas"] .nav-links { flex-direction: column; gap: 4px; }
body[data-template="atlas"] .nav-links a {
    position: relative;
    border-radius: 0;
    color: #f6f1e7;
    padding-inline-start: 16px;
}
body[data-template="atlas"] .nav-links a::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform .3s ease;
}
body[data-template="atlas"] .nav-links a:hover { background: transparent; color: #fff; }
body[data-template="atlas"] .nav-links a:hover::before { transform: scaleY(1); }
body[data-template="atlas"] .lang-switch {
    border-radius: 0;
    background: transparent;
    border: 1px solid color-mix(in srgb, #fff 24%, transparent);
    justify-content: space-between;
}
body[data-template="atlas"] .lang-switch a { color: #f6f1e7; border-radius: 0; }
body[data-template="atlas"] .lang-switch a.active { background: var(--accent); color: #fff; }
body[data-template="atlas"] .btn-donate,
body[data-template="atlas"] .btn-ghost { border-radius: 0; box-shadow: none; }
body[data-template="atlas"] .btn-donate {
    position: relative;
    z-index: 0;
    overflow: hidden;
    margin-top: auto;
    justify-content: center;
    background: var(--accent);
}
body[data-template="atlas"] .btn-donate::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: color-mix(in srgb, #fff 18%, var(--navy));
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform .35s ease;
}
[dir="ltr"] body[data-template="atlas"] .btn-donate::before { transform-origin: left center; }
body[data-template="atlas"] .btn-donate:hover { transform: none; filter: none; }
body[data-template="atlas"] .btn-donate:hover::before { transform: scaleX(1); }
body[data-template="atlas"] .btn-ghost {
    color: var(--navy);
    border: 1px solid var(--navy);
    background: transparent;
    transition: background .3s ease, color .3s ease;
}
body[data-template="atlas"] .btn-ghost:hover { background: var(--navy); color: #f6f1e7; }
body[data-template="atlas"] main,
body[data-template="atlas"] .site-footer { margin-inline-start: 268px; }
body[data-template="atlas"] main { counter-reset: atlas; }
body[data-template="atlas"] .hero {
    min-height: 0;
    background: transparent !important;
    color: var(--navy) !important;
    overflow: hidden;
}
body[data-template="atlas"] .hero-slides { min-height: 0; }
body[data-template="atlas"] .hero-slide { position: relative; display: none; opacity: 1; inset: auto; }
body[data-template="atlas"] .hero-slide.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    min-height: 560px;
    align-items: stretch;
}
body[data-template="atlas"] .hero-visual {
    position: relative;
    order: 2;
    inset: auto;
    min-width: 0;
    min-height: 420px;
    margin: 28px;
    transform: none;
    animation: atlas-frame 1s cubic-bezier(.2, .7, .2, 1) both;
    box-shadow: 12px 12px 0 color-mix(in srgb, var(--accent) 70%, #fff);
}
body[data-template="atlas"] .hero-copy {
    order: 1;
    max-width: none;
    min-width: 0;
    padding: 64px 40px 88px;
    color: var(--navy);
}
body[data-template="atlas"] .hero-copy h1 {
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.35;
    letter-spacing: 0;
}
body[data-template="atlas"] .hero-slide.is-active .hero-copy h1,
body[data-template="atlas"] .hero-slide.is-active .hero-copy p,
body[data-template="atlas"] .hero-slide.is-active .hero-actions {
    animation: atlas-rise .7s ease both;
}
body[data-template="atlas"] .hero-slide.is-active .hero-copy p { animation-delay: .1s; }
body[data-template="atlas"] .hero-slide.is-active .hero-actions { animation-delay: .18s; }
body[data-template="atlas"] .hero-copy p,
body[data-template="atlas"] .hero-copy .text-white\/90 { color: #4c453c !important; }
body[data-template="atlas"] .hero-shapes { display: none; }
body[data-template="atlas"] .hero-nav {
    inset-inline: auto;
    inset-inline-start: 40px;
    bottom: 28px;
    justify-content: flex-start;
}
body[data-template="atlas"] .hero-nav button,
body[data-template="atlas"] .hero-dots button {
    border-radius: 0;
    border: 1px solid var(--navy);
    background: transparent;
    color: var(--navy);
}
body[data-template="atlas"] .hero-dots button.is-active {
    width: 26px;
    border-radius: 0;
    background: var(--accent);
    border-color: var(--accent);
}
body[data-template="atlas"] .kicker { letter-spacing: 0; text-transform: none; font-size: 1rem; }
body[data-template="atlas"] .section { padding: 72px 0; counter-increment: atlas; }
body[data-template="atlas"] .section-alt { background: #fffdf8; }
body[data-template="atlas"] .section-head::before {
    content: counter(atlas, decimal-leading-zero);
    display: block;
    margin-bottom: 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: .8rem;
    letter-spacing: .16em;
    color: var(--accent);
}
body[data-template="atlas"] .section-head h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 2px;
    margin-top: 12px;
    background: var(--navy);
}
body[data-template="atlas"] .program-icon {
    border-radius: 0;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
body[data-template="atlas"] .info-card,
body[data-template="atlas"] .program-card,
body[data-template="atlas"] .news-card {
    border-radius: 0;
    box-shadow: none;
    border: 0;
    border-top: 2px solid var(--navy);
    background: #fffdf8;
    transition: background .3s ease, border-color .3s ease;
}
body[data-template="atlas"] .info-card:hover,
body[data-template="atlas"] .program-card:hover,
body[data-template="atlas"] .news-card:hover {
    transform: none;
    box-shadow: none;
    background: #fff;
    border-top-color: var(--accent);
}
body[data-template="atlas"] .info-card.accent {
    background: var(--navy);
    color: #f6f1e7;
    border-top-color: var(--accent);
}
body[data-template="atlas"] .info-card.accent h3,
body[data-template="atlas"] .info-card.accent p { color: #f6f1e7; }
body[data-template="atlas"] .stats-section {
    background: transparent;
    color: var(--navy);
}
body[data-template="atlas"] .stats-section .section-head.light h2,
body[data-template="atlas"] .stats-section .section-head.light p,
body[data-template="atlas"] .stats-section .kicker { color: var(--navy); }
body[data-template="atlas"] .stats-section .section-head.light .kicker { color: var(--accent); }
body[data-template="atlas"] .stat-tile {
    text-align: start;
    background: transparent;
    border: 0;
    border-radius: 0;
    border-top: 2px solid var(--navy);
    transition: border-color .3s ease;
}
body[data-template="atlas"] .stat-tile:hover { transform: none; border-top-color: var(--accent); background: transparent; }
body[data-template="atlas"] .stat-tile i { color: var(--accent); }
body[data-template="atlas"] .stat-tile strong { color: var(--navy); }
body[data-template="atlas"] .stat-tile span { color: #5c5348; }
body[data-template="atlas"] .cta-band { background: transparent; padding: 0 0 72px; }
body[data-template="atlas"] .cta-inner {
    align-items: center;
    border: 1px solid #e0d5c3;
    border-inline-start: 8px solid var(--accent);
    background: #fffdf8;
    padding: 32px;
}
body[data-template="atlas"] .cta-inner h2,
body[data-template="atlas"] .cta-inner p { color: var(--navy); }
body[data-template="atlas"] .site-footer {
    background: var(--navy);
    color: #f6f1e7;
    border-top: 0;
}
body[data-template="atlas"] .footer-copy { background: #0c1730; color: #d9d0c2; }
body[data-template="atlas"] .social a { border-radius: 0; transition: background .25s ease; }
body[data-template="atlas"] .social a:hover { background: var(--accent); }
body[data-template="atlas"] .newsletter-form input,
body[data-template="atlas"] .newsletter-form button { border-radius: 0; }
body[data-template="atlas"] .newsletter-form button { background: var(--accent); }
@keyframes atlas-frame {
    from { clip-path: inset(14% 14% 14% 14%); }
    to { clip-path: inset(0); }
}
@keyframes atlas-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

/* Pulse: glass header, image hero, and raised sheets on a dark field. */
body[data-template="pulse"] {
    background:
        radial-gradient(900px 420px at 100% -10%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 60%),
        var(--navy);
    font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
}
body[data-template="pulse"] .site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: color-mix(in srgb, var(--navy) 82%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid color-mix(in srgb, #fff 14%, transparent);
}
body[data-template="pulse"] .top-strip { background: var(--accent); color: #fff; }
body[data-template="pulse"] .navbar { position: relative; background: transparent; border: 0; }
body[data-template="pulse"] .navbar-inner { min-height: 72px; background: transparent; }
body[data-template="pulse"] .logo,
body[data-template="pulse"] .logo strong,
body[data-template="pulse"] .logo small,
body[data-template="pulse"] .nav-links a,
body[data-template="pulse"] .lang-switch a { color: #fff; }
body[data-template="pulse"] .nav-toggle span { background: #fff; }
body[data-template="pulse"] .lang-switch { background: color-mix(in srgb, #fff 12%, transparent); }
body[data-template="pulse"] .lang-switch a.active { background: var(--accent); color: #fff; }
body[data-template="pulse"] .nav-links a {
    position: relative;
    border-radius: 10px;
    transition: color .25s ease, background .25s ease;
}
body[data-template="pulse"] .nav-links a::after {
    content: "";
    position: absolute;
    inset-inline: 12px;
    bottom: 4px;
    height: 2px;
    border-radius: 99px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform .3s ease;
}
[dir="ltr"] body[data-template="pulse"] .nav-links a::after { transform-origin: left center; }
body[data-template="pulse"] .nav-links a:hover { background: color-mix(in srgb, #fff 10%, transparent); color: #fff; }
body[data-template="pulse"] .nav-links a:hover::after { transform: scaleX(1); }
body[data-template="pulse"] .btn-donate,
body[data-template="pulse"] .btn-ghost { border-radius: 999px; transition: transform .25s ease, box-shadow .25s ease; }
body[data-template="pulse"] .btn-donate:hover { transform: translateY(-2px); box-shadow: 0 12px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
body[data-template="pulse"] .hero { min-height: min(88vh, 760px); overflow: hidden; }
body[data-template="pulse"] .hero-visual { opacity: .55; }
body[data-template="pulse"] .hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, color-mix(in srgb, var(--navy) 20%, transparent), color-mix(in srgb, var(--navy) 88%, transparent));
}
body[data-template="pulse"] .hero::after {
    content: "";
    position: absolute;
    z-index: 2;
    width: min(460px, 70vw);
    height: min(460px, 70vw);
    border-radius: 50%;
    inset-inline-end: -8%;
    top: 8%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 50%, transparent), transparent 68%);
    animation: pulse-orb 9s ease-in-out infinite;
    pointer-events: none;
}
body[data-template="pulse"] .hero-copy { max-width: min(720px, 100%); text-align: start; }
body[data-template="pulse"] .hero-copy h1 {
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1.25;
    letter-spacing: 0;
}
body[data-template="pulse"] .hero-slide.is-active .kicker,
body[data-template="pulse"] .hero-slide.is-active h1,
body[data-template="pulse"] .hero-slide.is-active p,
body[data-template="pulse"] .hero-slide.is-active .hero-actions {
    animation: pulse-rise .7s ease both;
}
body[data-template="pulse"] .hero-slide.is-active h1 { animation-delay: .08s; }
body[data-template="pulse"] .hero-slide.is-active p { animation-delay: .16s; }
body[data-template="pulse"] .hero-slide.is-active .hero-actions { animation-delay: .24s; }
body[data-template="pulse"] main {
    display: grid;
    gap: 18px;
    padding-block: 18px 8px;
    width: 100%;
    min-width: 0;
}
body[data-template="pulse"] main > * { min-width: 0; max-width: 100%; }
body[data-template="pulse"] .partners-track { max-width: 100%; }
body[data-template="pulse"] .section,
body[data-template="pulse"] .cta-band,
body[data-template="pulse"] .site-footer {
    width: min(1180px, calc(100% - 24px));
    margin-inline: auto;
    border-radius: 22px;
    clip-path: none;
}
body[data-template="pulse"] .section {
    background: #fff;
    color: var(--navy);
    padding: clamp(28px, 5vw, 72px) 0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
}
body[data-template="pulse"] .section-alt { background: #fff; color: var(--navy); }
body[data-template="pulse"] .section-alt .kicker,
body[data-template="pulse"] .section-alt h2,
body[data-template="pulse"] .section-alt p { color: inherit; }
body[data-template="pulse"] .stats-section {
    background: linear-gradient(145deg, var(--navy), var(--primary));
    color: #fff;
}
body[data-template="pulse"] .stats-section .section-head.light h2,
body[data-template="pulse"] .stats-section .section-head.light p { color: #fff; }
body[data-template="pulse"] .stat-tile {
    transition: transform .35s ease, background .35s ease;
}
body[data-template="pulse"] .stat-tile:hover { transform: translateY(-6px); background: color-mix(in srgb, #fff 16%, transparent); }
body[data-template="pulse"] .program-card,
body[data-template="pulse"] .news-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #e7edf6;
    border-bottom: 1px solid #e7edf6;
    background: #f8f9fa;
    box-shadow: none;
    transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease;
}
body[data-template="pulse"] .program-card::after,
body[data-template="pulse"] .news-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, .55) 50%, transparent 68%);
    transform: translateX(-130%);
    transition: transform .7s ease;
    pointer-events: none;
}
body[data-template="pulse"] .program-card:hover,
body[data-template="pulse"] .news-card:hover { transform: translateY(-8px); box-shadow: 0 16px 32px rgba(10, 25, 47, .12); }
body[data-template="pulse"] .program-card:hover::after,
body[data-template="pulse"] .news-card:hover::after { transform: translateX(130%); }
body[data-template="pulse"] .cta-band {
    background: linear-gradient(100deg, var(--accent), var(--primary));
    padding: clamp(28px, 4vw, 48px) 0;
}
body[data-template="pulse"] .site-footer { background: #0c1730; color: #e7edf8; padding-top: 36px; margin-bottom: 18px; }
body[data-template="pulse"] .footer-copy { background: transparent; }
body[data-template="pulse"] .social a { transition: transform .25s ease, background .25s ease; }
body[data-template="pulse"] .social a:hover { transform: translateY(-3px) scale(1.06); background: var(--accent); }
body[data-template="pulse"] .newsletter-form button { background: var(--accent); transition: transform .25s ease; }
body[data-template="pulse"] .newsletter-form button:hover { transform: translateY(-2px); }
@keyframes pulse-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
@keyframes pulse-orb {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-18px, 14px, 0) scale(1.08); }
}

@media (max-width: 980px) {
    body[data-template="atlas"] .site-header {
        position: sticky;
        display: block;
        width: auto;
        inset: auto;
        height: auto;
        background: #fffdf8;
        color: var(--navy);
        border-bottom: 1px solid #e0d5c3;
    }
    body[data-template="atlas"] .top-strip { order: 0; background: var(--navy); padding: 0; }
    body[data-template="atlas"] .top-strip-inner { min-height: 38px; align-items: center; }
    body[data-template="atlas"] .top-contacts { flex-direction: row; }
    body[data-template="atlas"] .navbar { height: auto; }
    body[data-template="atlas"] .navbar-inner {
        flex-direction: row;
        align-items: center;
        height: auto;
        min-height: 72px;
        padding: 8px 0;
    }
    body[data-template="atlas"] .logo,
    body[data-template="atlas"] .logo strong { color: var(--navy); }
    body[data-template="atlas"] .logo small { color: #5c5348; }
    body[data-template="atlas"] .nav-toggle span { background: var(--navy); }
    body[data-template="atlas"] .nav-panel {
        flex: none;
        background: #fffdf8;
        border: 1px solid #e0d5c3;
        border-radius: 0;
        top: calc(100% + 8px);
    }
    body[data-template="atlas"] .nav-links a { color: var(--navy); }
    body[data-template="atlas"] .lang-switch a { color: var(--primary); }
    body[data-template="atlas"] .lang-switch a.active { color: #fff; }
    body[data-template="atlas"] .btn-donate { margin-top: 8px; }
    body[data-template="atlas"] main,
    body[data-template="atlas"] .site-footer { margin-inline-start: 0; }
    body[data-template="atlas"] .hero-slide.is-active { display: block; min-height: 0; }
    body[data-template="atlas"] .hero-visual { min-height: 220px; margin: 16px; box-shadow: 8px 8px 0 color-mix(in srgb, var(--accent) 70%, #fff); }
    body[data-template="atlas"] .hero-copy { padding: 12px 20px 72px; }
    body[data-template="atlas"] .hero-copy h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
    body[data-template="atlas"] .hero-nav { inset-inline-start: 20px; }
    body[data-template="atlas"] .cta-inner { align-items: stretch; }
    body[data-template="atlas"] .newsletter-form { flex-direction: column; }
    body[data-template="pulse"] .hero { min-height: 0; }
    body[data-template="pulse"] .hero-copy { padding-block: 72px 88px; }
    body[data-template="pulse"] .hero-copy h1 { font-size: clamp(1.8rem, 8vw, 2.8rem); max-width: none; }
    body[data-template="pulse"] .hero::after { width: 220px; height: 220px; }
    body[data-template="pulse"] .nav-panel {
        background: color-mix(in srgb, var(--navy) 96%, #000);
        border: 1px solid color-mix(in srgb, #fff 16%, transparent);
        top: calc(100% + 8px);
    }
    body[data-template="pulse"] .nav-links a { color: #fff; }
    body[data-template="pulse"] .section,
    body[data-template="pulse"] .cta-band,
    body[data-template="pulse"] .site-footer { width: min(1180px, calc(100% - 16px)); border-radius: 16px; }
    body[data-template="pulse"] .newsletter-form { flex-direction: column; }
    body[data-template="pulse"] .cta-inner { align-items: stretch; }
}
