/* ============================================================================
   UniWeb — Unified Header Strip & Social Links
   شريط علوي موحّد بألوان هوية الموقع مع روابط التواصل القابلة للإدارة.
   ============================================================================ */

body.uw-public-body {
    --uw-header-strip-1: var(--uw-college-primary, var(--uw-qedu-navy, #063447));
    --uw-header-strip-2: var(--uw-college-primary-2, var(--uw-qedu-teal, #0b8793));
    --uw-header-strip-accent: var(--uw-college-accent, var(--uw-qedu-coral, #ff654d));
}

body.uw-public-body .uw-public-header .uw-top-strip {
    min-height: 38px !important;
    overflow: visible !important;
    color: #fff !important;
    border: 0 !important;
    background:
        linear-gradient(
            105deg,
            color-mix(in srgb, var(--uw-header-strip-1) 96%, #000 4%) 0%,
            var(--uw-header-strip-1) 42%,
            var(--uw-header-strip-2) 100%
        ) !important;
    box-shadow:
        inset 0 -1px 0 rgba(255, 255, 255, .14),
        0 5px 16px rgba(6, 52, 71, .10) !important;
}

body.uw-public-body .uw-public-header .uw-top-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .16;
    background:
        radial-gradient(circle at 18% 50%, rgba(255,255,255,.22), transparent 24%),
        linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
}

body.uw-public-body .uw-public-header .uw-top-strip::after {
    height: 2px !important;
    opacity: 1 !important;
    background: linear-gradient(
        90deg,
        transparent,
        color-mix(in srgb, var(--uw-header-strip-accent) 82%, #fff 18%),
        color-mix(in srgb, var(--uw-header-strip-2) 68%, #fff 32%),
        transparent
    ) !important;
}

body.uw-public-body .uw-public-header .uw-top-strip .container {
    position: relative;
    z-index: 1;
    width: min(1460px, calc(100vw - 26px));
    max-width: 1460px;
}

body.uw-public-body .uw-public-header .uw-top-strip-row {
    min-height: 38px !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

body.uw-public-body .uw-public-header .uw-top-strip-left,
body.uw-public-body .uw-public-header .uw-top-strip-right {
    min-width: 0;
    gap: 4px !important;
    flex-wrap: nowrap !important;
}

body.uw-public-body .uw-public-header .uw-top-strip-left {
    flex: 1 1 auto;
    overflow: hidden;
}

body.uw-public-body .uw-public-header .uw-top-strip-right {
    flex: 0 0 auto;
}

body.uw-public-body .uw-public-header .uw-top-strip-link {
    min-height: 28px !important;
    padding: .28rem .55rem !important;
    gap: .38rem !important;
    border: 1px solid transparent;
    border-radius: 10px !important;
    color: rgba(255,255,255,.92) !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: .76rem !important;
    font-weight: 750 !important;
    white-space: nowrap;
}

body.uw-public-body .uw-public-header .uw-top-strip-link i {
    color: rgba(255,255,255,.92) !important;
    font-size: .88rem !important;
}

body.uw-public-body .uw-public-header .uw-top-strip-link:hover,
body.uw-public-body .uw-public-header .uw-top-strip-link:focus-visible {
    color: #fff !important;
    border-color: rgba(255,255,255,.16) !important;
    background: rgba(255,255,255,.10) !important;
    transform: translateY(-1px) !important;
}

body.uw-public-body .uw-public-header .uw-top-strip-link:hover i,
body.uw-public-body .uw-public-header .uw-top-strip-link:focus-visible i {
    color: #fff !important;
    transform: none !important;
}

body.uw-public-body .uw-public-header .uw-top-contact-link span {
    overflow: hidden;
    max-width: 245px;
    text-overflow: ellipsis;
}

body.uw-public-body .uw-public-header .uw-top-strip-divider {
    width: 1px;
    height: 20px;
    margin-inline: 4px;
    flex: 0 0 auto;
    background: rgba(255,255,255,.22);
}

body.uw-public-body .uw-header-socials {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

body.uw-public-body .uw-header-social-link {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 9px;
    color: rgba(255,255,255,.94) !important;
    background: rgba(255,255,255,.065);
    box-shadow: none;
    text-decoration: none !important;
    transition:
        transform .16s ease,
        border-color .16s ease,
        background-color .16s ease,
        box-shadow .16s ease;
}

body.uw-public-body .uw-header-social-link::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 6px;
    opacity: 0;
    background: rgba(255,255,255,.14);
    transform: scale(.72);
    transition: opacity .16s ease, transform .16s ease;
}

body.uw-public-body .uw-header-social-link i {
    position: relative;
    z-index: 1;
    color: currentColor !important;
    font-size: .87rem;
    line-height: 1;
}

body.uw-public-body .uw-header-social-link:hover,
body.uw-public-body .uw-header-social-link:focus-visible {
    color: #fff !important;
    border-color: rgba(255,255,255,.40);
    background: rgba(255,255,255,.15);
    box-shadow: 0 6px 14px rgba(0,0,0,.12);
    transform: translateY(-2px);
}

body.uw-public-body .uw-header-social-link:hover::after,
body.uw-public-body .uw-header-social-link:focus-visible::after {
    opacity: 1;
    transform: scale(1);
}

body.uw-public-body .uw-public-header .uw-top-strip :where(.uni-outline-btn, .uni-primary-btn) {
    min-height: 29px !important;
    padding: .32rem .72rem !important;
    border-radius: 10px !important;
    font-size: .76rem !important;
    box-shadow: none !important;
}

body.uw-public-body .uw-public-header .uw-top-strip .uni-outline-btn {
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.38) !important;
    background: rgba(255,255,255,.10) !important;
}

body.uw-public-body .uw-public-header .uw-top-strip .uni-outline-btn:hover {
    color: var(--uw-header-strip-1) !important;
    border-color: #fff !important;
    background: #fff !important;
}

body.uw-public-body .uw-public-header .uw-top-strip .uni-primary-btn {
    color: var(--uw-header-strip-1) !important;
    border: 1px solid rgba(255,255,255,.78) !important;
    background: rgba(255,255,255,.96) !important;
}

@media (max-width: 1260px) {
    body.uw-public-body .uw-public-header .uw-top-contact-link span {
        max-width: 155px;
    }

    body.uw-public-body .uw-header-social-link {
        width: 27px;
        height: 27px;
        flex-basis: 27px;
    }
}

@media (max-width: 1080px) {
    body.uw-public-body .uw-public-header .uw-top-contact-link span {
        display: none;
    }

    body.uw-public-body .uw-public-header .uw-top-contact-link {
        width: 28px;
        padding: 0 !important;
        justify-content: center;
    }
}

@media (max-width: 860px) {
    body.uw-public-body .uw-public-header .uw-top-strip-row {
        flex-wrap: wrap !important;
        justify-content: center !important;
        padding-block: 4px;
    }

    body.uw-public-body .uw-public-header .uw-top-strip-left,
    body.uw-public-body .uw-public-header .uw-top-strip-right {
        flex: 0 1 auto;
        justify-content: center;
    }

    body.uw-public-body .uw-public-header .uw-top-strip-left {
        overflow: visible;
    }
}

@media (max-width: 620px) {
    body.uw-public-body .uw-public-header .uw-top-strip-left {
        order: 2;
        width: 100%;
    }

    body.uw-public-body .uw-public-header .uw-top-strip-right {
        order: 1;
        width: 100%;
    }

    body.uw-public-body .uw-public-header .uw-top-strip-divider,
    body.uw-public-body .uw-public-header .uw-top-contact-link {
        display: none !important;
    }

    body.uw-public-body .uw-header-socials {
        gap: 6px;
    }

    body.uw-public-body .uw-header-social-link {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    body.uw-public-body .uw-public-header .uw-header-search-link span,
    body.uw-public-body .uw-public-header .uw-top-strip-right > .uw-top-strip-link:first-child span {
        display: none;
    }
}

@media print {
    body.uw-public-body .uw-public-header .uw-top-strip {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.uw-public-body .uw-header-social-link,
    body.uw-public-body .uw-header-social-link::after,
    body.uw-public-body .uw-public-header .uw-top-strip-link {
        transition: none !important;
    }
}
