/* ===== FINLIT HEADER ===== */
.finlit-header {
    background-color: var(--primary-bg-color);
    padding: 10px 0;
    /* larger top & bottom padding */
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

/* On scroll */
.finlit-header.scrolled {
    padding: 3px 0; /* reduced top & bottom padding */
    background-color: #691bbde7;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 20px 5px 20px;
    max-width: 100%;
    height: 60px;
    /* Consistent height prevents layout shift */
}

/* Base Flex Logic */
.left-section,
.right-section {
    flex: 1;
    display: flex;
    align-items: center;
}

.left-section {
    justify-content: flex-start;
}

.right-section {
    justify-content: flex-end;
}

.finlit-logo {
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.finlit-logo img {
    max-height: 40px;
    width: auto;
    display: block;
}

.finlit-logo img {
    max-height: 40px;
    transition: max-height 0.3s ease;
}

.finlit-header.scrolled .finlit-logo img {
    max-height: 30px;
}

.menu-icon {
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    transition: opacity 0.3s;
}

.menu-icon:hover {
    opacity: 0.8;
}

.subscribe-btn {
    background-color: #F7B926;
    color: #000;
    border: none;
    padding: 10px 24px;
    border-radius: 0px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s;
    text-transform: capitalize;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ===== MEGA MENU ===== */
.mega-menu {
    position: fixed;
    right: 0;
    left: 0;
    top: 40px;
    /* Matches header height */
    background-color: #4d0688;
    /* Solid color for mobile legibility */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    z-index: 999;
}

.mega-menu.active {
    max-height: 90vh;
    overflow-y: auto;
}

.mega-menu-content {
    padding: 40px 20px;
}

.search-section {
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
}

.search-box button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 18px;
}

.menu-btn {
    background-color: #F7B926;
    color: #000;
    border: none;
    padding: 10px 24px;
    border-radius: 0px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-transform: capitalize;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.menu-column h4 {
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-column ul {
    list-style: none;
    padding: 0;
}

.menu-column ul li {
    margin-bottom: 12px;
}

.menu-column ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
    font-family: "Proxima Nova", sans-serif !important;
}

.menu-column ul li a:hover {
    color: #fff;
}

.overlay {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 998;
}

.overlay.active {
    display: block;
}

/* ===== MOBILE RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
        height: 50px;
        /* Slightly shorter for mobile */
    }

    /* Force side sections to be smaller so logo stays centered */
    .left-section,
    .right-section {
        flex: 0 0 70px;
    }

    .finlit-logo {
        flex: 1;
    }

    .finlit-logo img {
        height: 18px;
        /* Fixed height for the text logo */
    }

    .subscribe-btn {
        padding: 6px 10px;
        font-size: 11px;
        font-weight: 700;
    }

    .mega-menu {
        top: 50px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .menu-column h4 {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 8px;
    }
}