/* ═══════════════════════════════════════════════════════════════
   INSURE WITH AHAD — Mobile-First / Corporate App Responsive CSS
   Breakpoints: 1199px | 991px | 767px | 575px | 400px
═══════════════════════════════════════════════════════════════ */

/* ─── Global Mobile Resets ─── */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; max-width: 100vw; }
img  { max-width: 100%; height: auto; display: block; }

/* ─── Sticky Header ─── */
.header {
    position: sticky !important;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}
.header.scrolled {
    box-shadow: 0 2px 20px rgba(13,27,62,0.10) !important;
}

/* ══════════════════════════════════════════
   ≤ 1199px  (laptop / large tablet)
══════════════════════════════════════════ */
@media (max-width: 1199px) {
    .banner-con .banner_content { width: 100%; padding: 110px 0 90px; }
    .banner-con .banner_wrapper .box { right: 20px; bottom: -340px; width: 220px; }
}

/* ══════════════════════════════════════════
   ≤ 991px  (tablet / small laptop)
══════════════════════════════════════════ */
@media (max-width: 991px) {

    /* ── Typography ── */
    h1 { font-size: 40px !important; line-height: 1.12 !important; }
    h2 { font-size: 32px !important; line-height: 1.18 !important; }
    h3 { font-size: 22px !important; }
    p  { font-size: 16px !important; line-height: 1.75 !important; }

    /* ── Mobile Nav ── */
    .navbar-toggler {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        padding: 10px 8px !important;
        margin-right: 4px;
    }
    .navbar-toggler-icon {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--e-global-color-primary, #0d1b3e);
        border-radius: 2px;
        margin: 5px 0;
        transition: all 0.3s ease;
    }
    .navbar-collapse {
        background: #ffffff;
        border-top: 1px solid #eef1f6;
        border-radius: 0 0 14px 14px;
        box-shadow: 0 12px 40px rgba(13,27,62,0.12);
        padding: 16px 8px 20px;
        margin-top: 8px;
    }
    .navbar-nav .nav-item { border-bottom: 1px solid #f0f3f8; }
    .navbar-nav .nav-item:last-child { border-bottom: none; }
    .navbar-nav .nav-link {
        font-size: 16px !important;
        font-weight: 600 !important;
        padding: 14px 16px !important;
        border-radius: 8px !important;
        color: #0d1b3e !important;
        min-height: 48px;
        display: flex !important;
        align-items: center;
    }
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-item.active .nav-link {
        background: rgba(61,206,178,0.08) !important;
        color: #3dceb2 !important;
    }
    /* Mobile dropdown */
    .dropdown-menu.drop-down-content {
        position: static !important;
        float: none !important;
        box-shadow: none !important;
        border: none !important;
        background: #f7f9fc !important;
        border-radius: 10px !important;
        padding: 6px 8px !important;
        margin: 4px 0 !important;
    }
    .drop-down-pages .nav-link {
        font-size: 14px !important;
        padding: 11px 14px !important;
        min-height: 44px;
    }
    /* Mobile "Book" button */
    .navbar-collapse > div > .contact_us {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        margin-top: 12px !important;
        padding: 15px !important;
        font-size: 15px !important;
    }

    /* ── Banner / Hero ── */
    .banner-con .banner_content {
        width: 100% !important;
        padding: 80px 0 60px !important;
        text-align: center;
    }
    .banner-con .banner_content h5::before { display: none; }
    .banner-con .banner_content h5 { padding-left: 0 !important; }
    .banner-con .banner_content .button_wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }
    .banner-con .banner_content .all_button { width: auto; padding: 16px 24px !important; }
    .banner-con .banner_wrapper { display: none !important; }
    .family_banner_outer { padding-bottom: 0 !important; }

    /* ── Benefit ── */
    .benefit-con { padding: 70px 0; }
    .benefit-con .benefit_content { text-align: center; margin-bottom: 36px; }
    .benefit-con .benefit_wrapper ul { flex-direction: column !important; gap: 0 !important; }
    .benefit-con .beneft-box { width: 100% !important; margin-bottom: 14px !important; }

    /* ── About ── */
    .about-con { padding: 70px 0; }
    .about-con .about_wrapper { margin-bottom: 48px; }
    .about-con .about-image2 { display: none !important; }
    .about-con .about_wrapper .box { display: none !important; }
    .about-con .about-image1 { position: static !important; width: 100%; }
    .about-con .about-image1 img { width: 100%; border-radius: 14px !important; }
    .about-con .about_content { padding: 0 !important; text-align: center; }
    .about-con .about_content a { margin: 0 auto; }

    /* ── Services ── */
    .service-con { padding: 70px 0; }
    .service-con .service-box,
    .service-con .service_box { margin-bottom: 20px; }

    /* ── Choose ── */
    .choose-con { padding: 70px 0; }
    .choose-con .choose-leftimage { display: none !important; }
    .choose-con .choose_content { text-align: center; margin-bottom: 40px; }
    .choose-con .choose_wrapper { padding-top: 0 !important; }
    .choose-con .choose_wrapper ul {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 16px;
    }
    .choose-con .choose_wrapper ul li {
        padding: 24px 16px !important;
        border-radius: 12px;
        background: rgba(255,255,255,0.07);
        border: 1px solid rgba(255,255,255,0.1);
        text-align: center;
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }

    /* ── FAQ ── */
    .faq-con { padding: 70px 0; }
    .faq-con .faq_wrapper { margin-bottom: 40px; }
    .faq-con .faq-image img { border-radius: 14px; }

    /* ── Testimonials ── */
    .testimonial-con { padding: 70px 0 100px; }
    .testimonial-sideimage { display: none !important; }
    .testimonial-con .carousel-indicators {
        position: static !important;
        margin-top: 28px !important;
        justify-content: center;
    }
    .testimonial-con .pagination_outer {
        position: static !important;
        margin-top: 20px !important;
        display: flex;
        justify-content: center;
        gap: 16px;
    }
    .testimonial-con .pagination_outer button {
        position: static !important;
        width: 48px !important;
        height: 48px !important;
        line-height: 48px !important;
    }

    /* ── Contact ── */
    .contact-con { padding: 70px 0; }
    .contact-con .contact_content { text-align: center; margin-bottom: 40px; }
    .contact-con .contact_content h2 { margin-bottom: 16px; }
    .contact-con .contact_form .form-group.float-left {
        float: none !important;
        width: 100% !important;
        margin-bottom: 14px !important;
    }
    .contact-con .contact_form .form-group.small_box { width: 100% !important; }
    .form_style { font-size: 16px !important; padding: 15px 18px !important; }
    .form-control {
        font-size: 16px !important;
        padding: 15px 18px !important;
        height: auto !important;
        border-radius: 8px !important;
        border: 1.5px solid #e8ecf3 !important;
        background: #f7f9fc !important;
    }
    .contact-con .manage-button { text-align: center; }
    .contact-con .manage-button .submit_now {
        width: 100% !important;
        max-width: 340px;
        display: inline-block;
        padding: 18px 24px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
    }

    /* ── Pre-footer CTA ── */
    .footer-cta-strip { text-align: center; padding: 50px 16px; }
    .footer-cta-strip h3 { font-size: 24px; }
    .footer-cta-strip .cta-btn { margin-top: 24px; display: inline-block; }

    /* ── Footer ── */
    .footer-con .middle_portion { padding: 60px 0 50px; }
    .footer-con .middle_portion .col-xl-10 { padding: 0; }
    .footer-con .middle_portion .logo-content { margin-bottom: 40px; text-align: center; }
    .footer-con .middle_portion .social-icons { justify-content: center; display: flex; }
    .footer-con .middle_portion .links { padding-left: 0 !important; }
    .footer-con .middle_portion h4.heading { font-size: 12px; letter-spacing: 0.1em; }

    /* ── Sub-banner (inner pages) ── */
    .sub_banner .sub_banner_con { padding: 80px 0 90px; }
    .sub_banner .sub_banner_con h1 { font-size: 36px !important; }
    .sub_banner .sub_banner_con p { padding: 0 !important; font-size: 16px !important; }

    /* ── Service detail page ── */
    .service_sidebar { margin-top: 48px; }
    .service_detail_content { margin-bottom: 40px; }
}

/* ══════════════════════════════════════════
   ≤ 767px  (mobile landscape / large phone)
══════════════════════════════════════════ */
@media (max-width: 767px) {

    h1 { font-size: 34px !important; }
    h2 { font-size: 28px !important; }

    /* ── Nav logo text ── */
    .navbar-brand .logo::after { font-size: 18px !important; }

    /* ── Banner ── */
    .banner-con .banner_content { padding: 70px 0 55px !important; }
    .banner-con .banner_content h1 { font-size: 32px !important; }
    .banner-con .banner_content p { font-size: 15px !important; }
    .banner-con .banner_content .all_button { font-size: 13px !important; padding: 14px 20px !important; }

    /* ── Choose stats: responsive grid ── */
    .choose_wrapper ul {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
        flex-wrap: unset !important;
    }
    .choose_wrapper ul li {
        margin: 0 !important;
        min-width: unset !important;
        padding: 20px 16px !important;
        text-align: center !important;
    }
    .choose_wrapper .value { justify-content: center !important; }
    .choose_wrapper .value .number { font-size: 36px !important; }
    .choose_wrapper .value .expression { font-size: 22px !important; }

    /* ── Service cards: 2-col grid on mobile ── */
    .service-con .row > [class*="col-md-6"] { flex: 0 0 50%; max-width: 50%; }

    /* ── FAQ image: hide on mobile ── */
    .faq-con .faq_wrapper { display: none; }
    .faq-con .faq_content { padding: 0; }
    .faq-con .faq_content h2 { text-align: center; }
    .faq-con .faq_content p { text-align: center; }
    .faq-con h6 { text-align: center; display: block; }

    /* ── Testimonials ── */
    .testimonial-con .testimonial-box p { font-size: 16px !important; line-height: 1.7 !important; }
    .testimonial-con .carousel-indicators li figure img { width: 44px !important; height: 44px !important; }

    /* ── Footer: 2-col links grid ── */
    .footer-con .col-lg-2,
    .footer-con .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 32px;
    }
    .footer-con .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .footer-con .col-lg-3:last-child {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* ── Section spacing ── */
    .benefit-con, .service-con, .about-con, .choose-con,
    .faq-con, .testimonial-con, .contact-con { padding: 60px 0; }
}

/* ══════════════════════════════════════════
   ≤ 575px  (phone portrait — primary mobile)
══════════════════════════════════════════ */
@media (max-width: 575px) {

    .container { padding-left: 20px !important; padding-right: 20px !important; }

    h1 { font-size: 30px !important; line-height: 1.18 !important; }
    h2 { font-size: 26px !important; }

    /* ── Banner: single CTA button ── */
    .banner-con .banner_content { padding: 60px 0 50px !important; }
    .banner-con .banner_content .button_wrapper { flex-direction: column; align-items: center; }
    .banner-con .banner_content .all_button { width: 100% !important; max-width: 300px; text-align: center; }

    /* ── Service cards: single column ── */
    .service-con .row > [class*="col-md-6"],
    .service-con .row > [class*="col-sm-6"] {
        flex: 0 0 100%; max-width: 100%;
    }

    /* ── Choose stats: 2-col on small phones ── */
    .choose_wrapper ul { grid-template-columns: 1fr 1fr !important; }
    .choose_wrapper ul li:last-child {
        grid-column: span 2;
        max-width: 200px;
        margin: 0 auto !important;
    }

    /* ── About: full width image ── */
    .about-con .about_wrapper { padding: 0; }

    /* ── Testimonial box ── */
    .testimonial-con .testimonial-box { padding: 24px 20px; }
    .testimonial-con .testimonial-box p { font-size: 15px !important; }

    /* ── CTA strip ── */
    .footer-cta-strip h3 { font-size: 22px; }
    .footer-cta-strip p { font-size: 14px; }
    .footer-cta-strip .cta-btn { width: 100%; max-width: 280px; text-align: center; }

    /* ── Footer links full-width ── */
    .footer-con .col-lg-2,
    .footer-con .col-lg-3,
    .footer-con .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 32px;
    }
    .footer-con .middle_portion { padding: 50px 0 36px; }

    /* ── Section spacing ── */
    .benefit-con, .service-con, .about-con, .choose-con,
    .faq-con, .testimonial-con, .contact-con { padding: 50px 0; }
}

/* ══════════════════════════════════════════
   ≤ 400px  (very small phones)
══════════════════════════════════════════ */
@media (max-width: 400px) {
    h1 { font-size: 26px !important; }
    h2 { font-size: 23px !important; }
    .banner-con .banner_content { padding: 50px 0 40px !important; }
    .choose-con .choose_wrapper ul { grid-template-columns: 1fr; }
    .choose-con .choose_wrapper ul li { flex-direction: row; justify-content: center; gap: 12px; }
}

/* ══════════════════════════════════════════
   MOBILE NAV SCROLL BEHAVIOUR (JS-driven class)
══════════════════════════════════════════ */
.header { will-change: transform; }

/* ══════════════════════════════════════════
   TOUCH TARGETS — ensure all interactive
   elements are at least 44px tall
══════════════════════════════════════════ */
@media (max-width: 991px) {
    a, button, .btn, input[type="submit"],
    .nav-link, .dropdown-item, .all_button, .cta-btn {
        min-height: 44px;
    }
    input, select, textarea {
        font-size: 16px !important; /* prevents iOS zoom on focus */
        min-height: 50px;
    }
    textarea { min-height: 100px !important; }
}

/* ══════════════════════════════════════════
   PREVENT OVERFLOW FROM ABSOLUTELY-POSITIONED
   TEMPLATE DECORATIONS
══════════════════════════════════════════ */
@media (max-width: 991px) {
    .choose-con { overflow: hidden; }
    .testimonial-con { overflow: hidden; }
    .about-con { overflow: hidden; }
    .banner-con { overflow: hidden; }
    .family_banner_outer { overflow: hidden; }
}
