/* ==========================================================================
   DOLLOP INFOTECH - RESPONSIVE DESIGN SYSTEM
   Header Behaviour, Navigation, and Homepage Responsiveness
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GLOBAL RESET & OVERFLOW CONTROLS
   -------------------------------------------------------------------------- */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

body.no-scroll {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Inner pages top padding to prevent fixed header from hiding page content */
body.inner-page {
    padding-top: 85px !important;
}

@media (max-width: 767px) {
    body.inner-page {
        padding-top: 72px !important;
    }
}


/* --------------------------------------------------------------------------
   2. HEADER & STICKY BEHAVIOUR (Desktop & Mobile Bar)
   -------------------------------------------------------------------------- */
.dollop_header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999 !important;
    transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease !important;
    will-change: transform, background-color, box-shadow;
}

/* --- A. HOMEPAGE UNSCROLLED STATE (Hero Section Visible) --- */
.home-page .dollop_header:not(.scrolled),
body:not(.inner-page) .dollop_header:not(.scrolled) {
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
}

/* Desktop Unscrolled Links & Logos */
@media (min-width: 992px) {
    .home-page .dollop_header:not(.scrolled) .nav-link,
    body:not(.inner-page) .dollop_header:not(.scrolled) .nav-link {
        color: #ffffff !important;
    }

    .home-page .dollop_header:not(.scrolled) .nav-link:hover,
    body:not(.inner-page) .dollop_header:not(.scrolled) .nav-link:hover,
    .home-page .dollop_header:not(.scrolled) .why_dollop:hover {
        color: #ff6b3d !important;
    }

    .home-page .dollop_header:not(.scrolled) .logo-white,
    body:not(.inner-page) .dollop_header:not(.scrolled) .logo-white {
        display: block !important;
        height: 50px;
    }

    .home-page .dollop_header:not(.scrolled) .logo-dark,
    body:not(.inner-page) .dollop_header:not(.scrolled) .logo-dark {
        display: none !important;
    }
}

/* --- B. HOMEPAGE SCROLLED STATE (Past Hero Section) --- */
.home-page .dollop_header.scrolled,
body:not(.inner-page) .dollop_header.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Desktop Scrolled Links & Logos */
@media (min-width: 992px) {
    .home-page .dollop_header.scrolled .nav-link,
    body:not(.inner-page) .dollop_header.scrolled .nav-link {
        color: #1f1f1f !important;
    }

    .home-page .dollop_header.scrolled .nav-link:hover,
    body:not(.inner-page) .dollop_header.scrolled .nav-link:hover,
    .home-page .dollop_header.scrolled .nav-link.active {
        color: #ff6b3d !important;
    }

    .home-page .dollop_header.scrolled .logo-white,
    body:not(.inner-page) .dollop_header.scrolled .logo-white {
        display: none !important;
    }

    .home-page .dollop_header.scrolled .logo-dark,
    body:not(.inner-page) .dollop_header.scrolled .logo-dark {
        display: block !important;
        height: 50px;
    }
}

/* --- C. INNER PAGES HEADER (Always White Background) --- */
body.inner-page .dollop_header {
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

@media (min-width: 992px) {
    body.inner-page .dollop_header .nav-link {
        color: #1f1f1f !important;
    }

    body.inner-page .dollop_header .nav-link:hover,
    body.inner-page .dollop_header .nav-link.active {
        color: #ff6b3d !important;
    }

    body.inner-page .dollop_header .logo-white {
        display: none !important;
    }

    body.inner-page .dollop_header .logo-dark {
        display: block !important;
        height: 50px;
    }
}


/* --------------------------------------------------------------------------
   3. DESKTOP NAVIGATION LAYOUT (992px and above)
   -------------------------------------------------------------------------- */
@media (min-width: 992px) {
    .drawer-header {
        display: none !important;
    }

    .mobile_menu_close_btn {
        display: none !important;
    }

    .dollop_header .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 6px;
        margin-left: auto !important;
        margin-right: 16px !important;
    }

    .dollop_header .nav-item {
        white-space: nowrap;
    }

    .dollop_header .nav-link {
        font-size: 15px;
        font-weight: 600;
        padding: 8px 14px !important;
        white-space: nowrap;
    }

    .dollop_header .home_icon_menu {
        display: none !important;
    }
}

/* 1024px – 1199px Viewport spacing */
@media (min-width: 992px) and (max-width: 1199px) {
    .dollop_header .nav-link {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }

    .talk_btn .btn {
        padding: 8px 16px !important;
        font-size: 14px !important;
    }

    .logo-white, .logo-dark {
        height: 44px !important;
    }
}

/* 1440px and above */
@media (min-width: 1440px) {
    .dollop_header .nav-link {
        font-size: 16px !important;
        padding: 8px 18px !important;
    }
}


/* --------------------------------------------------------------------------
   4. DARK BACKDROP OVERLAY
   -------------------------------------------------------------------------- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* --------------------------------------------------------------------------
   5. MOBILE & TABLET HEADER BAR & OFF-CANVAS DRAWER (< 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {

    .dollop_header {
        padding: 10px 0;
    }

    /* --- Mobile Header Bar Logos --- */
    .home-page .dollop_header:not(.scrolled) .logo-white {
        display: block !important;
        height: 38px;
    }
    .home-page .dollop_header:not(.scrolled) .logo-dark {
        display: none !important;
    }

    .dollop_header.scrolled .logo-white,
    body.inner-page .dollop_header .logo-white {
        display: none !important;
    }
    .dollop_header.scrolled .logo-dark,
    body.inner-page .dollop_header .logo-dark {
        display: block !important;
        height: 38px;
    }

    /* --- Navbar Toggler Button & Hamburger Icon State Logic --- */
    .navbar-toggler {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        padding: 4px 8px;
        z-index: 99995;
    }

    /* 1. Unscrolled Homepage Hero -> WHITE Hamburger Icon */
    .home-page .dollop_header:not(.scrolled) .navbar-toggler-icon,
    body:not(.inner-page) .dollop_header:not(.scrolled) .navbar-toggler-icon {
        filter: brightness(0) invert(1) !important;
        opacity: 1 !important;
    }

    /* 2. Scrolled Homepage (White Header BG) -> DARK Hamburger Icon */
    .home-page .dollop_header.scrolled .navbar-toggler-icon,
    body:not(.inner-page) .dollop_header.scrolled .navbar-toggler-icon {
        filter: brightness(0) !important;
        opacity: 0.9 !important;
    }

    /* 3. Inner Pages Header (Always White Header BG) -> DARK Hamburger Icon */
    body.inner-page .dollop_header .navbar-toggler-icon {
        filter: brightness(0) !important;
        opacity: 0.9 !important;
    }

    /* Reset old fixed hacks from style.css */
    .why_dollop {
        position: static !important;
        top: auto !important;
        right: auto !important;
    }

    .btn_tlk_2_us {
        position: static !important;
        top: auto !important;
        right: auto !important;
        margin: 0 !important;
    }

    .mobile_hide_cls {
        display: inline !important;
    }

    .home_icon_menu {
        width: auto !important;
        display: inline-flex !important;
        margin-right: 12px !important;
        font-size: 20px !important;
        vertical-align: middle;
        color: #ff6b3d !important;
    }

    /* Off-Canvas Navigation Drawer */
    .navbar-collapse {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        left: auto !important;
        width: 85vw !important;
        max-width: 360px !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: #ffffff !important;
        z-index: 100000 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding: 0 !important;
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.2) !important;
        transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        visibility: hidden;
    }

    .navbar-collapse.show {
        right: 0 !important;
        visibility: visible !important;
    }

    /* Drawer Header (Brand Logo + Close Button) */
    .drawer-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 20px 24px;
        border-bottom: 1px solid #f0f0f0;
        flex-shrink: 0;
        background: #ffffff;
        min-height: 72px;
        width: 100% !important;
    }

    .drawer-logo {
        flex: 1;
        display: flex;
        align-items: center;
    }

    .drawer-logo img {
        height: 38px !important;
        width: auto !important;
        max-width: 160px;
    }

    .mobile_menu_close_btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-width: 44px !important;
        min-height: 44px !important;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #f5f5f5;
        border: none;
        font-size: 20px;
        line-height: 1;
        color: #333333;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
        flex-shrink: 0;
        margin-left: auto !important;
        padding: 0;
    }

    .mobile_menu_close_btn:hover {
        background: #ff6b3d;
        color: #ffffff;
        transform: rotate(90deg);
    }

    .mobile_menu_close_btn:active {
        transform: rotate(90deg) scale(0.95);
    }

    /* Drawer Navigation Links (Always Dark Text on White Drawer Background) */
    .navbar-collapse .navbar-nav,
    .navbar-nav {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important;
        padding: 12px 0 !important;
        list-style: none;
    }

    .navbar-collapse .navbar-nav .nav-item,
    .navbar-nav .nav-item {
        width: 100% !important;
        margin: 0 !important;
    }

    .navbar-collapse .navbar-nav .nav-link,
    .navbar-collapse .nav-link,
    .navbar-collapse .why_dollop {
        display: flex !important;
        align-items: center !important;
        padding: 14px 24px !important;
        color: #1f1f1f !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        border-bottom: 1px solid #f8f8f8 !important;
        transition: all 0.2s ease !important;
        text-decoration: none !important;
        white-space: nowrap;
    }

    .navbar-collapse .navbar-nav .nav-link:hover,
    .navbar-collapse .nav-link:hover,
    .navbar-collapse .why_dollop:hover {
        color: #ff6b3d !important;
        background: #fff8f6 !important;
        padding-left: 30px !important;
    }

    .navbar-collapse .navbar-nav .nav-link.active {
        color: #ff6b3d !important;
        background: #fff8f6 !important;
        border-left: 4px solid #ff6b3d !important;
    }

    /* Contact CTA Button inside Drawer */
    .talk_btn {
        width: 100% !important;
        padding: 20px 24px !important;
        margin-top: auto !important;
        border-top: 1px solid #eee;
        background: #ffffff;
        flex-shrink: 0;
    }

    .talk_btn .btn {
        width: 100% !important;
        text-align: center !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px;
    }

    /* Hero Globe adjustments on Mobile */
    .hero-globe-wrap {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 360px !important;
        margin: 30px auto 0 !important;
        opacity: 0.85;
    }

    #hero-globe {
        display: none !important;
    }

    .hero_image {
        padding-top: 80px !important;
    }

    .main_heading {
        font-size: clamp(24px, 6vw, 42px) !important;
        line-height: 1.3 !important;
    }
}


/* --------------------------------------------------------------------------
   6. QUICK CONTACT FLOATING BUTTON (Overlapping Prevention)
   -------------------------------------------------------------------------- */
.floating-contact, #fcToggle {
    z-index: 99990 !important;
}

/* Hide floating contact button when mobile menu is open */
body.no-scroll .floating-contact,
body.no-scroll #fcToggle,
.menu-overlay.active ~ .floating-contact {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


/* --------------------------------------------------------------------------
   7. HOMEPAGE SECTION RESPONSIVE FIXES
   -------------------------------------------------------------------------- */

/* Watermarks & Hero overflow safety */
.background_tittle {
    overflow: hidden !important;
    white-space: nowrap !important;
}

.hero_image {
    overflow: hidden !important;
}

/* About Section */
@media (max-width: 767px) {
    .dollop_about_tabs {
        width: 100% !important;
        margin-bottom: 35px !important;
    }

    .dollop_about_button {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .dollop_about_button .nav-link {
        width: auto !important;
        font-size: 14px !important;
        padding: 8px 14px !important;
    }

    .all_container_satisfy {
        flex-direction: column !important;
        height: auto !important;
    }

    .client_stisfied_details {
        width: 100% !important;
        padding: 20px !important;
    }

    .tab_box_image {
        width: 100% !important;
    }

    img.side_image {
        display: none !important;
    }

    span.horizontal_line {
        display: none !important;
    }
}

/* Footer */
@media (max-width: 767px) {
    footer .row > div {
        margin-bottom: 24px !important;
    }
}
