:root {
    --primary-color: #0d47a1; /* MG Education Blue */
    --secondary-color: #1c335a;
    --text-color: #333;
    --light-grey: #f8f9fa;
    --border-color: #dee2e6;
    --white: #ffffff;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
}

/* Top Bar */
.top-bar {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 8px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar a {
    color: var(--white);
    text-decoration: none;
}

.top-bar-right .offer-tag {
    color: #ffc107;
    font-weight: bold;
}

.grab-now {
    text-decoration: underline !important;
    font-weight: bold;
}

/* Main Header */
.main-header {
    padding: 15px 5%;
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.logo img {
    height: 45px;
}

.header-search-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
}


.search-bar {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: #f1f3f5;
    outline: none;
}

.search-bar .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
}

.header-links .highlight-link {
    background: #e7f1ff;
    padding: 8px 15px;
    border-radius: 4px;
    color: var(--primary-color);
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-auth {
    padding: 8px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-signup {
    background: var(--primary-color);
    color: #fff;
}

.btn-signup:hover {
    background: #0b3d91; /* Darker MG blue */
    border-color: #0b3d91;
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
    transform: translateY(-2px);
}

.btn-login {
    background: transparent;
    color: var(--primary-color);
}

.btn-login:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.2);
    transform: translateY(-2px);
}

/* Navigation Bar */
.nav-bar {
    padding: 10px 5%;
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    flex-wrap: nowrap;
}

.nav-menu li:not(:last-child) {
    border-right: 1.5px solid #ddd;
}

.nav-menu li a {
    text-decoration: none;
    color: #444;
    font-size: 13px;
    font-weight: 600;
    padding: 0 16px;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

.browse-categories {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--secondary-color);
    font-size: 14px;
}

.mobile-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Professional Mobile Sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: var(--white);
    z-index: 2001;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 5px 0 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-color);
    cursor: pointer;
}

.sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-section ul li {
    margin-bottom: 5px;
}

.sidebar-section ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: background 0.2s;
}

.sidebar-section ul li a i {
    width: 20px;
    color: var(--primary-color);
    font-size: 16px;
}

.sidebar-section ul li a:hover {
    background: var(--light-grey);
    color: var(--primary-color);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-footer .btn-auth {
    text-align: center;
}

/* Mobile Responsiveness */
@media (max-width: 1150px) {
    .header-links, .auth-buttons {
        display: none;
    }
}

@media (max-width: 768px) {
    .top-bar-right {
        display: none;
    }
    
    .top-bar {
        justify-content: center;
        padding: 5px;
    }
    
    .main-header {
        justify-content: space-between;
        padding: 10px 5%;
    }

    .logo img {
        height: 35px;
    }

    .header-search-container, .nav-bar {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }
}
