/* ==========================================================================
   mobileresponsive.css
   Mobile-only responsive overrides for Landing/Home page (320px–767px)
   Desktop styles are untouched — all rules live inside media queries.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Mobile — max-width: 767px
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {

    /* ---- Global & Layout ---- */
    html {
        overflow-x: hidden;
    }

    body,
    body.hidden-bar-wrapper {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .page-wrapper,
    #mainContent {
        overflow-x: hidden;
        max-width: 100%;
        
    }

    img,
    figure img,
    svg,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }

    .container,
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
        max-width: 100%;
    }

    h1 { font-size: 28px; }
    h2 { font-size: 22px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }
    h5 { font-size: 14px; }

    p,
    li,
    span,
    a {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* ---- Top Utility Bar ---- */
    .top_nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 9999;
    }

    .top_nav .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }

    .top_nav .row {
        flex-direction: column;
        margin: 0;
    }

    .top_nav .col-sm-8,
    .top_nav .col-sm-4 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        padding: 4px 4px;
    }

    .top_nav .col-sm-8 {
        color: #fff;
        margin-top: 0;
        font-size: 11px;
        line-height: 1.5;
        text-align: center;
    }

    .header__logo.mt-1 a {
        margin-top: 10px;
    }

    .top_nav .col-sm-8 span,
    .top_nav .col-sm-8 a {
        display: inline;
        font-size: 11px;
    }

    .top_nav .col-sm-8 img.zoom-in-out-once {
        width: 22px;
        height: auto;
        margin-bottom: 0;
        vertical-align: middle;
    }

    .top_nav .btn-group.btn-group-sm.pull-right {
        float: none;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 2px;
        width: 100%;
        padding: 4px 10px 6px;
        border: 1px dotted #fff;
        border-radius: 12px;
    }

    .top_nav .btn-group.btn-group-sm.pull-right a {
        display: inline-flex;
    }

    .top_nav .btn-group .speak-toggle {
        font-size: 18px;
        min-width: 32px;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

        .top_nav .language-switcher select {
            height: 32px;
            margin-top: 0;
            font-size: 12px;
            min-width: 80px;
            margin-top: 0px !important;
        }

    .top_nav #pageSearch.form-control {
        height: 20px;
        margin-top: 0;
        font-size: 12px;
        width: 100%;
        max-width: 160px;
        flex: 1 1 120px;
    }

    .top_nav a.increase.btn.accessibility,
    .top_nav a.reset.btn.accessibility,
    .top_nav a.decrease.btn.accessibility {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        min-height: 36px;
        padding: 4px 8px;
        font-size: 13px;
        margin-top: 0;
    }

    .top_nav .accessibility-trigger {
        min-width: 36px;
        min-height: 36px;
    }

    .top_nav .accessibility-panel {
        width: min(92vw, 340px);
        right: 0;
        left: auto;
    }

    .top_nav .access-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .top_nav .access-item {
        font-size: 11px;
        padding: 10px 6px;
        min-height: 44px;
    }

    /* ---- Main Header ---- */
    header.header,
    header.header#mobileview,
    header#mobileview {
        position: fixed;
        top: 118px !important;
        width: 100%;
        z-index: 100;
        left: 0;
        background: #fff;
        overflow: visible;
    }

    /* Logo block — first row in header, must sit below expanded top_nav */
    header.header > .container-fluid:first-child {
        display: block;
        width: 100%;
        overflow: visible;
        background: #fff;
    }

    header.header .header__logo,
    .header__logo.mt-1 {
        display: block;
        visibility: visible;
        opacity: 1;
        width: 100%;
        padding: 10px 0 8px;
        text-align: center;
        min-height: 56px;
    }

    .header__logo.mt-1 a {
        display: block;
        width: 100%;
        line-height: 0;
    }

    .header__logo.mt-1 img {
        width: 90%;
        max-width: 260px;
        min-height: 44px;
        height: auto;
        float: none;
        margin: 0 auto;
        display: block;
        visibility: visible;
        opacity: 1;
        object-fit: contain;
    }

    header.header .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    header.header .row {
        flex-direction: column;
        align-items: center;
        margin: 0;
    }

    header.header .col-lg-6:first-child {
        order: 1;
    }

    header.header .col-lg-6:last-child,
    header.header .col-md-3 {
        order: 2;
    }

    header.header .col-lg-6,
    header.header .col-md-6,
    header.header .col-md-3 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        padding: 0;
    }

    header.header .button,
    header.header #cmlogo .button {
        float: none;
        margin-top: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding: 6px 0 8px;
        width: 100%;
        margin-top:0px !important;
    }

    .button a.login,
    a.login {
        font-size: 13px;
        padding: 8px 12px;
        margin: 0;
        white-space: nowrap;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }

    .header__top {
        padding: 4px 0;
        margin-bottom: 0;
    }

    .header__menu {
        display: none;
    }

    header.header .news-ticker {
        width: 100%;
        padding: 4px 8px;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        border: 1px solid #ccc;
    }

    header.header .news-ticker .ticker-content a {
        font-size: 12px;
    }

    /* ---- Mobile Navigation Drawer ---- */
    nav.mobile-navbar,
    .mobile-navbar {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        position: fixed !important;
        z-index: 999999;
        top: 132px !important;
        right: 8px;
        left: auto;
        width: auto;
        background: transparent;
        padding: 0;
        margin: 0;
        box-shadow: none;
    }

    .mobile-hamburger {
        font-size: 26px;
        background: #003366;
        border: none;
        color: #fff;
        cursor: pointer;
        width: 44px;
        height: 44px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

    .mobile-nav-links {
        position: fixed;
        top: 0;
        right: -280px;
        width: min(280px, 85vw);
        height: 100vh;
        height: 100dvh;
        background: #003366;
        list-style: none;
        padding: 48px 16px 24px;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
        transition: right 0.3s ease;
        z-index: 1000000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-nav-links.active {
        right: 0;
    }

    .mobile-nav-links li {
        list-style: none;
        width: 100%;
    }

    .mobile-nav-links li a {
        display: block;
        padding: 12px 16px;
        border-radius: 6px;
        background: #f1f7ff;
        color: #003366;
        font-weight: 500;
        font-size: 14px;
        text-decoration: none;
        min-height: 44px;
        line-height: 1.3;
    }

    .mobile-nav-links li a:hover,
    .mobile-nav-links li a:focus {
        background: #4e73df;
        color: #fff;
    }

    .mobile-nav-links .login-btn {
        background: #4e73df;
        color: #fff;
        text-align: center;
    }

    .mobile-close {
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.55);
        z-index: 999999;
    }

        .mobile-overlay.active {
            display: block;
            z-index: -1;
        }

    .submenu {
        display: none;
        flex-direction: column;
        gap: 4px;
        padding-left: 12px;
        margin-top: 4px;
        margin-bottom: 4px;
    }

    .has-submenu.open > .submenu {
        display: flex;
    }

    .submenu li a {
        background: #4e73df;
        font-size: 13px;
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    ul.submenu li {
        list-style: none;
    }

    .has-submenu > a {
        position: relative;
    }

    .has-submenu > a::after {
        content: "▸";
        position: absolute;
        right: 12px;
    }

    .has-submenu.open > a::after {
        content: "▾";
    }

    /* ---- News Ticker / Quick Quote ---- */
    .quick-quote.mb-1 {
        margin-top:285px !important;
        padding: 0;
    }

    .quick-quote.mb-1 .news-ticker {
        visibility: visible;
        padding: 6px 8px;
        font-size: 13px;
    }

    .quick-quote .news-ticker,
    .news-ticker {
        overflow: hidden;
        white-space: nowrap;
        width: 100%;
    }

    .ticker-content {
        font-size: 13px;
    }

    .ticker-content a {
        font-size: 13px;
    }

    .ticker-content i.fi {
        font-size: 14px;
        margin-right: 4px;
    }

    /* ---- Hero / Banner Slider ---- */
    section#homeslider.hero,
    .hero {
        margin-top: 0;
        padding: 0;
        overflow: hidden;
    }

    .hero__slider {
        overflow: hidden;
    }

    .hero__item {
        margin-right: 0;
    }

    .hero__inside__item {
        margin-right: 0;
        margin-bottom: 0;
    }

    .hero__inside__item--wide {
        width: 100%;
    }

    .hero__inside__item--wide img,
    .hero__inside__item img {
        width: 100%;
        max-width: 100%;
        height: auto;
        display: block;
        object-fit: contain;
    }

    .hero__slider.owl-carousel .owl-nav button {
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 20px;
        left: 8px;
    }

    .hero__slider.owl-carousel .owl-nav button.owl-next {
        right: 8px;
        left: auto;
    }

    .owl-carousel .owl-stage-outer {
        overflow: hidden;
    }

    /* ---- Section Titles ---- */
    .section-title {
        margin-bottom: 20px;
        padding: 0 8px;
    }

    .section-title h2 {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .section-title h3 {
        font-size: 1.1rem;
    }

    /* ---- E-Services Cards ---- */
    section#faq.faq,
    section.faq.section-bg {
        padding: 16px 0;
    }

    section#faq .container,
    section.faq .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .demo12 {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }

    .demo12.d-flex {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .demo12 .card,
    .demo12.d-flex .card {
        width: calc(50% - 10px);
        min-width: 140px;
        max-width: 100%;
        height: auto;
        min-height: 140px;
        margin: 0;
        padding: 16px 10px;
        flex: 1 1 calc(50% - 10px);
    }

    .demo12 .card-content {
        min-height: 120px;
    }

    .demo12 .default-text {
        font-size: 14px;
        padding: 0 4px;
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin-top: 8px;
    }

    .demo12 .hover-list {
        left: 0;
        width: 100%;
        height: 100%;
        min-height: 140px;
        margin-bottom: 0;
        padding: 12px 8px;
    }

    .demo12 ul.hover-list h3 {
        font-size: 14px;
        margin-top: 4px;
    }

    .demo12 .card i,
    .demo12 .card svg {
        width: 28px;
        height: 28px;
        margin-bottom: 8px;
    }

    .card {
        width: 100%;
        max-width: 100%;
        padding: 16px;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .grid-container .card {
        width: 100%;
    }

    /* ---- Gallery ---- */
    #gallery {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 0 8px 16px;
    }

        #gallery a {
            display: flex;
            flex-direction: column;
            gap: 10px;
            align-items: center;
        }

    #gallery img {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
        object-fit: cover;
        border-radius: 8px;
        display: block;
    }

    div#gallery img {
        width: 100%;
        min-width: 0;
    }

    /* ---- Quick Links / Notifications ---- */
    .policy_section,
    section.policy_section {
        padding: 16px 0 24px;
    }

    .policy_section .row {
        margin: 0;
    }

    .policy_section .col-lg-6 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        padding: 0 8px;
        margin-bottom: 24px;
    }

    .iconbox_block {
        height: auto;
        min-height: 0;
        padding-bottom: 12px;
    }

    .iconbox_block .iconbox_title {
        font-size: 18px;
        line-height: 1.3;
        padding: 10px 12px;
        margin-bottom: 0;
    }

    .iconbox_block .iconbox_content .usefull,
    .usefull {
        height: auto;
        max-height: 280px;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 10px 16px;
        margin-top: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .iconbox_content ul {
        padding-left: 16px;
    }

    .iconbox_content ul li {
        line-height: 1.4;
        padding-bottom: 6px;
        font-size: 14px;
    }

    p#usefulllinks {
        padding: 8px 16px;
        text-align: right;
    }

    /* ---- Other Links / Categories ---- */
    section.categories.spad {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    section.categories .row {
        display: flex;
        flex-wrap: wrap;
        margin: 0 -6px;
        justify-content: center;
    }

    section.categories .col-lg-2,
    section.categories .col-md-2,
    section.categories .col-sm-6 {
        width: 50%;
        max-width: 50%;
        flex: 0 0 50%;
        padding: 0 6px 12px;
    }

    .categories__item {
        height: 120px;
        margin-bottom: 12px;
        border-radius: 12px;
        background-size: cover;
        background-position: center;
    }

    .textcat {
        width: calc(100% - 20px);
        left: 10px;
        bottom: 10px;
        height: auto;
        min-height: 32px;
        padding: 4px 6px;
    }

    .textcat h5 {
        font-size: 11px;
        margin-top: 2px;
        line-height: 1.2;
    }

    /* ---- FAQ Section ---- */
    .faq-container {
        padding: 16px;
        margin: 0 8px;
    }

    .faq-container details {
        padding: 10px 12px;
    }

    .faq-container details summary {
        font-size: 14px;
    }

    .faq-container .btn {
        width: 100%;
        margin-top: 8px;
        min-height: 44px;
    }

    /* ---- Tables ---- */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    /* ---- Forms ---- */
    form {
        width: 100%;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    select,
    textarea,
    .form-control {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
        min-height: 30px;
    }

    textarea.form-control {
        min-height: 100px;
    }

    .captcha-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    /* ---- Buttons ---- */
    .btn,
    .site-btn,
    .primary-btn,
    button[type="submit"] {
        min-height: 44px;
        font-size: 14px;
    }

    .btn-block,
    .faq-container .btn,
    .login-btn {
        width: 100%;
        display: block;
        text-align: center;
    }

    /* ---- Footer ---- */
    footer.main-footer.style-two.style-four.home-5 {
        padding: 20px 0 0;
    }

    footer.main-footer .footer-top .row {
        flex-direction: column;
    }

    footer.main-footer .footer-column,
    footer.main-footer .col-lg-4,
    footer.main-footer .col-md-6,
    footer.main-footer .col-sm-12 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        padding: 0 12px;
        
    }

    .main-footer .widget-title {
        font-size: 16px;
        
    }
    .header__top {
        display: none;
    }

    .logo-widget.footer-widget ul li,
    .main-footer .footer-top .links-widget .widget-content ul li {
        font-size: 13px;
        line-height: 1.5;
        padding: 4px 0;
    }

    #footer .footer-bottom {
        padding: 12px;
        text-align: center;
    }

    #footer .footer-bottom.clearfix::after {
        content: "";
        display: table;
        clear: both;
    }

    #footer .copyright,
    #footer .credits {
        float: none;
        width: 100%;
        text-align: center;
        margin-top: 0;
        font-size: 12px;
        line-height: 1.5;
    }

    #footer .credits {
        margin-top: 8px;
        text-align: center !important;
    }

    #footer .credits img {
        width: 80px;
        max-width: 120px;
        height: auto;
        display: inline-block;
        vertical-align: middle;
    }

    /* ---- Modals ---- */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .modal-content {
        border-radius: 8px;
    }

    .modal-body {
        padding: 16px;
        overflow-x: auto;
    }

    .search-model-form input {
        width: 100%;
        font-size: 24px;
    }

    .search-close-switch {
        top: 15px;
        right: 15px;
    }

    /* ---- Carousels / Sliders ---- */
    .owl-carousel .owl-item {
        float: none;
    }

    .owl-carousel .owl-dots {
        margin-top: 8px;
    }

    .marquee-container {
        height: auto;
        max-height: 200px;
    }

    /* ---- Flex & Grid Utilities ---- */
    .d-flex {
        flex-wrap: wrap;
    }

    .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }

    /* ---- Icons ---- */
    i.fi {
        font-size: inherit;
    }

    .iconbox_block .iconbox_icon {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }

    /* ---- Spacing Overrides ---- */
    .spad {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .mb-4 {
        margin-bottom: 1rem;
    }

    .section-bg {
        padding: 12px 0;
    }

    /* ---- Preloader ---- */
    .preloader,
    #preloder {
        max-width: 100vw;
    }

    /* ---- Misc Landing Components ---- */
    .bg-light {
        padding: 12px;
    }

    .involved-block .container {
        background: none;
        padding: 12px 0;
    }

    section.grouping .tab-links {
        flex-direction: column;
        align-items: stretch;
    }

    section.grouping .tab-link {
        width: 100%;
        text-align: center;
        min-height: 44px;
    }

    section.grouping .card-container {
        grid-template-columns: 1fr;
    }

    section#cardown .card-container {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    section#cardown .card {
        width: 100%;
        max-width: 100%;
    }

    .login-container {
        width: 100%;
        padding: 0 12px;
    }

    .signin__content {
        width: 100%;
        max-width: 100%;
    }

    /* ---- Dropdown menus (touch fallback when visible) ---- */
    .dropdown__menu,
    .dropdown__submenu {
        position: static;
        width: 100%;
        box-shadow: none;
        white-space: normal;
    }

    .dropdown__submenu {
        left: 0;
        padding: 0 8px;
    }

    /* ---- Bootstrap column collapse ---- */
    .col-lg-12[style*="display: flex"],
    .col-lg-12[style*="display:flex"] {
        display: block;
        width: 100%;
    }
}


/* --------------------------------------------------------------------------
   Small Mobile — max-width: 480px
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {

    .top_nav .col-sm-8 {
        font-size: 8px;
    }
    .header__logo.mt-1 a {
        margin-top: 10px;
    }
    header.header,
    header.header#mobileview,
    header#mobileview {
        top: 108px !important;
    }

    nav.mobile-navbar,
    .mobile-navbar {
        top: 120px !important;
    }

    .quick-quote.mb-1 {
        margin-top: 264px !important;
    }

    .header__logo.mt-1 img {
        width: 92%;
        max-width: 240px;
        min-height: 40px;
    }

    .button a.login,
    a.login {
        font-size: 11px;
        padding: 7px 8px;
        flex: 1 1 calc(50% - 6px);
        max-width: fit-content;
    }

    header.header .button {
        gap: 4px;
    }

    .demo12 .card,
    .demo12.d-flex .card {
        width: 100%;
        flex: 1 1 100%;
        min-height: 120px;
    }

    section.categories .col-lg-2,
    section.categories .col-md-2,
    section.categories .col-sm-6 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    .categories__item {
        height: 100px;
    }

    .textcat h5 {
        font-size: 12px;
    }

    .section-title h2 {
        font-size: 1.1rem;
    }

    .iconbox_block .iconbox_title {
        font-size: 16px;
    }

    .top_nav #pageSearch.form-control {
        max-width: 100%;
        flex: 1 1 100%;
        display:none;
    }

    .top_nav .accessibility-panel {
        width: 50vw;
        right: -8px;
    }

    .hero__slider.owl-carousel .owl-nav button {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 16px;
    }

    h1 { font-size: 24px; }
    h2 { font-size: 20px; }

    #footer .copyright,
    #footer .credits {
        font-size: 11px;
    }
}
