/* ============================================
   MERITUS AI - Global V2 Styles
   Applied to ALL pages (fonts, dark mode, footer, navbar)
   ============================================ */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --mv2-font-body: 'Roboto', sans-serif;
    --mv2-font-display: 'Plus Jakarta Sans', sans-serif;

    /* Light mode (default) */
    --mv2-bg: #ffffff;
    --mv2-bg-alt: #f5f7fa;
    --mv2-text: #1a1a2e;
    --mv2-text-secondary: #6b7280;
    --mv2-border: #e5e7eb;
    --mv2-card-bg: #ffffff;
    --mv2-card-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --mv2-nav-bg: #ffffff;
    --mv2-nav-text: #1a1a2e;
    --mv2-input-bg: #ffffff;
    --mv2-input-border: #d1d5db;
}

/* ============================================
   Dark Mode Variables
   ============================================ */
body.dark-mode {
    --mv2-bg: #1d1e21;
    --mv2-bg-alt: #252629;
    --mv2-text: #ffffff;
    --mv2-text-secondary: #d1d1d1;
    --mv2-border: #2e2f33;
    --mv2-card-bg: #252629;
    --mv2-card-shadow: 0 2px 12px rgba(0,0,0,0.5);
    --mv2-nav-bg: #1d1e21;
    --mv2-nav-text: #ffffff;
    --mv2-input-bg: #252629;
    --mv2-input-border: #2e2f33;
}

/* ============================================
   Global Font Overrides
   ============================================ */
body {
    font-family: var(--mv2-font-body) !important;
    background-color: var(--mv2-bg);
    color: var(--mv2-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Body text / all general text */
p, span, a, li, td, th, label, input, textarea, select, button,
.font-14, .font-16, .font-12, .text-gray,
.nav-link, .nav-item, .btn, .form-control {
    font-family: var(--mv2-font-body) !important;
}

/* Heavy bold titles use Plus Jakarta Sans */
h1, h2, h3, h4, h5, h6,
.section-title,
.home-sections h2,
.home-sections h3 {
    font-family: var(--mv2-font-display) !important;
}

/* ============================================
   Dark Mode - Global Overrides
   ============================================ */
body.dark-mode {
    background-color: var(--mv2-bg) !important;
    color: var(--mv2-text) !important;
}

body.dark-mode p,
body.dark-mode span:not(.mv2-highlight):not(.text-pink):not(.text-cyan):not(.text-white),
body.dark-mode li,
body.dark-mode label,
body.dark-mode td,
body.dark-mode th,
body.dark-mode dt,
body.dark-mode dd,
body.dark-mode blockquote {
    color: #ffffff !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #ffffff !important;
}

body.dark-mode a:not(.btn):not(.mv2-btn-explore):not(.mv2-btn-demo):not(.mv2-signup-btn):not(.mv2-signin-btn):not(.mv2-eco-card-btn):not(.mv2-pathway-btn):not(.mv2-kit-cta):not(.mv2-announcement-btn):not(.mv2-frontier-card):not(.mv2-social-icons a) {
    color: #ffffff;
}

body.dark-mode a:not(.btn):hover {
    color: #43d477;
}

/* Navbar dark mode */
body.dark-mode #navbar {
    background-color: #1d1e21 !important;
    border-bottom-color: #2e2f33 !important;
}

body.dark-mode #navbar .navbar-brand img {
    filter: brightness(1.2);
}

body.dark-mode #navbar .nav-link,
body.dark-mode #navbar a,
body.dark-mode .nav-link,
body.dark-mode .mv2-nav-links .nav-link {
    color: #ffffff !important;
}

body.dark-mode #navbar .navbar-toggler-icon {
    filter: invert(1);
}

body.dark-mode .mv2-signin-btn,
body.dark-mode .mv2-auth-buttons .mv2-signin-btn {
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.3) !important;
}

body.dark-mode .mv2-theme-toggle {
    color: #ffffff;
    border-color: #2e2f33;
}

body.dark-mode .top-navbar {
    background-color: var(--mv2-nav-bg) !important;
    border-bottom-color: var(--mv2-border) !important;
}

body.dark-mode .top-navbar,
body.dark-mode .top-navbar * {
    color: var(--mv2-text-secondary) !important;
}

/* Cards dark mode */
body.dark-mode .home-sections {
    background-color: transparent;
}

body.dark-mode .section-title,
body.dark-mode .home-sections h2 {
    color: var(--mv2-text) !important;
}

body.dark-mode .section-hint {
    color: var(--mv2-text-secondary) !important;
}

/* Webinar cards / course cards */
body.dark-mode .webinar-card,
body.dark-mode .product-card,
body.dark-mode .bundle-card {
    background-color: var(--mv2-card-bg) !important;
    border-color: var(--mv2-border) !important;
}

body.dark-mode .webinar-card .webinar-card-body,
body.dark-mode .product-card .product-card-body {
    background-color: var(--mv2-card-bg) !important;
}

body.dark-mode .webinar-card .webinar-card-body h3,
body.dark-mode .webinar-card .webinar-card-body .webinar-card-title,
body.dark-mode .product-card h3 {
    color: var(--mv2-text) !important;
}

body.dark-mode .webinar-card .text-gray,
body.dark-mode .product-card .text-gray {
    color: var(--mv2-text-secondary) !important;
}

/* Forms dark mode */
body.dark-mode .form-control,
body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="password"],
body.dark-mode textarea,
body.dark-mode select {
    background-color: var(--mv2-input-bg) !important;
    border-color: var(--mv2-input-border) !important;
    color: var(--mv2-text) !important;
}

/* Dropdown dark mode */
body.dark-mode .dropdown-menu,
body.dark-mode .cat-dropdown-menu {
    background-color: var(--mv2-card-bg) !important;
    border-color: var(--mv2-border) !important;
}

body.dark-mode .cat-dropdown-menu li a,
body.dark-mode .dropdown-item {
    color: var(--mv2-text) !important;
}

body.dark-mode .cat-dropdown-menu li a:hover,
body.dark-mode .dropdown-item:hover {
    background-color: var(--mv2-bg) !important;
}

/* Borders */
body.dark-mode .border-bottom,
body.dark-mode .border-top {
    border-color: var(--mv2-border) !important;
}

.navbar-brand .img-cover {
  width: auto;
}
/* ============================================
   Theme Toggle Button
   ============================================ */
.mv2-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--mv2-border);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--mv2-text);
    margin-right: 12px;
    position: relative;
}

.mv2-theme-toggle:hover {
    background: var(--mv2-bg-alt);
    border-color: #43d477;
}

.mv2-theme-toggle .icon-sun,
.mv2-theme-toggle .icon-moon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Light mode: show moon (click to go dark) */
.mv2-theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}
.mv2-theme-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Dark mode: show sun (click to go light) */
body.dark-mode .mv2-theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}
body.dark-mode .mv2-theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

body.dark-mode .mv2-theme-toggle {
    color: #fbbf24;
    border-color: var(--mv2-border);
}

/* ============================================
   Navbar V2 Overrides (Simplified)
   ============================================ */
.mv2-nav-links {
    display: flex;
    width: 40vw;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.mv2-nav-links .nav-item .nav-link {
    font-family: var(--mv2-font-body) !important;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    color: var(--mv2-nav-text);
    transition: color 0.2s ease;
}

.mv2-nav-links .nav-item .nav-link:hover {
    color: #43d477;
}

/* Auth buttons */
.mv2-auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mv2-auth-buttons .mv2-signin-btn {
    font-family: var(--mv2-font-body) !important;
    width: 6rem;
    font-weight: 600;
    font-size: 14px;
    color: var(--mv2-nav-text);
    text-decoration: none;
    padding: 8px 20px;
    transition: color 0.2s ease;
}

.mv2-auth-buttons .mv2-signin-btn:hover {
    color: #43d477;
    text-decoration: none;
}

.mv2-auth-buttons .mv2-signup-btn {
    font-family: var(--mv2-font-body) !important;
    width: 7rem;
    background: linear-gradient(135deg, #e91e8c 0%, #9c27b0 50%, #2196f3 100%);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 28px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.mv2-auth-buttons .mv2-signup-btn:hover {
    filter: brightness(1.12);
    text-decoration: none;
    color: #fff;
    box-shadow: 0 4px 15px rgba(233, 30, 140, 0.4);
}

/* ============================================
   Navbar V2 Mobile Responsive
   ============================================ */

/* User menu in V2 navbar */
.mv2-user-menu {
    margin-left: 15px;
}

.mv2-user-menu .custom-dropdown-toggle {
    gap: 4px;
}

.mv2-user-menu .mv2-user-name {
    font-family: var(--mv2-font-body);
    color: var(--mv2-nav-text);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mv2-user-menu .custom-dropdown-body {
    right: 0;
    left: auto;
    min-width: 260px;
    top: 44px;
}

body.dark-mode .mv2-user-menu .mv2-user-name {
    color: #fff;
}

body.dark-mode .mv2-user-menu .custom-dropdown-body {
    background: #1d1e21;
    border-color: #2e2f33;
}

body.dark-mode .mv2-user-menu .dropdown-user-avatar {
    background: #252629;
    border-color: #2e2f33 !important;
}

body.dark-mode .mv2-user-menu .dropdown-user-avatar .text-secondary {
    color: #fff !important;
}

body.dark-mode .mv2-user-menu .navbar-auth-user-dropdown-item a {
    color: #d1d1d1 !important;
}

body.dark-mode .mv2-user-menu .navbar-auth-user-dropdown-item:hover {
    background-color: #252629;
}

@media (max-width: 991px) {
    .mv2-nav-links {
        width: 100% !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .mv2-nav-links .nav-item {
        width: 100%;
    }
    .mv2-nav-links .nav-item .nav-link {
        padding: 12px 16px !important;
        font-size: 15px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    .mv2-auth-buttons {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        padding: 15px 16px;
        gap: 10px;
    }
    .mv2-auth-buttons .mv2-signin-btn,
    .mv2-auth-buttons .mv2-signup-btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Dark mode navbar toggle on mobile */
@media (max-width: 991px) {
    body.dark-mode .navbar .navbar-toggle-content {
        background-color: #1d1e21 !important;
    }
    body.dark-mode .mv2-nav-links .nav-item .nav-link {
        border-bottom-color: rgba(255,255,255,0.08) !important;
    }
}

/* ============================================
   Footer V2 (Global - all pages)
   ============================================ */
.footer {
    background: #1d1e21 !important;
    padding-top: 60px !important;
    padding-bottom: 0 !important;
}

.footer .footer-subscribe {
    display: none !important;
}

.footer .mv2-footer-old-content {
    display: none !important;
}

.footer .footer-copyright-card {
    display: none !important;
}

.mv2-footer-new-content {
    display: block;
}

.mv2-footer {
    padding: 60px 0 0;
}

.mv2-footer-heading {
    font-family: var(--mv2-font-display) !important;
    font-size: 28px;
    font-weight: 800;
    text-align: left !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
    padding-bottom: 3rem;
}

.mv2-footer-heading .text-white {
    color: #fff;
}

.mv2-footer-heading .text-pink {
    color: #e91e8c;
}

.mv2-footer-columns {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

@media (max-width: 991px) {
    .mv2-footer-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575px) {
    .mv2-footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mv2-footer-col-title {
    font-family: var(--mv2-font-body) !important;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.mv2-footer-col-title.text-cyan {
    color: #00bcd4;
}

.mv2-footer-col-title.text-white {
    color: #fff;
}

.mv2-footer-col-title.text-pink {
    color: #e91e8c;
}

.mv2-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mv2-footer-links li {
    margin-bottom: 8px;
}

.mv2-footer-links a {
    font-family: var(--mv2-font-body) !important;
    font-size: 13px;
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mv2-footer-links a:hover {
    color: #fff !important;
    text-decoration: none;
    padding-left: 5px;
}

/* Connect with us bar */
.mv2-social-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #e91e8c;
    border-radius: 6px;
    padding: 12px 40px;
    max-width: 500px;
    margin: 0 auto 40px;
}

.mv2-social-bar span {
    font-family: var(--mv2-font-body) !important;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.mv2-social-icons {
    display: flex;
    gap: 10px;
}

.mv2-social-icons a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.mv2-social-icons a:hover {
    background: #fff;
    color: #e91e8c !important;
    transform: translateY(-2px);
    text-decoration: none;
}

.mv2-social-icons a img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.mv2-social-icons a:hover img {
    filter: brightness(0) invert(0.4) sepia(1) saturate(20) hue-rotate(300deg);
}

/* Footer bottom bar */
.mv2-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mv2-footer-bottom .mv2-footer-logo img {
    max-height: 36px;
}

.mv2-footer-bottom .mv2-footer-copyright {
    font-family: var(--mv2-font-body) !important;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* ============================================
   Footer V2 Mobile Responsive
   ============================================ */
@media (max-width: 991px) {
    .mv2-footer {
        padding: 40px 0 0;
    }
    .mv2-footer-heading {
        font-size: 22px;
        margin-bottom: 30px;
        padding-bottom: 2rem;
        text-align: center !important;
    }
    .mv2-footer-columns {
        gap: 25px;
        margin-bottom: 35px;
    }
}

@media (max-width: 767px) {
    .footer {
        padding-top: 40px !important;
    }
    .mv2-footer {
        padding: 30px 0 0;
    }
    .mv2-footer-heading {
        font-size: 20px;
        letter-spacing: 1px;
        margin-bottom: 25px;
        padding-bottom: 1.5rem;
    }
    .mv2-footer-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 30px;
    }
    .mv2-footer-col-title {
        font-size: 13px;
        margin-bottom: 14px;
    }
    .mv2-footer-links a {
        font-size: 12px;
    }
    .mv2-footer-links li {
        margin-bottom: 6px;
    }
    .mv2-social-bar {
        flex-direction: column;
        padding: 15px 20px;
        gap: 10px;
        max-width: 100%;
        margin-bottom: 30px;
    }
    .mv2-social-bar span {
        font-size: 14px;
    }
    .mv2-social-icons {
        gap: 8px;
    }
    .mv2-social-icons a {
        width: 34px;
        height: 34px;
    }
    .mv2-footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 15px 0;
    }
    .mv2-footer-bottom .mv2-footer-logo img {
        max-height: 30px;
    }
    .mv2-footer-bottom .mv2-footer-copyright {
        font-size: 11px;
    }
}

@media (max-width: 575px) {
    .mv2-footer-heading {
        font-size: 18px;
    }
    .mv2-footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }
}

/* ============================================
   Dark Mode - Home V2 Specific
   ============================================ */
body.dark-mode .mv2-announcement-bar {
    background: #252629;
}

body.dark-mode .mv2-hero-section {
    background: var(--mv2-bg);
}

body.dark-mode .mv2-hero-content h1 {
    color: var(--mv2-text) !important;
}

body.dark-mode .mv2-hero-content .mv2-hero-subtitle {
    color: var(--mv2-text-secondary) !important;
}

body.dark-mode .mv2-hero-tagline {
    color: var(--mv2-text-secondary) !important;
}

body.dark-mode .mv2-accreditations {
    background: var(--mv2-bg-alt);
}

body.dark-mode .mv2-accreditations .mv2-accred-title {
    color: var(--mv2-text) !important;
}

body.dark-mode .mv2-partner-card {
    background: var(--mv2-card-bg) !important;
    border-color: var(--mv2-border) !important;
}

body.dark-mode .mv2-partner-card img {
    filter: brightness(0.9) contrast(1.1);
}

body.dark-mode .mv2-ecosystem {
    background: var(--mv2-bg);
}

body.dark-mode .mv2-flagship {
    background: var(--mv2-bg) !important;
}

body.dark-mode .mv2-eco-title,
body.dark-mode .mv2-pathways-title,
body.dark-mode .mv2-flagship-title,
body.dark-mode .mv2-frontiers-title {
    color: var(--mv2-text) !important;
}

body.dark-mode .mv2-eco-subtitle,
body.dark-mode .mv2-pathways-subtitle,
body.dark-mode .mv2-flagship-subtitle {
    color: var(--mv2-text-secondary) !important;
}

body.dark-mode .mv2-eco-search {
    background: linear-gradient(var(--mv2-input-bg), var(--mv2-input-bg)) padding-box,
                linear-gradient(135deg, #e91e8c 0%, #9c27b0 50%, #2196f3 100%) border-box !important;
    border-color: transparent !important;
}

body.dark-mode .mv2-eco-search input {
    background: transparent !important;
    color: var(--mv2-text) !important;
}

body.dark-mode .mv2-eco-card {
    background: var(--mv2-card-bg) !important;
}

body.dark-mode .mv2-eco-card-title {
    color: var(--mv2-text) !important;
}

body.dark-mode .mv2-eco-card-desc {
    color: var(--mv2-text-secondary) !important;
}

body.dark-mode .mv2-pathways {
    background: var(--mv2-bg-alt);
}

body.dark-mode .mv2-pathway-item {
    background: var(--mv2-card-bg) !important;
    border-color: var(--mv2-border) !important;
}

body.dark-mode .mv2-pathway-title {
    color: var(--mv2-text) !important;
}

body.dark-mode .mv2-pathway-desc {
    color: var(--mv2-text-secondary) !important;
}

body.dark-mode .mv2-transform {
    background: var(--mv2-bg);
}

body.dark-mode .mv2-transform-title {
    color: var(--mv2-text) !important;
}

body.dark-mode .mv2-transform-desc {
    color: var(--mv2-text-secondary) !important;
}

body.dark-mode .mv2-stat-label {
    color: var(--mv2-text-secondary) !important;
}

body.dark-mode .mv2-institutions {
    background: var(--mv2-bg-alt);
}

body.dark-mode .mv2-institutions-title {
    color: var(--mv2-text) !important;
}

body.dark-mode .mv2-inst-check-text {
    color: var(--mv2-text-secondary) !important;
}

body.dark-mode .mv2-frontiers {
    background: var(--mv2-bg);
}

/* Subscribes section */
body.dark-mode .subscribes-container {
    background: var(--mv2-bg-alt) !important;
}

body.dark-mode .subscribe-plan {
    background-color: var(--mv2-card-bg) !important;
    border-color: var(--mv2-border) !important;
}

body.dark-mode .subscribe-plan .plan-title,
body.dark-mode .subscribe-plan h3 {
    color: var(--mv2-text) !important;
}

body.dark-mode .subscribe-plan .plan-description,
body.dark-mode .subscribe-plan p {
    color: var(--mv2-text-secondary) !important;
}

/* Find instructor section */
body.dark-mode .find-instructor-section {
    background-color: transparent !important;
}

body.dark-mode .find-instructor-section h2 {
    color: var(--mv2-text) !important;
}

body.dark-mode .find-instructor-section p {
    color: var(--mv2-text-secondary) !important;
}

/* Trend categories */
body.dark-mode .trend-categories-card {
    background-color: var(--mv2-card-bg) !important;
}

body.dark-mode .trend-categories-card h3 {
    color: var(--mv2-text) !important;
}

/* Blog cards */
body.dark-mode .blog-card {
    background-color: var(--mv2-card-bg) !important;
}

body.dark-mode .blog-card h3,
body.dark-mode .blog-card .blog-card-title {
    color: var(--mv2-text) !important;
}

body.dark-mode .blog-card p {
    color: var(--mv2-text-secondary) !important;
}

/* Modal dark mode */
body.dark-mode .modal-content {
    background-color: var(--mv2-card-bg) !important;
    border-color: var(--mv2-border) !important;
    color: var(--mv2-text) !important;
}

body.dark-mode .modal-header {
    border-bottom-color: var(--mv2-border) !important;
}

body.dark-mode .modal-footer {
    border-top-color: var(--mv2-border) !important;
}
