/**
 * MOBILE HAMBURGER MENU
 * Bhavyam Infotech - Professional Dark Navigation Panel
 * Updated: 2026-01-30
 */

/* ===================================
   FORCE HAMBURGER BUTTON VISIBILITY
   =================================== */

@media (max-width: 1199px) {
    .hamburger-btn {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .hamburger-trigger {
        width: 42px !important;
        height: 42px !important;
        background: linear-gradient(135deg, #C47300 0%, #B9B35A 100%) !important;
        border: none !important;
        border-radius: 8px !important;
        padding: 0 !important;
        cursor: pointer !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        transition: transform 0.3s ease, box-shadow 0.3s ease !important;
        box-shadow: 0 2px 10px rgba(196, 115, 0, 0.25) !important;
        z-index: 100 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .hamburger-trigger span {
        display: block !important;
        width: 22px !important;
        height: 2px !important;
        background: #fff !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
    }

    .hamburger-trigger:hover {
        transform: scale(1.05) !important;
        box-shadow: 0 4px 16px rgba(196, 115, 0, 0.35) !important;
    }

    /* Hide desktop navigation */
    .header-menu {
        display: none !important;
    }

    /* Header layout */
    .header-info-wrapper {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    .header-left-content {
        flex-shrink: 0;
    }

    .header-right-content {
        display: flex !important;
        align-items: center !important;
        margin-left: auto !important;
    }
}

/* ===================================
   KILL LEGACY MOBILE MENU (main.js clone)
   =================================== */
.mobile_menu {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
}

/* ===================================
   DARK PROFESSIONAL MOBILE PANEL
   =================================== */

@media (max-width: 1199px) {
    /* Body overlay */
    .body-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(5, 18, 41, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s ease, visibility 0.35s ease;
    }

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

    /* Slide-in panel - dark theme */
    .hamburger-area {
        position: fixed;
        top: 0;
        right: -380px;
        width: 340px;
        max-width: 88%;
        height: 100vh;
        height: 100dvh;
        background: linear-gradient(180deg, #0d1b2a 0%, #1b2a3d 50%, #0d1b2a 100%);
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
        z-index: 99999;
        transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
    }

    .hamburger-area.active {
        right: 0;
    }

    /* Scrollbar styling */
    .hamburger-area::-webkit-scrollbar {
        width: 3px;
    }
    .hamburger-area::-webkit-scrollbar-track {
        background: transparent;
    }
    .hamburger-area::-webkit-scrollbar-thumb {
        background: rgba(196, 115, 0, 0.3);
        border-radius: 3px;
    }

    /* Wrapper */
    .hamburger_wrapper {
        padding: 24px 24px 30px;
        min-height: 100%;
        display: flex;
        flex-direction: column;
    }

    /* Top bar: logo + close */
    .hamburger_top {
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        margin-bottom: 0;
    }

    .hamburger_logo img {
        max-width: 140px;
        height: auto;
        filter: brightness(0) invert(1);
        opacity: 0.9;
    }

    .hamburger_close_btn {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.25s ease, border-color 0.25s ease;
        color: rgba(255, 255, 255, 0.6);
        font-size: 16px;
    }

    .hamburger_close_btn:hover {
        background: rgba(196, 115, 0, 0.15);
        border-color: rgba(196, 115, 0, 0.3);
        color: #C47300;
    }

    /* Search bar */
    .hamburger_search {
        margin: 20px 0;
        position: relative;
    }

    .hamburger_search form {
        position: relative;
        display: flex;
        align-items: center;
    }

    .hamburger_search input {
        width: 100%;
        height: 44px;
        padding: 0 44px 0 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.9);
        background: rgba(255, 255, 255, 0.04);
        transition: border-color 0.25s ease, background 0.25s ease;
    }

    .hamburger_search input::placeholder {
        color: rgba(255, 255, 255, 0.3);
    }

    .hamburger_search input:focus {
        outline: none;
        border-color: rgba(196, 115, 0, 0.4);
        background: rgba(255, 255, 255, 0.06);
    }

    .hamburger_search button {
        position: absolute;
        right: 4px;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        background: transparent;
        border: none;
        border-radius: 6px;
        color: rgba(255, 255, 255, 0.4);
        cursor: pointer;
        transition: color 0.25s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }

    .hamburger_search button:hover {
        color: #C47300;
    }

    /* ===================================
       NAVIGATION MENU
       =================================== */
    .hamburger_menu {
        flex: 1;
        padding: 6px 0 20px;
    }

    .hamburger_menu > ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .hamburger_menu > ul > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .hamburger_menu > ul > li:last-child {
        border-bottom: none;
    }

    .hamburger_menu > ul > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 12px;
        color: rgba(255, 255, 255, 0.8);
        font-size: 14.5px;
        font-weight: 500;
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        transition: color 0.25s ease, background 0.25s ease;
        border-radius: 6px;
        margin: 2px 0;
        position: relative;
    }

    .hamburger_menu > ul > li > a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 60%;
        background: linear-gradient(180deg, #C47300 0%, #B9B35A 100%);
        border-radius: 0 2px 2px 0;
        transition: width 0.25s ease;
    }

    .hamburger_menu > ul > li > a:hover,
    .hamburger_menu > ul > li.active > a {
        color: #C47300;
        background: rgba(196, 115, 0, 0.06);
    }

    .hamburger_menu > ul > li > a:hover::before,
    .hamburger_menu > ul > li.active > a::before {
        width: 3px;
    }

    /* Dropdown arrow */
    .hamburger_menu .has-dropdown > a::after {
        content: '\f107';
        font-family: 'Font Awesome 5 Pro';
        font-weight: 300;
        font-size: 12px;
        margin-left: auto;
        color: rgba(255, 255, 255, 0.3);
        transition: transform 0.3s ease, color 0.3s ease;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
    }

    .hamburger_menu .has-dropdown.active > a::after {
        transform: rotate(180deg);
        color: #C47300;
    }

    /* ===================================
       SUBMENU - ACCORDION STYLE
       =================================== */
    .hamburger_menu .submenu {
        list-style: none;
        padding: 0 0 4px 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(0, 0, 0, 0.15);
        border-radius: 0 0 8px 8px;
    }

    .hamburger_menu .has-dropdown.active .submenu {
        max-height: 600px;
    }

    .hamburger_menu .submenu li {
        margin: 0;
    }

    .hamburger_menu .submenu li a {
        display: flex;
        align-items: center;
        padding: 11px 16px 11px 20px;
        color: rgba(255, 255, 255, 0.55);
        font-size: 13px;
        font-weight: 400;
        text-decoration: none;
        transition: color 0.2s ease, padding-left 0.2s ease;
        border-left: 2px solid transparent;
        letter-spacing: 0.2px;
    }

    .hamburger_menu .submenu li a::before {
        content: '\f105';
        font-family: 'Font Awesome 5 Pro';
        font-weight: 300;
        font-size: 10px;
        margin-right: 10px;
        color: rgba(196, 115, 0, 0.4);
        transition: color 0.2s ease;
        flex-shrink: 0;
    }

    .hamburger_menu .submenu li a:hover {
        color: #C47300;
        padding-left: 24px;
        border-left-color: rgba(196, 115, 0, 0.3);
    }

    .hamburger_menu .submenu li a:hover::before {
        color: #C47300;
    }

    /* ===================================
       CONTACT INFO & SOCIAL
       =================================== */
    .hamburger_info_wrap {
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        margin-top: auto;
    }

    .hamburger_info {
        margin-bottom: 18px;
    }

    .hamburger_info .address,
    .hamburger_info .phone,
    .hamburger_info .email {
        display: flex;
        align-items: flex-start;
        margin-bottom: 12px;
    }

    .hamburger_info .address:last-child,
    .hamburger_info .phone:last-child,
    .hamburger_info .email:last-child {
        margin-bottom: 0;
    }

    .hamburger_info .icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        background: rgba(196, 115, 0, 0.1);
        border: 1px solid rgba(196, 115, 0, 0.15);
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #C47300;
        font-size: 13px;
        margin-right: 12px;
    }

    .hamburger_info .info p,
    .hamburger_info .info a {
        margin: 0;
        font-size: 13px;
        color: rgba(255, 255, 255, 0.5);
        text-decoration: none;
        line-height: 1.55;
    }

    .hamburger_info .info a:hover {
        color: #C47300;
    }

    /* Social icons */
    .hamburger_social ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        gap: 8px;
    }

    .hamburger_social ul li a {
        width: 34px;
        height: 34px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.4);
        font-size: 14px;
        transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    }

    .hamburger_social ul li a:hover {
        background: rgba(196, 115, 0, 0.15);
        border-color: rgba(196, 115, 0, 0.3);
        color: #C47300;
    }

    /* Prevent body scroll when menu open */
    body.hamburger-open {
        overflow: hidden;
    }
}

/* ===================================
   MOBILE SPECIFIC SIZES
   =================================== */

@media (max-width: 767px) {
    .hamburger-trigger {
        width: 38px !important;
        height: 38px !important;
        gap: 4px !important;
    }

    .hamburger-trigger span {
        width: 20px !important;
    }

    .hamburger-area {
        width: 300px;
    }

    .hamburger_wrapper {
        padding: 20px 18px 24px;
    }

    .hamburger_logo img {
        max-width: 120px;
    }

    .hamburger_menu > ul > li > a {
        font-size: 13.5px;
        padding: 12px 10px;
        letter-spacing: 0.6px;
    }

    .hamburger_menu .submenu li a {
        font-size: 12.5px;
        padding: 10px 14px 10px 18px;
    }
}

@media (max-width: 479px) {
    .hamburger-trigger {
        width: 36px !important;
        height: 36px !important;
    }

    .hamburger-trigger span {
        width: 18px !important;
    }

    .hamburger-area {
        width: 280px;
    }

    .hamburger_search input {
        height: 40px;
        font-size: 13px;
    }

    .hamburger_search button {
        width: 32px;
        height: 32px;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

.hamburger-trigger:focus,
.hamburger_close_btn:focus {
    outline: 2px solid #C47300;
    outline-offset: 2px;
}

.hamburger_menu a:focus {
    outline: 2px solid rgba(196, 115, 0, 0.5);
    outline-offset: -2px;
}

/* ===================================
   REDUCED MOTION
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .hamburger-trigger,
    .hamburger-area,
    .body-overlay,
    .hamburger_menu a,
    .hamburger_close_btn {
        transition: none !important;
    }

    .hamburger-trigger:hover,
    .hamburger_close_btn:hover {
        transform: none !important;
    }
}
