/* =====================================================
   SIYA TRAVELS - HEADER CSS  (assets/css/header.css)
   Responsive-safe: kisi bhi screen size / browser zoom par
   logo, menu, search aur booking button overlap nahi honge.
   Rule: jab desktop menu ke liye jagah kam ho (<=1279px viewport,
   150% zoom bhi isme aata hai) to hamburger menu dikhega.
   ===================================================== */

/* Header wrapper: sticky + height reserved (CLS fix) */
#site-header {
    position: sticky;
    top: 0;
    z-index: 9000;
    min-height: 74px;
    background: #fff;
}

/* ---------- ICONS (inline SVG) ---------- */
.ic {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -.125em;
    flex: none;
}

/* ---------- BASE & HEADER ---------- */
.site-header {
    display: flex;
    justify-content: center;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
    position: relative;
    padding: 12px 0;
    min-height: 74px;
    font-family: Arial, Helvetica, sans-serif;
}
.site-header *, .mobile-sidebar *, .bk-modal *, .search-overlay-fullscreen * { box-sizing: border-box; }

.header-container {
    display: flex;
    width: 94%;
    max-width: 1360px;
    justify-content: space-between;
    align-items: center;
    gap: clamp(12px, 1.6vw, 32px);
}
.site-logo { flex: 0 0 auto; margin-right: 8px; }
.site-logo a { display: block; }
.site-logo img { max-height: 50px; width: auto; height: auto; max-width: 100%; display: block; }

/* ---------- DESKTOP NAV ---------- */
/* margin:auto => jagah kam ho to overflow dono taraf nahi failta */
.desktop-nav { flex: 1 1 0; display: flex; min-width: 0; }
.desktop-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    gap: clamp(12px, 1.5vw, 28px);
    margin: 0 auto;
    padding: 0;
    align-items: center;
}
.desktop-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: clamp(12.5px, 1.05vw, 14px);
    transition: color .2s;
    white-space: nowrap;
}
.desktop-nav a:hover { color: #ff5500; }
.has-dropdown { position: relative; padding: 10px 0; cursor: pointer; }
.has-dropdown > a .ic { margin-left: 4px; }

/* ---------- DROPDOWN ---------- */
.desktop-nav .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    margin-left: -140px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .15);
    min-width: 280px;
    padding: 6px 0;
    border-radius: 6px;
    border-top: 3px solid #ff5500;
    display: flex !important;
    flex-direction: column !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(15px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
    z-index: 9999 !important;
}
.desktop-nav .has-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.dropdown-menu li { padding: 0; width: 100%; border-bottom: 1px solid #f0f0f0; list-style: none; }
.dropdown-menu li:last-child { border-bottom: none; }
.dropdown-menu a { display: block; padding: 11px 22px; font-weight: 500; font-size: 14px; transition: background .2s, color .2s, padding-left .2s; }
.dropdown-menu a:hover { background: #fff5f0; color: #ff5500; padding-left: 26px; }

/* ---------- HEADER ACTIONS ---------- */
.header-actions { display: flex; gap: clamp(10px, 1.4vw, 22px); align-items: center; flex: 0 0 auto; margin-left: 8px; }
.search-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: #333; padding: 6px; line-height: 1; flex: none; }
.search-btn:hover { color: #ff5500; }
.booking-btn {
    background: linear-gradient(135deg, #FF8A00 0%, #FF5500 100%);
    color: #fff;
    border: none;
    padding: 12px clamp(14px, 1.6vw, 24px);
    white-space: nowrap;
    border-radius: 6px;
    font-weight: bold;
    font-size: clamp(12px, 1.05vw, 14px);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 8px 18px rgba(255, 85, 0, .3);
    flex: none;
}
.booking-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(255, 85, 0, .45); }

/* ---------- HAMBURGER (pure CSS) ---------- */
.mobile-toggle {
    display: none;
    -webkit-appearance: none;
    appearance: none;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    flex: none;
}
.mobile-toggle .bar {
    display: block;
    width: 22px;
    height: 2.5px;
    border-radius: 2px;
    background: #2B2F36;
    transition: background .2s;
}
.mobile-toggle .bar:nth-child(2) { width: 16px; align-self: flex-end; margin-right: 11px; }
.mobile-toggle:hover .bar,
.mobile-toggle:focus-visible .bar { background: #ff5500; }
.mobile-toggle:focus-visible { outline: 3px solid #FF8A00; outline-offset: 2px; }

/* ---------- MOBILE SIDEBAR ---------- */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 86vw;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 20000;
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform .3s ease, visibility 0s linear .3s;
    box-shadow: 2px 0 20px rgba(0, 0, 0, .25);
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    will-change: transform;
}
.mobile-sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    flex: none;
}
.mobile-sidebar-top img { max-height: 38px; width: auto; height: auto; display: block; }
.mobile-close {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    background: #f4f5f7;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #2B2F36;
}
.mobile-close:hover { background: #ffe3cc; color: #ff5500; }
.mobile-sidebar-content { padding: 6px 20px 30px; overflow-y: auto; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 19999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility 0s linear .3s;
}

/* open state: body par class "sm-open" */
body.sm-open { overflow: hidden; }
body.sm-open .mobile-sidebar { transform: none; visibility: visible; transition: transform .3s ease, visibility 0s; }
body.sm-open .mobile-overlay { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }

.mobile-nav { list-style: none; padding: 0; margin: 0; }
.mobile-nav > li { border-bottom: 1px solid #eee; list-style: none; }
.mobile-nav a { text-decoration: none; color: #333; font-weight: 600; font-size: 15px; display: block; padding: 15px 0; }
.mobile-nav a:hover { color: #ff5500; }
.mobile-dropdown-toggle { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 15px 0; font-weight: 600; font-size: 15px; color: #333; }
.mobile-dropdown-toggle .ic { font-size: 14px; transition: transform .25s; }
.mobile-dropdown-toggle:has(+ .open) { color: #ff5500; }
.mobile-dropdown-toggle:has(+ .open) .ic { transform: rotate(180deg); }
.mobile-submenu-wrap { display: none; background: #f9f9f9; padding: 0 15px; }
.mobile-submenu-wrap.open { display: block !important; }
.mobile-submenu { list-style: none; padding: 0; margin: 0; }
.mobile-submenu li { list-style: none; }
.mobile-submenu li:last-child a { border-bottom: none; }
.mobile-submenu a { padding: 12px 0; font-weight: 500; font-size: 14px; color: #555; border-bottom: 1px solid #eaeaea; }
.mobile-nav .mobile-book a { color: #ff5500; }

/* ---------- SEARCH OVERLAY & BOOKING MODAL ---------- */
.search-overlay-fullscreen,
.bk-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    z-index: 30000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: Arial, Helvetica, sans-serif;
}
.search-overlay-fullscreen.active,
.bk-modal.active { display: flex !important; }

.bk-dialog { background: #fff; width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto; border-radius: 12px; padding: 35px; position: relative; }
.bk-close { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 24px; cursor: pointer; color: #888; line-height: 1; }
.bk-close:hover { color: #333; }
#bk-title { margin: 0 0 5px; font-size: 24px; color: #111; }
.bk-sub { margin: 0 0 25px; color: #666; font-size: 14px; }

.bk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.bk-grid label { display: flex; flex-direction: column; font-size: 12px; font-weight: bold; color: #444; }
.bk-grid label b { color: red; margin-left: 3px; }
.bk-grid input, .bk-grid select, .bk-grid textarea {
    margin-top: 8px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    width: 100%;
}
.bk-grid input:focus, .bk-grid select:focus, .bk-grid textarea:focus { border-color: #ff5500; }
.bk-full { grid-column: span 2; }
.bk-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #FF8A00 0%, #FF5500 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 25px;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 22px rgba(255, 85, 0, .32);
}
.bk-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(255, 85, 0, .45); }

.search-content { text-align: center; width: 100%; max-width: 700px; }
.search-content h2 { color: #fff; margin-bottom: 20px; }
.search-content input { width: 100%; padding: 15px 20px; font-size: 18px; border-radius: 30px; border: none; outline: none; }
.close-search-btn { position: absolute; top: 30px; right: 30px; background: none; border: none; font-size: 35px; color: #fff; cursor: pointer; line-height: 1; }

/* ---------- BAHUT BADI SCREEN (zoom-out / 4K) ---------- */
@media (min-width: 1700px) {
    .header-container { max-width: 1560px; }
}

/* ---------- LAPTOP / ZOOM (992px - 1279px): menu compact hoke fit hoga ----------
   Font, gap, logo aur button sab viewport ke hisaab se chhote hote hain. */
@media (min-width: 992px) and (max-width: 1279px) {
    .header-container { width: 96%; gap: 10px; }
    .site-logo { margin-right: 0; }
    .site-logo img { max-height: clamp(34px, 3.9vw, 48px); }
    .desktop-nav ul { gap: clamp(9px, 1.3vw, 20px); }
    .desktop-nav a { font-size: clamp(10.5px, 1.2vw, 13.5px); }
    .has-dropdown > a .ic { display: none; }
    .header-actions { gap: 8px; margin-left: 0; }
    .search-btn { font-size: 18px; padding: 4px; }
    .booking-btn { padding: 9px 12px; font-size: clamp(10.5px, 1.05vw, 12.5px); }
}

/* ---------- TABLET / MOBILE (<=991px): hamburger menu ---------- */
@media (max-width: 991px) {
    #site-header { min-height: 64px; }
    .site-header { padding: 10px 0; min-height: 64px; }
    .header-container { width: 92%; gap: 12px; }
    .site-logo img { max-height: 42px; }
    .desktop-nav, .booking-btn { display: none !important; }
    .mobile-toggle { display: flex !important; }
    .header-actions { gap: 10px; margin-left: auto; }
    .bk-grid { grid-template-columns: 1fr; }
    .bk-full { grid-column: span 1; }
    .bk-dialog { padding: 25px 20px; }
}

@media (max-width: 480px) {
    .site-logo img { max-height: 38px; }
    .mobile-sidebar { width: 280px; }
    #bk-title { font-size: 21px; padding-right: 28px; }
    .close-search-btn { top: 16px; right: 16px; font-size: 30px; }
    .search-content input { font-size: 16px; padding: 13px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-sidebar, .mobile-overlay { transition: none !important; }
}