/* 
 * File: assets/css/responsive/mobile.css 
 * Theme: Kalinajaya 
 */

/* Hide Desktop Header Elements */
.topbar,
.header-main,
.main-navigation,
.header-main-row-desktop {
    display: none !important;
}

/* 100% Mobile Friendly Strict Constraints */
html, body {
    max-width: 100vw;
    overflow-x: hidden !important;
    position: relative;
}
p, h1, h2, h3, h4, h5, h6, a, span, div, li {
    word-wrap: break-word;
    overflow-wrap: break-word;
}
img {
    max-width: 100%;
    height: auto;
}

/* Body adjustments */
body {
    padding-bottom: 75px !important;
}

body.menu-open {
    overflow: hidden !important;
}

/* Show mobile-only elements on mobile views */
.mobile-header {
    display: block !important;
}
.mobile-bottom-nav {
    display: block !important;
}
.mobile-whatsapp-btn {
    display: block !important;
}
.mobile-menu-drawer {
    display: block !important;
}

/* Mobile Header Styles */
.mobile-header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transparent Header Support for Mobile */
.header-transparent-overlay:not(.site-header-scrolled) .mobile-header {
    background-color: transparent !important;
    box-shadow: none !important;
    border-bottom: none !important;
}
.header-transparent-overlay:not(.site-header-scrolled) .mobile-header__logo a {
    color: #ffffff !important;
}
.header-transparent-overlay:not(.site-header-scrolled) .mobile-header__action-btn {
    color: #ffffff !important;
}
.header-transparent-overlay:not(.site-header-scrolled) .hamburger-inner,
.header-transparent-overlay:not(.site-header-scrolled) .hamburger-inner::before,
.header-transparent-overlay:not(.site-header-scrolled) .hamburger-inner::after {
    background-color: #ffffff !important;
}

.mobile-header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 15px;
}

.mobile-header__logo a,
.mobile-header__logo img {
    display: block;
    max-height: 40px;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}
.mobile-header__logo .site-logo-img {
    max-height: 38px !important;
}
.mobile-header__logo .site-logo-img--dark {
    opacity: 1 !important;
    position: relative !important;
    display: block !important;
}
.mobile-header__logo .site-logo-img--light {
    opacity: 0 !important;
    display: none !important;
}

.mobile-header__logo .custom-logo-link img {
    width: auto;
    height: 40px;
}

.mobile-header__actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-header__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--gray-600);
    transition: all 0.2s ease;
}

.mobile-header__wa {
    background-color: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.mobile-header__toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

/* Hamburger Icon Animation */
.hamburger-box {
    display: inline-block;
    position: relative;
    width: 24px;
    height: 18px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: #ffffff !important; /* White lines for dark header */
    border-radius: 4px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before {
    content: "";
    top: -8px;
}

.hamburger-inner::after {
    content: "";
    bottom: -8px;
}

.mobile-header__toggle.is-active .hamburger-inner {
    transform: rotate(45deg);
}

.mobile-header__toggle.is-active .hamburger-inner::before {
    opacity: 0;
}

.mobile-header__toggle.is-active .hamburger-inner::after {
    transform: rotate(-90deg);
    bottom: 0;
}

/* Mobile Navigation Drawer Styles - Dark Slate Theme */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    visibility: hidden;
    transition: visibility 0.3s ease;
}

.mobile-menu-drawer.is-active {
    visibility: visible;
}

.mobile-menu-drawer__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-drawer.is-active .mobile-menu-drawer__overlay {
    opacity: 1;
}

.mobile-menu-drawer__content {
    position: absolute;
    top: 0;
    right: -300px;
    width: 300px;
    max-width: 85%;
    height: 100%;
    background-color: #0f172a !important; /* Dark Slate background */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-drawer.is-active .mobile-menu-drawer__content {
    transform: translateX(-300px);
}

.mobile-menu-drawer__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.mobile-menu-drawer__logo a,
.mobile-menu-drawer__logo img {
    display: block;
    max-height: 35px;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #FF7A00 !important; /* Brand Orange */
    text-decoration: none;
}

.mobile-menu-drawer__close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-navigation {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.mobile-menu-list li a {
    display: block;
    padding: 12px 20px;
    color: #e2e8f0 !important; /* Light Slate text */
    font-weight: 600 !important;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-menu-list li a:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: #FF7A00 !important;
}

.mobile-menu-drawer__footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background-color: #1e293b !important; /* Darker Slate footer */
}

.mobile-menu-drawer__contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background-color: var(--success);
    color: var(--white);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.mobile-menu-drawer__contact:hover {
    background-color: #128c3a;
}

/* Sticky Bottom Navbar Styles */
.mobile-bottom-nav {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 150;
    border-top: 1px solid var(--gray-100);
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav__container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.mobile-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    flex-grow: 1;
    height: 100%;
    transition: color 0.2s ease;
}

.mobile-bottom-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item.is-active {
    color: var(--primary);
}

.mobile-bottom-nav__item--highlight {
    color: var(--success);
}

.mobile-bottom-nav__item--highlight:hover {
    color: #128c3a;
}

/* Floating WhatsApp Button Styles */
.mobile-whatsapp-btn {
    display: block;
    position: fixed;
    bottom: 80px; /* Positioned above the bottom navbar */
    right: 20px;
    z-index: 140;
    animation: float-wa 3s infinite ease-in-out;
}

.mobile-whatsapp-btn__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--success);
    color: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transition: transform 0.2s ease;
    position: relative;
}

.mobile-whatsapp-btn__link:hover {
    transform: scale(1.1);
}


@keyframes float-wa {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Responsive Grid System */
.grid-2,
.grid-3,
.grid-4 {
    grid-template-columns: 1fr !important;
    gap: 20px;
}

/* Homepage Hero section overrides */
.hero-section {
    padding: 60px 0 !important;
    min-height: auto !important;
}

.hero-content h1 {
    font-size: 32px !important;
}

.hero-content p {
    font-size: 15px !important;
    margin-bottom: 25px !important;
}

/* Footer Mobile Grid & Layout Optimizations */
.footer-grid {
    grid-template-columns: 1fr !important;
    gap: 35px !important;
    text-align: center;
}
.footer-widget h3 {
    margin-bottom: 12px;
}
.payment-list {
    justify-content: center;
}
.footer-bottom {
    padding-bottom: 20px;
}

/* Prevent WebView keyboard overlay issues */
@media (max-height: 500px) {
    .kj-single-tour-booking-cta-bar,
    .mobile-bottom-nav {
        position: relative !important;
        bottom: auto !important;
        box-shadow: none !important;
    }
    body {
        padding-bottom: 0 !important;
    }
}

/* Force enable all form interactions on mobile (anti-protection override) */
input, textarea, select, button,
input[type="date"],
input[type="text"],
input[type="number"],
input[type="tel"],
input[type="email"],
.kj-form-input,
.kj-qty-btn,
.hp-search-field input,
.hp-search-field select,
.flatpickr-input {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    user-select: text !important;
    pointer-events: auto !important;
    -webkit-appearance: auto !important;
    touch-action: manipulation !important;
}
body {
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    user-select: auto !important;
}

