/* ==========================================================================
   RubikCare Marketing Layout — Header / Nav / Footer chrome.
   Shared across every marketing page via MarketingLayout.razor.
   Class names mirror template.html 1:1 (header, .nav, .navlinks, footer...)
   so behaviour/spacing/hover states match the approved design exactly.
   ========================================================================== */

/* ==========================================================================
   HEADER — sticky top bar
   ========================================================================== */
.rc-scope header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(243,241,234,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.rc-scope .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 14px 32px;
    max-width: var(--maxw);
    margin: 0 auto;
}

/* ---- Logo ---- */
.rc-scope .logo {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}

.rc-scope .logo-img {
    height: 48px;
    width: auto;
    display: block;
}

/* ==========================================================================
   NAV LINKS — desktop only
   ========================================================================== */
.rc-scope .navlinks {
    display: flex;
    align-items: center;
    gap: 30px;
}

    .rc-scope .navlinks a {
        font-size: 14.5px;
        font-weight: 600;
        text-decoration: none;
        color: var(--rubik-text-secondary);
        position: relative;
        background: none;
        border: none;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

        .rc-scope .navlinks a:hover {
            color: var(--rubik-primary);
        }

    .rc-scope .navlinks .active {
        color: var(--rubik-primary);
    }

    .rc-scope .navlinks .dd svg {
        width: 10px;
        height: 10px;
        margin-top: 1px;
    }

/* ==========================================================================
   NAV DROPDOWN — "Who We Serve"
   ========================================================================== */
.rc-scope .nav-dropdown {
    position: relative;
}

    .rc-scope .nav-dropdown .dd {
        font-size: 14.5px;
        font-weight: 600;
        color: var(--rubik-text-secondary);
        background: none;
        border: none;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 0;
        font-family: inherit;
    }

        .rc-scope .nav-dropdown .dd:hover {
            color: var(--rubik-primary);
        }

.rc-scope .nav-dropdown-menu {
    position: absolute;
    inset-inline-start: 0;
    top: calc(100% + 14px);
    min-width: 260px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    box-shadow: 0 20px 40px -20px rgba(16,35,59,.25);
    padding: 8px;
    display: flex;
    flex-direction: column;
    z-index: 60;
}

.rc-scope .nav-dropdown-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-s);
    text-decoration: none;
}

    .rc-scope .nav-dropdown-item:hover {
        background: var(--paper);
    }

    .rc-scope .nav-dropdown-item b {
        font-size: 14px;
        color: var(--rubik-text-primary);
    }

    .rc-scope .nav-dropdown-item span {
        font-size: 12.5px;
        color: var(--rubik-text-secondary);
    }

/* ==========================================================================
   NAV RIGHT — language switcher + demo button + burger
   ========================================================================== */
.rc-scope .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.rc-scope .lang-switch {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--rubik-text-secondary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}

    .rc-scope .lang-switch:hover {
        color: var(--rubik-primary);
    }

/* ==========================================================================
   BURGER — mobile only
   ========================================================================== */
.rc-scope .nav-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
}

    .rc-scope .nav-burger span {
        width: 20px;
        height: 2px;
        background: var(--rubik-text-primary);
    }

/* ==========================================================================
   MOBILE MENU — shown when @if (mobileMenuOpen) is true
   ========================================================================== */
.rc-scope .nav-mobile {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 1rem 32px 1.5rem;
    border-top: 1px solid var(--line);
}

    .rc-scope .nav-mobile a {
        padding: .6rem 0;
        font-weight: 500;
        text-decoration: none;
        color: var(--rubik-text-primary);
    }

.rc-scope .nav-mobile {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 1rem 32px 1.5rem;
    border-top: 1px solid var(--line);
    /* ⭐ ضد FOUC */
    content-visibility: auto;
    contain-intrinsic-size: 0 300px;
}

/* ==========================================================================
   RESPONSIVE — collapse nav on mobile
   ========================================================================== */
@media (max-width: 980px) {
    .rc-scope .navlinks {
        display: none;
    }

    .rc-scope .nav-burger {
        display: flex;
    }
    /* ملاحظة: .nav-mobile يظهر تلقائياً عندما @if (mobileMenuOpen) == true
       — لا نحتاج قاعدة CSS هنا لأن Blazor يتحكم في الظهور */
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.rc-scope footer {
    background: var(--rubik-primary-dark);
    color: #B7CDD8;
    padding: 70px 0 34px;
}

.rc-scope .foot-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.rc-scope .foot-logo {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

    .rc-scope .foot-logo em {
        font-style: normal;
        color: var(--mint);
    }

.rc-scope .foot-top p {
    font-size: 13.5px;
    color: #8FB2C2;
    max-width: 280px;
    line-height: 1.6;
}

.rc-scope .foot-col h4 {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7FA4B5;
    margin-bottom: 16px;
    font-weight: 600;
}

.rc-scope .foot-col a {
    display: block;
    font-size: 14px;
    color: #C9DCE4;
    text-decoration: none;
    margin-bottom: 11px;
}

    .rc-scope .foot-col a:hover {
        color: #fff;
    }

.rc-scope .foot-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 26px;
    flex-wrap: wrap;
    gap: 14px;
    max-width: var(--maxw);
    margin: 0 auto;
    padding-inline: 32px;
}

    .rc-scope .foot-bottom .badges2 {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }

        .rc-scope .foot-bottom .badges2 span {
            font-family: var(--mono);
            font-size: 11px;
            color: #7FA4B5;
        }

    .rc-scope .foot-bottom .legal {
        font-size: 12.5px;
        color: #7FA4B5;
    }

.rc-scope footer .wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 32px;
}
/* Footer — Built by Rubikans */
.rc-scope .foot-built-by {
    font-family: var(--mono);
    color: #7FA4B5;
    font-size: 11.5px;
    letter-spacing: 0.04em;
    margin-inline-end: 6px;
}

.rc-scope .foot-sep {
    color: #7FA4B5;
    margin-inline: 6px;
}

.rc-scope .foot-bottom .legal a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

    .rc-scope .foot-bottom .legal a:hover {
        color: #fff;
    }


/* ==========================================================================
   FOOTER RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
    .rc-scope .foot-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .rc-scope .foot-top {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Bootstrap override — force our button contract inside .rc-scope
   ========================================================================== */
.rc-scope a.btn,
.rc-scope button.btn {
    display: inline-flex !important;
    white-space: nowrap !important;
    text-align: center;
}
