﻿/* ========================================
   MAHESH SEED COMPANY - HEADER STYLES
   Mobile Responsive | Product Dropdown
   ======================================== */

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------- Company Colors ---------- */
:root {
    --primary-green: #2e7d32;
    --primary-green-dark: #1b5e20;
    --primary-green-light: #4caf50;
    --secondary-orange: #ed6c02;
    --secondary-orange-dark: #bf5b02;
    --secondary-orange-light: #ff9800;
    --accent-brown: #8b5a2b;
    --text-dark: #1f2937;
    --text-light: #f9fafb;
    --bg-light: #ffffff;
    --bg-gray: #f3f4f6;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', 'Open Sans', sans-serif;
    overflow-x: hidden;
}

/* ---------- Top Bar ---------- */
.mahesh-top-bar {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--secondary-orange-dark) 100%);
    color: var(--text-light);
    text-align: center;
    padding: 12px 20px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1001;
    border-bottom: 3px solid var(--secondary-orange-light);
}

    .mahesh-top-bar .company-tagline {
        display: block;
        font-size: 14px;
        font-weight: 400;
        letter-spacing: 1px;
        margin-top: 4px;
        opacity: 0.9;
        text-transform: none;
        font-style: italic;
    }

/* ---------- Main Header ---------- */
.mahesh-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    will-change: transform, height;
}

    /* Header when scrolled */
    .mahesh-header.shrink {
        box-shadow: var(--shadow-lg);
    }

        .mahesh-header.shrink .mahesh-logo-img {
            height: 60px;
        }

/* Placeholder to prevent content jump */
#mahesh-header-placeholder {
    width: 100%;
    height: 0;
    transition: height 0.3s ease;
}

/* ---------- Navbar Container ---------- */
.mahesh-navbar {
    width: 100%;
    background: var(--bg-light);
}

.mahesh-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 40px;
    transition: padding 0.3s ease;
}

/* ---------- Logo Section ---------- */
.mahesh-logo-header {
    display: flex;
    align-items: center;
}

.mahesh-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.mahesh-logo-img {
    height: 80px;
    width: auto;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

    .mahesh-logo-img:hover {
        transform: scale(1.05);
        filter: drop-shadow(0 4px 8px rgba(46, 125, 50, 0.3));
    }

.mahesh-logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-green);
    line-height: 1.2;
    border-left: 2px solid var(--secondary-orange);
    padding-left: 10px;
}

    .mahesh-logo-text span {
        display: block;
        font-size: 12px;
        color: var(--secondary-orange);
        font-weight: 500;
        letter-spacing: 1px;
    }

/* ---------- Navigation Menu ---------- */
.mahesh-nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.mahesh-nav-item {
    position: relative;
}

.mahesh-nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

    .mahesh-nav-link i {
        font-size: 14px;
        transition: transform 0.3s ease;
    }

    .mahesh-nav-link:hover {
        color: var(--primary-green);
        border-bottom-color: var(--secondary-orange);
    }

    .mahesh-nav-link.active {
        color: var(--primary-green);
        border-bottom-color: var(--primary-green);
        font-weight: 700;
    }

/* ---------- Product Dropdown Styles ---------- */
.mahesh-dropdown {
    position: relative;
}

.mahesh-dropdown-toggle {
    cursor: pointer;
}

.mahesh-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-light);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(46, 125, 50, 0.1);
}

.mahesh-dropdown:hover .mahesh-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mahesh-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    gap: 12px;
    border-left: 3px solid transparent;
}

    .mahesh-dropdown-item i {
        width: 20px;
        color: var(--primary-green);
        font-size: 16px;
    }

    .mahesh-dropdown-item:hover {
        background: var(--bg-gray);
        color: var(--primary-green);
        border-left-color: var(--secondary-orange);
        padding-left: 25px;
    }

    .mahesh-dropdown-item .product-tag {
        margin-left: auto;
        font-size: 10px;
        background: var(--primary-green-light);
        color: white;
        padding: 2px 6px;
        border-radius: 12px;
        opacity: 0.8;
    }

    /* Product icons colors */
    .mahesh-dropdown-item .fa-seedling {
        color: var(--primary-green);
    }

    .mahesh-dropdown-item .fa-wheat-alt {
        color: #b45309;
    }

    .mahesh-dropdown-item .fa-leaf {
        color: #2e7d32;
    }

    .mahesh-dropdown-item .fa-apple-alt {
        color: var(--accent-brown);
    }

/* ---------- Mobile Menu Toggle ---------- */
.mahesh-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

    .mahesh-menu-toggle:focus {
        outline: 2px solid var(--primary-green-light);
        outline-offset: 2px;
        border-radius: 4px;
    }

.mahesh-bar {
    width: 30px;
    height: 3px;
    background: var(--primary-green);
    border-radius: 3px;
    display: block;
    margin: 4px 0;
    transition: all 0.3s ease;
}

/* Toggle animation classes */
.mahesh-menu-toggle.active .mahesh-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--secondary-orange);
}

.mahesh-menu-toggle.active .mahesh-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mahesh-menu-toggle.active .mahesh-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--secondary-orange);
}

/* ---------- Mobile Responsive Styles ---------- */
@media (max-width: 992px) {
    .mahesh-container {
        padding: 12px 20px;
    }

    .mahesh-logo-img {
        height: 60px;
    }

    .mahesh-logo-text {
        font-size: 16px;
    }

    .mahesh-menu-toggle {
        display: flex;
    }

    /* Mobile Navigation Panel */
    .mahesh-nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        max-width: 380px;
        height: 100vh;
        background: linear-gradient(145deg, #ffffff 0%, #f8faf8 100%);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0;
        padding: 100px 20px 40px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
        border-left: 3px solid var(--primary-green);
    }

        .mahesh-nav-menu.open {
            transform: translateX(0);
        }

    .mahesh-nav-item {
        width: 100%;
        margin: 5px 0;
    }

    .mahesh-nav-link {
        padding: 15px 20px;
        font-size: 18px;
        border-bottom: 1px solid rgba(46, 125, 50, 0.1);
        border-radius: 8px;
        width: 100%;
    }

        .mahesh-nav-link:hover {
            background: rgba(46, 125, 50, 0.05);
            border-bottom-color: var(--secondary-orange);
            padding-left: 25px;
        }

    /* Mobile Dropdown Styles */
    .mahesh-dropdown {
        width: 100%;
    }

    .mahesh-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 0 20px;
        margin: 5px 0;
        background: transparent;
        border: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .mahesh-dropdown.active .mahesh-dropdown-menu {
        max-height: 300px;
    }

    .mahesh-dropdown-item {
        padding: 12px 20px;
        border-left: 3px solid transparent;
        background: rgba(46, 125, 50, 0.02);
        margin: 2px 0;
        border-radius: 0 8px 8px 0;
    }

        .mahesh-dropdown-item:hover {
            background: rgba(237, 108, 2, 0.05);
            border-left-color: var(--secondary-orange);
        }

    .mahesh-nav-link i {
        margin-left: auto;
    }

    /* Mobile overlay when menu open */
    body.menu-open {
        overflow: hidden;
    }

        body.menu-open::after {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            animation: fadeIn 0.3s ease;
        }
}

/* ---------- Small Mobile Devices ---------- */
@media (max-width: 576px) {
    .mahesh-top-bar {
        font-size: 18px;
        padding: 8px 12px;
    }

        .mahesh-top-bar .company-tagline {
            font-size: 11px;
        }

    .mahesh-container {
        padding: 8px 15px;
    }

    .mahesh-logo-img {
        height: 45px;
    }

    .mahesh-logo-text {
        font-size: 14px;
        padding-left: 6px;
    }

        .mahesh-logo-text span {
            font-size: 10px;
        }

    .mahesh-nav-menu {
        width: 100%;
        max-width: none;
        padding: 80px 15px 30px;
    }

    .mahesh-nav-link {
        font-size: 16px;
        padding: 12px 15px;
    }

    .mahesh-dropdown-item {
        font-size: 14px;
        padding: 10px 15px;
    }
}

/* ---------- Tablet Specific ---------- */
@media (min-width: 769px) and (max-width: 992px) {
    .mahesh-nav-menu {
        width: 70%;
        max-width: 350px;
    }
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Desktop Dropdown Hover Enhancement ---------- */
@media (min-width: 993px) {
    .mahesh-dropdown-menu {
        animation: slideDown 0.3s ease;
    }

    .mahesh-dropdown-item {
        position: relative;
        overflow: hidden;
    }

        .mahesh-dropdown-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 0;
            background: linear-gradient(90deg, rgba(46, 125, 50, 0.1), transparent);
            transition: width 0.3s ease;
            z-index: -1;
        }

        .mahesh-dropdown-item:hover::before {
            width: 100%;
        }
}

/* ---------- Utility Classes ---------- */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-pattern {
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%), linear-gradient(-45deg, #f8f9fa 25%, transparent 25%);
    background-size: 20px 20px;
}
