/* ================================================================
   Marketing Dot Limited — Client Portal Design System
   mktl-portal.css  v3.0  |  High-specificity overrides
================================================================ */

/* ── 1. FONTS ─────────────────────────────────────────────────── */
/* Loaded via <link> in layout_default.html.twig <head>           */

/* ── 2. BODY & GLOBAL TYPOGRAPHY ──────────────────────────────── */
html[lang^="ar"] body,
html[dir="rtl"] body {
    font-family: 'Almarai', Tahoma, 'Arabic Transparent', sans-serif !important;
    direction: rtl !important;
}
html[lang^="en"] body,
html[dir="ltr"] body {
    font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif !important;
}
body {
    background-color: #f4f6fa !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
}
h1, h2, h3 {
    line-height: 1.3;
}
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3 {
    font-family: 'Almarai', sans-serif !important;
}

/* ── 3. NAVBAR — override huraga.css ──────────────────────────── */
body .mktl-header .navbar,
body .mktl-header nav.navbar.mktl-navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
    box-shadow: 0 4px 16px rgba(30,60,114,.25) !important;
    border: none !important;
    padding: .7rem 0 !important;
}

body .mktl-header .navbar .nav-link,
body .mktl-header .navbar .nav-link:hover {
    color: rgba(255,255,255,.9) !important;
}
body .mktl-header .navbar .nav-link.active {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* ── 4. LOGO ──────────────────────────────────────────────────── */
.mktl-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    flex-shrink: 0;
}
.mktl-logo-img {
    height: 46px;
    width: auto;
    max-width: 220px;
    display: block;
    transition: opacity .2s ease;
    /* No background — logo has transparent BG with red + white text.
       Both colors show perfectly on the dark blue navbar. */
}
.mktl-logo-img:hover { opacity: .85; }


/* ── 5. LANGUAGE SWITCHER ─────────────────────────────────────── */
.mktl-lang-switch {
    display: flex;
    align-items: center;
    gap: .3rem;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    padding: .25rem .75rem;
}
.mktl-lang-btn {
    color: rgba(255,255,255,.80) !important;
    text-decoration: none !important;
    font-size: .82rem;
    font-weight: 600;
    padding: .05rem .15rem;
    transition: color .2s;
    line-height: 1.4;
}
.mktl-lang-btn:first-child {
    font-family: 'Almarai', sans-serif;
    font-size: .88rem;
}
.mktl-lang-btn.active { color: #fff !important; font-weight: 800 !important; }
.mktl-lang-sep { color: rgba(255,255,255,.35); font-size: .7rem; }

/* ── 6. ICON BUTTON (dark/light toggle) ───────────────────────── */
.mktl-icon-btn {
    color: rgba(255,255,255,.80) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    transition: all .2s;
    text-decoration: none !important;
}
.mktl-icon-btn:hover {
    background: rgba(255,255,255,.15);
    color: #fff !important;
}

/* ── 7. NAV CTA BUTTONS ───────────────────────────────────────── */
.mktl-nav-cta {
    background: rgba(255,255,255,.18) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,.40) !important;
    border-radius: 20px !important;
    padding: .35rem 1.1rem !important;
    font-size: .88rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all .2s !important;
    white-space: nowrap;
    display: inline-block;
}
.mktl-nav-cta:hover {
    background: rgba(255,255,255,.28) !important;
    color: #fff !important;
}
.mktl-nav-register {
    background: #ffffff !important;
    color: #1e3c72 !important;
    border-radius: 20px !important;
    padding: .35rem 1.1rem !important;
    font-size: .88rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: all .2s !important;
    white-space: nowrap;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(30,60,114,.15);
}
.mktl-nav-register:hover {
    background: #e8eeff !important;
    color: #1e3c72 !important;
    transform: translateY(-1px);
}

/* ── 8. BREADCRUMB — Premium redesign ────────────────────────── */
.mktl-breadcrumb-nav {
    margin-top: 1rem;
    margin-bottom: 1.1rem;
}

.mktl-breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: .45rem .9rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    box-shadow: 0 1px 4px rgba(30,60,114,.06);
    width: fit-content;
    max-width: 100%;
    gap: 0;
}

/* Each item */
.mktl-bc-item {
    display: flex;
    align-items: center;
    font-size: .82rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

/* Chevron separator — inserted AFTER every non-last item */
.mktl-bc-item:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0 .3rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    opacity: .8;
}

/* RTL: flip chevron direction */
html[dir="rtl"] .mktl-bc-item:not(:last-child)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E");
}

/* Home link */
.mktl-bc-home {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: #2a5298;
    text-decoration: none !important;
    font-weight: 600;
    padding: .15rem .45rem;
    border-radius: 20px;
    transition: all .18s ease;
}
.mktl-bc-home:hover {
    color: #1e3c72;
    background: rgba(42,82,152,.08);
}
.mktl-bc-home svg {
    flex-shrink: 0;
    color: #2a5298;
}

/* Middle crumbs (links) */
.mktl-bc-item a:not(.mktl-bc-home) {
    color: #2a5298;
    text-decoration: none !important;
    font-weight: 500;
    padding: .15rem .35rem;
    border-radius: 20px;
    transition: all .18s ease;
}
.mktl-bc-item a:not(.mktl-bc-home):hover {
    color: #1e3c72;
    background: rgba(42,82,152,.08);
}

/* Active / current page */
.mktl-bc-active span,
.mktl-bc-item.mktl-bc-active {
    color: #1e293b;
    font-weight: 600;
    padding: .15rem .35rem;
}

/* Dark mode */
[data-bs-theme="dark"] .mktl-breadcrumb-list {
    background: #1e293b;
    border-color: #334155;
}
[data-bs-theme="dark"] .mktl-bc-home,
[data-bs-theme="dark"] .mktl-bc-item a {
    color: #93c5fd;
}
[data-bs-theme="dark"] .mktl-bc-active span {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .mktl-bc-home:hover,
[data-bs-theme="dark"] .mktl-bc-item a:hover {
    background: rgba(147,197,253,.12);
}

/* Mobile: show it on small screens too (just smaller) */
@media (max-width: 576px) {
    .mktl-breadcrumb-list {
        padding: .35rem .7rem;
        font-size: .78rem;
    }
}


/* ── 9. HERO BANNER — very high specificity ───────────────────── */
body .mktl-content-wrapper .mktl-hero-card,
body div.mktl-hero-card {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 55%, #3b6cc4 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 28px rgba(30,60,114,.22) !important;
    padding: 2.5rem 2.25rem !important;
    margin-bottom: 1.5rem;
}
body .mktl-hero-card h1,
body .mktl-hero-card h2,
body .mktl-hero-card .display-5 {
    color: #ffffff !important;
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,.12);
    margin-bottom: .65rem;
}
html[dir="rtl"] body .mktl-hero-card h1 {
    font-family: 'Almarai', sans-serif !important;
    font-size: 2rem !important;
}
body .mktl-hero-card p,
body .mktl-hero-card .lead {
    color: rgba(255,255,255,.92) !important;
    font-size: 1rem !important;
    margin-bottom: 0;
}
body .mktl-hero-card .btn {
    font-weight: 700;
    border-radius: 25px;
    padding: .55rem 1.6rem;
    font-size: .95rem;
    transition: all .22s;
    display: inline-block;
    width: auto;
}
body .mktl-hero-card .btn + .btn {
    margin-top: 0;
}
body .mktl-hero-card .btn-white {
    background: #ffffff !important;
    color: #1e3c72 !important;
    border-color: #ffffff !important;
}
body .mktl-hero-card .btn-white:hover {
    background: #e8eeff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
body .mktl-hero-card .btn-outline-light {
    color: #ffffff !important;
    border-color: rgba(255,255,255,.55) !important;
}
body .mktl-hero-card .btn-outline-light:hover {
    background: rgba(255,255,255,.18) !important;
    color: #fff !important;
}

/* ── 10. FEATURE CARDS ────────────────────────────────────────── */
.mktl-feature-card {
    border-radius: 14px !important;
    border: 1px solid #e2e8f0 !important;
    text-align: center !important;
    padding: 1.75rem 1.25rem !important;
    transition: all .22s !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(30,60,114,.07) !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}
.mktl-feature-card:hover {
    box-shadow: 0 8px 24px rgba(30,60,114,.14) !important;
    transform: translateY(-3px);
    border-color: #3b6cc4 !important;
}
.mktl-feature-card .icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.mktl-feature-card h5 {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: .45rem;
}
html[dir="rtl"] .mktl-feature-card h5 {
    font-family: 'Almarai', sans-serif !important;
}
.mktl-feature-card p {
    color: #64748b !important;
    font-size: .875rem !important;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem !important;
}
.mktl-feature-card .btn {
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: .875rem !important;
    padding: .4rem 1.2rem !important;
    width: 100% !important;
    max-width: 180px !important;
}

/* ── 11. GENERAL CARDS inside content area ────────────────────── */
.content-block .card {
    border-radius: 12px !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(30,60,114,.07) !important;
    transition: all .22s;
}
.content-block .card:hover {
    box-shadow: 0 6px 20px rgba(30,60,114,.12) !important;
    transform: translateY(-2px);
}
.content-block .card-header {
    background: transparent !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-weight: 700;
    font-size: .95rem;
    color: #1e293b;
    padding: .9rem 1.25rem !important;
}

/* ── 12. FORMS ────────────────────────────────────────────────── */
.form-control,
.form-select {
    border-radius: 8px !important;
    border-color: #e2e8f0 !important;
    font-size: .95rem;
    transition: all .2s;
}
.form-control:focus,
.form-select:focus {
    border-color: #2a5298 !important;
    box-shadow: 0 0 0 3px rgba(42,82,152,.14) !important;
}
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select,
html[dir="rtl"] input,
html[dir="rtl"] textarea {
    text-align: right;
    font-family: 'Almarai', sans-serif !important;
}

/* ── 13. SIDEBAR MENU ─────────────────────────────────────────── */
.mktl-sidebar .list-group-item,
.mktl-sidebar .list-group-item a {
    border: none !important;
    border-radius: 8px !important;
    margin-bottom: .15rem !important;
    font-size: .9rem;
    font-weight: 500;
    color: #1e293b;
    transition: all .2s;
    padding: .6rem .9rem;
    text-decoration: none;
    display: block;
}
.mktl-sidebar .list-group-item:hover {
    background: rgba(30,60,114,.07) !important;
    color: #1e3c72 !important;
}
.mktl-sidebar .list-group-item.active,
.mktl-sidebar .list-group-item.active a {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
    color: #ffffff !important;
}

/* ── 14. FOOTER ───────────────────────────────────────────────── */
.mktl-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1.25rem 0;
    margin-top: 1.5rem;
    color: #64748b;
    font-size: .83rem;
    text-align: center;
}
.mktl-footer-link {
    color: #64748b !important;
    text-decoration: none !important;
    transition: color .2s;
}
.mktl-footer-link:hover { color: #2a5298 !important; }

/* ── 15. TO-TOP BUTTON ────────────────────────────────────────── */
.mktl-to-top {
    position: fixed !important;
    bottom: 1.5rem !important;
    right: 1.5rem !important;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
    color: #ffffff !important;
    border-radius: 50px !important;
    padding: .45rem 1rem !important;
    font-size: .83rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(30,60,114,.25) !important;
    display: flex !important;
    align-items: center !important;
    gap: .3rem !important;
    transition: all .2s !important;
    z-index: 999 !important;
}
html[dir="rtl"] .mktl-to-top { right: auto !important; left: 1.5rem !important; }
.mktl-to-top:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(30,60,114,.30) !important;
    color: #fff !important;
}

/* ── 16. RTL HELPERS ──────────────────────────────────────────── */
/* ── RTL: Fix breadcrumb separator ────────────────────────────── */
html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    float: right;
    padding-right: 0;
    padding-left: .5rem;
    margin-right: .5rem;
}

/* ── RTL: Fix footer "Powered by" order ───────────────────────── */
html[dir="rtl"] .footer-fossbilling-wrap {
    direction: rtl;
}


/* ── 17. DARK MODE ────────────────────────────────────────────── */
[data-bs-theme="dark"] body {
    background-color: #0f172a !important;
}
[data-bs-theme="dark"] .mktl-feature-card,
[data-bs-theme="dark"] .content-block .card {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] .mktl-feature-card h5 {
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"] .mktl-feature-card p {
    color: #94a3b8 !important;
}
[data-bs-theme="dark"] .mktl-footer {
    border-color: #1e293b;
}

/* ── 18. RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 767px) {
    body .mktl-hero-card { padding: 1.5rem 1.25rem !important; }
    body .mktl-hero-card h1 { font-size: 1.4rem !important; }
    .mktl-feature-card { margin-bottom: 0; }
}
