/* ================================================================
   QAMSA PUBLIC UI — SHARED RESPONSIVE FOUNDATION
   SECTION: IDENTITY / PUBLIC SHELL
   Purpose: shared mobile-first behaviour for public pages.
   Pages: index.php, categories.php, sub_cat.php, content_details.php
   ================================================================ */

:root {
    --qamsa-primary: #0d6efd;
    --qamsa-radius: 20px;
    --qamsa-mobile-nav-height: 70px;
    --qamsa-header-height: 64px;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    padding-bottom: 0;
}

/* ================================================================
   SECTION: PUBLIC HEADER
   ================================================================ */
.qamsa-public-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
    border-radius: 0 !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.qamsa-header-main {
    min-height: var(--qamsa-header-height);
}

.qamsa-brand {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 1.15rem;
    letter-spacing: -.03em;
}

.qamsa-brand-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(13,110,253,.10);
}

.qamsa-desktop-nav {
    border-top: 1px solid rgba(108,117,125,.10);
}

.qamsa-desktop-nav .qamsa-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 7px 10px;
    color: var(--bs-body-color);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    border-radius: 11px;
    transition: .22s ease;
}

.qamsa-desktop-nav .qamsa-nav-link:hover,
.qamsa-desktop-nav .qamsa-nav-link:focus-visible {
    color: var(--qamsa-primary);
    background: rgba(13,110,253,.08);
    transform: translateY(-1px);
}

.qamsa-header-search {
    min-width: 0;
    width: min(420px, 38vw);
}

.qamsa-header-search .form-control {
    min-width: 0;
}

.qamsa-theme-toggle {
    flex: 0 0 auto;
}

.qamsa-auth-pill {
    min-width: 0;
    max-width: 210px;
    overflow: hidden;
}

.qamsa-auth-identity {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qamsa-mobile-menu-btn {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 13px;
    border: 1px solid rgba(108,117,125,.18);
    background: rgba(255,255,255,.36);
    box-shadow: 0 6px 18px rgba(31,38,135,.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

[data-bs-theme="dark"] .qamsa-mobile-menu-btn {
    background: rgba(255,255,255,.06);
}

.qamsa-mobile-menu-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(31,38,135,.12);
}

.qamsa-offcanvas {
    width: min(88vw, 360px) !important;
    border: 0 !important;
    background: rgba(248,250,253,.88) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

[data-bs-theme="dark"] .qamsa-offcanvas {
    background: rgba(16,22,32,.92) !important;
}

.qamsa-mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 14px;
    color: var(--bs-body-color);
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    font-size: .9rem;
    transition: .2s ease;
}

.qamsa-mobile-menu-link i {
    width: 22px;
    text-align: center;
    color: var(--qamsa-primary);
}

.qamsa-mobile-menu-link:hover,
.qamsa-mobile-menu-link:focus-visible {
    color: var(--qamsa-primary);
    background: rgba(13,110,253,.08);
}

/* ================================================================
   SECTION: MOBILE BOTTOM NAVIGATION
   ================================================================ */
.qamsa-mobile-bottom-nav {
    display: none;
}

/* ================================================================
   SECTION: SHARED PAGE CONTAINERS
   ================================================================ */
.qamsa-public-page,
.qamsa-content-page {
    min-width: 0;
}

.qamsa-public-page img,
.qamsa-content-page img,
.qamsa-public-page video,
.qamsa-content-page video,
.qamsa-public-page iframe,
.qamsa-content-page iframe {
    max-width: 100%;
}

.qamsa-public-page .row,
.qamsa-content-page .row {
    --bs-gutter-x: 1.25rem;
}

/* ================================================================
   SECTION: MOBILE <576px
   ================================================================ */
@media (max-width: 575.98px) {
    body {
        padding-bottom: calc(var(--qamsa-mobile-nav-height) + env(safe-area-inset-bottom));
    }

    .qamsa-public-header {
        position: sticky;
    }

    .qamsa-header-main {
        min-height: 60px;
        padding: 8px 10px !important;
        gap: 7px;
    }

    .qamsa-brand {
        font-size: 1rem;
        margin-right: auto;
    }

    .qamsa-brand-icon {
        width: 29px;
        height: 29px;
        border-radius: 9px;
    }

    .qamsa-theme-toggle {
        gap: 2px !important;
        transform: scale(.82);
        transform-origin: center;
        margin-left: 0 !important;
        margin-right: -2px;
    }

    .qamsa-theme-toggle .form-check-input {
        width: 2rem;
        height: 1rem;
    }

    .qamsa-auth-pill {
        max-width: 82px;
        padding: 5px 7px !important;
        gap: 4px !important;
        border-radius: 12px !important;
    }

    .qamsa-auth-pill .qamsa-auth-separator,
    .qamsa-auth-pill .qamsa-dashboard-link,
    .qamsa-auth-pill .qamsa-logout-link,
    .qamsa-auth-pill .qamsa-user-label,
    .qamsa-auth-pill .qamsa-user-name {
        display: none !important;
    }

    .qamsa-auth-pill .qamsa-login-btn {
        padding: 7px 9px !important;
        font-size: .67rem !important;
        white-space: nowrap;
    }

    .qamsa-auth-pill .qamsa-login-btn i {
        margin-right: 0 !important;
    }

    .qamsa-mobile-menu-btn {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .qamsa-desktop-nav,
    .qamsa-header-search {
        display: none !important;
    }

    .qamsa-mobile-bottom-nav {
        position: fixed;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        min-height: var(--qamsa-mobile-nav-height);
        padding: 7px 7px calc(7px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,.88);
        border-top: 1px solid rgba(108,117,125,.14);
        box-shadow: 0 -10px 30px rgba(31,38,135,.10);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    [data-bs-theme="dark"] .qamsa-mobile-bottom-nav {
        background: rgba(18,24,36,.92);
    }

    .qamsa-mobile-bottom-link {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: var(--bs-secondary-color);
        text-decoration: none;
        border-radius: 13px;
        font-size: .57rem;
        line-height: 1;
        font-weight: 600;
        transition: .2s ease;
    }

    .qamsa-mobile-bottom-link i {
        font-size: .95rem;
    }

    .qamsa-mobile-bottom-link:hover,
    .qamsa-mobile-bottom-link:focus-visible,
    .qamsa-mobile-bottom-link.active {
        color: var(--qamsa-primary);
        background: rgba(13,110,253,.07);
    }

    .qamsa-mobile-bottom-link:active {
        transform: scale(.96);
    }

    .qamsa-public-page main,
    .qamsa-content-page main {
        width: 100%;
        max-width: 100%;
    }

    .qamsa-public-page .container-xl,
    .qamsa-content-page .container-xl {
        padding-left: 10px;
        padding-right: 10px;
    }

    .qamsa-public-page .glass-panel,
    .qamsa-content-page .glass-panel {
        max-width: 100%;
    }

    .qamsa-public-page .display-5 {
        font-size: clamp(1.55rem, 7vw, 2.1rem);
        line-height: 1.12;
    }

    .qamsa-public-page .input-group-lg .form-control,
    .qamsa-public-page .input-group-lg .btn {
        font-size: .82rem;
        padding: .7rem .75rem;
    }

    .qamsa-public-page .breadcrumb,
    .qamsa-content-page .breadcrumb {
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .qamsa-public-page .breadcrumb::-webkit-scrollbar,
    .qamsa-content-page .breadcrumb::-webkit-scrollbar {
        display: none;
    }

    .qamsa-public-page .table-responsive,
    .qamsa-content-page .table-responsive {
        max-width: 100%;
    }

    .qamsa-public-page pre,
    .qamsa-content-page pre,
    .qamsa-public-page .table,
    .qamsa-content-page .table {
        max-width: 100%;
    }

    .qamsa-public-page .row > [class*="col-"],
    .qamsa-content-page .row > [class*="col-"] {
        min-width: 0;
    }

    /* Compact advertisements instead of letting banners push the viewport. */
    .qamsa-public-page .advert-container,
    .qamsa-public-page .premium-ad-card {
        max-width: 100%;
        overflow: hidden;
    }

    .qamsa-public-page .advert-container img,
    .qamsa-public-page .premium-ad-card img {
        max-height: 90px !important;
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }
}

/* ================================================================
   SECTION: SMALL TABLET 576–767px
   ================================================================ */
@media (min-width: 576px) and (max-width: 767.98px) {
    .qamsa-header-main {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .qamsa-desktop-nav {
        display: none !important;
    }

    .qamsa-mobile-menu-btn {
        display: inline-flex !important;
    }
}

/* ================================================================
   SECTION: TABLET 768–991px
   ================================================================ */
@media (min-width: 768px) and (max-width: 991.98px) {
    .qamsa-header-main {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .qamsa-header-search {
        width: min(300px, 34vw);
        margin-left: 12px !important;
        margin-right: 12px !important;
    }
}

/* ================================================================
   SECTION: REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    .qamsa-mobile-menu-btn,
    .qamsa-mobile-menu-link,
    .qamsa-mobile-bottom-link,
    .qamsa-desktop-nav .qamsa-nav-link {
        transition: none !important;
    }
}

/* ================================================================
   QAMSA PUBLIC HEADER — FINAL VISUAL OVERRIDES
   SECTION: APPROVED LOGO / MOBILE HEADER / AUTH CONTROLS
   ================================================================ */
.qamsa-brand {
    width: auto;
    min-width: 0;
    height: 46px;
    display: inline-flex !important;
    align-items: center;
    flex: 0 0 auto;
}

.qamsa-logo {
    display: block;
    width: auto;
    height: 44px;
    max-width: 138px;
    object-fit: contain;
    object-position: left center;
}

.qamsa-logo-dark {
    display: none;
}

[data-bs-theme="dark"] .qamsa-logo-light {
    display: none !important;
}

[data-bs-theme="dark"] .qamsa-logo-dark {
    display: block !important;
}

.qamsa-menu-logo {
    display: block;
    width: auto;
    height: 44px;
    max-width: 145px;
    object-fit: contain;
}

.qamsa-mobile-menu-btn {
    position: relative;
    z-index: 2;
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    color: var(--bs-body-color);
    cursor: pointer;
}

.qamsa-mobile-menu-btn:focus-visible {
    outline: 3px solid rgba(13,110,253,.22);
    outline-offset: 2px;
}

.qamsa-auth-pill {
    flex: 0 1 auto;
    white-space: nowrap;
}

.qamsa-login-btn {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .qamsa-header-main {
        min-height: 66px;
        padding: 8px 10px !important;
        gap: 6px;
    }

    .qamsa-brand {
        height: 44px;
        max-width: 122px;
        margin-right: auto;
    }

    .qamsa-logo {
        height: 39px;
        max-width: 118px;
    }

    .qamsa-theme-toggle {
        transform: none;
        gap: 2px !important;
        margin: 0 !important;
    }

    .qamsa-theme-toggle .form-check-input {
        width: 1.75rem;
        height: .9rem;
    }

    .qamsa-theme-toggle i {
        font-size: .62rem !important;
    }

    .qamsa-auth-pill {
        max-width: 64px;
        min-width: 0;
        padding: 4px 5px !important;
        border-radius: 12px !important;
        gap: 0 !important;
    }

    .qamsa-auth-pill .qamsa-auth-identity,
    .qamsa-auth-pill .qamsa-auth-separator,
    .qamsa-auth-pill .qamsa-dashboard-link,
    .qamsa-auth-pill .qamsa-logout-link {
        display: none !important;
    }

    .qamsa-auth-pill .qamsa-login-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 32px;
        padding: 6px 7px !important;
        font-size: .64rem !important;
        line-height: 1;
    }

    .qamsa-auth-pill .qamsa-login-btn span {
        display: inline !important;
    }

    .qamsa-mobile-menu-btn {
        width: 39px;
        height: 39px;
        flex: 0 0 39px;
        border-radius: 12px;
        background: rgba(255,255,255,.52);
    }

    [data-bs-theme="dark"] .qamsa-mobile-menu-btn {
        background: rgba(255,255,255,.08);
    }

    .qamsa-mobile-menu-btn i {
        font-size: .95rem;
    }

    .qamsa-menu-logo {
        height: 39px;
        max-width: 132px;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .qamsa-logo {
        height: 42px;
        max-width: 132px;
    }
}

/* ================================================================
   QAMSA PUBLIC HEADER
   SECTION: TABLET / MOBILE AUTH COMPRESSION
   ---------------------------------------------------------------
   Prevent the authentication identity from competing with the
   Login button and hamburger on 360px–991px screens.
   ================================================================ */
@media (max-width: 991.98px) {
    .qamsa-header-main {
        min-width: 0;
        overflow: hidden;
    }

    .qamsa-auth-pill {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: 96px !important;
        min-width: 0 !important;
        padding: 4px 6px !important;
        gap: 0 !important;
        overflow: hidden;
    }

    .qamsa-auth-pill .qamsa-auth-identity,
    .qamsa-auth-pill .qamsa-auth-separator {
        display: none !important;
    }

    .qamsa-auth-pill .qamsa-login-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: auto !important;
        min-width: 78px;
        min-height: 34px;
        padding: 7px 10px !important;
        margin: 0 !important;
        white-space: nowrap;
        line-height: 1;
    }

    .qamsa-auth-pill .qamsa-login-btn i {
        margin-right: .25rem !important;
    }
}

/* ============================================================
   QAMSA PUBLIC FOOTER
   SECTION: RESPONSIVE / MOBILE-FIRST FOOTER
   ============================================================ */
.qamsa-public-footer {
    position: relative;
    margin-top: 2rem;
    background: rgba(255, 255, 255, .74);
    border-top: 1px solid rgba(15, 23, 42, .07);
    box-shadow: 0 -14px 40px rgba(15, 23, 42, .055);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

[data-bs-theme="dark"] .qamsa-public-footer {
    background: rgba(15, 23, 42, .78);
    border-top-color: rgba(255,255,255,.08);
    box-shadow: 0 -14px 40px rgba(0,0,0,.18);
}

.qamsa-footer-main {
    padding: 3.25rem 0 1.15rem;
}

.qamsa-footer-brand {
    display: inline-flex;
    max-width: 180px;
    min-height: 44px;
}

.qamsa-footer-logo {
    display: block;
    width: auto;
    height: 48px;
    max-width: 170px;
    object-fit: contain;
}

.qamsa-footer-tagline {
    margin-top: .8rem;
    font-size: .84rem;
    font-weight: 700;
    color: var(--bs-primary);
}

.qamsa-footer-description {
    max-width: 500px;
    color: var(--bs-secondary-color);
    font-size: .84rem;
    line-height: 1.75;
}

.qamsa-footer-heading {
    margin: .15rem 0 1rem;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bs-body-color);
}

.qamsa-footer-links {
    display: flex;
    flex-direction: column;
    gap: .62rem;
}

.qamsa-footer-links a {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--bs-secondary-color);
    font-size: .82rem;
    line-height: 1.4;
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

.qamsa-footer-links a::before {
    content: "";
    width: 0;
    height: 2px;
    margin-right: 0;
    border-radius: 999px;
    background: var(--bs-primary);
    transition: width .2s ease, margin-right .2s ease;
}

.qamsa-footer-links a:hover,
.qamsa-footer-links a:focus-visible {
    color: var(--bs-primary);
    transform: translateX(2px);
}

.qamsa-footer-links a:hover::before,
.qamsa-footer-links a:focus-visible::before {
    width: 8px;
    margin-right: 7px;
}

.qamsa-footer-divider {
    height: 1px;
    margin: 2rem 0 1rem;
    background: linear-gradient(90deg, transparent, rgba(15,23,42,.12), transparent);
}

[data-bs-theme="dark"] .qamsa-footer-divider {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
}

.qamsa-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .35rem;
    color: var(--bs-secondary-color);
    font-size: .72rem;
}

.qamsa-footer-principle,
.qamsa-footer-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.qamsa-footer-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #198754;
    box-shadow: 0 0 0 4px rgba(25,135,84,.10);
}

/* ================================================================
   QAMSA PUBLIC FOOTER
   SECTION: TABLET LOWER FOOTER ALIGNMENT
   ---------------------------------------------------------------
   Center the principle and copyright row on tablet widths so the
   lower footer reads as a deliberate centered closing section.
   ================================================================ */
@media (min-width: 768px) and (max-width: 991.98px) {
    .qamsa-footer-bottom {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: .55rem;
    }

    .qamsa-footer-principle,
    .qamsa-footer-meta {
        justify-content: center;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .qamsa-footer-meta {
        flex-wrap: wrap;
    }
}

@media (max-width: 767.98px) {
    .qamsa-footer-main {
        padding: 2.35rem 0 1rem;
    }

    .qamsa-footer-brand {
        max-width: 150px;
    }

    .qamsa-footer-logo {
        height: 40px;
        max-width: 145px;
    }

    .qamsa-footer-tagline {
        margin-top: .65rem;
        font-size: .78rem;
    }

    .qamsa-footer-description {
        font-size: .78rem;
        line-height: 1.65;
    }

    .qamsa-footer-heading {
        margin-bottom: .8rem;
        font-size: .68rem;
    }

    .qamsa-footer-links {
        gap: .52rem;
    }

    .qamsa-footer-links a {
        min-height: 32px;
        font-size: .76rem;
    }

    .qamsa-footer-divider {
        margin: 1.5rem 0 .9rem;
    }

    .qamsa-footer-bottom {
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: .45rem;
        font-size: .68rem;
        text-align: center;
    }

    .qamsa-footer-principle,
    .qamsa-footer-meta {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .qamsa-footer-meta {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qamsa-footer-links a,
    .qamsa-footer-links a::before {
        transition: none !important;
    }
}

.qamsa-footer-planned {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    color: var(--bs-secondary-color);
    font-size: .82rem;
    line-height: 1.4;
}

.qamsa-footer-planned small {
    display: inline-flex;
    align-items: center;
    padding: .18rem .42rem;
    border-radius: 999px;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .08);
    border: 1px solid rgba(var(--bs-primary-rgb), .12);
}

@media (max-width: 767.98px) {
    .qamsa-footer-planned {
        min-height: 32px;
        font-size: .76rem;
    }
}

/* ================================================================
   QAMSA PUBLIC SHELL V7
   SECTION: FULL LOGO + MOBILE/TABLET LOGIN SWITCH
   ---------------------------------------------------------------
   The complete approved Qamsa wordmark remains visible on every
   viewport. The compact green login control replaces the crowded
   username/login pill on mobile and tablet.
   ================================================================ */

.qamsa-public-header .qamsa-brand {
    margin-right: auto !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
}

.qamsa-public-header .qamsa-logo {
    display: block !important;
    width: auto !important;
    height: 44px !important;
    max-width: 150px !important;
    object-fit: contain !important;
}

/* ================================================================
   SECTION: MOBILE/TABLET AUTH — GREEN SWITCH-ON LOGIN
   ================================================================ */
@media (max-width: 991.98px) {
    .qamsa-public-header .qamsa-header-main {
        min-width: 0 !important;
        overflow: hidden !important;
        flex-wrap: nowrap !important;
    }

    .qamsa-public-header .qamsa-brand {
        max-width: 135px !important;
        flex: 0 1 135px !important;
        overflow: hidden !important;
    }

    .qamsa-public-header .qamsa-logo {
        height: 42px !important;
        max-width: 135px !important;
    }

    .qamsa-public-header .qamsa-header-main > .ms-auto {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        gap: 6px !important;
    }

    .qamsa-public-header .qamsa-auth-pill {
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        overflow: visible !important;
    }

    .qamsa-public-header .qamsa-auth-identity,
    .qamsa-public-header .qamsa-auth-separator,
    .qamsa-public-header .qamsa-dashboard-link,
    .qamsa-public-header .qamsa-logout-link {
        display: none !important;
    }

    .qamsa-public-header .qamsa-login-switch {
        position: relative;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        width: auto !important;
        min-width: 70px !important;
        height: 36px !important;
        padding: 0 11px !important;
        margin: 0 !important;
        border: 1px solid rgba(255,255,255,.45) !important;
        border-radius: 999px !important;
        background: linear-gradient(135deg, #16a34a 0%, #22c55e 55%, #15803d 100%) !important;
        color: #fff !important;
        font-size: .74rem !important;
        font-weight: 800 !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        box-shadow: 0 7px 18px rgba(22,163,74,.26), inset 0 1px 0 rgba(255,255,255,.34) !important;
        overflow: hidden !important;
        transition: transform .2s ease, box-shadow .2s ease, filter .2s ease !important;
    }

    /* Small switch-on indicator. */
    .qamsa-public-header .qamsa-login-switch::before {
        content: "";
        width: 8px;
        height: 8px;
        flex: 0 0 8px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(255,255,255,.16), 0 0 10px rgba(255,255,255,.75);
    }

    .qamsa-public-header .qamsa-login-switch i {
        margin: 0 !important;
        font-size: .72rem !important;
    }

    .qamsa-public-header .qamsa-login-switch:hover,
    .qamsa-public-header .qamsa-login-switch:focus-visible {
        color: #fff !important;
        transform: translateY(-1px);
        filter: brightness(1.04);
        box-shadow: 0 10px 22px rgba(22,163,74,.32), inset 0 1px 0 rgba(255,255,255,.38) !important;
    }

    .qamsa-public-header .qamsa-login-switch:active {
        transform: translateY(0);
    }
}

@media (max-width: 575.98px) {
    .qamsa-public-header .qamsa-header-main {
        min-height: 62px !important;
        padding: 7px 9px !important;
        gap: 5px !important;
    }

    .qamsa-public-header .qamsa-brand {
        max-width: 112px !important;
        flex-basis: 112px !important;
        height: 42px !important;
    }

    .qamsa-public-header .qamsa-logo {
        height: 38px !important;
        max-width: 112px !important;
    }

    .qamsa-public-header .qamsa-theme-toggle {
        transform: scale(.82) !important;
        transform-origin: center !important;
        margin: 0 -1px !important;
        gap: 1px !important;
    }

    .qamsa-public-header .qamsa-theme-toggle .form-check-input {
        width: 1.72rem !important;
        height: .9rem !important;
    }

    .qamsa-public-header .qamsa-login-switch {
        min-width: 66px !important;
        height: 34px !important;
        padding: 0 8px !important;
        font-size: .68rem !important;
        gap: 4px !important;
    }

    .qamsa-public-header .qamsa-login-switch::before {
        width: 7px;
        height: 7px;
        flex-basis: 7px;
    }

    .qamsa-public-header .qamsa-login-switch i {
        font-size: .66rem !important;
    }

    .qamsa-public-header .qamsa-mobile-menu-btn {
        width: 38px !important;
        height: 38px !important;
        flex: 0 0 38px !important;
        border-radius: 12px !important;
    }
}

@media (max-width: 374.98px) {
    .qamsa-public-header .qamsa-brand {
        max-width: 102px !important;
        flex-basis: 102px !important;
    }

    .qamsa-public-header .qamsa-logo {
        height: 35px !important;
        max-width: 102px !important;
    }

    .qamsa-public-header .qamsa-login-switch {
        min-width: 62px !important;
        padding: 0 6px !important;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .qamsa-public-header .qamsa-header-main {
        min-height: 68px !important;
        padding: 9px 14px !important;
    }

    .qamsa-public-header .qamsa-logo {
        height: 42px !important;
        max-width: 135px !important;
    }

    .qamsa-public-header .qamsa-login-switch {
        min-width: 76px !important;
        height: 37px !important;
        font-size: .75rem !important;
    }
}

/* Keep the full wordmark in the mobile/tablet menu as well. */
.qamsa-offcanvas .qamsa-menu-logo {
    display: block !important;
    width: auto !important;
    height: 44px !important;
    max-width: 150px !important;
    object-fit: contain !important;
}

@media (max-width: 575.98px) {
    .qamsa-offcanvas .qamsa-menu-logo {
        height: 40px !important;
        max-width: 130px !important;
    }
}
