/* ================================================================
   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: 44px;
    width: auto;
    max-width: 210px;
    object-fit: contain;
    display: block;
    transition: all .2s ease;
    /* Logo has transparent bg + red/dark colors — show as-is on white pill */
    background: rgba(255,255,255,.92);
    border-radius: 8px;
    padding: 4px 10px;
}
.mktl-logo-img:hover {
    opacity: .88;
    background: rgba(255,255,255,1);
}

/* ── 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 ────────────────────────────────────────────── */
.mktl-breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: .75rem;
    font-size: .84rem;
}
.mktl-breadcrumb .breadcrumb-item a {
    color: #2a5298;
    text-decoration: none;
}

/* ── 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;
}
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 ──────────────────────────────────────────── */
html[dir="rtl"] .text-start { text-align: right !important; }
html[dir="rtl"] .text-end   { text-align: left !important; }
html[dir="rtl"] .dropdown-menu-end { right: auto !important; left: 0 !important; }

/* ── 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; }
}
