/* =====================================================================
   BHB Mahal - site-wide mobile / tablet fixes
   Loaded from includes/footer.php (after every page's own styles).
   ===================================================================== */

/* ---------- 1. Never scroll sideways ---------- */
html, body { max-width: 100%; overflow-x: hidden; }   /* fallback for older browsers */
@supports (overflow: clip) {
    html, body { overflow-x: clip; }                  /* clip keeps position:sticky working */
}
img, video, iframe, svg, canvas { max-width: 100%; }
img { height: auto; }

/* slide-in animations travel less on small screens */
@media (max-width: 767px) {
    .bhb-reveal.bhb-left  { transform: translateX(-24px); }
    .bhb-reveal.bhb-right { transform: translateX(24px); }
    .js-rv .bhb-rv.from-left  { transform: translateX(-24px); }
    .js-rv .bhb-rv.from-right { transform: translateX(24px); }
}

/* ---------- 2. Mobile header: visible "Book" button next to the menu ---------- */
.hdr-book-m { display: none; }
@media (max-width: 991px) {
    .header-area .main-header .container { position: relative; }
    .hdr-book-m {
        display: inline-flex; align-items: center; gap: 6px;
        position: absolute; top: 50%; right: 78px; transform: translateY(-50%);
        z-index: 1000;
        padding: 9px 16px; border-radius: 40px;
        background: linear-gradient(135deg, #92000A, #3a0000);
        color: #fff !important; text-decoration: none !important;
        font: 600 12px/1 "Roboto", "Helvetica", "Arial", sans-serif;
        letter-spacing: .8px; text-transform: uppercase;
        box-shadow: 0 8px 18px -8px rgba(146, 0, 10, .6);
    }
    .hdr-book-m i { font-size: 12px; }
    .hdr-book-m:active { transform: translateY(-50%) scale(.95); }
    /* the same button is already inside the slide-out menu */
}
@media (max-width: 359px) {
    .hdr-book-m span { display: none; }      /* very small phones: icon only */
    .hdr-book-m { padding: 10px 12px; }
}

/* ---------- 2b. Mobile menu: ☰ turns into ✕ (close) when open ---------- */
@media (max-width: 991px) {
    .slicknav_menu .slicknav_btn .slicknav_icon-bar {
        display: block; width: 28px; height: 3px; margin: 5px 0 !important;
        border-radius: 3px;
        background-color: #e01010 !important;
        transform-origin: center;
        transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .25s ease !important;
    }
    .slicknav_menu .slicknav_btn.slicknav_open .slicknav_icon-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .slicknav_menu .slicknav_btn.slicknav_open .slicknav_icon-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .slicknav_menu .slicknav_btn.slicknav_open .slicknav_icon-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .slicknav_menu .slicknav_btn.slicknav_open .slicknav_icon-bar { background-color: #92000A !important; }
}

/* ---------- 2c. Page banners (About / Services / Blog / Contact / Gallery) on mobile ---------- */
@media (max-width: 767px) {
    /* About banner: taller, content clear of the header, whole photo visible */
    .bhb-banner { height: auto !important; min-height: 340px; padding: 110px 0 56px; }
    .bhb-banner-bg { background-position: center center !important; animation: bhbZoomM 18s ease-in-out infinite !important; }
    .bhb-banner-content h1 { font-size: 30px !important; letter-spacing: 1.5px; margin-bottom: 12px; }
    .bhb-breadcrumb { font-size: 14px; }

    /* Services / Blog / Contact banners: same height feel, less zoom-crop */
    .bhb-hero { min-height: 0 !important; }
    .bhb-hero-bg { background-position: center center !important; animation: bhbZoomM 18s ease-in-out infinite !important; transform: none; }
    .bhb-hero-inner { padding: 112px 18px 96px !important; max-width: 100% !important; }
    .bhb-hero h1 { font-size: 34px !important; line-height: 1.12 !important; margin-bottom: 14px !important; }
    .bhb-hero p { font-size: 15px !important; line-height: 1.65 !important; margin-bottom: 22px !important; }
    .bhb-hero .bhb-eyebrow { font-size: 11px !important; letter-spacing: 3px !important; }

    /* Gallery hero: start below the header */
    .gx-hero { padding-top: 110px !important; }
}
@media (max-width: 400px) {
    .bhb-hero h1 { font-size: 30px !important; }
    .bhb-banner { min-height: 300px; }
}
@keyframes bhbZoomM { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---------- 3. Home page ---------- */
@media (max-width: 575px) {
    /* Facilities: 2 per row instead of 1 long list */
    .bhb-home .row > [class*="col-"]:has(> .single-defination) { flex: 0 0 50%; max-width: 50%; padding-left: 6px; padding-right: 6px; margin-bottom: 12px !important; }
    .bhb-home .row:has(> [class*="col-"] > .single-defination) { margin-left: -6px; margin-right: -6px; }
    .bhb-home .single-defination { padding: 22px 10px 18px !important; }
    .bhb-home .fac-icon { width: 54px !important; height: 54px !important; margin-bottom: 12px !important; box-shadow: 0 0 0 4px rgba(201,162,75,.12) !important; }
    .bhb-home .fac-icon i { font-size: 20px !important; }
    .bhb-home .single-defination h4 { font-size: 15.5px !important; line-height: 1.3; margin-bottom: 10px !important; padding-bottom: 10px; }
    .bhb-home .single-defination p { font-size: 12.5px !important; line-height: 1.55 !important; }

    /* Photo gallery: 2 per row */
    .bhb-home .gallery-item > [class*="col-"] { flex: 0 0 50%; max-width: 50%; padding-left: 6px; padding-right: 6px; margin-bottom: 12px !important; }
    .bhb-home .gallery-item { margin-left: -6px; margin-right: -6px; }
    .bhb-home .gallery-item > [class*="col-"]:nth-child(4),
    .bhb-home .gallery-item > [class*="col-"]:nth-child(5) { flex: 0 0 100%; max-width: 100%; }
    .bhb-home .single-gallery-image { height: 150px !important; }
    .bhb-home .gallery-item > [class*="col-"]:nth-child(4) .single-gallery-image,
    .bhb-home .gallery-item > [class*="col-"]:nth-child(5) .single-gallery-image { height: 200px !important; }

    /* Hero buttons share the row nicely */
    .bhb-home .bhb-hero-actions { gap: 10px; }
}

/* ---------- 4. Readable small text ---------- */
@media (max-width: 575px) {
    .bhb-topic small { font-size: 11px !important; letter-spacing: 1.8px !important; }
}

/* ---------- 5. Comfortable tap targets & forms on phones ---------- */
@media (max-width: 575px) {
    input, select, textarea { font-size: 16px !important; }   /* stops iOS zoom-in on focus */
    .bhb-btn, .gx-btn, .bhf-btn { max-width: 100%; white-space: normal !important; text-align: center; }

    /* floating buttons: a little smaller and out of the way */
    .whatsapp-float { width: 50px !important; height: 50px !important; right: 16px !important; font-size: 26px !important; }
}

/* ---------- 6. Booking popup fits small screens ---------- */
@media (max-width: 575px) {
    .mp-overlay { padding: 10px; align-items: flex-end; }
    .mp-box { max-height: calc(100svh - 20px); overflow-y: auto; border-radius: 16px; }
    .mp-hero { height: 200px; }
    .mp-body h3 { font-size: 19px; }
    .mp-head { padding: 16px 16px 12px; }
    .mp-form { padding: 14px 16px 16px; }
    .mp-hall span { padding: 10px 6px; }
    .mp-hall span b { font-size: 12.5px; }
}

/* ---------- 7. Footer on phones ---------- */
@media (max-width: 575px) {
    .bhf-wrap { padding-left: 18px; padding-right: 18px; }
    .bhf-cta h3 { font-size: 22px; }
    .bhf-cta__btns { width: 100%; }
    .bhf-cta__btns .bhf-btn { flex: 1 1 100%; }
    .bhf-bottom { font-size: 12.5px; line-height: 1.6; }
}
