/* ================================================================
   الهوية المشتركة للموقع العام (LIBAC)
   الخط Cairo مستضاف محليًا، الألوان من هوية المركز: أزرق #0056b3،
   ذهبي #c5a059، كحلي للأقسام الداكنة. يُحمَّل بعد أي CSS قديم للصفحة.
   ================================================================ */

@font-face { font-family: "Cairo"; src: url("../../assets/fonts/cairo/cairo-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Cairo"; src: url("../../assets/fonts/cairo/cairo-arabic-600-normal.woff2") format("woff2"); font-weight: 500 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Cairo"; src: url("../../assets/fonts/cairo/cairo-arabic-700-normal.woff2") format("woff2"); font-weight: 700 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Cairo"; src: url("../../assets/fonts/cairo/cairo-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Cairo"; src: url("../../assets/fonts/cairo/cairo-latin-600-normal.woff2") format("woff2"); font-weight: 500 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Cairo"; src: url("../../assets/fonts/cairo/cairo-latin-700-normal.woff2") format("woff2"); font-weight: 700 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122; }

:root {
    --lb-blue: #0056b3;
    --lb-blue-dark: #003f85;
    --lb-blue-soft: #e8f0fa;
    --lb-navy: #0b2340;
    --lb-navy-2: #10325a;
    --lb-gold: #c5a059;
    --lb-gold-dark: #9c7a3a;
    --lb-gold-soft: #f6efe1;
    --lb-ink: #1b2a3a;
    --lb-muted: #5b6a7b;
    --lb-line: #e2e8ef;
    --lb-surface: #f5f7fa;
    --lb-white: #ffffff;
    --lb-radius: 10px;
    --lb-radius-lg: 16px;
    --lb-shadow: 0 1px 2px rgba(11, 35, 64, .06), 0 8px 24px rgba(11, 35, 64, .06);
    --lb-container: 1200px;
    --lb-header-h: 76px;
    --lb-font: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;

    /* المتغيرات القديمة تتبع الهوية نفسها كي تتسق الصفحات التي لم تُعد بعد */
    --primary-color: var(--lb-blue);
    --primary-dark: var(--lb-blue-dark);
    --secondary-color: var(--lb-gold);
    --font-main: var(--lb-font);
}

body.libac-public {
    margin: 0;
    font-family: var(--lb-font);
    color: var(--lb-ink);
    background: var(--lb-white);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body.libac-public :where(input, button, select, textarea) { font-family: inherit; }
body.libac-public *, body.libac-public *::before, body.libac-public *::after { box-sizing: border-box; }

.lb-container { width: 100%; max-width: calc(var(--lb-container) + 48px); margin-inline: auto; padding-inline: 24px; }
.lb-skip {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 2000;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--lb-navy);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform .15s ease;
}
.lb-skip:focus, .lb-skip:focus-visible { transform: none; color: #fff; }
body.libac-public #main { scroll-margin-top: var(--lb-header-h); }
body.libac-public #main:focus { outline: none; }
.lb-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- الأزرار ---------- */
.lb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: var(--lb-radius);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.lb-btn i { font-size: .95em; }
.lb-btn-primary { background: var(--lb-blue); color: #fff; }
.lb-btn-primary:hover { background: var(--lb-blue-dark); color: #fff; }
.lb-btn-gold { background: var(--lb-gold); color: var(--lb-navy); }
.lb-btn-gold:hover { background: #d4b273; color: var(--lb-navy); }
.lb-btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; background: rgba(255, 255, 255, .06); }
.lb-btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .14); color: #fff; }
.lb-btn-outline { border-color: var(--lb-blue); color: var(--lb-blue); background: transparent; }
.lb-btn-outline:hover { background: var(--lb-blue); color: #fff; }
.lb-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lb-blue);
    font-weight: 700;
    text-decoration: none;
}
.lb-link i { font-size: .8em; transition: transform .18s ease; }
.lb-link:hover i { transform: translateX(-4px); }

body.libac-public :where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid var(--lb-gold);
    outline-offset: 2px;
}

/* ---------- رأس الصفحة ---------- */
body.libac-public #main-header.lb-header {
    position: sticky;
    top: 0;
    left: auto;
    width: 100%;
    z-index: 1000;
    padding: 0;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--lb-line);
    box-shadow: none;
    backdrop-filter: saturate(1.4) blur(10px);
    transition: box-shadow .2s ease;
}
body.libac-public #main-header.lb-header.is-scrolled { box-shadow: 0 6px 24px rgba(11, 35, 64, .08); padding: 0; }
.lb-header .lb-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: var(--lb-header-h);
    max-width: 1360px;
}

.lb-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--lb-navy); flex: 0 0 auto; }
.lb-brand-mark {
    position: relative;
    display: block;
    width: 54px;
    height: 46px;
    overflow: hidden;
    border-radius: 6px;
}
.lb-brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* لمعة ذهبية تعبر الشعار مرة عند فتح الصفحة ومرة عند تمرير المؤشر */
.lb-brand-mark::after {
    content: "";
    position: absolute;
    inset: -20% auto -20% 0;
    width: 45%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 236, 190, 0) 20%, rgba(255, 236, 190, .85) 50%, rgba(255, 236, 190, 0) 80%, transparent 100%);
    transform: translateX(-160%) skewX(-18deg);
    mix-blend-mode: screen;
    pointer-events: none;
    animation: lb-shine 1.4s .5s cubic-bezier(.4, 0, .2, 1) 1 both;
}
.lb-brand:hover .lb-brand-mark::after,
.lb-brand:focus-visible .lb-brand-mark::after { animation: lb-shine-again 1.1s cubic-bezier(.4, 0, .2, 1) 1 both; }
@keyframes lb-shine { from { transform: translateX(-160%) skewX(-18deg); } to { transform: translateX(330%) skewX(-18deg); } }
@keyframes lb-shine-again { from { transform: translateX(-160%) skewX(-18deg); } to { transform: translateX(330%) skewX(-18deg); } }

.lb-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.lb-brand-text strong { font-size: 1.0625rem; font-weight: 700; color: var(--lb-navy); }
.lb-brand-text span { font-size: .75rem; font-weight: 600; color: var(--lb-gold-dark); letter-spacing: .08em; direction: ltr; text-align: right; }

body.libac-public .lb-header nav { flex: 1 1 auto; display: flex; justify-content: flex-end; }
body.libac-public .lb-header .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
body.libac-public .lb-header .nav-links > li > a:not(.lb-nav-cta):not(.lb-nav-portal) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--lb-ink);
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
body.libac-public .lb-header .nav-links > li > a:not(.lb-nav-cta):not(.lb-nav-portal)::after { display: none; }
body.libac-public .lb-header .nav-links > li > a:not(.lb-nav-cta):not(.lb-nav-portal):hover { background: var(--lb-surface); color: var(--lb-blue); }
body.libac-public .lb-header .nav-links > li > a.active,
body.libac-public .lb-header .nav-links > li > a[aria-current="page"] { color: var(--lb-blue); background: transparent; box-shadow: inset 0 -2px 0 var(--lb-gold); border-radius: 8px 8px 0 0; }

/* الرأس صار ثابتًا ضمن التدفق (sticky)، فلا حاجة إلى إزاحة المحتوى تحت رأس عائم كما في التصميم السابق */
body.libac-public .news-public-main { padding-top: 48px; }
body.libac-public .lb-header .lb-nav-cta {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    margin-inline-start: 8px;
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--lb-blue);
    color: #fff;
    font-size: .9375rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
body.libac-public .lb-header .lb-nav-cta:hover { background: var(--lb-blue-dark); color: #fff; }
/* في صفحة التقديم نفسها يبقى الزر زرًا، بلون أغمق يدل على الصفحة الحالية */
body.libac-public .lb-header .nav-links > li > a.lb-nav-cta[aria-current="page"] { background: var(--lb-navy); color: #fff; box-shadow: none; border-radius: 8px; }
body.libac-public .lb-header .lb-nav-portal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--lb-line);
    border-radius: 8px;
    color: var(--lb-navy);
    background: #fff;
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
body.libac-public .lb-header .lb-nav-portal::after { content: none !important; }
body.libac-public .lb-header .lb-nav-portal:hover { border-color: var(--lb-blue); color: var(--lb-blue); }

body.libac-public .lb-header .menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--lb-line);
    border-radius: 8px;
    background: #fff;
    color: var(--lb-navy);
    font-size: 1.15rem;
    cursor: pointer;
}

@media (max-width: 1360px) {
    body.libac-public .lb-header .menu-toggle { display: inline-flex; order: 3; }
    body.libac-public .lb-header nav { flex: 0 0 auto; }
    body.libac-public .lb-header .nav-links {
        position: fixed;
        top: var(--lb-header-h);
        inset-inline: 0;
        bottom: auto;
        max-height: calc(100vh - var(--lb-header-h));
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 16px 20px;
        background: #fff;
        border-bottom: 1px solid var(--lb-line);
        box-shadow: 0 18px 40px rgba(11, 35, 64, .14);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .18s ease, transform .18s ease, visibility 0s .18s;
    }
    body.libac-public .lb-header .nav-links.active {
        transform: none;
        opacity: 1;
        visibility: visible;
        transition: opacity .18s ease, transform .18s ease;
    }
    body.libac-public .lb-header .nav-links > li > a:not(.lb-nav-cta):not(.lb-nav-portal) { display: flex; padding: 12px 12px; font-size: 1rem; }
    body.libac-public .lb-header .nav-links > li > a.active { box-shadow: inset -3px 0 0 var(--lb-gold); border-radius: 0 8px 8px 0; background: var(--lb-surface); }
    body.libac-public .lb-header .lb-nav-cta,
    body.libac-public .lb-header .lb-nav-portal { display: flex; width: 100%; margin: 8px 0 0; justify-content: center; min-height: 48px; }
}
@media (max-width: 520px) {
    :root { --lb-header-h: 66px; }
    .lb-brand-mark { width: 46px; height: 40px; }
    .lb-brand-text strong { font-size: .9375rem; }
}

/* ---------- رأس الصفحات الداخلية (موحّد) ---------- */
.lb-page-hero {
    position: relative;
    padding: 56px 0 48px;
    background: var(--lb-navy);
    color: #fff;
    overflow: hidden;
}
.lb-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 300px at 85% -20%, rgba(0, 86, 179, .55), transparent 70%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 10px);
    pointer-events: none;
}
.lb-page-hero > .lb-container { position: relative; }
.lb-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; font-size: .875rem; color: #b6c4d4; }
.lb-crumbs a { color: #dfe7f0; text-decoration: none; }
.lb-crumbs a:hover { color: #fff; text-decoration: underline; }
.lb-crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: #7d8fa4; }
.lb-page-hero h1 { margin: 0 0 10px; font-size: clamp(1.875rem, 3.2vw, 2.5rem); font-weight: 700; line-height: 1.3; color: #fff; }
.lb-page-hero p { margin: 0; max-width: 62ch; color: #c9d5e2; font-size: 1.0625rem; }
.lb-page-hero::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 120px;
    height: 3px;
    background: var(--lb-gold);
}

/* ---------- عناوين الأقسام ---------- */
.lb-section { padding: 88px 0; }
.lb-section.is-tinted { background: var(--lb-surface); }
.lb-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.lb-section-head h2 { margin: 0 0 8px; color: var(--lb-navy); font-size: clamp(1.625rem, 2.6vw, 2.125rem); font-weight: 700; line-height: 1.35; }
.lb-section-head p { margin: 0; max-width: 60ch; color: var(--lb-muted); font-size: 1.0625rem; }
.lb-section-head .lb-rule { display: block; width: 56px; height: 3px; margin-top: 14px; background: var(--lb-gold); border-radius: 2px; }

/* ---------- النماذج (تواصل معنا) ---------- */
.lb-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.lb-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lb-form-group { margin-bottom: 14px; }
.lb-form-group label { display: block; margin-bottom: 6px; color: var(--lb-ink); font-size: .9375rem; font-weight: 600; }
.lb-optional { color: var(--lb-muted); font-weight: 400; }
body.libac-public :is(.lb-contact-form, .lb-form-card) .form-control {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #c3cdd8;
    border-radius: var(--lb-radius);
    background: #fff;
    color: var(--lb-ink);
    font-size: 1rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
body.libac-public :is(.lb-contact-form, .lb-form-card) textarea.form-control { min-height: 128px; resize: vertical; line-height: 1.7; }
body.libac-public :is(.lb-contact-form, .lb-form-card) .form-control:focus { outline: none; border-color: var(--lb-blue); box-shadow: 0 0 0 3px rgba(0, 86, 179, .15); }
body.libac-public :is(.lb-contact-form, .lb-form-card) input[dir="ltr"] { text-align: left; }
.lb-captcha { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; }
.lb-captcha-q { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding-inline: 16px 4px; border: 1px dashed #c3cdd8; border-radius: var(--lb-radius); background: var(--lb-surface); color: var(--lb-navy); font-size: 1.0625rem; }
.lb-captcha-refresh { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--lb-muted); cursor: pointer; }
.lb-captcha-refresh:hover { background: #e8eef5; color: var(--lb-blue); }
.lb-captcha .form-control { text-align: center !important; }

@media (max-width: 560px) {
    .lb-form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .lb-captcha { grid-template-columns: minmax(0, 1fr) 96px; }
}

/* ---------- التذييل ---------- */
body.libac-public footer.lb-footer {
    margin: 0;
    padding: 64px 0 0;
    background: var(--lb-navy);
    color: #c9d5e2;
    font-size: .9375rem;
}
.lb-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: 40px;
    padding-bottom: 48px;
}
.lb-footer-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 16px; color: #fff; text-decoration: none; }
.lb-footer-brand img { width: 48px; height: auto; background: #fff; border-radius: 8px; padding: 4px; }
.lb-footer-brand strong { font-size: 1.0625rem; font-weight: 700; }
.lb-footer p { margin: 0 0 16px; max-width: 42ch; line-height: 1.8; }
.lb-footer h3 { margin: 0 0 16px; color: #fff; font-size: 1rem; font-weight: 700; }
.lb-footer ul { margin: 0; padding: 0; list-style: none; }
.lb-footer li + li { margin-top: 10px; }
.lb-footer a { color: #c9d5e2; text-decoration: none; }
.lb-footer a:hover { color: #fff; }
.lb-footer-contact li { display: flex; gap: 10px; align-items: baseline; }
.lb-footer-contact i { width: 16px; color: var(--lb-gold); }
.lb-footer-social { display: flex; gap: 10px; margin-top: 4px; }
.lb-footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    color: #fff;
}
.lb-footer-social a:hover { border-color: var(--lb-gold); color: var(--lb-gold); }
.lb-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding: 20px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: #93a4b8;
    font-size: .8125rem;
}
.lb-footer-bottom .libac-app-version { margin: 0; padding: 0; border: 0; color: #93a4b8; font-family: var(--lb-font); }

@media (max-width: 960px) {
    .lb-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lb-footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .lb-container { padding-inline: 18px; }
    .lb-section { padding: 64px 0; }
    .lb-section-head { flex-direction: column; align-items: flex-start; margin-bottom: 28px; }
    .lb-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
    .lb-footer-grid > :last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
    .lb-brand-mark::after { animation: none !important; display: none; }
    body.libac-public * { scroll-behavior: auto !important; }
}
