/* ========================================
   MOBILE HEADER BAR
   ======================================== */

.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: var(--thm-primary-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

@media (max-width: 1399px) {
    .mobile-header {
        display: block;
    }
}

.mobile-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 100%;
}

.mobile-header-logo {
    display: flex;
    align-items: center;
}

.mobile-header-logo img {
    height: 50px;
    width: auto;
}

.mobile-header .mobile-menu-button {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: transparent;
    border: none;
    margin: 0;
}

.mobile-header .mobile-menu-button span {
    height: 3px;
    width: 28px;
    background-color: var(--thm-white);
    display: block;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-header .mobile-menu-button:hover span {
    background-color: var(--thm-primary);
}

/* Sticky mobile header */
.mobile-header.stuck {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mobile-header.stuck .mobile-header-logo img {
    height: 40px;
    transition: height 0.3s ease;
}

/* Adjust main content padding for mobile */
@media (max-width: 1399px) {
    main {
        padding-top: 80px !important;
    }
}

/* ========================================
   MOBILE MENU STYLES
   ======================================== */

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Mobile Menu Container */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    right: 0;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--thm-primary-dark);
    border-bottom: 2px solid var(--thm-gray);
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-menu-logo img {
    height: 40px;
    width: auto;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.mobile-menu-close:hover {
    transform: rotate(90deg);
}

/* Mobile Menu List */
.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list > li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-list > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mobile-menu-list > li > a:hover,
.mobile-menu-list > li.active > a {
    background: var(--thm-accent);
    color: var(--thm-black);
    padding-left: 25px;
}

/* Dropdown Toggle Button */
.mobile-dropdown-toggle {
    background: transparent;
    border: none;
    padding: 16px 20px;
    color: #333;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mobile-dropdown-toggle:hover {
    background: var(--thm-accent);
    color: var(--thm-black);
    padding-left: 25px;
}

.mobile-dropdown-toggle i {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.mobile-dropdown-toggle.active i {
    transform: rotate(180deg);
}

/* Mobile Submenu */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    background: #f8f9fa;
    transition: max-height 0.4s ease;
}

.mobile-submenu.active {
    max-height: 1000px;
}

.mobile-submenu li {
    border-bottom: 1px solid #e9ecef;
}

.mobile-submenu li:last-child {
    border-bottom: none;
}

.mobile-submenu a {
    display: block;
    padding: 14px 20px 14px 40px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-submenu a:hover {
    background: #ffffff;
    color: var(--thm-primary);
    padding-left: 45px;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.mobile-menu-footer .btn {
    width: 100%;
    padding: 14px;
    text-align: center;
    background: var(--thm-primary);
    color: #ffffff;
    text-decoration: none;
    display: block;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mobile-menu-footer .btn:hover {
    background: var(--thm-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile Menu Contact Info */
.mobile-contact-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.mobile-contact-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-contact-info li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
}

.mobile-contact-info i {
    color: var(--thm-primary);
    font-size: 16px;
    width: 20px;
}

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

/* Responsive adjustments for mobile menu button */
@media (max-width: 1399px) {
    .mobile-menu-button {
        display: flex !important;
    }
}

/* Hide desktop navigation on mobile */
@media (max-width: 1399px) {
    .navigation {
        display: none !important;
    }
}

/* Adjust mobile menu for smaller screens */
@media (max-width: 480px) {
    .mobile-menu {
        width: 100%;
        max-width: 100%;
    }
}

/* Smooth scrolling for mobile menu */
.mobile-menu {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--thm-gray) transparent;
}

.mobile-menu::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-menu::-webkit-scrollbar-thumb {
    background: var(--thm-gray);
    border-radius: 3px;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
    background: var(--thm-primary);
}