/* ===================================================================
   css/responsive.css - 100% Mobile-First Responsive Stylesheet
   Sundarban Anamika Travels / Ma Banobibi Tour and Travels
   Compatible with 320px, 360px, 375px, 390px, 414px, 768px, 1024px, 1366px, 1920px
   =================================================================== */

/* 1. Global Box Sizing & Root Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
    position: relative;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Prevent iOS input auto-zoom by ensuring minimum 16px font */
input, select, textarea, button {
    font-size: 16px;
    font-family: inherit;
}

@media (min-width: 768px) {
    input, select, textarea {
        font-size: 0.95rem;
    }
}

/* 2. Fluid Typography with clamp() */
h1, .display-1, .display-2, .display-3, .display-4 {
    font-size: clamp(1.85rem, 5vw + 0.5rem, 3.25rem) !important;
    line-height: 1.15 !important;
    word-break: break-word;
}

h2, .display-5, .display-6 {
    font-size: clamp(1.45rem, 3.5vw + 0.3rem, 2.25rem) !important;
    line-height: 1.25 !important;
    word-break: break-word;
}

h3 {
    font-size: clamp(1.25rem, 2.5vw + 0.2rem, 1.75rem) !important;
    line-height: 1.3 !important;
}

h4 {
    font-size: clamp(1.1rem, 2vw + 0.15rem, 1.4rem) !important;
}

h5 {
    font-size: clamp(1rem, 1.5vw + 0.1rem, 1.25rem) !important;
}

h6 {
    font-size: clamp(0.9rem, 1.2vw + 0.1rem, 1.05rem) !important;
}

p, .lead {
    word-break: break-word;
}

.lead {
    font-size: clamp(0.95rem, 1.6vw + 0.2rem, 1.15rem) !important;
}

/* 3. Touch Targets (Minimum 44x44px for accessibility) */
.btn, .nav-link, .form-control, .form-select, .floating-wa, .bottom-nav-item {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sm {
    min-height: 38px;
    padding: 6px 14px;
}

/* 4. Responsive Navbar & Hamburger Menu */
.navbar-main {
    transition: all 0.25s ease-in-out;
}

.navbar-brand {
    max-width: calc(100% - 60px);
}

.navbar-brand img {
    height: clamp(38px, 6vw, 48px);
    width: auto;
    object-fit: contain;
}

.navbar-brand-title {
    font-size: clamp(1.05rem, 3.2vw, 1.45rem);
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-brand-subtitle {
    font-size: clamp(0.65rem, 1.8vw, 0.78rem);
    letter-spacing: 0.3px;
}

.navbar-toggler {
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(6, 78, 59, 0.2) !important;
    border-radius: 8px;
    background: #F8FAFC;
    color: var(--forest-main);
    outline: none !important;
    box-shadow: none !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(6, 78, 59, 0.25) !important;
}

/* Smooth mobile menu dropdown styling */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        padding: 16px 20px;
        margin-top: 12px;
        border: 1px solid #E2E8F0;
    }

    .navbar-nav .nav-item {
        border-bottom: 1px solid #F1F5F9;
    }

    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }

    .navbar-nav .nav-link {
        padding: 12px 14px !important;
        font-size: 1.02rem;
        font-weight: 600;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .navbar-nav .nav-link:active,
    .navbar-nav .nav-link:hover {
        background-color: #F8FAFC;
        color: var(--forest-main) !important;
    }

    .navbar-nav .btn-gold {
        width: 100%;
        margin-top: 10px;
        justify-content: center;
        padding: 12px;
        font-size: 1rem;
    }
}

/* 5. Mobile Sticky Bottom Quick Action Bar (< 768px) */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: #ffffff;
    box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #E2E8F0;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    padding: 4px;
    border-radius: 8px;
    transition: all 0.2s;
    min-height: 48px;
}

.bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.bottom-nav-item.call-btn {
    color: var(--forest-main);
}

.bottom-nav-item.wa-btn {
    color: #25D366;
}

.bottom-nav-item.book-btn {
    background: linear-gradient(135deg, var(--forest-main), var(--forest-dark));
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(6, 78, 59, 0.3);
    margin: 0 4px;
    flex: 1.3;
}

.bottom-nav-item.book-btn i {
    font-size: 1.1rem;
    color: var(--amber-accent);
}

/* Push content up on mobile so bottom bar does not overlap footer/buttons */
@media (max-width: 767.98px) {
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    /* Reposition floating WhatsApp on mobile to not clash with bottom bar */
    .floating-wa {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
        right: 16px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 26px !important;
    }
}

@media (min-width: 768px) {
    .mobile-bottom-bar {
        display: none !important;
    }
}

/* 6. Hero Section & Video Responsiveness */
.hero-banner {
    padding: clamp(65px, 12vw, 120px) 0 clamp(50px, 10vw, 90px) !important;
    position: relative;
    overflow: hidden;
    background: #064E3B url('../img/slide-show/slide-1.jpg') center/cover no-repeat;
    color: #ffffff;
    min-height: 520px;
}

.hero-banner .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.88) 0%, rgba(6, 78, 59, 0.72) 45%, rgba(4, 40, 30, 0.92) 100%);
    z-index: 1;
}

.hero-banner .hero-content {
    position: relative;
    z-index: 2;
}

.hero-banner h1 {
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6) !important;
}

.hero-banner p.lead {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

.hero-banner .carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-banner .carousel-item {
    height: 100%;
}

.hero-banner .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-banner video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
    opacity: 0.35;
}

/* Hero Search Card Responsiveness */
.search-card-wrapper {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: clamp(14px, 3vw, 24px);
    margin-top: clamp(24px, 5vw, 40px);
}

.search-card-wrapper .form-control,
.search-card-wrapper .form-select {
    height: 48px;
    border-radius: 10px;
}

/* 7. Package Cards & Grids */
.package-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.package-img {
    width: 100%;
    height: clamp(180px, 24vw, 230px);
    object-fit: cover;
    display: block;
}

/* 8. Gallery Grid Responsiveness */
.gallery-card {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.gallery-card-img {
    width: 100%;
    height: clamp(150px, 22vw, 220px);
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.gallery-card:hover .gallery-card-img {
    transform: scale(1.05);
}

/* 9. Modal Dialog Responsiveness */
.modal-dialog {
    margin: 12px auto;
    max-width: calc(100% - 24px);
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .modal-dialog {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .modal-dialog.modal-lg {
        max-width: 860px;
    }
}

.modal-content {
    border-radius: 20px !important;
    overflow: hidden;
}

.modal-header, .modal-body, .modal-footer {
    padding: clamp(14px, 3vw, 24px) !important;
}

/* 10. Specific Breakpoint Optimizations */

/* Ultra Small Phones (320px - 359px) */
@media (max-width: 359.98px) {
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .btn {
        padding-left: 12px !important;
        padding-right: 12px !important;
        font-size: 0.88rem !important;
    }

    .hero-banner {
        padding: 50px 0 40px !important;
    }

    .badge {
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
    }

    .col-6 {
        width: 100% !important;
    }
}

/* Standard Mobile Devices (360px - 575px) */
@media (min-width: 360px) and (max-width: 575.98px) {
    .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .row.g-4 {
        --bs-gutter-y: 1.25rem;
    }
}

/* Tablet Devices (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .container {
        max-width: 720px;
    }
    
    .package-img {
        height: 200px;
    }
}

/* Laptops & Standard Desktops (1024px - 1365px) */
@media (min-width: 1024px) and (max-width: 1365.98px) {
    .container {
        max-width: 960px;
    }
}

/* Large Screens (1366px - 1920px+) */
@media (min-width: 1366px) {
    .container {
        max-width: 1240px;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1440px;
    }
}

/* 11. Responsive Table Stack for Admin & Client Lists */
@media (max-width: 575.98px) {
    .table-mobile-cards thead {
        display: none;
    }
    .table-mobile-cards tbody tr {
        display: block;
        margin-bottom: 14px;
        background: #ffffff;
        border: 1px solid #E2E8F0;
        border-radius: 12px;
        padding: 10px 14px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    }
    .table-mobile-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0 !important;
        border-bottom: 1px dashed #F1F5F9;
        font-size: 0.88rem;
    }
    .table-mobile-cards tbody td:last-child {
        border-bottom: none;
    }
    .table-mobile-cards tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748B;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: 8px;
    }
}

/* 12. Utilities & Helper Classes */
.text-break-all {
    word-break: break-all;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-overflow-x {
    overflow-x: hidden !important;
}
