:root {
    /* الهوية اللونية للجمعية الجغرافية المصرية */
    --navy: #0C1F32;        /* كحلي أساسي */
    --navy-2: #142D46;      /* كحلي ثانوي */
    --navy-3: #1B3854;      /* كحلي فاتح للتدرج */
    --gold: #B18963;        /* ذهبي رئيسي */
    --gold-light: #D1A775;  /* ذهبي فاتح */
    --bronze: #8B5E2F;      /* برونزي غامق */
    --bronze-deep: #6C4211; /* بني برونزي */
    --ivory: #EED8B8;       /* عاجي */
    --gray-warm: #B1AAA0;   /* رمادي دافئ */

    /* أسماء قديمة معاد ربطها بالهوية الجديدة */
    --papyrus: #F6EEE1;
    --papyrus-light: #FBF6EC;
    --papyrus-dark: #EFE2CC;
    --papyrus-deep: #E2D3B8;
    --sepia: #8B5E2F;
    --brown: #142D46;
    --brown-dark: #0C1F32;
    --brown-deep: #081522;
    --terracotta: #B4552D;
    --lapis: #1B3854;
    --ink: #16222E;
    --ink-soft: #46555f;

    --navy-gradient: linear-gradient(135deg, #0C1F32 0%, #142D46 55%, #1B3854 100%);
    --gold-gradient: linear-gradient(135deg, #8B5E2F 0%, #B18963 50%, #D1A775 100%);
}

/* ---------- Global overflow & responsive hardening ---------- */
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
    background-color: var(--papyrus);
    color: var(--ink);
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
    /* يمنع أي كلمة طويلة (خاصة بالإنجليزي) من كسر التصميم */
    overflow-wrap: break-word;
    word-wrap: break-word;
}
img, svg, video, canvas, iframe { max-width: 100%; }
img { height: auto; }
table { max-width: 100%; }
pre, code { max-width: 100%; white-space: pre-wrap; word-break: break-word; }

a { text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
}

/* ---------- Force readable text in light mode ---------- */
:root {
    --text-on-light: var(--ink);
    --text-on-light-muted: var(--ink-soft);
}
:root:not([data-theme="dark"]) {
    --text-on-light: var(--ink);
    --text-on-light-muted: var(--ink-soft);
}
:root:not([data-theme="dark"]) .text-white,
:root:not([data-theme="dark"]) .text-white-50,
:root:not([data-theme="dark"]) .text-light {
    color: var(--ink) !important;
}
:root:not([data-theme="dark"]) a.text-white,
:root:not([data-theme="dark"]) a.text-white-50,
:root:not([data-theme="dark"]) a.text-light {
    color: var(--ink) !important;
}
:root:not([data-theme="dark"]) .badge.text-white,
:root:not([data-theme="dark"]) .badge.text-light {
    color: var(--ink) !important;
}
:root:not([data-theme="dark"]) .btn .text-white,
:root:not([data-theme="dark"]) .btn .text-light {
    color: var(--ink) !important;
}

/* ---------- EGS Photo Gallery ---------- */
.egs-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.egs-gallery-card {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--papyrus-deep);
    background: var(--papyrus-light);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.egs-gallery-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 28px rgba(12, 31, 50, 0.25);
    border-color: var(--gold);
}
.egs-gallery-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
    background: var(--ink);
}
.egs-gallery-card:hover img {
    transform: scale(1.04);
}
@media (max-width: 575.98px) {
    .egs-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
}

/* ---------- EGS Video Section ---------- */
.egs-video-section {
    padding: 2rem 0 0;
}
.video-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.egs-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    display: block;
}
.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 21, 34, 0.15) 0%, rgba(8, 21, 34, 0.75) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    pointer-events: none;
}
.video-caption {
    text-align: center;
    color: #F6EEE1;
}
.video-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    margin-bottom: 1rem;
    background: #fff;
}
.video-title {
    font-family: "Cairo", "Segoe UI", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.7);
}
.video-subtitle {
    font-family: "Cairo", sans-serif;
    font-size: 1.15rem;
    color: #E5DAC6;
    margin: 0;
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
@media (max-width: 767.98px) {
    .video-title { font-size: 1.4rem; }
    .video-subtitle { font-size: 0.95rem; }
    .video-logo { width: 50px; height: 50px; }
    .video-overlay { padding: 1.2rem 0.8rem; }
}

/* ---------- Top bar ---------- */
.top-bar {
    position: relative;
    z-index: 1080;
    color: #EED8B8;
    font-size: 0.82rem;
    background:
        radial-gradient(ellipse at 50% -120%, rgba(209, 167, 117, 0.3), transparent 60%),
        linear-gradient(90deg, #081522 0%, #0C1F32 28%, #142D46 50%, #0C1F32 72%, #081522 100%);
    border-bottom: 2px solid var(--gold-deep);
    box-shadow:
        inset 0 1px 0 rgba(209, 167, 117, 0.28),
        inset 0 0 0 1px rgba(209, 167, 117, 0.06),
        0 3px 10px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.2px;
}
.top-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold) 18%, var(--gold-light) 50%, var(--gold) 82%, transparent);
    pointer-events: none;
}

.topbar-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    min-height: 44px;
}
.topbar-group { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; min-width: 0; }
.topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.4rem;
}
.topbar-item + .topbar-item::before {
    content: "\2726";
    color: rgba(209, 167, 117, 0.55);
    font-size: 0.65rem;
    margin-inline-end: 0.25rem;
    text-shadow: 0 0 6px rgba(209, 167, 117, 0.6);
}
.topbar-item i, .topbar-link i, .topbar-icon-btn i { font-size: 0.95rem; line-height: 1; color: var(--gold-light); }
.topbar-date {
    opacity: 1;
    font-family: "Cairo", sans-serif;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #EED8B8;
    border: 1px solid rgba(209, 167, 117, 0.45);
    background: linear-gradient(180deg, rgba(209, 167, 117, 0.16), rgba(209, 167, 117, 0.05));
    border-radius: 999px;
    padding: 0.32rem 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 3px rgba(0, 0, 0, 0.25);
}
.top-bar a.topbar-link {
    color: var(--gold-light);
    font-weight: 700;
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(209, 167, 117, 0.45);
    background: linear-gradient(180deg, rgba(209, 167, 117, 0.18), rgba(209, 167, 117, 0.06));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.top-bar a.topbar-link:hover {
    background: linear-gradient(180deg, var(--gold), var(--gold-deep));
    border-color: var(--gold);
    color: var(--brown-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(177, 137, 99, 0.35);
}
.topbar-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(209, 167, 117, 0.35);
    background: rgba(255, 255, 255, 0.06);
    color: var(--gold-light);
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    cursor: pointer;
    max-width: 100%;
    min-width: 0;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.topbar-icon-btn .topbar-icon-label,
.lang-switch .topbar-icon-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-icon-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--brown-dark); }
.topbar-icon-btn:active { transform: scale(0.94); }
[data-theme="dark"] .topbar-icon-btn { color: #E9CFA5; }
[data-theme="dark"] .topbar-icon-btn:hover { color: #2b1c0d; }
.lang-dropdown .dropdown-menu {
    min-width: 9rem;
    border: 1px solid rgba(177, 137, 99, 0.35);
    box-shadow: 0 8px 20px rgba(12, 31, 50, 0.2);
}
.lang-dropdown .dropdown-menu .dropdown-item { font-weight: 700; padding: 0.45rem 1rem; }
.lang-dropdown .dropdown-menu .dropdown-item.active,
.lang-dropdown .dropdown-menu .dropdown-item:active { background: var(--gold); color: var(--brown-dark); }
.lang-dropdown .dropdown-menu .dropdown-item:not(.active):hover { background: var(--papyrus-light); color: var(--brown-dark); }
[data-theme="dark"] .lang-dropdown .dropdown-menu { background: #16304C; }
[data-theme="dark"] .lang-dropdown .dropdown-menu .dropdown-item { color: #E9CFA5; }
[data-theme="dark"] .lang-dropdown .dropdown-menu .dropdown-item:not(.active):hover { background: rgba(209, 167, 117, 0.12); color: #E9CFA5; }
@media (max-width: 575.98px) {
    .topbar-icon-btn { padding: 0.48rem 0.6rem; }
    .topbar-icon-btn .topbar-icon-label { font-size: 0.75rem; }
    .top-bar a.topbar-link { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-item { min-width: 0; }
}

/* إخفاء نص الزر على الشاشات الصغيرة جداً والإبقاء على الأيقونة فقط */
@media (max-width: 400px) {
    #themeLabel { display: none; }
    .lang-switch .topbar-icon-label { display: none; }
}


/* ---------- Header ---------- */
.site-header {
    position: relative;
    background:
        radial-gradient(ellipse 80% 120% at 50% -60%, rgba(177, 137, 99, 0.22), transparent 65%),
        linear-gradient(135deg, #FBF6EC 0%, #F0E4CF 100%);
    border-top: 3px solid var(--gold-deep);
    border-bottom: 2px solid var(--gold);
}

.site-header > .container { position: relative; z-index: 1; min-width: 0; }
.site-header .brand-link {
    min-width: 0;
    max-width: 100%;
}
.header-logo {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(12, 31, 50, 0.35), 0 0 0 3px rgba(177, 137, 99, 0.25);
}
.brand-cartouche {
    display: inline-flex;
    align-items: center;
    min-height: 62px;
    min-width: 0;
    padding: 0.45rem 1.6rem;
    border: 2px solid var(--gold-deep);
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(177, 137, 99, 0.15), inset 0 0 0 1px rgba(177, 137, 99, 0.35);
    background: linear-gradient(135deg, rgba(232, 240, 248, 0.6), rgba(200, 216, 236, 0.35));
    max-width: 100%;
}
[data-theme="dark"] .brand-cartouche {
    background: linear-gradient(135deg, rgba(58, 45, 28, 0.7), rgba(43, 33, 20, 0.55));
    box-shadow: 0 0 0 3px rgba(209, 167, 117, 0.12), inset 0 0 0 1px rgba(209, 167, 117, 0.3);
}
.brand-link:hover .brand-title { color: var(--gold-deep); }
.brand-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.3;
    text-align: center;
    min-width: 0;
    max-width: 100%;
}
.brand-title {
    font-family: "Cairo", "Segoe UI", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brown-dark);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.2s ease;
}
.brand-subtitle {
    font-size: 0.9rem;
    color: var(--sepia);
    font-weight: 700;
    font-family: "Cairo", sans-serif;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
@media (max-width: 575.98px) {
    .header-logo { width: 60px; height: 60px; }
    .brand-cartouche { padding: 0.4rem 0.9rem; min-height: 52px; }
    .brand-title { font-size: 0.98rem; }
    .brand-subtitle { font-size: 0.78rem; }
}
@media (max-width: 379.98px) {
    .brand-title { font-size: 0.88rem; }
    .brand-cartouche { padding: 0.35rem 0.7rem; }
}
.header-search { width: 320px; max-width: 100%; min-width: 0; }
.header-search .form-control { min-width: 0; }
.header-search .btn-search {
    background: linear-gradient(180deg, var(--navy-3), var(--navy-2));
    color: #fff !important;
    font-weight: 700;
    border: 1px solid var(--gold-deep);
}
.header-search .btn-search:hover { background: var(--navy-2); color: #fff !important; }

/* ---------- Main navigation ---------- */
.main-nav {
    background: linear-gradient(180deg, var(--brown) 0%, var(--brown-dark) 100%);
    box-shadow: 0 4px 12px rgba(8, 21, 34, 0.35);
    border-bottom: 2px solid var(--gold-deep);
    position: relative;
    z-index: 1070;
}
.main-nav .navbar-collapse { position: relative; z-index: 1071; }
.main-nav .navbar-nav { position: relative; z-index: 1072; }
.main-nav .navbar-toggler {
    border-color: rgba(209, 167, 117, 0.6);
    color: #fff;
}
.main-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(245,233,204,0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.nav-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: clip;
    overflow-y: visible;
    scrollbar-width: thin;
}
/* على الشاشات الكبيرة: خلي القائمة تلتف لسطر تاني بدل ما تتقص لو النص الإنجليزي طويل */
@media (min-width: 992px) {
    .nav-scroll { flex-wrap: wrap; overflow-x: visible; justify-content: center; }
}
.nav-scroll::-webkit-scrollbar { height: 4px; }
.nav-scroll::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
.main-nav .nav-item { position: relative; }
.main-nav .nav-link {
    color: #EED8B8;
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
    padding: 0.85rem 0.9rem;
    font-family: "Cairo", sans-serif;
}
.main-nav .nav-link:hover, .main-nav .nav-link:focus { color: var(--gold-light); }
.main-nav .nav-item.active > .nav-link { color: var(--gold-light); }
.main-nav .dropdown-menu {
    background: var(--papyrus-light);
    border: 1px solid var(--gold-deep);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 28px rgba(8, 21, 34, 0.25);
    min-width: 230px;
    z-index: 1080;
}
.main-nav .dropdown-item { padding: 0.55rem 1.1rem; font-weight: 700; color: var(--ink); font-size: 0.92rem; }
.main-nav .dropdown-item:hover { background: var(--gold); color: var(--brown-dark); }
.main-nav .dropdown-item + .dropdown-item { border-top: 1px solid var(--papyrus-deep); }

@media (max-width: 991.98px) {
    .main-nav .nav-scroll { flex-direction: column; overflow-x: visible; overflow-y: visible; }
    .main-nav .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .main-nav .nav-link { padding: 0.75rem 1rem; }
    .main-nav .navbar-nav { padding-bottom: 0.5rem; }
    .main-nav .dropdown-menu { min-width: 0; max-width: 100%; }
    .main-nav .dropdown-toggle::after { margin-inline-start: 0.45rem; }
}

/* ---------- زر الخطوط العريض (صفحة 404) ---------- */
.nf-actions .btn-hero-outline {
    border: 2px solid var(--gold-light);
    color: var(--gold-light);
    font-weight: 700;
    padding: 0.6rem 1.6rem;
    border-radius: 4px;
    font-family: "Cairo", sans-serif;
    font-size: 1.1rem;
}
.nf-actions .btn-hero-outline:hover { background: var(--gold-light); color: var(--brown-dark); }

/* ---------- Stats band ---------- */
.stats-band {
    background: linear-gradient(90deg, var(--gold-deep), var(--gold-light) 50%, var(--gold-deep));
    border-bottom: 2px solid var(--brown);
}
.stat-box { text-align: center; padding: 1.4rem 0.5rem; }
.stat-num { font-size: 2.3rem; font-weight: 800; color: var(--navy); font-family: "Cairo", sans-serif; }
.stat-label { font-weight: 700; color: var(--navy-2); }

/* ---------- Section title ---------- */
.section-title-wrap { display: flex; align-items: center; gap: 0.8rem; margin: 0 0 1.4rem; min-width: 0; }
.section-title { font-weight: 700; color: var(--brown-dark); margin: 0; font-size: 1.6rem; }
.section-title::before {
    content: "";
    display: inline-block;
    width: 26px;
    height: 26px;
    margin-left: 0.6rem;
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cg fill='none' stroke='%23b18963' stroke-width='1.8'%3e%3ccircle cx='12' cy='7' r='3'/%3e%3cpath d='M12 10 L12 20'/%3e%3cpath d='M7 14 L17 14'/%3e%3cpath d='M2 21 L7 15 L12 21 Z M12 21 L17 15 L22 21 Z'/%3e%3c/g%3e%3c/svg%3e") no-repeat center / contain;
    vertical-align: middle;
}
.section-title-line { flex: 1; height: 2px; min-width: 1.5rem; background: linear-gradient(to left, var(--gold), transparent); }
.section-more { font-weight: 700; color: var(--gold-deep); font-size: 0.9rem; }
.section-more:hover { color: var(--brown); }

/* ---------- Cards ---------- */
.item-card {
    background: var(--papyrus-light);
    border: 1px solid var(--papyrus-deep) !important;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.item-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold) !important;
    box-shadow: 0 10px 24px rgba(12, 31, 50, 0.22) !important;
}
.item-thumb { position: relative; height: 180px; overflow: hidden; background: var(--papyrus); }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.2rem 0.7rem;
    border-radius: 3px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold-light);
    background-color: var(--brown) !important;
    border: 1px solid var(--gold-deep);
    font-family: "Cairo", sans-serif;
}
.item-badge.bg-danger { background-color: var(--terracotta) !important; }
.item-badge.bg-primary { background-color: var(--lapis) !important; }
.item-badge.bg-warning { background-color: var(--gold) !important; color: var(--brown-dark) !important; }
.item-card .bg-success { background-color: var(--brown) !important; color: var(--gold-light) !important; }
.card-grid .card-title { font-weight: 700; color: var(--brown-dark); font-size: 1.1rem; }
.card-grid .card-subtitle { font-weight: 600; }
.card-grid .card-text { font-size: 0.92rem; color: var(--ink-soft); }
.item-card .card-footer { background-color: transparent !important; border-top: 1px solid rgba(177, 137, 99, 0.3); }

/* ---------- Feature cards ---------- */
.feature-card {
    background: var(--papyrus-light);
    border: 1px solid var(--papyrus-deep);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(12, 31, 50, 0.25); border-color: var(--gold) !important; }
.feature-thumb { position: relative; height: 340px; overflow: hidden; background: var(--papyrus); }
.feature-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.feature-card:hover .feature-thumb img { transform: scale(1.03); }
.feature-tag {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    padding: 0.3rem 0.9rem;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-family: "Cairo", sans-serif;
}
.feature-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex-grow: 1; }
.feature-title { color: var(--brown-dark); font-weight: 800; font-size: 1.45rem; line-height: 1.35; margin-bottom: 0.4rem; }
.feature-title:hover { color: var(--gold-deep); }
.feature-meta { font-size: 0.8rem; font-weight: 600; color: var(--sepia); margin-bottom: 0.7rem; }
.feature-text { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 1rem; flex-grow: 1; }
.feature-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--gold-deep);
    font-weight: 800;
    font-size: 0.9rem;
    align-self: flex-start;
}
.feature-more i { transition: transform 0.2s ease; }
.feature-card:hover .feature-more { color: var(--brown); }
[dir="rtl"] .feature-more i { transform: scaleX(-1); }
[dir="rtl"] .feature-card:hover .feature-more i { transform: scaleX(-1) translateX(-3px); }
[dir="ltr"] .feature-card:hover .feature-more i { transform: translateX(3px); }

.side-card {
    background: var(--papyrus-light);
    border: 1px solid var(--papyrus-deep);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.side-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(12, 31, 50, 0.2); border-color: var(--gold) !important; }
.side-thumb { position: relative; width: 42%; min-width: 130px; overflow: hidden; background: var(--papyrus); }
.side-thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-body { padding: 1rem 1.1rem; display: flex; flex-direction: column; }
.side-title { color: var(--brown-dark); font-weight: 800; font-size: 1.02rem; line-height: 1.35; margin-bottom: 0.3rem; }
.side-title:hover { color: var(--gold-deep); }
.side-text { color: var(--ink-soft); font-size: 0.88rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

[data-theme="dark"] .feature-card, [data-theme="dark"] .side-card { background: #16304C; }
[data-theme="dark"] .feature-title, [data-theme="dark"] .side-title { color: #E9CFA5; }
[data-theme="dark"] .feature-card:hover .feature-title, [data-theme="dark"] .side-card:hover .side-title { color: var(--gold-light); }
[data-theme="dark"] .feature-text, [data-theme="dark"] .side-text { color: #CBB89B; }
[data-theme="dark"] .feature-meta { color: #C9BBA4; }

@media (max-width: 991.98px) {
    .feature-thumb { height: 240px; }
    .side-card { flex-direction: column; }
    .side-thumb { width: 100%; min-width: 0; height: 170px; }
}
@media (max-width: 575.98px) {
    .feature-thumb { height: 200px; }
    .feature-title { font-size: 1.2rem; }
}

/* ---------- Page header ---------- */
.page-header {
    background:
        radial-gradient(circle at 85% 20%, rgba(209, 167, 117, 0.2), transparent 45%),
        var(--navy-gradient);
    color: #F6EEE1;
    padding: 2.6rem 0;
    margin-bottom: 2.2rem;
    position: relative;
    border-bottom: 2px solid var(--gold-deep);
    overflow: hidden;
}

.page-header .container { position: relative; z-index: 1; }
.page-header .breadcrumb { --bs-breadcrumb-divider-color: rgba(232, 240, 248, 0.6); margin: 0; }
.page-header .breadcrumb-item a { color: var(--gold-light); font-weight: 700; }
.page-header .breadcrumb-item.active { color: rgba(232, 240, 248, 0.85); }
.page-title { font-family: "Cairo", "Segoe UI", sans-serif; font-weight: 700; font-size: 2.1rem; margin: 0.3rem 0 0.2rem; }
.page-subtitle { color: #E5DAC6; margin: 0; max-width: 720px; font-family: "Cairo", sans-serif; font-size: 1.05rem; }

/* ---------- Content / static pages ---------- */
.content-card {
    background: var(--papyrus-light);
    border: 2px double var(--gold);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: inset 0 0 0 1px var(--papyrus-deep), 0 6px 18px rgba(12, 31, 50, 0.12);
}
[data-theme="dark"] .content-card {
    background: #16304C;
}
.content-card.bg-light { background: var(--papyrus); }
.lead-callout {
    border-right: 5px solid var(--gold);
    background: rgba(177, 137, 99, 0.13);
    padding: 1rem 1.2rem;
    border-radius: 6px;
    font-size: 1.12rem;
    color: var(--ink-soft);
    font-family: "Cairo", sans-serif;
}
.vision-card { border-radius: 8px; height: 100%; border: 1px solid var(--papyrus-deep); }
.vision-icon { font-size: 2.6rem; color: var(--gold-deep); }

.president-quote {
    border-right: 3px solid var(--gold);
    background: rgba(177, 137, 99, 0.10);
    padding: 0.7rem 0.9rem;
    border-radius: 6px;
    font-family: "Cairo", sans-serif;
    font-style: italic;
    color: var(--ink-soft);
}
.president-quote .bi-quote { color: var(--gold-deep); }


.timeline { position: relative; padding-right: 1.8rem; }
.timeline::before {
    content: "";
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: linear-gradient(var(--brown), var(--gold));
    border-radius: 3px;
}
.timeline-item { position: relative; margin-bottom: 1.4rem; }
.timeline-item::before {
    content: "";
    position: absolute;
    right: -1.55rem;
    top: 0.6rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--papyrus-light);
    box-shadow: 0 0 0 2px var(--brown);
}

/* Presidents page */
.current-president-card {
    background: linear-gradient(120deg, #0C1F32 0%, #081522 60%, #142D46 100%);
    border: 2px solid var(--gold);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(8, 21, 34, 0.45);
}
.current-president-card .lead-callout,
.current-president-card .president-quote {
    color: #E5DAC6;
    background: rgba(177, 137, 99, 0.13);
}
.current-president-card .president-quote {
    background: rgba(177, 137, 99, 0.10);
}
.current-president-card .text-muted {
    color: #C9BBA4 !important;
}
.current-president-card .text-success {
    color: #D1A775 !important;
}
.current-president-img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    border-radius: 10px;
    border: 4px solid var(--gold);
}
.current-president-name {
    font-family: "Cairo", sans-serif;
    font-weight: 700;
    font-size: 2.1rem;
    color: #E9CFA5;
}
.current-president-badge {
    background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
    color: #0C1F32;
    font-weight: 700;
    border-radius: 30px;
    padding: 0.4rem 1.1rem;
}
.president-row {
    border: 1px solid var(--papyrus-deep);
    border-radius: 10px;
    background: rgba(251, 246, 236, 0.85);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.president-row:hover { box-shadow: 0 6px 16px rgba(12, 31, 50, 0.14); }
[data-theme="dark"] .president-row { background: rgba(43, 33, 20, 0.55); }
.president-row-img { width: 100%; height: 200px; object-fit: cover; }
.president-term-badge {
    background: var(--gold);
    color: #fff;
    font-weight: 700;
    border-radius: 6px;
    padding: 0.25rem 0.8rem;
    display: inline-block;
}
.president-quote::before {
    content: "\F6B0";
    font-family: "bootstrap-icons", sans-serif;
    position: absolute;
    inset-inline-start: 0;
    color: var(--gold-deep);
}
.past-president-number {
    font-family: "Cairo", sans-serif;
    font-size: 1.05rem;
    color: var(--gold-deep);
    background: rgba(177, 137, 99, 0.14);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    border: 2px solid var(--gold);
}

.president-photo {
    width: 170px;
    max-width: 100%;
    height: 210px;
    object-fit: cover;
    border: 3px solid var(--gold);
    box-shadow: 0 6px 16px rgba(12, 31, 50, 0.16);
}

.president-mini {
    border: 1px solid var(--papyrus-deep);
    border-radius: 10px;
    background: rgba(251, 246, 236, 0.85);
    overflow: hidden;
    text-align: center;
    height: 100%;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.president-mini:hover {
    box-shadow: 0 8px 18px rgba(12, 31, 50, 0.16);
    transform: translateY(-3px);
    border-color: var(--gold);
}
.president-mini img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 2px solid var(--gold);
}
.president-mini-body { padding: 0.55rem 0.4rem; }
.president-mini-body strong {
    display: block;
    font-family: "Cairo", sans-serif;
    color: var(--brown-dark);
    font-size: 0.95rem;
    line-height: 1.25;
    min-height: 2.5em;
}
.president-mini-body small {
    color: var(--gold-deep);
    font-weight: 700;
    font-size: 0.8rem;
}
[data-theme="dark"] .president-mini { background: rgba(43, 33, 20, 0.55); }
[data-theme="dark"] .president-mini img { border-bottom-color: var(--gold-deep); }

/* LTR overrides */
html[dir="ltr"] .timeline { padding-right: 0; padding-left: 1.8rem; }
html[dir="ltr"] .timeline::before { right: auto; left: 6px; }
html[dir="ltr"] .timeline-item::before { right: auto; left: -1.55rem; }
html[dir="ltr"] .lead-callout { border-right: 0; border-left: 5px solid var(--gold); }
html[dir="ltr"] .president-quote { border-right: 0; border-left: 3px solid var(--gold); }
html[dir="ltr"] .custom-list { padding-right: 0; padding-left: 0; }

.team-photo { width: 100px; height: 100px; object-fit: cover; border-radius: 50%; border: 3px solid var(--gold); }

.structure-box {
    border: 2px solid var(--gold-deep);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    font-weight: 800;
    color: var(--brown-dark);
    background: var(--papyrus-light);
    font-family: "Cairo", sans-serif;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 150px;
}
.structure-box-img {
    width: 100%;
    height: 90px;
    object-fit: contain;
    background: linear-gradient(180deg, rgba(12, 31, 50, 0.85), rgba(8, 21, 34, 0.95));
    border-radius: 6px;
    border: 2px solid var(--gold);
    display: block;
}
a.structure-box-link:hover .structure-box {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    border-color: var(--gold);
}

/* قائمة أعضاء مجلس الإدارة في الرئيسية — مضغوطة لتقليل طول الصفحة مع تعدد الأعضاء */
.board-list-compact .structure-box {
    min-height: 0;
    padding: 0.45rem 0.5rem;
    gap: 0.15rem;
    line-height: 1.35;
}
.board-list-compact .structure-box > span { font-size: 0.86rem; }
@media (max-width: 575.98px) {
    .board-list-compact .structure-box { padding: 0.35rem 0.4rem; }
    .board-list-compact .structure-box > span { font-size: 0.8rem; }
}
.structure-line { text-align: center; color: var(--gold); font-weight: 700; }

/* ===== الهيكل التنظيمي: مجلس الإدارة · هيئة المكتب · الإدارة ===== */
.org-node {
    border: 2px solid var(--gold-deep);
    border-radius: 8px;
    background: var(--papyrus-light);
    color: var(--brown-dark);
    font-family: "Cairo", sans-serif;
    text-align: center;
    padding: 1rem 0.75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.org-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    border-color: var(--gold);
}
.org-node-lead { border-width: 3px; padding: 1.4rem 1rem; }
.org-node-office { border-color: var(--gold); }

.org-node-photo {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--gold);
    background: rgba(12, 31, 50, .06);
}
.org-node-photo-placeholder {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 3px dashed var(--gold-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gold-deep);
    background: rgba(12, 31, 50, .04);
}

.org-node-name { font-weight: 800; font-size: 1rem; line-height: 1.4; }
.org-node-role { font-size: 0.85rem; font-weight: 600; opacity: .8; }
.org-node .org-node-name + .org-node-role { color: var(--gold-deep); opacity: 1; }

/* خط الربط بين المستويات */
.org-connector {
    position: relative;
    height: 34px;
    margin: 0.75rem 0;
}
.org-connector::before {
    content: "";
    position: absolute;
    inset-inline-start: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--gold-deep);
    transform: translateX(-50%);
}
.org-connector::after {
    content: "";
    position: absolute;
    inset-inline-start: 50%;
    bottom: 0;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--gold-deep);
}

.org-group-label {
    text-align: center;
    font-weight: 800;
    color: var(--gold-deep);
    margin-bottom: 0.75rem;
}

@media (max-width: 575.98px) {
    .org-node-photo, .org-node-photo-placeholder { width: 68px; height: 68px; }
    .org-node-name { font-size: .9rem; }
    .org-node-role { font-size: .8rem; }
}
[data-theme="dark"] .org-node { background: #0F2135; border-color: #1E4066; color: var(--ink); }
[data-theme="dark"] .org-node .org-node-name + .org-node-role { color: var(--gold); }
[data-theme="dark"] .org-connector::before { background: #1E4066; }
[data-theme="dark"] .org-connector::after { border-top-color: #1E4066; }
[data-theme="dark"] .org-group-label { color: var(--gold); }

.contact-icon { font-size: 1.6rem; color: var(--gold-deep); }
.map-frame { border: 0; width: 100%; height: 420px; border-radius: 8px; }

.member-benefit { text-align: center; padding: 1.4rem 1rem; }
.member-benefit .bi, .member-benefit i { font-size: 2.4rem; color: var(--gold); }

.form-label { font-weight: 700; color: var(--ink); }
.form-control { background-color: #F6EEE1; border-color: var(--papyrus-deep); color: var(--ink); }
.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 0.25rem rgba(177, 137, 99, 0.2); background-color: #FFF9EE; color: var(--ink); }
.btn-primary-custom {
    background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
    color: var(--brown-dark) !important;
    font-weight: 700;
    border: 1px solid var(--gold-deep);
}
.btn-primary-custom:hover { background: linear-gradient(180deg, var(--gold), var(--brown)); color: var(--brown-dark) !important; }

[data-theme="dark"] .btn-primary-custom { 
    background: linear-gradient(180deg, var(--gold), var(--gold-deep)); 
    color: var(--brown-dark) !important; 
    border-color: var(--gold); 
}
[data-theme="dark"] .btn-primary-custom:hover { 
    background: linear-gradient(180deg, var(--gold-light), var(--gold)); 
    color: var(--brown-dark) !important; 
}

.btn-outline-success { color: var(--brown); border-color: var(--gold-deep); font-weight: 700; }
.btn-outline-success:hover { background: var(--gold); border-color: var(--gold-deep); color: var(--brown-dark); }

[data-theme="dark"] .btn-outline-success { 
    color: var(--gold-light); 
    border-color: var(--gold); 
}
[data-theme="dark"] .btn-outline-success:hover { 
    background: var(--gold); 
    border-color: var(--gold); 
    color: var(--brown-dark); 
}

.btn-outline-secondary { color: var(--brown); border-color: var(--gold-deep); font-weight: 700; background: transparent; }
.btn-outline-secondary:hover { background: var(--gold); border-color: var(--gold-deep); color: var(--brown-dark); }

[data-theme="dark"] .btn-outline-secondary { 
    color: var(--gold-light); 
    border-color: var(--gold); 
    background: transparent;
}
[data-theme="dark"] .btn-outline-secondary:hover { 
    background: var(--gold); 
    border-color: var(--gold); 
    color: var(--brown-dark); 
}

[data-theme="dark"] .btn-outline-secondary { 
    color: var(--gold-light); 
    border-color: var(--gold); 
    background: transparent;
}
[data-theme="dark"] .btn-outline-secondary:hover { 
    background: var(--gold); 
    border-color: var(--gold); 
    color: var(--brown-dark); 
}

.text-success { color: var(--brown) !important; }
.bg-papyrus {
    background: linear-gradient(180deg, rgba(238, 216, 184, 0.30), rgba(209, 167, 117, 0.16));
    border-top: 1px solid rgba(177, 137, 99, 0.3);
    border-bottom: 1px solid rgba(177, 137, 99, 0.3);
}

.custom-list { list-style: none; padding-right: 0; }
.custom-list li { position: relative; padding-right: 1.6rem; margin-bottom: 0.5rem; color: var(--ink-soft); }
.custom-list li::before {
    content: "\25C8";
    color: var(--gold);
    position: absolute;
    right: 0;
    font-size: 0.85rem;
    top: 0.1em;
}

.alert-success { background: var(--papyrus-light); color: var(--brown-dark); border-color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer {
    background: linear-gradient(180deg, var(--brown-dark), var(--brown-deep));
    color: #E5DAC6;
    margin-top: 2.25rem;
    border-top: 3px solid var(--gold);
}
.footer-logo { width: 44px; height: 44px; border-radius: 50%; }
.footer-title { color: #fff; font-weight: 700; font-family: "Cairo", "Segoe UI", sans-serif; font-size: 1.05rem; }
.footer-heading { color: var(--gold-light); font-weight: 700; margin-bottom: 0.6rem; font-family: "Cairo", sans-serif; font-size: 1rem; }
.footer-text { color: #a08060; font-size: 0.85rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.3rem; }
.footer-links a { color: #a08060; font-size: 0.85rem; }
.footer-links a:hover { color: var(--gold-light); }
.footer-social { display: flex; gap: 0.5rem; margin-top: 0.7rem; }
.footer-social a {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px;
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
}
.footer-social a:hover { background: var(--gold); color: var(--brown-dark); }
.btn-footer-subscribe { background: linear-gradient(180deg, var(--gold-light), var(--gold-deep)); color: #fff; font-weight: 700; border: 1px solid var(--gold-deep); }
.btn-footer-subscribe:hover { background: var(--gold); color: var(--brown-dark); }
.footer-contact { list-style: none; padding: 0; margin: 0.6rem 0 0; color: #a08060; font-size: 0.84rem; }
.footer-contact li { margin-bottom: 0.3rem; }
.footer-bottom { background: rgba(0, 0, 0, 0.3); border-top: 1px solid rgba(177, 137, 99, 0.35); }
.footer-bottom a { color: #a08060; font-size: 0.8rem; }
.footer-bottom a:hover { color: var(--gold-light); }


/* ---------- Hero slider ---------- */
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.4s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(8, 21, 34, 0.72) 0%, rgba(12, 31, 50, 0.45) 45%, rgba(12, 31, 50, 0.12) 100%);
    z-index: 0;
}
.hero-search { max-width: 560px; margin-top: 1.2rem; }
.hero-search .form-control { border: 1px solid var(--gold-deep); background-color: rgba(232, 240, 248, 0.94); color: var(--ink); }
.hero-search .btn-hero { border: 1px solid var(--gold-deep); border-radius: 0 4px 4px 0; }

/* ---------- Quotes ---------- */
.quotes-strip { background: var(--papyrus-light); border-top: 1px solid rgba(177, 137, 99, 0.35); border-bottom: 1px solid rgba(177, 137, 99, 0.35); }
.quote-card, .quote-card-sm {
    position: relative;
    background: var(--papyrus-light);
    border: 1px solid var(--papyrus-deep);
    border-radius: 8px;
    padding: 1.3rem 1.6rem 1.1rem 1.2rem;
    box-shadow: 0 4px 14px rgba(12, 31, 50, 0.1);
}
.quote-card-sm { border-right: 4px solid var(--gold); }
.quote-mark {
    font-family: "Cairo", sans-serif;
    font-size: 2.6rem;
    line-height: 0.6;
    color: var(--gold);
    text-align: right;
    margin-bottom: 0.6rem;
}
.quote-text { font-family: "Cairo", sans-serif; font-size: 1.15rem; color: var(--ink); }
.quote-text-sm { font-family: "Cairo", sans-serif; font-size: 0.98rem; color: var(--ink-soft); margin-bottom: 0.7rem; }
.quote-footer { border-top: 1px dashed var(--gold); padding-top: 0.6rem; margin-top: 0.6rem; color: var(--sepia); }

/* ---------- Quiz ---------- */
.quiz-option { padding: 0.5rem 0.8rem; border: 1px solid var(--papyrus-deep); border-radius: 6px; background: #f5ecd7; cursor: pointer; }
.quiz-option:hover { border-color: var(--gold); }
.quiz-option.option-correct { background: #d9f0d5; border-color: #2e8b57; }
.quiz-option.option-wrong { background: #f6d6d0; border-color: var(--terracotta); }
.quiz-score { font-size: 2.6rem; font-weight: 800; color: var(--brown); font-family: "Cairo", sans-serif; }

/* ---------- Admin ---------- */
.admin-stat { color: inherit; text-decoration: none; border: 1px solid var(--papyrus-deep); transition: all 0.2s ease; }
.admin-stat:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 8px 18px rgba(12, 31, 50, 0.18); }
.admin-stat h2 { color: var(--brown-dark); }
.admin-stat:hover h2 { color: var(--gold-deep); }

/* ---------- Floating print/share ---------- */
.floating-actions { position: fixed; bottom: 1.2rem; left: 1.2rem; z-index: 1050; display: flex; flex-direction: column; gap: 0.6rem; }
.floating-actions .floating-btn {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
    color: #fff; border: 2px solid var(--brown-dark);
    box-shadow: 0 4px 14px rgba(8, 21, 34, 0.4);
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}
.floating-actions .floating-btn:hover { transform: translateY(-3px); }

.floating-actions .scroll-top-btn {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.floating-actions .scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media print {
    .top-bar, .main-nav, .site-footer,
    .floating-actions, .page-header::after, .hero-slides, .hero-overlay { display: none !important; }
    .content-card, .card { box-shadow: none !important; }
}

/* ---------- Page header texture ---------- */
.page-header { background:
    radial-gradient(circle at 85% 20%, rgba(209, 167, 117, 0.2), transparent 45%),
    var(--navy-gradient); }

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
    --papyrus: #081220;
    --papyrus-light: #0E2033;
    --papyrus-dark: #16304C;
    --papyrus-deep: #1E4066;
    --sepia: #D1A775;
    --brown: #D1A775;
    --brown-dark: #E9CFA5;
    --brown-deep: #050B14;
    --gold: #B18963;
    --gold-light: #E9CFA5;
    --gold-deep: #B18963;
    --terracotta: #D97B57;
    --lapis: #6FA3D8;
--ink: #F2ECE0;
    --ink-soft: #CBC5B8;
}
[data-theme="dark"] body {
    background-color: var(--papyrus);
    color: var(--ink);
}
[data-theme="dark"] .main-nav {
    background: linear-gradient(180deg, #081220 0%, #0B1928 50%, #0F2135 100%);
    border-bottom-color: var(--gold-deep);
}
[data-theme="dark"] .main-nav .nav-link {
    color: #E9CFA5;
}
[data-theme="dark"] .main-nav .nav-link:hover, 
[data-theme="dark"] .main-nav .nav-link:focus { 
    color: var(--gold-light); 
}
[data-theme="dark"] .main-nav .nav-item.active > .nav-link { 
    color: var(--gold-light); 
}
[data-theme="dark"] .main-nav .dropdown-menu { 
    background: #0F2135; 
    border-color: #1E4066; 
}
[data-theme="dark"] .main-nav .dropdown-item { 
    color: #E9CFA5; 
}
[data-theme="dark"] .main-nav .dropdown-item:hover { 
    background: var(--gold); 
    color: var(--brown-dark); 
}
[data-theme="dark"] .main-nav .dropdown-item + .dropdown-item { 
    border-top-color: #1E4066; 
}

[data-theme="dark"] .site-header { background: linear-gradient(135deg, #0F2135 0%, #16304C 100%); }
[data-theme="dark"] .content-card { background: #0F2135; border-color: #1E4066; }
[data-theme="dark"] .item-card { background: #0F2135; border-color: #1E4066; }
[data-theme="dark"] .feature-card { background: #0F2135; border-color: #1E4066; }
[data-theme="dark"] .side-card { background: #0F2135; border-color: #1E4066; }
[data-theme="dark"] .main-nav .dropdown-menu { background: #0F2135; border-color: #1E4066; }
[data-theme="dark"] .form-control { background-color: #142A42; border-color: #1E4066; color: var(--ink); }
[data-theme="dark"] .quiz-option { background: #142A42; border-color: #1E4066; }
[data-theme="dark"] .header-search .form-control,
[data-theme="dark"] .navbar-collapse .form-control {
    background-color: #1E4066;
    border-color: #B18963;
    color: #EED8B8;
}
[data-theme="dark"] .header-search .form-control::placeholder,
[data-theme="dark"] .navbar-collapse .form-control::placeholder { color: #B9C7D8; }
[data-theme="dark"] .header-search .form-control:focus,
[data-theme="dark"] .navbar-collapse .form-control:focus {
    background-color: #0B1928;
    border-color: #E9CFA5;
    color: #EED8B8;
    box-shadow: 0 0 0 0.25rem rgba(177, 137, 99, 0.25);
}
[data-theme="dark"] .quotes-strip { background: #0B1928; }
[data-theme="dark"] .bg-papyrus { background: linear-gradient(180deg, rgba(15, 11, 6, 0.6), rgba(43, 33, 20, 0.6)); }
[data-theme="dark"] .quote-card-sm, [data-theme="dark"] .admin-stat { background: #0F2135; border-color: #1E4066; }
[data-theme="dark"] .president-row { background: rgba(26, 19, 8, 0.55); }
[data-theme="dark"] .president-mini { background: rgba(26, 19, 8, 0.55); border-color: #1E4066; }
[data-theme="dark"] .structure-box { background: #0F2135; border-color: #1E4066; color: var(--ink); }
[data-theme="dark"] .structure-box-img { border-color: #1E4066; }
[data-theme="dark"] .cinema-card { background: rgba(26, 19, 8, 0.98); border-color: #1E4066; color: var(--ink); }
[data-theme="dark"] .cinema-card h5 { color: var(--ink); }
[data-theme="dark"] .cinema-card .cinema-card-meta { color: var(--ink-soft); }
[data-theme="dark"] .egs-gallery-card { background: #0F2135; border-color: #1E4066; }
[data-theme="dark"] .egs-gallery-card img { filter: brightness(0.9); }
[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(209,167,117,0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
[data-theme="dark"] .cinema-scene {
    background: linear-gradient(135deg, #050B14 0%, #0F2135 55%, #16304C 100%);
}
[data-theme="dark"] .cinema-scene .cinema-sky {
    background: radial-gradient(circle at 50% 30%, rgba(177, 137, 99, 0.22), transparent 55%),
        linear-gradient(180deg, #050B14 0%, #16304C 70%, #1E4066 100%);
}
[data-theme="dark"] .cinema-scene .cinema-title { color: #F6EEE1; }
[data-theme="dark"] .cinema-scene .cinema-text { color: #C9BBA4; }
[data-theme="dark"] .cinema-scene .cinema-eyebrow { color: #E9CFA5; border-bottom-color: rgba(177, 137, 99, 0.4); }
[data-theme="dark"] .cinema-section { background: linear-gradient(180deg, #081220 0%, #0F2135 100%); }
[data-theme="dark"] .cinema-section .section-title { color: #E9CFA5; }
[data-theme="dark"] .cinema-note { color: #C9BBA4; }
[data-theme="dark"] .cinema-slider { background: transparent; }
[data-theme="dark"] .site-footer { background: linear-gradient(180deg, #081220, #050B14); }
[data-theme="dark"] .top-bar { background: linear-gradient(90deg, #080503 0%, #0B1928 28%, #0F2135 50%, #0B1928 72%, #080503 100%); }
[data-theme="dark"] .hero { background: linear-gradient(135deg, #081220 0%, #0F2135 55%, #16304C 100%); }
[data-theme="dark"] .page-header { background: linear-gradient(135deg, #081220, #16304C); }
[data-theme="dark"] .stats-band { background: linear-gradient(90deg, #8B5E2F, #B18963 50%, #8B5E2F); }
[data-theme="dark"] .current-president-card { background: linear-gradient(120deg, #0C1F32 0%, #081522 60%, #142D46 100%); border-color: var(--gold); }
[data-theme="dark"] .lead-callout { background: rgba(177, 137, 99, 0.13); border-color: var(--gold); }
[data-theme="dark"] .president-quote { background: rgba(177, 137, 99, 0.10); border-color: var(--gold); }
[data-theme="dark"] .btn-primary-custom { background: linear-gradient(180deg, #B18963, #B18963); border-color: #B18963; }
[data-theme="dark"] .btn-primary-custom:hover { background: linear-gradient(180deg, #E9CFA5, #B18963); }
[data-theme="dark"] .egs-video-overlay { background: linear-gradient(180deg, rgba(10, 7, 4, 0.15) 0%, rgba(10, 7, 4, 0.80) 100%); }
[data-theme="dark"] .card-footer { background-color: transparent !important; border-top-color: #1E4066; }

/* ---------- Dark theme: readable text && contrast fixes ---------- */
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6,
[data-theme="dark"] .section-title, [data-theme="dark"] .feature-title,
[data-theme="dark"] .side-title, [data-theme="dark"] .card-grid .card-title,
[data-theme="dark"] .structure-box { color: #EFE2C6; }
[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary,
[data-theme="dark"] .breadcrumb-item.active { color: #C9C4B8 !important; }
[data-theme="dark"] .text-success { color: #C9AA7D !important; }
[data-theme="dark"] .footer-text { color: #C7A987; }
[data-theme="dark"] .form-label { color: #F0E9DB; }
[data-theme="dark"] .floating-ad { background: #0F2135; border-color: #1E4066; border-inline-start-color: var(--gold); }
[data-theme="dark"] .floating-ad-title { color: #F0E9DB; }
[data-theme="dark"] .floating-ad-title i { color: #D1A775; }
[data-theme="dark"] .floating-ad-close { color: #C9C4B8; }
[data-theme="dark"] .btn-primary-custom,
[data-theme="dark"] .btn-outline-success:hover,
[data-theme="dark"] .btn-outline-secondary:hover,
[data-theme="dark"] .btn-footer-subscribe:hover,
[data-theme="dark"] .main-nav .dropdown-item:hover,
[data-theme="dark"] .lang-dropdown .dropdown-menu .dropdown-item.active,
[data-theme="dark"] .lang-dropdown .dropdown-menu .dropdown-item:active,
[data-theme="dark"] .top-bar a.topbar-link:hover,
[data-theme="dark"] .nf-actions .btn-hero-outline:hover,
[data-theme="dark"] .footer-social a:hover,
[data-theme="dark"] .item-badge.bg-warning,
[data-theme="dark"] .item-card .bg-success {
    color: #24160A !important;
}

/* ---------- Cinematic scroll scenes ---------- */
.cinema-scene {
    position: relative;
    height: 220vh;
    background: var(--navy-gradient);
    overflow: hidden;
    color: var(--papyrus-light);
}
.cinema-scene .cinema-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cinema-scene .cinema-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    will-change: transform, opacity, filter;
}
.cinema-scene .cinema-content {
    position: relative;
    z-index: 5;
    max-width: 720px;
    text-align: center;
    padding: 1.5rem;
    text-shadow: 0 2px 12px rgba(6, 14, 22, 0.85);
}
.cinema-scene .cinema-eyebrow {
    color: #E9CFA5;
    font-family: "Cairo", sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(209, 167, 117, 0.5);
    display: inline-block;
    padding-bottom: 0.4rem;
    margin-bottom: 1rem;
}
.cinema-scene .cinema-title {
    font-family: "Cairo", "Segoe UI", sans-serif;
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 1rem;
    color: #F6EEE1;
}
.cinema-scene .cinema-text {
    font-size: 1.1rem;
    color: #E5DAC6;
    max-width: 600px;
    margin: 0 auto 1.4rem;
}
.cinema-scene .cinema-bg {
    background-repeat: repeat;
    background-size: auto;
    background-position: center;
}
.cinema-scene .cinema-sky {
    background: radial-gradient(circle at 50% 30%, rgba(209, 167, 117, 0.28), transparent 55%),
        linear-gradient(180deg, #081522 0%, #142D46 70%, #1B3854 100%);
    opacity: 0.9;
}
.cinema-scene .cinema-papyrus {
    background-image: radial-gradient(rgba(209, 167, 117, 0.10) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.5;
}

.cinema-scene .cinema-vignette {
    background: radial-gradient(ellipse at center, transparent 40%, rgba(6, 14, 22, 0.55) 100%);
}
.cinema-scene .cinema-line {
    height: 3px;
    width: 120px;
    margin: 0 auto 1.2rem;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}
.cinema-scene .btn-hero {
    background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
    color: var(--navy);
    font-weight: 700;
    padding: 0.6rem 1.6rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-family: "Cairo", sans-serif;
    font-size: 1.1rem;
    text-shadow: none;
}
.cinema-scene .btn-hero:hover { background: var(--gold); color: var(--navy); }
.cinema-scene .btn-hero-outline {
    border: 2px solid #E9CFA5;
    color: #F6EEE1;
    font-weight: 700;
    padding: 0.6rem 1.6rem;
    border-radius: 4px;
    font-family: "Cairo", sans-serif;
    font-size: 1.1rem;
    background: rgba(8, 21, 34, 0.35);
}
.cinema-scene .btn-hero-outline:hover { background: #E9CFA5; color: var(--navy); }
.cinema-scene .hero-search .btn-hero { border-radius: 0 4px 4px 0; color: var(--navy); }
@media (max-width: 767.98px) {
    .cinema-scene { height: auto; min-height: 100vh; }
    .cinema-scene .cinema-stage { position: relative; top: auto; height: auto; padding: 4rem 1rem; }
    .cinema-scene .cinema-title { font-size: 1.8rem; }
}

/* ---------- Infinite card slider (drag + seamless loop) ---------- */
.cinema-slider {
    overflow: hidden;
    padding: 1.6rem 0;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.cinema-slider.dragging { cursor: grabbing; }
.cinema-slider.dragging .cinema-card { pointer-events: none; }
.cinema-track {
    display: flex;
    width: max-content;
    will-change: transform;
}
.cinema-card {
    width: 300px;
    flex: 0 0 300px;
    margin-inline-end: 1.2rem;
    background: rgba(251, 246, 236, 0.98);
    border: 2px solid var(--gold-deep);
    border-radius: 10px;
    overflow: hidden;
    color: var(--navy);
    box-shadow: 0 8px 20px rgba(6, 14, 22, 0.35);
}
.cinema-card-img {
    position: relative;
    padding: 8px;
    background: linear-gradient(160deg, var(--gold-light) 0%, var(--gold-deep) 60%, #a07a52 100%);
    border-radius: 8px;
}
.cinema-card-img::after {
    content: "";
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 5px;
    pointer-events: none;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}
.cinema-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    object-position: center;
    display: block;
    pointer-events: none;
    border-radius: 4px;
    background: var(--papyrus-light);
}
[data-theme="dark"] .cinema-card img {
    background: #0F2135;
}
.cinema-card .cinema-card-body { padding: 0.9rem 1rem; }
.cinema-card h5 { font-family: "Cairo", sans-serif; font-size: 1.15rem; margin-bottom: 0.35rem; color: var(--navy); }
.cinema-card .cinema-card-meta { font-size: 0.85rem; color: var(--bronze-deep); }
@media (max-width: 575.98px) {
    .cinema-card { width: 240px; flex: 0 0 240px; }
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(6, 14, 22, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.lightbox.show { display: flex; }
.lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 92vw;
    max-height: 90vh;
}
.lightbox-img {
    max-width: 88vw;
    max-height: 70vh;
    border: 3px solid rgba(209, 167, 117, 0.5);
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.7);
    cursor: zoom-in;
    transition: transform 0.25s ease;
    user-select: none;
    -webkit-user-drag: none;
    object-fit: contain;
}
.lightbox-img.zoomed {
    transform: scale(1.6);
    cursor: zoom-out;
}
.lightbox-info {
    text-align: center;
    margin-top: 1rem;
    color: #EED8B8;
    max-width: 700px;
}
.lightbox-title {
    font-family: "Cairo", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #F6EEE1;
    margin-bottom: 0.3rem;
}
.lightbox-photographer {
    font-size: 0.85rem;
    color: #E9CFA5;
    margin-bottom: 0.2rem;
}
.lightbox-photographer::before { content: "\1F4F7 "; }
.lightbox-caption {
    font-size: 0.9rem;
    color: #C9BBA4;
    margin-bottom: 0.3rem;
}
.lightbox-counter {
    font-size: 0.8rem;
    color: rgba(209, 167, 117, 0.6);
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(177, 137, 99, 0.3);
    border: 1px solid rgba(209, 167, 117, 0.4);
    color: #E9CFA5;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2010;
    transition: background 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.lightbox-nav:hover { background: rgba(177, 137, 99, 0.6); transform: translateY(-50%) scale(1.1); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-close {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    background: transparent;
    border: none;
    color: #E9CFA5;
    font-size: 2.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2010;
}
.lightbox-close:hover { color: #fff; }
.lightbox-hint {
    position: absolute;
    bottom: 1.2rem;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(209, 167, 117, 0.5);
    font-size: 0.8rem;
    pointer-events: none;
}
img.lightbox-trigger { cursor: zoom-in; }
@media (max-width: 767.98px) {
    .lightbox-nav { width: 40px; height: 40px; font-size: 1.5rem; }
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
    .lightbox-title { font-size: 1.1rem; }
}

/* ---------- Mobile smoothness ---------- */
a, button, .btn, input, select, textarea, label { -webkit-tap-highlight-color: transparent; }
a, button, .btn { touch-action: manipulation; }

@media (max-width: 767.98px) {
    body { background-attachment: scroll, scroll; }
}

@media (max-width: 575.98px) {

    .content-card { padding: 1.1rem; }
    .section-title { font-size: 1.3rem; }
    .page-header { padding: 1.8rem 0; margin-bottom: 1.6rem; }
    .page-title { font-size: 1.6rem; }
    .current-president-img { height: 240px; }
    .president-row-img { height: 170px; }
    .president-mini img { height: 120px; }
    .hero-title { font-size: 1.55rem; }
    .hero { padding: 2.2rem 0; }
    .item-thumb { height: 150px; }
    .stat-num { font-size: 1.7rem; }
    .current-president-name { font-size: 1.6rem; }
    .lead-callout { font-size: 1.02rem; }
    .floating-actions { bottom: 0.9rem; left: 0.9rem; }
    .floating-actions .floating-btn { width: 42px; height: 42px; }
}

@media (hover: none) {
    .item-card:hover { transform: none; }
    .admin-stat:hover { transform: none; }
    .president-row:hover { box-shadow: none; }
}

/* ---------- Book reader (flip pages) ---------- */
.reader-page {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
}

.reader-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    background: rgba(177, 137, 99, 0.12);
    border-bottom: 1px solid rgba(177, 137, 99, 0.25);
}

.reader-title {
    font-size: 1.25rem;
    margin: 0;
    flex: 1 1 auto;
    min-width: 12rem;
}

.reader-controls,
.reader-tools {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.reader-counter {
    min-width: 5.5rem;
    text-align: center;
    font-weight: 600;
    color: var(--brown);
}

.reader-zoom-level {
    min-width: 3rem;
    text-align: center;
    font-weight: 600;
    color: var(--brown);
}

.book-stage {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1.5rem 0.5rem;
    background:
        linear-gradient(rgba(12, 31, 50, 0.06), rgba(12, 31, 50, 0.10)),
        radial-gradient(ellipse at center, #FBF6EC 0%, #E2D3B8 100%);
    transition: height 0.3s ease;
}

.reader-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: var(--brown);
    font-weight: 600;
}

#book {
    margin: 0 auto;
}

@media (max-width: 576px) {
    .reader-toolbar { justify-content: center; }
    .reader-title { text-align: center; flex-basis: 100%; }
}

/* ---------- Image protection ---------- */
.egs-gallery-card img,
.gallery-protected {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
}


/* ============================================================
   الهوية الجديدة: مكونات إضافية
   ============================================================ */

/* ---------- ساعة التوب بار ---------- */
.topbar-clock { color: #EED8B8; font-weight: 700; font-variant-numeric: tabular-nums; }
.topbar-clock i { color: var(--gold-light); }

/* ---------- شريط الإعلانات ---------- */
.announcement-bar {
    background: var(--gold-gradient);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
.announcement-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 42px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}
.announcement-icon {
    flex-shrink: 0;
    font-size: 1.05rem;
    animation: announcementPulse 2.2s ease-in-out infinite;
}
@keyframes announcementPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.15); opacity: 1; }
}
.announcement-items {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.announcement-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
a.announcement-item:hover strong { text-decoration: underline; }
.announcement-cta {
    background: var(--navy);
    color: #F6EEE1 !important;
    border-radius: 999px;
    padding: 0.12rem 0.65rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a.announcement-item:hover .announcement-cta {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(8, 21, 34, 0.45);
}
[dir="ltr"] .announcement-cta i { transform: scaleX(-1); }
.announcement-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    padding: 0 0.3rem;
}
.announcement-close:hover { opacity: 1; }

/* ---------- الإعلان العائم ---------- */
.floating-ad {
    position: fixed;
    bottom: 96px;
    inset-inline-end: 22px;
    z-index: 1045;
    width: 300px;
    height: 114px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    background: var(--papyrus-light);
    border: 1px solid var(--papyrus-deep);
    border-inline-start: 4px solid var(--gold);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(8, 21, 34, 0.28);
    padding: 0.85rem 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.floating-ad.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.floating-ad-title {
    font-weight: 800;
    color: var(--navy);
    font-size: 0.95rem;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    min-height: 0;
    padding-inline-start: 1.35rem;
}
.floating-ad-title i { flex-shrink: 0; margin-top: 0.28rem; color: var(--bronze-deep); margin-inline-start: -1.35rem; }
.floating-ad-title span {
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.floating-ad .btn-primary-custom { margin-bottom: 0.15rem; }
.floating-ad-close {
    position: absolute;
    top: 4px;
    inset-inline-start: 8px;
    background: transparent;
    border: none;
    color: var(--ink-soft);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem;
}
.floating-ad-close:hover { color: var(--terracotta); }
@media (max-width: 575.98px) {
    .floating-ad { bottom: 86px; inset-inline-end: 16px; width: min(300px, calc(100vw - 32px)); height: 114px; }
}

/* ---------- الأزرار العائمة: واتساب + سهم لأعلى ---------- */
.floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(8, 21, 34, 0.30);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.whatsapp-btn {
    background: #25D366;
    color: #fff;
}
.whatsapp-btn:hover {
    background: #1EBE5A;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(37, 211, 102, 0.45);
}
.scroll-top-btn {
    background: var(--navy-gradient);
    color: var(--gold-light);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s, transform 0.2s ease, box-shadow 0.2s ease;
}
.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(12, 31, 50, 0.45);
}

/* ---------- أيقونات السوشيال في الفوتر ---------- */
.footer-social {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}
.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(246, 238, 225, 0.08);
    border: 1px solid rgba(209, 167, 117, 0.45);
    color: var(--gold-light);
    font-size: 1.1rem;
    transition: all 0.22s ease;
}
.footer-social a:hover {
    background: var(--gold-gradient);
    border-color: transparent;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(177, 137, 99, 0.4);
}

/* ---------- Powered by ---------- */
.powered-by { font-size: 0.82rem; color: rgba(246, 238, 225, 0.55); }
.powered-by a { color: var(--gold-light); font-weight: 700; }
.powered-by a:hover { text-decoration: underline; }

/* ---------- صناديق الإحصائيات بأيقونات ---------- */
.stat-box i.stat-icon {
    display: block;
    font-size: 1.7rem;
    color: var(--bronze-deep);
    margin-bottom: 0.35rem;
}

/* ---------- صناديق الأقسام (structure) بأيقونات ---------- */
.structure-box .box-icon {
    font-size: 2rem;
    color: var(--gold);
}

/* ---------- بطاقات الفيديو ---------- */
.video-logo {
    filter: drop-shadow(0 4px 12px rgba(8, 21, 34, 0.5));
}

/* ---------- إحصائيات الزوار (الداشبورد) ---------- */
.visitor-stat {
    background: var(--papyrus-light);
    border: 1px solid var(--papyrus-deep);
    border-radius: 10px;
    padding: 0.9rem 0.5rem;
}
.visitor-icon {
    font-size: 1.5rem;
    color: var(--gold);
}
.visitor-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

/* ---------- صورت قسم "أقسام الموقع": ظهور كامل بدون قص ---------- */
.structure-box-img {
    width: 100%;
    height: 90px;
    object-fit: contain;
    background: linear-gradient(180deg, rgba(12, 31, 50, 0.85), rgba(8, 21, 34, 0.95));
    border-radius: 6px;
    border: 2px solid var(--gold);
    display: block;
}

/* ---------- Responsive شامل: موبايل + تاب ---------- */
@media (max-width: 991.98px) {
    .structure-box { min-height: 120px; padding: 0.7rem; }
    .structure-box .box-icon { font-size: 1.5rem; }
    .structure-box-img { height: 72px; }
}

@media (max-width: 767.98px) {
    .structure-box { min-height: 96px; gap: 0.4rem; }
    .structure-box-img { height: 58px; }
}

@media (max-width: 575.98px) {
    .structure-box { min-height: 84px; padding: 0.5rem; font-size: 0.86rem; }
    .structure-box .box-icon { font-size: 1.2rem; }
    .structure-box-img { height: 46px; }
    .stat-box i.stat-icon { font-size: 1.35rem; }
    .visitor-icon { font-size: 1.15rem; }
    .card-grid .card-title { font-size: 1rem; }
    .card-grid .card-text { font-size: 0.85rem; }
    .feature-title { font-size: 1.1rem; }
    .lead-callout { font-size: 0.98rem; }
}

/* منع overflow أفقي على الشاشات الصغيرة + تثبيت حدود الصور الفيديو/الصور */
@media (max-width: 575.98px) {
    body, html { overflow-x: hidden; }
    .video-wrapper { aspect-ratio: 16 / 10; }
    .video-title { font-size: 1.2rem; }
    .video-subtitle { font-size: 0.85rem; }
    .video-logo { width: 42px; height: 42px; margin-bottom: 0.6rem; }
    .video-overlay { align-items: center; }
    .president-photo { width: 140px; height: 175px; }
    .item-thumb { height: 150px; }
    .side-thumb { height: 140px; }
    .current-president-img { height: 220px; }
    .president-mini img { height: 125px; }
    .content-card img { max-width: 100%; height: auto; }
    .lead-callout img { max-width: 100%; height: auto; }
    .card-text img { max-width: 100%; height: auto; }
    .feature-body img, .side-body img { max-width: 100%; height: auto; }
}

/* ---------- تثبيت حجم الصفحة وموحّدية الكروت والصور ---------- */
html { overflow-x: clip; }
body { overflow-x: clip; }
main[role="main"] { min-width: 0; }

@media (min-width: 1400px) {
    .container { max-width: 1280px; }
}

.card-grid .card { height: 100%; }
.card-grid .card-body { display: flex; flex-direction: column; flex-grow: 1; }
.card-grid .card-body .card-text { flex-grow: 1; }
.card-grid .card-img-top { aspect-ratio: 16 / 10; object-fit: cover; }
.feature-card, .side-card, .structure-box { height: 100%; }
.egs-gallery-card { height: 100%; }

/* ---------- تظبيط وش الموقع على الموبايل ---------- */
@media (max-width: 575.98px) {
    .announcement-inner { gap: 0.5rem; }
    .announcement-icon { font-size: 0.9rem; }
    .announcement-item { font-size: 0.84rem; gap: 0.35rem; }
    .hero-search { width: 100%; }
    .hero-search .btn-hero, .hero-search .form-control { white-space: normal; }
    .btn { white-space: normal; text-align: center; }
    .page-subtitle { font-size: 0.95rem; }
    .footer-social { flex-wrap: wrap; }
}
