/* =====================================================
   جمعية السعادة البيضاوية - أنماط مشتركة لكل الصفحات
   1) شريط الهوية تحت الهيدر  2) عارض الصور المصغّر  3) الفوتر
   ===================================================== */
:root {
    --sd-blue: #1e3a8a;
    --sd-blue-light: #2563eb;
    --sd-green: #10b981;
    --sd-gold: #f59e0b;
    --sd-red: #ef4444;
    --sd-violet: #7c3aed;
    --sd-ink: #0b1226;
    --sd-ink-2: #111a33;
    --sd-line: rgba(255, 255, 255, 0.12);
    --sd-muted: #a9b4cc;
}

/* ---------- 1) شريط الهوية تحت الهيدر (أزرق | أخضر) ---------- */
header { position: sticky; top: 0; z-index: 1000; }
header::after {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--sd-blue) 0 50%, var(--sd-green) 50% 100%);
}
.nav-links a.active { box-shadow: inset 0 -3px 0 var(--sd-green); border-radius: 4px 4px 0 0; }

/* ---------- 2) عارض الصور المصغّر ---------- */
.sd-hero {
    position: relative;
    height: clamp(300px, 40vw, 540px);
    background: var(--sd-ink);
    color: #fff;
    overflow: hidden;
    direction: rtl;
}
.sd-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s;
}
.sd-slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.sd-slide-bg, .sd-slide-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sd-slide-video { opacity: 0; transition: opacity 0.5s ease; }
.sd-slide-video.is-playing { opacity: 1; }
.sd-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(270deg, rgba(11, 18, 38, 0.92) 0%, rgba(11, 18, 38, 0.72) 45%, rgba(11, 18, 38, 0.25) 100%);
}
.sd-slide-body {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 64px;
    display: flex;
    align-items: center;
    gap: 22px;
}
.sd-slide-logo {
    width: clamp(58px, 8vw, 84px);
    height: clamp(58px, 8vw, 84px);
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
    background: #fff;
}
.sd-slide-text { max-width: 620px; }
.sd-slide-tag {
    display: inline-block;
    padding: 3px 12px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
    color: #fff;
    background: var(--sd-accent, var(--sd-blue-light));
}
.sd-slide h2 {
    font-size: clamp(21px, 3.2vw, 34px);
    line-height: 1.35;
    font-weight: 800;
    margin: 0 0 6px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.sd-slide p {
    font-size: clamp(13px, 1.5vw, 16px);
    line-height: 1.7;
    margin: 0 0 14px;
    color: #e6ebf7;
    max-width: 52ch;
}
.sd-slide-cta {
    display: inline-block;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    background: var(--sd-accent, var(--sd-blue-light));
    transition: filter 0.2s ease, transform 0.2s ease;
}
.sd-slide-cta:hover { filter: brightness(1.12); transform: translateY(-2px); }
.sd-slide-cta:focus-visible, .sd-arrow:focus-visible, .sd-dot:focus-visible, .sd-pause:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}
.sd-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 38px;
    height: 38px;
    margin-top: -19px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.sd-arrow:hover { background: rgba(255, 255, 255, 0.34); }
.sd-prev { right: 14px; }
.sd-next { left: 14px; }
.sd-controls {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.sd-dot {
    width: 26px;
    height: 5px;
    border: none;
    padding: 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}
.sd-dot.is-active { width: 44px; background: #fff; }
.sd-pause {
    border: none;
    background: transparent;
    color: #fff;
    opacity: 0.75;
    font-size: 13px;
    cursor: pointer;
    margin-inline-start: 6px;
}
.sd-pause:hover { opacity: 1; }

@media (max-width: 640px) {
    .sd-slide-body { padding: 0 20px; gap: 12px; }
    .sd-slide-logo { display: none; }
    .sd-arrow { display: none; }
    .sd-slide p { display: none; }
    .sd-slide::before { background: rgba(11, 18, 38, 0.72); }
}
@media (prefers-reduced-motion: reduce) {
    .sd-slide { transition: none; }
}

/* ---------- 3) الفوتر (4 أعمدة متوازنة، بهوية الجمعية) ---------- */
/* footer.sd-footer أقوى من قاعدة footer القديمة الموجودة داخل كل صفحة */
footer.sd-footer { background: var(--sd-ink); color: var(--sd-muted); direction: rtl; font-size: 14px; text-align: start; padding: 0; margin: 0; border: 0; box-shadow: none; }
.sd-footer * { box-sizing: border-box; }
.sd-footer::before {
    content: "";
    display: block;
    height: 5px;
    background: linear-gradient(90deg, var(--sd-blue) 0 50%, var(--sd-green) 50% 100%);
}
.sd-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.sd-cols {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.35fr;
    gap: 44px;
    padding: 46px 0 40px;
    align-items: stretch;
}

/* العمود 1: الهوية */
.sd-brand-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.sd-brand-logo { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 2px solid var(--sd-blue-light); background: #fff; flex-shrink: 0; }
.sd-brand-head strong { display: block; color: #fff; font-size: 15px; line-height: 1.4; letter-spacing: 0.3px; }
.sd-brand-head span { display: block; color: #cbd5f0; font-size: 14px; margin-top: 2px; }
.sd-address { font-style: normal; line-height: 1.9; margin: 0 0 18px; }
.sd-address div { display: flex; gap: 10px; align-items: flex-start; }
.sd-address i { color: var(--sd-green); margin-top: 6px; width: 14px; text-align: center; flex-shrink: 0; }
.sd-social { display: flex; gap: 10px; flex-wrap: wrap; }
.sd-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, transform 0.2s ease;
}
.sd-social a:hover { background: var(--sd-green); transform: translateY(-3px); }
.sd-social a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.sd-brand-note { margin-top: 22px; padding: 12px 16px; border-radius: 8px; background: rgba(16,185,129,0.12); border-inline-start: 4px solid var(--sd-green); color: #fff; font-weight: 700; line-height: 1.7; }
.sd-brand-note small { display: block; color: var(--sd-muted); font-weight: 400; font-size: 13px; }

/* الأعمدة 2 و3: الروابط (قسمان في كل عمود) */
.sd-col h3 {
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--sd-accent, var(--sd-blue-light));
    display: inline-block;
}
.sd-sec + .sd-sec { margin-top: 28px; }
.sd-col ul { list-style: none; margin: 0; padding: 0; }
.sd-col li { margin-bottom: 10px; }
.sd-col li i { width: 18px; margin-inline-end: 6px; color: var(--sd-green); text-align: center; }
.sd-col a { color: var(--sd-muted); text-decoration: none; transition: color 0.2s ease; }
.sd-col a:hover { color: #fff; }
.sd-col a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sd-col .ltr { direction: ltr; display: inline-block; }

/* العمود 4: الخريطة (تملأ الارتفاع المتبقي) */
.sd-col-map { display: flex; flex-direction: column; }
.sd-col-map h3 { align-self: flex-start; }
.sd-map-box { flex: 1; display: flex; flex-direction: column; min-height: 240px; }
.sd-map-frame { display: block; width: 100%; flex: 1; min-height: 200px; border: 0; border-radius: 10px; background: #1a2340; }
.sd-map { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; padding: 9px 14px; border-radius: 6px; background: rgba(255,255,255,0.08); color: #fff !important; font-weight: 700; font-size: 13px; text-decoration: none; transition: background 0.2s ease; }
.sd-map:hover { background: var(--sd-green); }
.sd-map i { color: var(--sd-green); }
.sd-map:hover i { color: #fff; }
.sd-map:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* الشريط القانوني */
.sd-legal {
    border-top: 1px solid var(--sd-line);
    padding: 20px 0 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}
.sd-legal-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 15px; }
.sd-legal-brand img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.sd-legal nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sd-legal nav a, .sd-legal nav button {
    color: var(--sd-muted);
    text-decoration: none;
    background: none;
    border: none;
    padding: 2px 10px;
    font: inherit;
    cursor: pointer;
    border-inline-start: 1px solid var(--sd-line);
}
.sd-legal nav > :first-child { border-inline-start: none; }
.sd-legal nav a:hover, .sd-legal nav button:hover { color: #fff; }

@media (max-width: 1000px) {
    .sd-cols { grid-template-columns: 1fr 1fr; gap: 34px; }
    .sd-brand, .sd-col-map { grid-column: 1 / -1; }
    .sd-map-box { min-height: 260px; }
}
@media (max-width: 520px) {
    .sd-cols { grid-template-columns: 1fr; gap: 28px; padding: 34px 0 30px; }
    .sd-legal { flex-direction: column; text-align: center; }
    .sd-legal nav { justify-content: center; }
}

/* ---------- شريط الأخبار: حركة متصلة بدون فراغ ----------
   الأصل كان يترك الشريط فارغاً معظم الوقت (padding-right:100% + حركة لمرة واحدة).
   الآن المحتوى يُكرَّر مرة واحدة من saada.js وتدور الحركة بلا انقطاع. */
.ticker-wrap, .ticker-move { direction: ltr !important; }
.ticker-move { padding-right: 0 !important; animation: sdTicker var(--sd-ticker-time, 60s) linear infinite !important; }
@keyframes sdTicker {
    from { transform: translate3d(-50%, 0, 0); }
    to   { transform: translate3d(0, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .ticker-move { animation: none !important; transform: none; }
}

/* ---------- العارض: حجم أكبر ووضوح أفضل ---------- */
.sd-hero { min-height: 300px; }
.sd-slide-logo { width: clamp(70px, 9vw, 112px); height: clamp(70px, 9vw, 112px); border-width: 4px; }
.sd-slide-body { gap: 30px; padding: 0 76px; }
.sd-slide-text { max-width: 680px; }
.sd-slide-tag { font-size: clamp(13px, 1.3vw, 16px); padding: 5px 16px; margin-bottom: 12px; }
.sd-slide h2 { font-size: clamp(24px, 3.6vw, 48px); margin-bottom: 10px; }
.sd-slide p { font-size: clamp(14px, 1.7vw, 20px); margin-bottom: 20px; max-width: 46ch; }
.sd-slide-cta { font-size: clamp(14px, 1.4vw, 17px); padding: 12px 30px; border-radius: 8px; }
.sd-arrow { width: 48px; height: 48px; margin-top: -24px; font-size: 20px; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.35); }
.sd-arrow:hover { background: rgba(0, 0, 0, 0.6); }
.sd-controls { bottom: 18px; }
.sd-dot { height: 6px; width: 30px; }
.sd-dot.is-active { width: 52px; }

@media (max-width: 640px) {
    .sd-hero { height: 300px; }
    .sd-slide-body { padding: 0 22px; }
    .sd-slide h2 { font-size: 24px; }
}
