/* ================================================
   MINDEX ACADEMY - RESPONSIVE FIXES
   Add this to public/css/style-additions.css
   OR create public/css/responsive.css and link it
   ================================================ */

/* ── FORCE DARK TABLES (Bootstrap override) ── */
.table,
.table > :not(caption) > * > * {
    --bs-table-bg: transparent !important;
    --bs-table-color: #e2e8f0 !important;
    background-color: transparent !important;
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
}
.table thead tr th {
    background: transparent !important;
    color: #64748b !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
.table tbody tr td {
    background: transparent !important;
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
    vertical-align: middle !important;
}
.table tbody tr:hover > * {
    background-color: rgba(255, 255, 255, 0.03) !important;
}
.table-responsive {
    background: transparent !important;
}

/* ── GLOBAL MOBILE BASE ── */
*,
*::before,
*::after {
    box-sizing: border-box;
}
img {
    max-width: 100%;
    height: auto;
}

/* ── NAVBAR RESPONSIVE ── */
@media (max-width: 991px) {
    .navbar {
        padding: 12px 0 !important;
        background: #020617 !important;
    }
    .navbar-collapse {
        background: #01040f;
        border-radius: 16px;
        padding: 20px;
        margin-top: 12px;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
    .navbar-nav .nav-item {
        margin: 4px 0;
    }
    .nav-link {
        padding: 10px 15px !important;
        border-radius: 10px;
    }
    .nav-link:hover {
        background: rgba(177, 0, 255, 0.1);
    }
    .navbar-nav .btn-main {
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }
    .ms-lg-3 {
        margin-left: 0 !important;
    }
    .ms-lg-2 {
        margin-left: 0 !important;
    }
}

/* ── HERO SECTION ── */
@media (max-width: 991px) {
    .hero {
        padding-top: 100px !important;
        padding-bottom: 60px !important;
        text-align: center;
        min-height: auto !important;
    }
    .hero h1 {
        font-size: 36px !important;
    }
    .hero p {
        font-size: 16px !important;
    }
    .hero .d-flex {
        justify-content: center !important;
    }
    .hero-img {
        margin-top: 40px;
        width: 280px !important;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 28px !important;
        line-height: 1.3 !important;
    }
    .hero p {
        font-size: 15px !important;
    }
    .hero-img {
        width: 220px !important;
    }
    .hero .btn-main,
    .hero .btn-outline-light {
        width: 100%;
        text-align: center;
    }
    .hero .d-flex.gap-3 {
        flex-direction: column !important;
        gap: 12px !important;
    }
}

/* ── SECTIONS ── */
@media (max-width: 768px) {
    section {
        padding: 60px 0 !important;
    }
    .section-title h2 {
        font-size: 30px !important;
    }
    .section-title p {
        font-size: 14px !important;
    }
}

/* ── COURSE CARDS ── */
@media (max-width: 576px) {
    .course-card {
        padding: 25px 20px !important;
    }
    .course-icon {
        width: 65px !important;
        height: 65px !important;
        font-size: 26px !important;
    }
}

/* ── FEATURE BOXES ── */
@media (max-width: 768px) {
    .feature-box {
        padding: 30px 20px !important;
    }
    .feature-box i {
        font-size: 38px !important;
    }
}

/* ── COUNTER SECTION ── */
@media (max-width: 576px) {
    .counter h2 {
        font-size: 40px !important;
    }
}

/* ── CTA SECTION ── */
@media (max-width: 768px) {
    .cta {
        padding: 45px 25px !important;
        border-radius: 20px !important;
    }
    .cta h2 {
        font-size: 24px !important;
    }
    .cta .btn {
        width: 100%;
    }
}

/* ── FOOTER ── */
@media (max-width: 576px) {
    footer {
        padding: 25px 15px !important;
    }
    .social a {
        width: 38px !important;
        height: 38px !important;
        margin: 0 5px !important;
    }
}

/* ── AUTH PAGES ── */
@media (max-width: 576px) {
    .auth-section {
        padding: 100px 15px 40px !important;
    }
    .auth-card {
        padding: 35px 25px !important;
        border-radius: 20px !important;
    }
    .auth-card h2 {
        font-size: 26px !important;
    }
    .otp-inputs {
        gap: 8px !important;
    }
    .otp-inputs input {
        width: 44px !important;
        height: 54px !important;
        font-size: 22px !important;
    }
}

/* ── CHECKOUT PAGE ── */
@media (max-width: 991px) {
    .checkout-section {
        padding: 100px 0 60px !important;
    }
}
@media (max-width: 576px) {
    .checkout-card {
        padding: 25px 20px !important;
    }
    .payment-method-card {
        padding: 18px !important;
    }
}

/* ── USER DASHBOARD ── */
@media (max-width: 768px) {
    .dashboard-section {
        padding: 100px 0 60px !important;
    }
    .dash-card {
        padding: 20px !important;
    }
}
@media (max-width: 576px) {
    .dashboard-section h1 {
        font-size: 26px !important;
    }
}

/* ── COURSE DETAIL ── */
@media (max-width: 991px) {
    .course-detail-sticky {
        position: static !important;
    }
}

/* ── COURSE PLAYER ── */
@media (max-width: 768px) {
    .player-section {
        padding: 100px 0 40px !important;
    }
    .player-container iframe {
        height: 250px !important;
    }
}

/* ── ADMIN SIDEBAR - MOBILE ── */
@media (max-width: 991px) {
    .admin-sidebar {
        width: 100% !important;
        min-height: auto !important;
        position: relative !important;
        display: none;
    }
    .admin-sidebar.open {
        display: block !important;
    }
    .admin-content {
        margin-left: 0 !important;
    }
    .admin-topbar {
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px 16px !important;
    }
    .admin-body {
        padding: 20px 16px !important;
    }
    .admin-card {
        padding: 20px 16px !important;
    }

    /* Hamburger toggle button for admin */
    .admin-menu-toggle {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    .admin-menu-toggle {
        display: none !important;
    }
}

/* Admin mobile hamburger button */
.admin-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(177, 0, 255, 0.15);
    border: 1px solid rgba(177, 0, 255, 0.3);
    color: #b100ff;
    cursor: pointer;
    font-size: 18px;
}

/* Admin stats row responsive */
@media (max-width: 768px) {
    .stat-card {
        padding: 18px !important;
    }
    .stat-card .stat-value {
        font-size: 26px !important;
    }
    .stat-card .stat-icon {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
    }
}

/* Admin table horizontal scroll on mobile */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .admin-table th,
    .admin-table td {
        white-space: nowrap;
        font-size: 13px !important;
        padding: 10px 12px !important;
    }
}

/* Admin form responsive */
@media (max-width: 576px) {
    .admin-card .row.g-4 > .col-md-4,
    .admin-card .row.g-4 > .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* ── BUNDLES PAGE ── */
@media (max-width: 576px) {
    .bundle-detail-course {
        padding: 14px !important;
        gap: 10px !important;
    }
}

/* ── GENERAL UTILITY FIXES ── */
@media (max-width: 576px) {
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    h1 {
        font-size: 28px !important;
    }
    h2 {
        font-size: 24px !important;
    }
    h3 {
        font-size: 20px !important;
    }
    .btn-main {
        padding: 11px 22px !important;
        font-size: 14px !important;
    }
    .gradient-text {
        font-size: inherit !important;
    }
}

/* Fix overflow on all screen sizes */
body {
    overflow-x: hidden !important;
}
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}


[dir="rtl"] {
    text-align: right;
    font-family: 'Noto Nastaliq Urdu', Arial, sans-serif;
}