/* ============================================================
   responsive.css — CredNexus Pvt. Ltd.
   Add AFTER style.css in masterlayout <head>
   Fixes every section that was not mobile-friendly
   ============================================================ */

/* ─────────────────────────────────────────
   CSS CUSTOM PROPERTIES (shared palette)
───────────────────────────────────────── */
:root {
    --cn-navy: #1a335c;
    --cn-navy-dark: #0d1f3c;
    --cn-green: #9cc03a;
    --cn-green-lt: #c8e880;
    --cn-green-dim: rgba(156, 192, 58, 0.15);
    --cn-green-light: #f0f8e2;
    --radius: 10px;
    --radius-lg: 16px;
}

/* ─────────────────────────────────────────
   0.  GLOBAL HELPERS
───────────────────────────────────────── */
img {
    max-width: 100%;
    height: auto;
}

/* ─────────────────────────────────────────
   1.  NAVBAR  (already partially responsive;
       this completes it for <768 px)
───────────────────────────────────────── */
@media (max-width: 767px) {
    .navbar-brand img {
        max-width: 130px;
    }

    .navbar-nav .nav-item {
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    .navbar-nav .nav-item a {
        padding: 10px 0;
        font-size: 15px;
    }

    /* Hamburger sits right */
    .navbar-toggler {
        margin-left: auto;
    }
}

/* ─────────────────────────────────────────
   2.  HERO (header-hero)
   Badges overflow on small screens
───────────────────────────────────────── */
@media (max-width: 991px) {
    .header-hero {
        height: auto;
        padding-bottom: 60px;
    }

    .image-wrapper {
        max-width: 320px;
        height: 320px;
        margin: 0 auto;
    }

    .product-img {
        width: 300px;
    }

    /* Hide floating badges on tablet to prevent overflow */
    .badge-float {
        display: none;
    }
}

@media (max-width: 767px) {
    .header-hero-content {
        padding-top: 100px;
    }
    .header-hero-content .header-title {
        font-size: 26px;
        line-height: 1.3;
    }
    .header-hero-content .text {
        font-size: 14px;
    }

    /* Stack CTA buttons vertically */
    .header-hero-content ul {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: flex-start;
    }
    .header-hero-content ul li {
        margin-left: 0 !important;
    }
    .header-hero-content ul li .main-btn {
        font-size: 14px;
        height: 46px;
        line-height: 42px;
        padding: 0 20px;
    }

    .image-wrapper {
        max-width: 260px;
        height: 260px;
    }
    .product-img {
        width: 240px;
    }

    /* Background circles on hero */
    .header-image::before {
        width: 220px;
        height: 220px;
    }
    .header-image::after {
        width: 180px;
        height: 180px;
    }
}

/* ─────────────────────────────────────────
   3.  WHY CHOOSE US (services-area)
───────────────────────────────────────── */
@media (max-width: 575px) {
    .single-services {
        padding: 30px 18px;
    }
    .single-services .services-icon {
        width: 64px;
        height: 64px;
    }
    .single-services .services-icon i {
        font-size: 30px;
        line-height: 64px;
    }
    .services-area .section-title .title {
        font-size: 20px;
    }
}

/* ─────────────────────────────────────────
   4.  ABOUT SECTION (about-area)
───────────────────────────────────────── */
@media (max-width: 991px) {
    .about-image {
        margin-left: 0;
        padding-top: 60px;
        padding-bottom: 40px;
    }
    .about-image .about-shape {
        width: 280px;
        height: 280px;
    }
    /* .about-image .app { max-width: 170px; } */
}

@media (max-width: 767px) {
    .about-image .about-shape {
        width: 240px;
        height: 240px;
    }
    .about-content .main-btn {
        margin-top: 24px;
    }
}

/* ─────────────────────────────────────────
   5.  DOWNLOAD / PRODUCTS SECTION
───────────────────────────────────────── */
@media (max-width: 767px) {
    .download-area .download-image {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 40px;
        padding-bottom: 20px;
    }
    .download-content .download-title {
        font-size: 22px;
    }
    .download-content ul {
        padding-top: 20px;
    }
    .download-content ul li {
        display: block;
        margin-top: 12px;
    }
    .download-content ul li .main-btn {
        width: auto;
    }
}

/* ─────────────────────────────────────────
   6.  BULK ORDER SECTION  (#bulk-order)
───────────────────────────────────────── */
@media (max-width: 991px) {
    #bulk-order .bulk-order-inner {
        flex-direction: column;
        gap: 32px;
    }
    #bulk-order .bulk-order-left,
    #bulk-order .bulk-order-right {
        min-width: 100%;
    }

    #bulk-order .bulk-title {
        font-size: 26px;
    }
    #bulk-order .bulk-stats {
        gap: 8px;
    }
    #bulk-order .stat-pill {
        min-width: 100px;
        padding: 12px 14px;
    }

    #bulk-order .bulk-process-steps {
        flex-wrap: wrap;
    }
    #bulk-order .step-item {
        min-width: 48%;
    }
}

@media (max-width: 575px) {
    #bulk-order.bulk-order-area {
        padding: 60px 0;
    }
    #bulk-order .bulk-title {
        font-size: 22px;
    }
    #bulk-order .bulk-stats {
        justify-content: space-between;
    }
    #bulk-order .stat-pill {
        min-width: 45%;
        flex: 1;
    }
    #bulk-order .step-item {
        min-width: 48%;
    }
    #bulk-order .btn-bulk-green,
    #bulk-order .btn-bulk-outline {
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* ─────────────────────────────────────────
   7.  CONTACT SECTION  (#contact)
───────────────────────────────────────── */
@media (max-width: 991px) {
    #contact .contact-form-box {
        padding: 24px;
    }
}

@media (max-width: 767px) {
    #contact.contact-area {
        padding: 60px 0;
    }
    #contact .section-title .title {
        font-size: 24px;
    }

    /* Contact info cards: 2-col grid on small screens */
    #contact .contact-info-card {
        padding: 20px 14px;
    }
    #contact .contact-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    /* Form full-width fields */
    #contact .contact-form-box {
        padding: 20px 16px;
    }
    #contact .contact-form-box .form-control {
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    #contact .section-title .title {
        font-size: 20px;
    }
    #contact .contact-form-box .btn-submit-form {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
}

/* ─────────────────────────────────────────
   8.  BLOG SECTION  (#blog)
───────────────────────────────────────── */
@media (max-width: 767px) {
    #blog.blog-area {
        padding: 60px 0;
    }
    #blog .section-title .title {
        font-size: 24px;
    }
    #blog .blog-thumb {
        height: 140px;
    }
    #blog .blog-content {
        padding: 16px;
    }
    #blog .blog-content h4 {
        font-size: 14px;
    }
}

@media (max-width: 575px) {
    /* Force single column on very small screens */
    #blog .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ─────────────────────────────────────────
   9.  ABOUT PAGE (ab-hero, counters, etc.)
───────────────────────────────────────── */

/* Hero grid */
@media (max-width: 991px) {
    .ab-hero-grid {
        grid-template-columns: 1fr;
    }
    .ab-left {
        padding: 100px 32px 48px;
    }
    .ab-right {
        min-height: 260px;
    }
    .ab-main-img {
        height: 260px;
        width: 90%;
    }

    .ab-badge-1 {
        bottom: 14px;
        left: 12px;
        padding: 10px 14px;
    }
    .ab-badge-2 {
        top: 14px;
        right: 12px;
    }
}

@media (max-width: 767px) {
    .ab-left {
        padding: 90px 20px 36px;
    }
    .ab-title {
        font-size: 26px;
    }
    .ab-desc {
        font-size: 13px;
    }
    .ab-tags {
        gap: 6px;
    }
    .abt {
        font-size: 10px;
        padding: 4px 10px;
    }
    .ab-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .btn-green-solid {
        padding: 11px 24px;
        font-size: 13px;
    }

    .ab-badge-1,
    .ab-badge-2 {
        display: none;
    } /* avoid layout issues on very small */
}

/* Counter strip */
@media (max-width: 767px) {
    .ab-counters {
        grid-template-columns: 1fr 1fr;
    }
    .ab-cnt-item {
        padding: 24px 14px;
        border-bottom: 1px solid #e4ecd0;
    }
    .ab-cnt-num {
        font-size: 24px;
    }
}

@media (max-width: 380px) {
    .ab-counters {
        grid-template-columns: 1fr;
    }
}

/* Mission strip */
@media (max-width: 991px) {
    .ab-mission {
        grid-template-columns: 1fr;
        padding: 48px 24px;
        gap: 32px;
    }
}

@media (max-width: 767px) {
    .ab-mission {
        padding: 40px 16px;
    }
    .ab-miss-left h2 {
        font-size: 20px;
    }
    .ab-miss-cards {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .ab-mcard {
        padding: 14px 12px;
    }
    .ab-mc-title {
        font-size: 12px;
    }
    .ab-mc-sub {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .ab-miss-cards {
        grid-template-columns: 1fr;
    }
}

/* Timeline + Promise */
@media (max-width: 991px) {
    .ab-two-col {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 767px) {
    .ab-body {
        padding: 48px 0;
    }
    .ab-sh {
        font-size: 20px;
    }
    .ab-pcard {
        padding: 14px;
    }
    .ab-pc-icon {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }
}

/* Testimonial band */
@media (max-width: 991px) {
    .ab-tband-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 767px) {
    .ab-tband {
        padding: 48px 0;
    }
    .ab-tband-left blockquote {
        font-size: 14px;
    }
    .ab-tband-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .ab-tsn {
        font-size: 22px;
    }
}

/* Cert strip */
@media (max-width: 767px) {
    .ab-certs {
        grid-template-columns: 1fr 1fr;
    }
    .ab-cert-item {
        padding: 20px 10px;
        border-bottom: 1px solid #e4ecd0;
    }
    .ab-cert-ic {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 380px) {
    .ab-certs {
        grid-template-columns: 1fr;
    }
}

/* ─────────────────────────────────────────
   10.  PRODUCT PAGE (pr-*)
───────────────────────────────────────── */

/* Hero */
@media (max-width: 991px) {
    .pr-hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .pr-left {
        padding-bottom: 0;
    }
    .pr-right img {
        border-radius: var(--radius-lg);
    }
    .pr-stats {
        position: static;
        margin-top: 12px;
        border-radius: var(--radius);
    }
    .pr-title {
        font-size: clamp(1.6rem, 4vw, 2.2rem);
    }
}

@media (max-width: 767px) {
    .pr-hero {
        padding: 80px 0 40px;
        margin-top: 70px;
    }
    .pr-title {
        font-size: 1.6rem;
    }
    .pr-desc {
        font-size: 0.88rem;
    }
    .pr-stats {
        flex-wrap: wrap;
        gap: 0;
    }
    .pr-stat {
        min-width: 50%;
        padding: 12px 8px;
    }
    .pr-stat + .pr-stat {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .pr-stat-val {
        font-size: 1.2rem;
    }
}

/* Feature strip */
@media (max-width: 991px) {
    .pr-features-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575px) {
    .pr-features-grid {
        grid-template-columns: 1fr;
    }
    .pr-feat {
        padding: 24px 20px;
    }
}

/* Filter bar */
@media (max-width: 767px) {
    .pr-filter {
        padding: 20px 0;
        position: static;
    }
    .pr-filter-inner {
        border-radius: var(--radius);
        padding: 4px;
        gap: 4px;
    }
    .pr-filter-btn {
        padding: 7px 14px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .pr-filter-inner {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .pr-filter-btn {
        flex-shrink: 0;
    }
}

/* Product grid */
@media (max-width: 1024px) {
    .pr-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .pr-grid {
        grid-template-columns: 1fr;
    }
    .pr-card-img {
        aspect-ratio: 16/9;
    }
}

/* CTA strip */
@media (max-width: 767px) {
    .pr-cta-box {
        padding: 32px 24px;
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .pr-cta-text h3 {
        font-size: 1.4rem;
    }
    .btn-green-solid {
        width: 100%;
        justify-content: center;
    }
}

/* ─────────────────────────────────────────
   11.  BULK PAGE (bk-*)
───────────────────────────────────────── */
@media (max-width: 1024px) {
    .bk-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 767px) {
    .bk-section {
        padding: 60px 0;
        margin-top: 70px;
    }
    .bk-title {
        font-size: 26px;
    }
    .bk-desc {
        font-size: 13px;
    }
    .bk-stats-row {
        gap: 8px;
    }
    .bk-stat {
        min-width: 110px;
        flex: 1;
        padding: 14px 12px;
    }
    .bk-snum {
        font-size: 18px;
    }

    .bk-steps {
        grid-template-columns: 1fr 1fr;
    }
    .bk-step {
        padding: 14px 10px;
    }

    .bk-prod-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bk-form-box {
        padding: 22px 18px;
    }
    .bk-fi-row {
        grid-template-columns: 1fr;
    }
    .bk-fi-row .bk-fi {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .bk-title {
        font-size: 22px;
    }
    .bk-steps {
        grid-template-columns: 1fr;
    }
    .bk-prod-grid {
        grid-template-columns: 1fr;
    }
    .bk-stat {
        min-width: 44%;
    }
}

/* ─────────────────────────────────────────
   12.  FOOTER
───────────────────────────────────────── */
@media (max-width: 767px) {
    .footer-widget {
        padding-top: 20px;
        padding-bottom: 50px;
    }
    .footer-about {
        max-width: 100%;
        margin-top: 30px;
    }
    .footer-link {
        flex-direction: column;
        gap: 0;
    }
    .footer-link-wrapper {
        width: 100%;
        margin-top: 30px;
    }
    .footer-contact {
        margin-top: 30px;
    }

    .footer-copyright .copyright {
        text-align: center;
    }
    .footer-copyright .copyright-privacy {
        text-align: center;
        margin-top: 6px;
    }

    .footer-area .logo {
        max-width: 150px;
    }

    /* Stack footer shape decorators so they don't overflow */
    .footer-area .footer-shape.shape-1 {
        left: auto;
        right: 20px;
    }
    .footer-area .footer-shape.shape-7 {
        display: none;
    }
    .footer-area .footer-shape.shape-8 {
        display: none;
    }
}

/* ─────────────────────────────────────────
   13.  SECTION TITLES (global)
───────────────────────────────────────── */
@media (max-width: 575px) {
    .section-title .title {
        font-size: 20px !important;
    }
    .section-title .sub-title {
        font-size: 10px;
    }
    .section-title .text {
        font-size: 14px;
        margin-top: 12px;
    }
}

/* ─────────────────────────────────────────
   14.  MAIN BUTTONS (global)
───────────────────────────────────────── */
@media (max-width: 480px) {
    .main-btn {
        font-size: 14px;
        height: 46px;
        line-height: 42px;
        padding: 0 18px;
    }
}

/* ─────────────────────────────────────────
   15.  PRELOADER — already fine, minor fix
───────────────────────────────────────── */
.preloader-logo img {
    max-width: 110px;
}

/* ─────────────────────────────────────────
   16.  GENERAL OVERFLOW GUARD
   Prevents horizontal scroll on all pages
───────────────────────────────────────── */
html,
body {
    overflow-x: hidden;
}

.container {
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 576px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}
@media (min-width: 1200px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ─────────────────────────────────────────
   17.  BACK-TO-TOP button
───────────────────────────────────────── */
@media (max-width: 480px) {
    .back-to-top {
        right: 12px;
        bottom: 12px;
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 17px;
    }
}

/* ─────────────────────────────────────────
   18.  TABLET TWEAKS (768–991 px)
───────────────────────────────────────── */
@media only screen and (min-width: 768px) and (max-width: 991px) {
    /* About page hero */
    .ab-left {
        padding: 80px 40px 48px;
    }
    .ab-title {
        font-size: 28px;
    }

    /* Products page grid 2-col */
    .pr-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Bulk form full width */
    .bk-grid {
        grid-template-columns: 1fr;
    }

    /* Contact cards 2-col */
    .contact-info-card {
        padding: 22px 16px;
    }
}
