/* ============================================================
   MaxMaint - Custom Brand Overrides
   Colors: Navy #2E5090 | Orange #E8792F
   ============================================================ */

/* --- CSS Variables Override --- */
:root {
    --mm-navy: #2E5090;
    --mm-navy-dark: #1B3A5C;
    --mm-navy-light: #3A6BC5;
    --mm-orange: #E8792F;
    --mm-orange-dark: #D06820;
    --mm-orange-light: #F5944F;
    --mm-bg-light: #F4F7FB;
    --mm-text-dark: #1D2D44;
    --mm-text-muted: #5A6B80;
}

/* --- Primary Color Override (Navy) --- */
.btn-primary {
    background-color: var(--mm-navy) !important;
    border-color: var(--mm-navy) !important;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--mm-navy-dark) !important;
    border-color: var(--mm-navy-dark) !important;
}

.btn-outline-primary {
    color: var(--mm-navy) !important;
    border-color: var(--mm-navy) !important;
}
.btn-outline-primary:hover {
    background-color: var(--mm-navy) !important;
    border-color: var(--mm-navy) !important;
    color: #fff !important;
}

.text-primary {
    color: var(--mm-navy) !important;
}

.bg-primary {
    background-color: var(--mm-navy) !important;
}

a {
    color: var(--mm-navy);
}
a:hover {
    color: var(--mm-navy-dark);
}

/* --- Orange Accent --- */
.text-accent,
.text-orange {
    color: var(--mm-orange) !important;
}

.btn-accent {
    background-color: var(--mm-orange) !important;
    border-color: var(--mm-orange) !important;
    color: #fff !important;
}
.btn-accent:hover {
    background-color: var(--mm-orange-dark) !important;
    border-color: var(--mm-orange-dark) !important;
    color: #fff !important;
}

.btn-outline-accent {
    color: var(--mm-orange) !important;
    border-color: var(--mm-orange) !important;
}
.btn-outline-accent:hover {
    background-color: var(--mm-orange) !important;
    color: #fff !important;
}

/* --- Navbar Brand --- */
.navbar-brand img {
    vertical-align: middle;
}

/* Fix: Keep header above hero background spans */
.header.navbar {
    z-index: 1080 !important;
}

/* --- Navigation Active State --- */
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: var(--mm-navy) !important;
}

/* --- Hero Section --- */
.mm-hero {
    background: linear-gradient(135deg, #F4F7FB 0%, #E8EEF7 50%, #F4F7FB 100%);
    position: relative;
    overflow: hidden;
}
.mm-hero .mm-hero-badge {
    display: inline-block;
    background: rgba(46, 80, 144, 0.1);
    color: var(--mm-navy);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .mm-hero {
    background: radial-gradient(84.79% 172.9% at 73.31% 31.4%, rgba(46, 80, 144, 0.15) 0%, rgba(232, 121, 47, 0.05) 52.47%, rgba(46, 80, 144, 0.1) 100%);
}

/* --- Module Cards --- */
.mm-module-card {
    border: 1px solid #E8EEF7;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #fff;
    height: 100%;
}
.mm-module-card:hover {
    border-color: var(--mm-navy);
    box-shadow: 0 8px 32px rgba(46, 80, 144, 0.12);
    transform: translateY(-4px);
}
.mm-module-card .mm-module-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
}
.mm-module-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--mm-text-dark);
}
.mm-module-card p {
    font-size: 0.9rem;
    color: var(--mm-text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

[data-bs-theme="dark"] .mm-module-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-bs-theme="dark"] .mm-module-card:hover {
    border-color: var(--mm-orange);
    box-shadow: 0 8px 32px rgba(232, 121, 47, 0.15);
}
[data-bs-theme="dark"] .mm-module-card h3 {
    color: #fff;
}

/* --- Stats Section --- */
.mm-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--mm-navy);
    line-height: 1;
}
.mm-stat-label {
    font-size: 0.9rem;
    color: var(--mm-text-muted);
    margin-top: 0.5rem;
}
[data-bs-theme="dark"] .mm-stat-number {
    color: var(--mm-orange);
}

/* --- Feature Highlight --- */
.mm-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(46, 80, 144, 0.1);
    color: var(--mm-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* --- Pricing Cards --- */
.mm-pricing-card {
    border-radius: 16px;
    border: 1px solid #E8EEF7;
    overflow: hidden;
    transition: all 0.3s ease;
}
.mm-pricing-card:hover {
    box-shadow: 0 12px 40px rgba(46, 80, 144, 0.12);
}
.mm-pricing-card.featured {
    border: 2px solid var(--mm-navy);
    position: relative;
}
.mm-pricing-card.featured .mm-pricing-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mm-orange);
    color: #fff;
    padding: 4px 20px;
    border-radius: 0 0 8px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- CTA Section --- */
.mm-cta-section {
    background: linear-gradient(135deg, var(--mm-navy) 0%, var(--mm-navy-dark) 100%);
    border-radius: 24px;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}
.mm-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(232, 121, 47, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* --- WhatsApp Float Button --- */
.mm-whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}
.mm-whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
    color: #fff;
}

/* --- Language Switcher --- */
.mm-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: rgba(46, 80, 144, 0.08);
    border-radius: 8px;
    margin-right: 12px;
}
.mm-lang-switch a {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--mm-text-muted);
    transition: all 0.2s ease;
}
.mm-lang-switch a.active {
    background: var(--mm-navy);
    color: #fff;
}

[data-bs-theme="dark"] .mm-lang-switch {
    background: rgba(255, 255, 255, 0.08);
}

/* --- RTL Support --- */
html[dir="rtl"] {
    text-align: right;
}

/* Fix: Force logo brand to always render LTR (MAX before MAINT) */
html[dir="rtl"] .navbar-brand {
    direction: ltr;
}
html[dir="rtl"] .navbar-brand img {
    margin-right: 8px;
    margin-left: 0;
}

/* Fix: Dark/Light toggle labels overlap in RTL */
html[dir="rtl"] .mode-switch {
    direction: ltr;
}
html[dir="rtl"] .mode-switch .form-check-label {
    padding-left: 0;
    padding-right: 0;
}

/* Fix: Offcanvas title logo also LTR */
html[dir="rtl"] .offcanvas-title {
    direction: ltr;
}

html[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
html[dir="rtl"] .ms-auto { margin-left: unset !important; margin-right: auto !important; }
html[dir="rtl"] .me-auto { margin-right: unset !important; margin-left: auto !important; }
html[dir="rtl"] .mm-whatsapp-float { right: auto; left: 24px; }

/* --- Section Spacing --- */
.mm-section {
    padding: 5rem 0;
}
.mm-section-sm {
    padding: 3.5rem 0;
}

/* --- Integration Flow Lines --- */
.mm-flow-arrow {
    color: var(--mm-orange);
    font-size: 1.5rem;
    font-weight: bold;
}

/* --- Footer Override --- */
.footer .navbar-brand .brand-max {
    color: #fff;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .mm-hero h1 {
        font-size: 2rem;
    }
    .mm-stat-number {
        font-size: 1.75rem;
    }
    .mm-cta-section {
        padding: 2.5rem 1.5rem;
    }
}
