﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

:root {
    --green: #2e7d32;
    --green-dark: #1b5e20;
    --orange: #ed6c02;
    --light: #ffffff;
    --shadow: 0 8px 25px rgba(0,0,0,.15);
}

/* TOP BAR */
.mahesh-top-bar {
    background: linear-gradient(135deg, var(--green-dark), var(--orange));
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 26px;
    font-weight: 700;
}

.company-tagline {
    display: block;
    font-size: 13px;
    font-style: italic;
}

/* HEADER */
.mahesh-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 999;
    box-shadow: var(--shadow);
}

/* NAV */
.mahesh-container {
    max-width: 1300px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
}

/* LOGO */
.mahesh-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.mahesh-logo-img {
    height: 70px;
}

.mahesh-logo-text {
    font-weight: 700;
    color: var(--green);
}

/* MENU - DESKTOP */
.mahesh-nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.mahesh-nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: .3s;
}

    .mahesh-nav-link:hover {
        color: var(--green);
    }

/* DROPDOWN - DESKTOP */
.mahesh-dropdown {
    position: relative;
}

.mahesh-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    width: 230px;
    box-shadow: var(--shadow);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: .35s ease;
}

.mahesh-dropdown:hover .mahesh-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mahesh-dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    gap: 10px;
    transition: .3s;
}

    .mahesh-dropdown-item:hover {
        background: #f5f5f5;
    }

.product-tag {
    margin-left: auto;
    background: var(--green);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

/* MOBILE BUTTON */
.mahesh-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    padding: 5px;
}

.mahesh-bar {
    width: 28px;
    height: 3px;
    background: var(--green);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
    display: block;
}

/* HAMBURGER ANIMATION */
.mahesh-menu-toggle.active .mahesh-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mahesh-menu-toggle.active .mahesh-bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mahesh-menu-toggle.active .mahesh-bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* OVERLAY */
.mahesh-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 998;
    backdrop-filter: blur(3px);
}

    .mahesh-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* ========== MOBILE STYLES ========== */
@media screen and (max-width: 992px) {

    /* Show mobile toggle button */
    .mahesh-menu-toggle {
        display: block;
        order: 1; /* This ensures toggle stays on left */
    }

    /* Adjust container for mobile */
    .mahesh-container {
        padding: 10px 15px;
    }

    /* Logo stays in center/right */
    .mahesh-logo-header {
        order: 2;
        margin-right: auto;
    }

    /* Hide desktop menu by default */
    .mahesh-nav-menu {
        position: fixed;
        top: 0;
        left: -100%; /* Start from left side */
        width: 85%;
        max-width: 380px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 20px 40px;
        margin: 0;
        gap: 10px;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth easing */
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        overflow-y: auto;
        display: flex;
        border-top-right-radius: 20px;
        border-bottom-right-radius: 20px;
    }

        /* Open state - slide in from left */
        .mahesh-nav-menu.open {
            left: 0;
        }

    /* Nav items styling for mobile */
    .mahesh-nav-item {
        width: 100%;
    }

    .mahesh-nav-link {
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
        border-radius: 12px;
        transition: background-color 0.3s ease;
    }

        .mahesh-nav-link:hover {
            background: #f0f7f0;
        }

        .mahesh-nav-link i {
            width: 24px;
            font-size: 18px;
        }

    /* Mobile dropdown styles */
    .mahesh-dropdown {
        width: 100%;
    }

    .mahesh-dropdown-toggle {
        justify-content: space-between;
        width: 100%;
    }

    .mahesh-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        background: #f9f9f9;
        border-radius: 12px;
        margin-top: 5px;
        width: 100%;
    }

    .mahesh-dropdown.active .mahesh-dropdown-menu {
        max-height: 400px;
        transition: max-height 0.5s ease-in-out;
    }

    .mahesh-dropdown-item {
        padding: 12px 20px 12px 45px;
        border-radius: 8px;
    }

    .dropdown-arrow {
        transition: transform 0.3s ease;
    }

    .mahesh-dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }

    /* Product tag adjustment for mobile */
    .product-tag {
        margin-left: 10px;
        font-size: 10px;
        padding: 2px 8px;
    }

    /* Ensure content doesn't scroll behind menu */
    body.menu-open {
        overflow: hidden;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    .mahesh-nav-menu {
        width: 90%;
        padding: 90px 15px 30px;
    }

    .mahesh-logo-img {
        height: 50px;
    }

    .mahesh-logo-text {
        font-size: 14px;
    }

    .mahesh-top-bar {
        font-size: 20px;
        padding: 8px;
    }

    .company-tagline {
        font-size: 11px;
    }
}

/* Ensure smooth transitions for all interactive elements */
.mahesh-nav-link,
.mahesh-dropdown-item,
.mahesh-dropdown-menu,
.mahesh-bar {
    transition: all 0.3s ease;
}
