:root {
    --primary-blue: #007bff;
    /* Standard Bootstrap Primary */
    --success-green: #28a745;
    /* Standard Bootstrap Success */
    --light-bg: #f8f9fa;
    /* Standard Bootstrap Light */
}

/* ============================================================== */
/* FIX: Add padding to the body to clear the fixed header */
/* Adjusted for Header Top Bar (visible) + Main Nav Bar (shrunk) */
body {
    padding-top: 95px;
}

/* ============================================================== */

/* ============================================== */
/* GENERAL HEADER STYLES */
/* ============================================== */
.header-main {
    /* Now using fixed-top */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 1030;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.header-top-area-wrapper .btn-gradient {
    padding: 0.2rem 1rem;
    font-size: 0.8rem;
    border-radius: 50rem;
}

/* Removed max-height/overflow/transition on top bar wrapper */

/* Main Nav Link Styling */
.main-nav-bar .nav-link {
    color: #343a40 !important;
    /* padding: 0.5rem 1rem; */
    transition: color 0.2s;
}

.main-nav-bar .nav-link:hover {
    color: var(--primary-blue) !important;
}

/* ============================================== */
/* TOGGLER & MOBILE MENU STYLES */
/* ============================================== */
.navbar-toggler {
    background-color: white !important;
    border: 1px solid #dee2e6 !important;
    padding: 0.5rem 0.75rem;
    border-radius: 0.3rem;
    right: 10px;
    position: absolute;
}

.navbar-toggler .fas.fa-bars {
    color: #495057;
    font-size: 1.25rem;
}

/* Offcanvas Customization (Mobile Menu) */
.offcanvas-start {
    width: 300px;
    border-right: 5px solid var(--primary-blue);
}

.offcanvas-header {
    background: linear-gradient(90deg, #0062FF, #00D48C);
    padding: 9px 20px;
}

.custom-offcanvas-body {
    /* background-color: #f8f9fa; */
}

.offcanvas-body .nav-item .nav-link {
    font-size: 14px;
    /* padding: 0.8rem 1rem; */
    /* border-bottom: 1px solid #e9ecef; */
    transition: background-color 0.2s, padding-left 0.2s ease-in-out;
    font-weight: 500;
    font-family: "Montserrat", sans-serif;
}

.offcanvas-body .nav-item .nav-link:hover {
    /* background-color: #e2f1ff; */
    /* padding-left: 1.5rem; */
    color: var(--primary-blue) !important;
}

/* ============================================== */
/* DESKTOP STYLES & MENU POSITIONING */
/* ============================================== */
@media (min-width: 992px) {
    .navbar-toggler {
        display: none;
    }

    .offcanvas-start {
        visibility: visible !important;
        transform: none !important;
        background-color: transparent !important;
        border: none !important;
        position: static;
        height: auto;
    }

    .offcanvas-body {
        padding: 0 !important;
    }

    .offcanvas-header {
        display: none;
    }

    /* Mega Menu Positioning */
    .dropdown-mega .dropdown-menu {
        left: 0;
        transform: none;
        width: 800px;
        max-width: 95vw;
        /* border-top: 3px solid var(--primary-blue); */
        border-radius: 0.5rem;
        box-shadow: 0 8px 16px rgb(0 0 0 / 6%);
        border: none;
        padding: 40px 35px;
    }

    .dropdown-mega .dropdown-menu .row {
        margin: 0;
    }

    /* WIDE SUBMENU STYLES (DOROS EDUZONE & SUPPORT) */
    .dropdown-wide .dropdown-menu {
        left: 0 !important;
        transform: none !important;
        width: 300px;
        max-width: 95vw;
        border-top: 3px solid var(--primary-blue);
        border-radius: 0.5rem;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        border: none;
        padding: 30px;
    }
}

/* Mobile Menu Fix */
@media (max-width: 991px) {

    .dropdown-mega .dropdown-menu,
    .dropdown-wide .dropdown-menu {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent;
    }
}

/* ============================================== */
/* SCROLL EFFECT STYLES */
/* ============================================== */
.header-main.is-scrolled .main-nav-bar {
    /* This shrinks the main nav bar */
    /* padding-top: 0.5rem !important; */
    /* padding-bottom: 0.5rem !important; */
    transition: padding 0.3s ease;
}

/* --- BUTTON & ANIMATION STYLES (Unchanged) --- */
.navbar-brand img {
    /* transition: transform 0.3s ease-out; */
}

.navbar-brand img:hover {
    /* transform: scale(1.05); */
}

@media (min-width: 992px) {
    .main-nav-bar .nav-link {
        position: relative;
        overflow: hidden;
    }

    .main-nav-bar .nav-link:hover::after {
        transform: translateX(0);
    }
}

.btn-gradient {
    background-image: linear-gradient(90deg, #007bff 0%, #00d9cd 50%, #007bff 100%);
    transition: all 0.4s ease-in-out;
    background-size: 200% auto;
    color: white !important;
}

.btn-gradient:hover {
    background-position: right center;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    transform: translateY(-1px);
}

.btn-outline-primary {
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: all 0.4s ease-in-out;
    border: 2px solid;
    padding: 12px 12px;
    font-weight: 500;
    text-transform: capitalize;
    font-size: 14px;
    line-height: 12px;
    font-family: "Montserrat", sans-serif;
}

.btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-blue);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease-in-out;
}

.btn-outline-primary:hover {
    color: white !important;
    border-color: var(--primary-blue);
}

.btn-outline-primary:hover::before {
    transform: scaleX(1);
}

.btn-master-markets {
    background-color: #e3f2fd;
    color: var(--primary-blue);
    border: 1px solid #bbdefb;
    border-radius: 0.3rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

.btn-master-markets:hover {
    background-color: var(--primary-blue);
    color: white;
}

.dropdown-toggle::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    /* required for solid icons */
    content: "\f078";
    /* chevron-down icon */
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
    border: none;
    top: -1px;
    position: relative;
}

.dropdown-menu h6 {
    font-weight: 600;
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
}

.dropdown-item {
    padding: 0px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    padding: 0px 0;
    /* font-size: 14px; */
    /* line-height: 1.4; */
    white-space: normal;              /* allow wrapping */
    overflow-wrap: break-word;
}

.dropdown-item:hover,
.dropdown-item:active {
    background-color: transparent;
    /* font-family: "Inter", sans-serif; */
    color: #0d6efd;
}

.dropdown-mega .dropdown-menu li {
    margin-bottom: 12px;
    font-family: "Inter", sans-serif;
}

.dropdown-menu li {
    margin-bottom: 11px;
    font-size: 14px;
}

.navbar .btn-gradient {
    line-height: 25px;
    /* padding: 0px; */
    height: max-content;
    font-size: 14px;
    font-weight: 500;
    font-family: "Inter", sans-serif;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Montserrat", sans-serif;
}
.offcanvas-header img {
    width: 100px;
}
.navbar-nav .nav-item {
    padding: 0px 8px;
}




/**/

.market-nav-wrapper {
    background: linear-gradient(to right, #F0F9FF, #F8FBFF);
}
/* Sub-Menu Links */
.sub-menu-links .nav-link {
    color: #4a5568 !important;
    font-size: 13px;
    font-weight: 600;
    padding: 0;
    transition: color 0.2s;
    font-family: "Montserrat", sans-serif;
    background: transparent;
    color: #212529 !important;
    padding: 8px 24px;
}

.sub-menu-links .nav-link:hover {
    color: #007bff !important;
}

/* Search Pill Styling */
.search-pill {
    max-width: 250px;
}

.search-pill .form-control, 
.search-pill .input-group-text {
    border-radius: 10px !important; /* Forces the pill shape */
    border: 1px solid #e2e8f0;
    font-size: 13px;
    padding: 9px 15px;
}

.search-pill .input-group-text {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    background-color: white;
}

.search-pill .form-control {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.search-pill .form-control:focus {
    box-shadow: none;
    border-color: #007bff;
}
.sub-menu-links .nav-item {
    /* padding: 8px 24px; */
}
.sub-menu-links .nav-link:hover{
    background-color: white;
}





/* 1. The Scroll Container */
.scroll-container {
    overflow-x: auto;
    display: flex;
    white-space: nowrap;
    scrollbar-width: none; /* Hide for Firefox */
    -ms-overflow-style: none; /* Hide for IE/Edge */
    flex-grow: 1;
    mask-image: linear-gradient(to right, black 85%, transparent 100%); /* Fades out right edge */
    -webkit-mask-image: linear-gradient(to right, black 85%, #00000000 100%);
}

.scroll-container::-webkit-scrollbar {
    display: none; /* Hide for Chrome/Safari */
}

/* 2. The Modern "Chip" Look */
.market-chips {
    gap: 7px; /* Space between links */
    padding: 4px 0;
}

.market-chips .nav-link {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    background: transparent;
    border-radius: 7px; /* Perfect pill shape */
    padding: 8px 10px !important;
    border: none;
    transition: all 0.2s ease-in-out;
    font-family: "Montserrat", sans-serif;
    text-transform: uppercase;
}

/* Active Chip Style */
.market-chips .nav-link.active {
    background: linear-gradient(90deg, #007bff 0%, #00d2ff 100%); /* Modern dark look or use your brand color */
    color: #fff !important;
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); */
    /* border-radius: 20px; */
}

.market-chips .nav-link:hover:not(.active) {
    background: #fff;
    color: #111;
}

/* 3. Modern Compact Search Button */
.btn-search-pill {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: 0.3s;
}

.btn-search-pill:hover {
    background: #000;
    color: #fff;
}

/* Specific Mobile Fixes */
@media (max-width: 768px) {
    .market-nav-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .market-chips .nav-link {
        font-size: 12px; /* Slightly smaller for mobile */
        letter-spacing: -0.2px;
    }
}
