/* 
   Amatyas Responsive Fixes - Final Clean Version
   Mobile only. Zero changes to desktop/laptop view.
*/

/* === Global: hide mobile nav on desktop === */
.amts-mobile-header {
    display: none; /* Hidden by default, shown only on mobile via media query */
}

/* === GLOBAL: prevent horizontal scroll === */
html, body {
    overflow-x: hidden !important;
}
#page, .page_wapper, .content_all_warpper {
    overflow-x: hidden !important;
    width: 100% !important;
}

/* === MOBILE ONLY (max 991px) === */
@media (max-width: 991px) {

    /* Hide the original Creote header on mobile */
    .header_area {
        display: none !important;
    }

    /* Show our mobile header */
    .amts-mobile-header {
        display: block !important;
        position: sticky;
        top: 0;
        z-index: 9999;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        width: 100%;
    }

    /* Top bar: logo + toggler */
    .amts-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        height: 65px;
    }

    .amts-logo img {
        max-width: 140px;
        height: auto;
        display: block;
    }

    /* Hamburger button */
    .amts-toggler {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 34px;
        height: 24px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        outline: none;
    }

    .amts-toggler span {
        display: block;
        width: 100%;
        height: 3px;
        background: #0f4c81;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Nav panel - hidden by default */
    .amts-nav-panel {
        display: none;
        background: #fff;
        max-height: 75vh;
        overflow-y: auto;
        border-top: 1px solid #eee;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .amts-nav-panel.open {
        display: block;
    }

    /* Nav list */
    .amts-nav-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .amts-nav-list > li {
        border-bottom: 1px solid #f0f0f0;
    }

    .amts-nav-list > li > a {
        display: block;
        padding: 15px 20px;
        color: #1a1a2e;
        font-weight: 600;
        font-size: 15px;
        text-decoration: none;
    }

    /* Solutions dropdown trigger */
    .amts-dropdown-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .amts-caret {
        font-size: 11px;
        color: #0f4c81;
        transition: transform 0.2s ease;
        display: inline-block;
    }

    .amts-dropdown-link.open .amts-caret {
        transform: rotate(180deg);
    }

    /* Submenu */
    .amts-submenu {
        list-style: none;
        margin: 0;
        padding: 0;
        display: none;
        background: #f8f9fa;
    }

    .amts-submenu.open {
        display: block;
    }

    .amts-submenu li {
        border-top: 1px solid #eee;
    }

    .amts-submenu li a {
        display: block;
        padding: 12px 30px;
        color: #333;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
    }

    .amts-submenu li a:hover {
        background: #e9f0f8;
        color: #0f4c81;
    }

    /* CTA button in nav: white text, blue bg, centered */
    .amts-cta a {
        color: #fff !important;
        font-weight: 700 !important;
        background-color: #0f4c81 !important;
        padding: 12px 20px !important;
        border-radius: 5px !important;
        margin: 12px 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        text-decoration: none !important;
    }


    /* Hide Creote mobile sidebar */
    .crt_mobile_menu {
        display: none !important;
    }

    /* ---- Navbar layout: logo left, toggler right ---- */
    .header_default.navbar {
        padding: 8px 15px !important;
    }

    .logo_column {
        flex: 0 0 auto !important;
        padding: 0 !important;
    }

    .logo_default {
        max-width: 140px !important;
        height: auto !important;
    }

    /* Hide sticky duplicate logo */
    .logo__sticky {
        display: none !important;
    }

    /* ---- Bootstrap navbar toggler styling ---- */
    .navbar-toggler {
        border: 1px solid #0f4c81 !important;
        padding: 5px 8px !important;
        background-color: #fff !important;
        outline: none !important;
        box-shadow: none !important;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2815,76,129,1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
        width: 22px !important;
        height: 22px !important;
    }

    /* ---- Mobile nav collapse panel ---- */
    .navbar-collapse {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background: #fff !important;
        box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
        z-index: 1020 !important;
        max-height: 75vh !important;
        overflow-y: auto !important;
        padding: 10px 0 !important;
    }

    /* ---- Nav items ---- */
    .navbar-nav {
        flex-direction: column !important;
        width: 100% !important;
    }

    .navbar-nav .nav-item {
        width: 100% !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

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

    .navbar-nav .nav-link {
        padding: 14px 20px !important;
        color: #1a1a2e !important;
        font-weight: 600 !important;
        font-size: 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        text-decoration: none !important;
    }

    /* Remove theme's default dropdown caret from ALL nav-links */
    .navbar-nav .nav-link::after,
    .navbar-nav .nav-link .fa-angle-down,
    .navbar-nav .nav-link span.fa-angle-down {
        display: none !important;
    }
    .dropdown-toggle::after {
        display: none !important;
    }

    /* ---- Solutions: custom toggle arrow (only for mobile) ---- */
    .mobile-arrow {
        font-size: 11px !important;
        color: #0f4c81 !important;
        transition: transform 0.2s ease !important;
        display: inline-block !important;
        margin-left: auto !important;
    }

    .mobile-dropdown-toggle.is-open .mobile-arrow {
        transform: rotate(180deg) !important;
    }

    /* ---- Solutions submenu: hidden by default, shown on click ---- */
    .mobile-submenu {
        display: none !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #f8f9fa !important;
        width: 100% !important;
    }

    .mobile-submenu.open {
        display: block !important;
    }

    .mobile-submenu li {
        width: 100% !important;
        display: block !important;
        border-top: 1px solid #eee !important;
    }

    .mobile-submenu .dropdown-item {
        display: block !important;
        width: 100% !important;
        padding: 12px 30px !important;
        color: #333 !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        background: transparent !important;
        white-space: normal !important;
    }

    .mobile-submenu .dropdown-item:hover,
    .mobile-submenu .dropdown-item:active {
        background: #e9f0f8 !important;
        color: #0f4c81 !important;
    }

    /* ---- Global button alignment ---- */
    .theme-btn, .sch_btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
}

/* === Small screens (max 767px) additional fixes === */
@media (max-width: 767px) {
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Footer centering */
    /* Footer: center heading and decorative blue line on mobile */
    .footer_area .fo_wid_title,
    .footer_area .get_intouch_inrfo {
        text-align: center !important;
    }

    /* Center the blue decorative line under footer headings */
    .footer_widgets .fo_wid_title:before {
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
    }

    /* Center footer navigation links (Explore, Useful Links columns) */
    .navigation_foo_inner,
    .navigation_foo_inner ul,
    .navigation_foo_inner ul li {
        text-align: center !important;
        width: 100% !important;
    }

    .navigation_foo_inner ul li a {
        display: block !important;
        text-align: center !important;
        width: 100% !important;
    }

    /* Center Get In Touch contact info */
    .get_intouch_inrfo,
    .foo_cont_inner,
    .foo_cont_inner .top,
    .foo_cont_inner .bottom,
    .foo_cont_inner h6,
    .foo_cont_inner p,
    .foo_cont_inner a {
        text-align: center !important;
    }

    .footer_copy_content {
        font-size: 11px !important;
        white-space: nowrap !important;
    }
}

/* === Banner/Carousel Responsiveness === */
@media (max-width: 768px) {
    .carousel-caption h5 {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }
    .carousel-caption p {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
    }
    .carousel-caption {
        bottom: 15% !important;
        left: 5% !important;
        right: 5% !important;
    }
    .carousel-item img {
        height: 60vh !important;
    }
}

@media (max-width: 480px) {
    .carousel-caption h5 {
        font-size: 1.5rem !important;
    }
    .carousel-caption {
        bottom: 10% !important;
    }
}
