/* =========================================
   NKTPe - Responsive CSS (Fixed)
   ========================================= */

/* ===== GLOBAL OVERFLOW FIX ===== */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}
* { box-sizing: border-box; }
.container-fluid, .row, section, header, footer, nav {
    max-width: 100% !important;
}

/* ===== SMOOTH SCROLL ===== */
html { scroll-behavior: smooth; }

/* ===== TABLET 1199px ===== */
@media (max-width: 1199px) {
    .hero-cards-wrap { display: none; }
    .left-sidebar, .sidebar-panel { display: none !important; }
    .mega-menu { width: 700px; }
}

/* ===== TABLET 991px ===== */
@media (max-width: 991px) {
    #heroSection { height: 70vh !important; min-height: 480px !important; }
    .hrow { min-height: 70vh !important; }
    .hero-glass-box { padding: 2rem; }
    .hero-heading { font-size: 2rem; }
    .stats-section .stat-card::after { display: none; }
    .mega-menu {
        position: static; width: 100% !important;
        transform: none !important; opacity: 1 !important;
        visibility: visible !important; box-shadow: none;
        border-radius: 12px; margin-top: 0.5rem;
    }
    .service-img-wrap { height: 180px; }
    .api-section { padding: 4rem 0; }
    .aeps-banner { text-align: center; }
    .navbar-collapse { max-height: 80vh; overflow-y: auto; }
}

/* ===== MOBILE 767px ===== */
@media (max-width: 767px) {
    /* Hero */
    #heroSection { height: 75vh !important; min-height: 500px !important; }
    .hrow { min-height: 75vh !important; }
    .hero-glass-box { padding: 1.6rem; border-radius: 16px; }
    .hero-heading { font-size: 1.75rem; }
    .hero-cta { flex-direction: column; }
    .btn-hero-primary, .btn-hero-outline { justify-content: center; width: 100%; }
    .hero-stats-mini { justify-content: center; gap: 1.2rem; }
    .hero-stat-item strong { font-size: 1.2rem; }

    /* Carousel buttons on mobile */
    .hbtn { width: 36px !important; height: 36px !important; font-size: 0.85rem !important; }
    #hPrev { left: 0.6rem !important; }
    #hNext { right: 0.6rem !important; }
    #hdots { bottom: 12px !important; }

    /* Section titles */
    .section-title { font-size: 1.5rem; }

    /* Stats */
    .stat-number { font-size: 1.6rem; }
    .stat-icon { width: 44px; height: 44px; font-size: 1.1rem; }

    /* Page banner */
    .page-banner { padding: 3.5rem 0 2rem; }
    .page-banner h1 { font-size: 1.6rem; }

    /* Topbar */
    .topbar { font-size: 0.72rem; }

    /* Misc */
    .contact-cta-section { text-align: center; }
    .contact-cta-section .d-flex { justify-content: center !important; flex-wrap: wrap; }
    .partners-track { animation-duration: 15s; }
    .footer-logo-text { font-size: 1.5rem; }
    .testimonial-card { padding: 1.5rem; }
    .app-section { text-align: center; }
    .app-section .d-flex { justify-content: center; }
    .app-phone { width: 267px;
        height: 481px;
    } }
    .phone-amount { font-size: 1.6rem; }
    .about-badge-card { display: none; }
    .why-card { padding: 1.5rem; }
    .faq-section { padding: 3.5rem 0; }
    .aeps-banner { padding: 3rem 0; }
    .api-code-card { font-size: 0.75rem; }

    /* Row gutter fix */
    .row { margin-left: 0; margin-right: 0; }
}

/* ===== SMALL MOBILE 575px ===== */
@media (max-width: 575px) {
    /* Topbar hide extras */
    .topbar-left .topbar-item:not(:first-child) { display: none !important; }

    /* Hero */
    #heroSection { height: 80vh !important; }
    .hrow { min-height: 80vh !important; }
    .hero-glass-box { padding: 1.2rem; }
    .hero-badge { font-size: 0.65rem; }
    .hero-heading { font-size: 1.35rem; }
    .hero-sub { font-size: 0.88rem; }
    .btn-hero-primary, .btn-hero-outline { padding: 11px 20px; font-size: 0.85rem; }
    .hero-stats-mini { gap: 0.8rem; }
    .hero-stat-item strong { font-size: 1.1rem; }

    /* Stats */
    .stat-icon { width: 40px; height: 40px; font-size: 1rem; }
    .stat-number { font-size: 1.4rem; }

    /* Nav */
    .btn-nav-secondary { display: none; }
    .nav-cta .btn-nav-primary { padding: 8px 14px; font-size: 0.82rem; }

    /* Cards */
    .service-card { max-width: 380px; margin: 0 auto; }
    .why-icon { width: 54px; height: 54px; font-size: 1.4rem; }

    /* WhatsApp / Back to top */
    .whatsapp-float { width: 48px; height: 48px; font-size: 1.3rem; bottom: 75px; right: 16px; }
    #back-to-top { width: 40px; height: 40px; right: 16px; bottom: 18px; }

    /* Preloader */
    .preloader-logo { font-size: 2.2rem; }
    .preloader-bar { width: 200px; }

    /* Prevent col padding from causing overflow */
    [class*="col-"] { padding-left: 8px; padding-right: 8px; }
    .px-4 { padding-left: 12px !important; padding-right: 12px !important; }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-height: 500px) and (orientation: landscape) {
    #heroSection { height: auto !important; min-height: 100vw !important; }
    .hrow { min-height: 100vw !important; }
    .hero-glass-box { padding: 1.2rem; }
}

/* ===== LARGE DESKTOP 1400px+ ===== */
@media (min-width: 1400px) {
    .container-fluid { max-width: 1500px; margin: 0 auto; }
    .hero-heading { font-size: 4rem; }
}