/* ============================================================
   MYWEBSOLUTION - MOBILE RESPONSIVE CSS
   Breakpoints:
   XS: <480px  |  SM: 480-767px  |  MD: 768-991px  |  LG: 992px+
   ============================================================ */

/* ── TOPBAR ─────────────────────────────────────────────── */
@media (max-width: 767px) {
    .topbar { display: none !important; }
}

/* ── HEADER / NAVBAR ─────────────────────────────────────── */
@media (max-width: 991px) {
    .header-wrapper {
        padding: 0 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1050 !important;
        background: #ffffff !important;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08) !important;
    }

    .site-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 64px !important;
        flex-wrap: wrap !important;
        padding: 8px 15px !important;
        position: relative !important;
    }

    .title-area {
        width: auto !important;
        float: none !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
    }

    .site-title img {
        height: 44px !important;
        max-height: 44px !important;
        width: auto !important;
    }

    /* Navbar collapse area */
    .col-lg-9.col-md-9.col-sm-12 {
        float: none !important;
        width: auto !important;
        padding: 0 !important;
        position: static !important;
    }

    .navbar-default {
        min-height: auto !important;
        border: none !important;
        margin: 0 !important;
        display: block !important;
    }

    .navbar-header {
        float: right !important;
        margin: 0 !important;
    }

    .navbar-toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        margin: 0 !important;
        border: 1.5px solid #0284c7 !important;
        background: #f0f9ff !important;
        border-radius: 8px !important;
        padding: 8px 11px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }
    .navbar-toggle:hover, .navbar-toggle:focus {
        background: #e0f2fe !important;
    }
    .navbar-toggle .icon-bar {
        background-color: #0284c7 !important;
        width: 22px !important;
        height: 2.5px !important;
        border-radius: 2px !important;
        margin: 0 !important;
    }

    /* Mobile dropdown menu */
    #defaultmenu.navbar-collapse {
        flex: 0 0 100% !important;
        width: 100% !important;
        border-top: 1px solid #f1f5f9 !important;
        background: #ffffff !important;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12) !important;
        padding: 10px 0 14px 0 !important;
        margin: 8px 0 0 0 !important;
        border-radius: 0 0 16px 16px !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }

    .navbar-default .navbar-nav {
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 2px !important;
        float: none !important;
        width: 100% !important;
    }

    .navbar-default .navbar-nav > li {
        float: none !important;
        width: 100% !important;
        display: block !important;
        border-bottom: 1px solid #f8fafc !important;
    }

    .navbar-default .navbar-nav > li > a {
        font-size: 14.5px !important;
        font-weight: 600 !important;
        padding: 11px 18px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        color: #1e293b !important;
        margin: 0 10px !important;
        transition: all 0.2s ease !important;
    }

    .navbar-default .navbar-nav > li > a:hover,
    .navbar-default .navbar-nav > .active > a {
        background: #f0f9ff !important;
        color: #0284c7 !important;
        font-weight: 700 !important;
    }

    .navbar-default .navbar-nav > .active > a::after {
        display: none !important;
    }

    /* Contact button on mobile */
    .navbar-default .navbar-nav > li:last-child {
        border-bottom: none !important;
        padding-top: 6px !important;
    }

    .navbar-default .navbar-nav > li:last-child > a {
        background: linear-gradient(135deg, #e63c1e 0%, #f05a2a 100%) !important;
        color: #ffffff !important;
        text-align: center !important;
        justify-content: center !important;
        padding: 11px 20px !important;
        border-radius: 50px !important;
        margin: 4px 14px 0 14px !important;
        box-shadow: 0 4px 14px rgba(230, 60, 30, 0.35) !important;
    }
}

/* ── HERO SECTION ────────────────────────────────────────── */
@media (max-width: 991px) {
    .hero-dev-wrapper {
        padding: 50px 0 40px 0 !important;
    }

    .hero-title {
        font-size: 30px !important;
        letter-spacing: -0.02em !important;
        text-align: center !important;
    }

    .hero-badge {
        display: inline-flex !important;
        margin: 0 auto 16px auto !important;
    }

    .hero-desc {
        font-size: 15px !important;
        text-align: center !important;
        max-width: 100% !important;
        margin: 0 auto 20px auto !important;
    }

    .hero-dev-wrapper [style*="display:flex"][style*="gap:14px"] {
        justify-content: center !important;
    }

    .hero-dev-wrapper [style*="margin-top:15px"] {
        text-align: center !important;
    }

    .hero-dev-wrapper [style*="display:flex"][style*="gap:8px"] {
        justify-content: center !important;
    }

    .dev-terminal-card {
        margin-top: 30px !important;
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 24px !important;
    }

    .hero-dev-wrapper .btn-brand,
    .hero-dev-wrapper .btn-outline-white {
        width: 100% !important;
        text-align: center !important;
        display: block !important;
        margin-bottom: 10px !important;
    }

    .hero-dev-wrapper [style*="display:flex"][style*="gap:14px"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .tech-pill {
        font-size: 11px !important;
        padding: 4px 9px !important;
    }
}

/* ── PAGE BREADCRUMB HEADERS ─────────────────────────────── */
@media (max-width: 767px) {
    .post-wrapper-top h2 {
        font-size: 20px !important;
        line-height: 1.3 !important;
    }

    .post-wrapper-top p {
        font-size: 13px !important;
    }

    .post-wrapper-top .col-lg-4.text-right {
        text-align: left !important;
        margin-top: 12px !important;
    }
}

/* ── CARDS & SECTIONS ────────────────────────────────────── */
@media (max-width: 767px) {
    /* Service cards, feature boxes */
    .col-sm-12 { width: 100% !important; }

    /* Generic section padding */
    section { padding-left: 10px !important; padding-right: 10px !important; }

    /* Tables — horizontal scroll */
    .table-responsive { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }

    /* Modal widths */
    .modal-dialog { margin: 10px auto !important; width: 95% !important; }
    .modal-content { border-radius: 12px !important; }

    /* Forms */
    .form-control {
        font-size: 14px !important;
        padding: 9px 12px !important;
    }

    input, select, textarea, button {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 8px !important;
    }

    /* Admin table buttons */
    .btn-xs, .btn-sm { padding: 5px 9px !important; font-size: 11px !important; }
}

/* ── FOOTER ──────────────────────────────────────────────── */
@media (max-width: 767px) {
    .footer-wrapper .col-md-3,
    .footer-wrapper .col-md-4,
    .footer-wrapper .col-md-6 {
        width: 100% !important;
        margin-bottom: 24px !important;
        float: none !important;
    }

    .footer-bottom .col-md-6 {
        text-align: center !important;
        width: 100% !important;
        float: none !important;
        margin-bottom: 8px !important;
    }

    .footer-bottom p { font-size: 12px !important; }
}

/* ── TRAINING PAGE ───────────────────────────────────────── */
@media (max-width: 767px) {
    #trainingModal .modal-dialog { width: 96% !important; }
}

/* ── ADMIN PANEL ─────────────────────────────────────────── */
@media (max-width: 767px) {
    .admin-sidebar {
        width: 100% !important;
        position: relative !important;
        height: auto !important;
    }

    .admin-content {
        margin-left: 0 !important;
        padding: 10px !important;
    }

    .admin-table-wrapper { overflow-x: auto !important; }

    th, td { white-space: nowrap !important; font-size: 12px !important; }

    .status-badge { font-size: 10px !important; padding: 2px 8px !important; }
}

/* ── IMAGES ──────────────────────────────────────────────── */
@media (max-width: 767px) {
    img { max-width: 100% !important; height: auto !important; }
    .img-responsive { width: 100% !important; }
}

/* ── UTILITY ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    h1 { font-size: 24px !important; }
    h2 { font-size: 20px !important; }
    h3 { font-size: 17px !important; }
    h4 { font-size: 15px !important; }

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

    /* Prevent overflow */
    body { overflow-x: hidden !important; }
    * { box-sizing: border-box !important; }
}

/* ── TOUCH IMPROVEMENTS ──────────────────────────────────── */
@media (max-width: 991px) {
    /* Larger tap targets */
    a, button, .btn { min-height: 40px; }

    /* Smooth scrolling */
    html { scroll-behavior: smooth; }

    /* Prevent text size adjust */
    body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
}
