/* ============================================================
   Edu Pavilion — Global Public Responsive Stylesheet
   Breakpoints:
     xs  : <576px
     sm  : 576–767px
     md  : 768–991px
     lg  : 992–1199px
     xl  : ≥1200px
   ============================================================ */

/* ─── 0. Base / Universal ─────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* ─── 1. Top Navbar ──────────────────────────────────────── */
.top-navbar {
    width: 100%;
}

/* Desktop ≥992px: kembalikan margin user menu */
@media (min-width: 992px) {
    .top-navbar .navbar-auth-user-dropdown {
        margin-left: 30px !important;
    }
}

/* Tablet + Mobile (≤991px): 2-row layout — search atas, ikon bawah */
@media (max-width: 991px) {
    /* Container: column tempel atas, no gap/padding */
    .top-navbar .container {
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        gap: 0 !important;
    }

    /* Row 1: Search bar — lebar penuh, sembunyikan telp/email */
    .top-navbar .top-contact-box {
        width: 100% !important;
        padding: 10px 16px 10px 16px !important;
        padding-right: 2cm !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(0,0,0,0.08) !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
    .top-navbar .top-contact-box > .d-flex:not(.w-100) { display: none !important; }
    .top-navbar .top-contact-box > .d-flex.w-100 {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        justify-content: flex-start !important;
    }
    #navbarSearchForm.navbar-search {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    /* Row 2: Ikon + User — satu baris penuh */
    .top-navbar .xs-w-100 {
        width: 100% !important;
        padding: 8px 16px 8px 12px !important;
        margin: 0 !important;
    }
    /* Grup ikon kiri */
    .top-navbar .xs-w-100 > .d-flex {
        flex-shrink: 0 !important;
    }
    /* User menu kanan */
    .top-navbar .xs-w-100 .navbar-auth-user-dropdown {
        margin-left: 8px !important;
        flex-shrink: 0 !important;
    }

    /* Currency — sembunyikan */
    .top-navbar .js-currency-select { display: none !important; }

    /* Lang toggle: flags only, ukuran tablet */
    .top-navbar .lang-toggle-wrapper { display: flex !important; align-items: center; }
    .top-navbar .lang-toggle-divider { display: none !important; }
    .top-navbar .lang-toggle {
        width: 90px !important;
        height: 32px !important;
        padding: 3px !important;
        background: #e8edf2 !important;
        border: 1.5px solid #b8c4ce !important;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.08) !important;
    }
    .top-navbar .lang-toggle-slider {
        width: 26px !important;
        height: 24px !important;
        border-radius: 13px !important;
    }
    /* (90 - 6) / 3 tombol = 28px per tombol */
    .top-navbar .lang-toggle.is-en .lang-toggle-slider { transform: translateX(28px) !important; }
    .top-navbar .lang-toggle.is-cn .lang-toggle-slider { transform: translateX(56px) !important; }
    .top-navbar .lang-toggle-btn span { display: none !important; }
    .top-navbar .lang-toggle-btn .flagstrap-icon { margin-right: 0 !important; }

    /* User name: tampilkan */
    .top-navbar .xs-w-100 .navbar-auth-user-dropdown .user-name { display: inline !important; font-size: 13px !important; }

    /* Theme toggle: ukuran tablet */
    .theme-toggle { width: 36px !important; height: 36px !important; margin-right: 10px !important; }
    .theme-toggle svg { width: 16px !important; height: 16px !important; }

    /* Pastikan dropdown body user menu tetap absolute (tidak in-flow) */
    .top-navbar .custom-dropdown-body {
        position: absolute !important;
    }
}

/* Mobile ≤575px: phone size overrides (layout sudah handled ≤991px) */
@media (max-width: 575px) {
    /* Floating bar — sembunyikan */
    .floating-bar { display: none !important; }
    .has-fixed-top-floating-bar { padding-top: 0 !important; }
    .has-fixed-top-floating-bar .navbar.sticky { top: 0 !important; }

    /* Padding lebih rapat */
    .top-navbar .top-contact-box { padding: 6px 16px !important; padding-right: 2cm !important; }
    .top-navbar .xs-w-100 { padding: 5px 16px !important; }

    /* Lang toggle — lebih kecil dari tablet (90px → 75px) */
    .top-navbar .lang-toggle {
        width: 75px !important;
        height: 28px !important;
        background: #dde3ea !important;
        border: 1.5px solid #a0aab4 !important;
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.1) !important;
    }
    .top-navbar .lang-toggle-slider { width: 21px !important; height: 20px !important; border-radius: 10px !important; }
    /* (75 - 6) / 3 = 23px per tombol */
    .top-navbar .lang-toggle.is-en .lang-toggle-slider { transform: translateX(23px) !important; }
    .top-navbar .lang-toggle.is-cn .lang-toggle-slider { transform: translateX(46px) !important; }
    .top-navbar .lang-toggle-btn .flagstrap-icon { min-width: 16px !important; min-height: 11px !important; }

    /* Theme toggle — terkecil (36px → 30px) */
    .theme-toggle { width: 30px !important; height: 30px !important; margin-right: 6px !important; }
    .theme-toggle svg { width: 15px !important; height: 15px !important; }

    /* Cart & Bell — padding kompak, hapus margin SVG */
    .top-navbar .xs-w-100 .dropdown .btn { padding: 4px 6px !important; }
    .top-navbar .xs-w-100 .dropdown .btn svg { margin-right: 0 !important; }

    /* User menu — avatar lebih kecil, nama compact */
    .top-navbar .xs-w-100 .navbar-auth-user-dropdown { margin-left: 6px !important; }
    .top-navbar .xs-w-100 .navbar-auth-user-dropdown .rounded-circle { width: 26px !important; height: 26px !important; flex-shrink: 0 !important; }
    .top-navbar .xs-w-100 .navbar-auth-user-dropdown .user-name { font-size: 11px !important; max-width: 70px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* Border pemisah ikon */
    .top-navbar .xs-w-100 .border-left { margin-left: 5px !important; margin-right: 5px !important; }
}

/* ─── 2. Main Navbar ─────────────────────────────────────── */
#navbar .navbar-brand {
    flex-shrink: 0;
}

#navbar .navbar-brand .navbar-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 991px) {
    .navbar {
        padding: 8px 0;
    }

    #navbar .navbar-brand .navbar-logo {
        width: 100%;
        height: 100% !important;
        max-height: 40px;
        object-fit: contain;
    }

    /* CTA container — bisa menyusut, teks tidak overflow viewport */
    .nav-icons-or-start-live {
        flex-shrink: 1 !important;
        min-width: 0 !important;
        overflow: hidden;
        margin-right: 10px !important;
    }

    /* Tombol Start Learning / CTA mobile —
       d-flex tidak bisa text-overflow, ubah ke inline-block */
    .nav-start-a-live-btn.d-flex.d-lg-none {
        display: inline-block !important;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px !important;
        font-weight: 600;
        line-height: 1.4;
        vertical-align: middle;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* Mobile menu overlay */
    .navbar-toggle-content {
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 10050;
        padding: 20px 15px;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .navbar-toggle-content.show {
        display: flex !important;
        flex-direction: column;
    }

    .navbar .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .navbar .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar .navbar-nav .nav-link {
        padding: 10px 5px;
        font-size: 15px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    /* Sub-menus dalam main navbar overlay */
    .navbar .sub-menu,
    .navbar .cat-dropdown-menu,
    .navbar .custom-dropdown-body {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        padding: 0 10px !important;
    }
}

@media (max-width: 575px) {
    #navbar .navbar-brand .navbar-logo {
        max-height: 30px;
    }
    .navbar {
        padding: 6px 0 !important;
    }
    /* Lebih kecil di phone kecil */
    .nav-start-a-live-btn.d-flex.d-lg-none {
        max-width: 120px !important;
        font-size: 12px !important;
    }
}

/* Layar sangat kecil (≤360px) — sembunyikan teks CTA, hanya icon */
@media (max-width: 360px) {
    .nav-start-a-live-btn.d-flex.d-lg-none {
        max-width: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
        visibility: hidden !important;
    }
}

/* ─── 3. #navbarVacuum ───────────────────────────────────── */
/* Biarkan JS yang mengatur height saat navbar sticky; jangan paksa di CSS */
@media (max-width: 991px) {
    #navbarVacuum {
        height: 0;
    }
}

/* ─── 4. Hero / Slider Section ───────────────────────────── */
@media (max-width: 991px) {
    .slider-container {
        min-height: auto !important;
        padding: 40px 0 !important;
    }

    .slider-content h1 {
        font-size: 24px !important;
        line-height: 1.3;
    }

    .slider-content .slide-hint {
        font-size: 14px !important;
        line-height: 1.6;
    }

    .slider-search {
        border-radius: 8px !important;
        width: 100%;
    }

    .slider-search .form-control {
        font-size: 13px !important;
        height: 44px !important;
        min-width: 0;
        flex: 1 1 auto;
    }

    .slider-search .btn {
        padding: 8px 18px !important;
        font-size: 13px !important;
        white-space: nowrap;
        flex: 0 0 auto;
        min-width: 96px;
    }

    /* Hero section 2 — image di atas, text di bawah pada mobile */
    .slider-hero-section2 .hero-section2 {
        flex-direction: column-reverse;
        padding: 20px 0 30px !important;
    }

    .slider-hero-section2 .hero-section2 .col-12.col-md-5,
    .slider-hero-section2 .hero-section2 .col-12.col-md-7 {
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .hero-section2 .col-12.col-md-5.col-lg-6 img,
    .slider-hero-section2 .hero-section2 img {
        max-height: 240px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
        margin: 0 auto;
        display: block;
    }

    /* Teks hero section 2 */
    .slider-hero-section2 h1 {
        font-size: 22px !important;
        line-height: 1.35 !important;
        margin-bottom: 12px !important;
    }

    .slider-hero-section2 .slide-hint {
        font-size: 14px !important;
        line-height: 1.65 !important;
    }

    /* Form pencarian hero section 2 */
    .slider-hero-section2 .slider-search {
        margin-top: 20px !important;
    }
    .slider-hero-section2 .slider-search .form-control {
        font-size: 13px !important;
        min-width: 0;
        flex: 1;
    }

    .slider-hero-section2 form.d-inline-flex,
    .slider-content form.d-inline-flex {
        padding-right: 0 !important;
    }
}

@media (max-width: 575px) {
    .slider-container {
        padding: 20px 0 !important;
    }

    .slider-content h1 {
        font-size: 19px !important;
    }

    .slider-search .btn {
        padding: 8px 16px !important;
        white-space: nowrap;
        font-size: 12px !important;
        min-width: 92px;
    }

    .slider-hero-section2 h1 {
        font-size: 18px !important;
    }

    .slider-hero-section2 .slide-hint {
        font-size: 13px !important;
    }

    .slider-hero-section2 .hero-section2 img {
        max-height: 180px !important;
    }
}

/* ─── 5. Section Titles / Headers ────────────────────────── */
@media (max-width: 991px) {
    .section-header h2,
    .section-title {
        font-size: 20px !important;
    }

    .section-header,
    .section-title-wrapper {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 575px) {
    .section-header h2,
    .section-title {
        font-size: 18px !important;
    }
}

/* ─── 6. Course / Webinar Cards ──────────────────────────── */
@media (max-width: 991px) {
    /* Kurangi tinggi thumbnail agar proporsional di tablet/mobile */
    .webinar-card .image-box {
        height: 200px !important;
    }
}

@media (max-width: 575px) {
    .webinar-card,
    .webinar-card-list,
    .course-card {
        margin-bottom: 16px !important;
    }

    /* Thumbnail lebih kecil di phone */
    .webinar-card .image-box {
        height: 170px !important;
    }

    /* Sembunyikan avatar instructor di phone — tampilan lebih bersih */
    .webinar-card .user-inline-avatar {
        display: none !important;
    }

    .webinar-card .webinar-card-footer {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* List card layout on mobile */
@media (max-width: 767px) {
    .webinar-card-list {
        flex-direction: column !important;
    }

    .webinar-card-list .webinar-card-list-img {
        width: 100% !important;
        height: 180px !important;
        border-radius: 8px 8px 0 0 !important;
    }
}

/* ─── 7. Blog Cards ──────────────────────────────────────── */
@media (max-width: 991px) {
    .blog-grid-card .blog-grid-img {
        height: 200px;
        object-fit: cover;
    }
}

@media (max-width: 575px) {
    .blog-grid-card .blog-grid-img {
        height: 180px;
    }

    .blog-grid-card .blog-grid-title {
        font-size: 15px !important;
    }

    .blog-grid-card .blog-grid-desc {
        font-size: 13px !important;
    }
}

/* ─── 8. Categories / Filter Tabs ───────────────────────── */
@media (max-width: 767px) {
    .categories-tabs,
    .filter-tabs,
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .categories-tabs::-webkit-scrollbar,
    .filter-tabs::-webkit-scrollbar,
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .categories-tabs .nav-item,
    .filter-tabs .nav-item,
    .nav-tabs .nav-item {
        flex-shrink: 0;
    }
}

/* ─── 9. Stats / Counter Section ────────────────────────── */
@media (max-width: 767px) {
    .stats-item,
    .counter-item {
        margin-bottom: 24px;
    }

    .stats-item .stat-number,
    .counter-item .count-number {
        font-size: 28px !important;
    }
}

@media (max-width: 575px) {
    /* Kurangi overlap negatif stats container di mobile */
    .stats-container:not(.page-has-hero-section-2) {
        top: -30px !important;
    }

    .stat-icon-box {
        width: 64px !important;
        height: 64px !important;
        padding: 12px !important;
    }

    .stats-item {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .stats-item .stat-number {
        font-size: 24px !important;
    }

    .stats-item .stat-title {
        font-size: 13px !important;
    }

    .stats-item .stat-desc {
        font-size: 12px !important;
    }
}

/* ─── 10. Instructor Cards ───────────────────────────────── */
@media (max-width: 575px) {
    .instructor-card,
    .instructor-finder-card {
        margin-bottom: 16px;
    }

    .instructor-card img,
    .instructor-finder-card img {
        max-height: 220px;
        object-fit: cover;
    }
}

/* ─── 11. Top-banner (page header) ──────────────────────── */
@media (max-width: 767px) {
    .site-top-banner,
    .search-top-banner {
        min-height: 160px !important;
        padding: 30px 0 !important;
    }

    .site-top-banner h1,
    .search-top-banner h1 {
        font-size: 20px !important;
    }

    .top-search-categories-form .search-input {
        border-radius: 8px !important;
    }

    .top-search-categories-form .form-control {
        font-size: 13px !important;
    }

    .top-search-categories-form .btn {
        padding: 6px 14px !important;
        font-size: 12px !important;
    }
}

/* ─── 12. Filter Sidebar (classes/search page) ───────────── */
@media (max-width: 991px) {
    /* Sidebar pushes below course list on md, hidden on mobile */
    .col-12.col-lg-4.filter-sidebar-col,
    .col-lg-4.filter-col {
        order: 2;
        margin-top: 24px;
    }

    .col-12.col-lg-8.courses-col,
    .col-lg-8.courses-col {
        order: 1;
    }
}

/* ─── 13. Top Filters Bar ───────────────────────────────── */
@media (max-width: 767px) {
    .top-filters,
    .filters-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .top-filters .filter-item,
    .filters-row .filter-item {
        flex: 1 1 calc(50% - 4px);
        min-width: 130px;
    }

    .sort-bar,
    .sort-wrapper {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ─── 14. Tables (panel/dashboard) ──────────────────────── */
@media (max-width: 767px) {
    .table-responsive-wrapper,
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table.table {
        min-width: 600px;
    }

    /* For tables NOT already wrapped */
    .panel-content table,
    .user-panel table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
}

/* ─── 15. Forms ─────────────────────────────────────────── */
@media (max-width: 575px) {
    .form-group label {
        font-size: 13px;
    }

    .form-control {
        font-size: 14px !important;
    }

    .btn {
        font-size: 13px !important;
    }

    /* Stacked form rows */
    .form-row > [class*="col-"],
    .row.form-inline > [class*="col-"] {
        margin-bottom: 12px;
    }
}

/* ─── 16. Modals ─────────────────────────────────────────── */
@media (max-width: 575px) {
    .modal-dialog {
        margin: 10px auto !important;
        max-width: calc(100% - 20px) !important;
    }

    .modal-body {
        padding: 16px !important;
    }

    .modal-header {
        padding: 12px 16px !important;
    }

    .modal-footer {
        padding: 10px 16px !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal-footer .btn {
        flex: 1 1 auto;
    }
}

/* ─── 17. Shopping Cart / Notification Dropdown ────────── */
@media (max-width: 575px) {
    .shopping-cart-dropdown,
    .notification-dropdown {
        right: -60px !important;
        left: auto !important;
        width: calc(100vw - 24px) !important;
        max-width: 340px !important;
    }
}

/* ─── 18. User Profile Dropdown ──────────────────────────── */
@media (max-width: 575px) {
    .navbar-auth-user-dropdown .custom-dropdown-body {
        right: 0 !important;
        left: auto !important;
        width: calc(100vw - 24px) !important;
        max-width: 290px;
    }
}

/* Dropdown body — posisi dan lebar pada layar kecil */
@media (max-width: 767px) {
    /* Pastikan dropdown tidak terpotong di tepi kanan layar */
    .top-navbar .navbar-auth-user-dropdown .custom-dropdown-body {
        right: 0 !important;
        left: auto !important;
    }
    /* Nama user di toggle row — truncate lebih agresif di mobile */
    .top-navbar .navbar-auth-user-dropdown .navbar-user .user-name {
        max-width: 60px;
    }
    /* Login / Register guest links — lebih kompak */
    .top-navbar .auth-login-link,
    .top-navbar .auth-register-link {
        font-size: 11px !important;
        padding: 4px 6px !important;
    }
}

/* ─── 19. Footer ─────────────────────────────────────────── */
@media (max-width: 767px) {
    /* The card sits 100px above the footer; do not clip its heading. */
    .footer > .container:first-child {
        overflow: visible !important;
    }

    .footer .footer-subscribe {
        flex-direction: column;
        text-align: center;
    }

    .footer .footer-subscribe .subscribe-input {
        margin-top: 16px;
        border-radius: 8px;
    }

    .footer .footer-subscribe .form-group {
        flex-direction: column;
        gap: 8px;
    }

    .footer .footer-subscribe .btn {
        width: 100%;
    }

    /* Footer columns: 2-col on mobile */
    .footer .row > .col-6.col-md-3 {
        margin-bottom: 20px;
    }

    .footer .mt-40.border-blue {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        text-align: center;
    }

    .footer .footer-social {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .footer .footer-social img {
        margin-right: 0 !important;
    }
}

@media (max-width: 575px) {
    .footer .row > .col-6.col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ─── 20. Panel / User Dashboard ─────────────────────────── */
@media (max-width: 991px) {
    /* Panel sidebar collapses — already handled by panel.css, just ensure content width */
    .panel-content,
    .user-panel-content {
        padding: 16px !important;
    }
}

@media (max-width: 767px) {
    .dashboard-stats .stat-icon {
        width: 60px !important;
        min-width: 60px !important;
        height: 60px !important;
    }

    .dashboard-stats .stat-icon img {
        width: 28px !important;
        height: 28px !important;
    }

    .user-profile-state {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* ─── 21. Swiper / Carousel ──────────────────────────────── */
@media (max-width: 575px) {
    .swiper-container,
    .owl-carousel {
        /* Prevent carousel from overflowing */
        overflow: hidden;
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}

/* ─── 22. Programs / Course Category Cards ───────────────── */
@media (max-width: 767px) {
    .program-card,
    .category-card {
        margin-bottom: 16px;
    }

    .program-card img,
    .category-card img {
        max-height: 140px;
        object-fit: cover;
    }
}

/* ─── 23. Scroll-to-top Button ───────────────────────────── */
@media (max-width: 575px) {
    #scrollToTopBtn {
        bottom: 16px !important;
        right: 16px !important;
        width: 40px !important;
        height: 40px !important;
    }
}

/* ─── 24. Search Page ────────────────────────────────────── */
@media (max-width: 767px) {
    .search-filters-sidebar {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        box-shadow: none !important;
        margin-bottom: 20px;
    }
}

/* ─── 25. Contact Page ───────────────────────────────────── */
@media (max-width: 767px) {
    .contact-card,
    .contact-form-wrapper {
        padding: 20px !important;
    }

    .contact-info-items {
        flex-direction: column;
        gap: 16px;
    }
}

/* ─── 26. Breadcrumb ─────────────────────────────────────── */
@media (max-width: 575px) {
    .breadcrumb {
        font-size: 12px !important;
        flex-wrap: wrap;
    }
}

/* ─── 27. Pagination ─────────────────────────────────────── */
@media (max-width: 575px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .page-item .page-link {
        padding: 6px 10px !important;
        font-size: 13px !important;
    }
}

/* ─── 28. Badges / Chips ─────────────────────────────────── */
@media (max-width: 575px) {
    .badge,
    .chip {
        font-size: 11px !important;
    }
}

/* ─── 29. Feature / Trending Sliders ────────────────────── */
@media (max-width: 767px) {
    .feature-slider-card,
    .trending-card {
        min-width: 240px;
    }
}

/* ─── 30. Testimonials ───────────────────────────────────── */
@media (max-width: 767px) {
    .testimonial-card {
        padding: 20px !important;
        margin-bottom: 16px;
    }

    .testimonial-card .testimonial-avatar {
        width: 50px !important;
        height: 50px !important;
    }
}

/* ─── 31. Language Toggle Bar ───────────────────────────── */
@media (max-width: 767px) {
    .lang-toggle-wrapper {
        margin-right: 8px;
    }
}

/* ─── 32. Dark Mode + Responsive Combined ───────────────── */
@media (max-width: 767px) {
    body.dark-mode .footer .footer-subscribe {
        border-color: #334155 !important;
    }

    body.dark-mode .modal-content {
        background-color: #1e293b !important;
    }
}

/* ─── 33. Typography Scaling ────────────────────────────── */
@media (max-width: 767px) {
    .font-40,
    h1.display-4 { font-size: 28px !important; }
    .font-30,
    h2 { font-size: 22px !important; }
    .font-24,
    h3 { font-size: 18px !important; }
    .font-20,
    h4 { font-size: 16px !important; }
}

@media (max-width: 575px) {
    .font-40,
    h1.display-4 { font-size: 22px !important; }
    .font-30,
    h2 { font-size: 18px !important; }
    .font-24,
    h3 { font-size: 16px !important; }
}

/* ─── 34. Utility Overrides ──────────────────────────────── */
@media (max-width: 575px) {
    /* Remove excessive horizontal margins on xs */
    .mx-lg-30 { margin-left: 0 !important; margin-right: 0 !important; }
    .mr-lg-50 { margin-right: 0 !important; }
    .mt-lg-50 { margin-top: 24px !important; }
    .mt-lg-30 { margin-top: 16px !important; }
    .pt-lg-20 { padding-top: 0 !important; }
}

/* ─── 35. Blog Show / Single Post ───────────────────────── */
@media (max-width: 991px) {
    .blog-show-sidebar,
    .blog-single-sidebar {
        margin-top: 32px;
    }

    .blog-show-content img {
        max-width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 575px) {
    .blog-show-content h2,
    .blog-single-title { font-size: 18px !important; }

    .blog-show-content p { font-size: 14px !important; }
}

/* ─── 36. Instructor Finder Map ─────────────────────────── */
@media (max-width: 767px) {
    .instructor-finder-map {
        height: 300px !important;
    }

    .find-instructor-section-hero {
        width: 100% !important;
        height: auto !important;
    }
}

/* ─── 37. Login / Register Pages ────────────────────────── */
@media (max-width: 991px) {
    .login-container .col-lg-8 {
        display: none;
    }

    .login-container .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ─── 38. Accordion ──────────────────────────────────────── */
@media (max-width: 575px) {
    .accordion-row .accordion-header {
        font-size: 14px !important;
        padding: 12px 14px !important;
    }

    .accordion-row .accordion-body {
        padding: 12px 14px !important;
        font-size: 13px !important;
    }
}

/* ─── 39. Floating Bar ───────────────────────────────────── */
@media (max-width: 767px) {
    /* 576-767px: kompak, konten wrap satu baris */
    .floating-bar {
        height: auto !important;
        min-height: 0 !important;
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
    .floating-bar .container > .d-flex {
        flex-wrap: wrap !important;
        gap: 6px !important;
        justify-content: center !important;
        align-items: center !important;
    }
    .floating-bar h5 { font-size: 13px !important; margin-bottom: 0 !important; }
    .floating-bar .font-14 { font-size: 12px !important; }
    .floating-bar__icon img { width: 24px !important; height: 24px !important; }
    .floating-bar .btn-sm { font-size: 12px !important; padding: 4px 10px !important; }
    /* Sesuaikan padding #app dengan tinggi bar yang lebih kecil */
    .has-fixed-top-floating-bar {
        padding-top: 44px !important;
    }
    .has-fixed-top-floating-bar .navbar.sticky {
        top: 44px !important;
    }
}
@media (max-width: 575px) {
    /* ≤575px: sembunyikan floating bar sepenuhnya */
    .floating-bar {
        display: none !important;
    }
    .has-fixed-top-floating-bar {
        padding-top: 0 !important;
    }
    .has-fixed-top-floating-bar .navbar.sticky {
        top: 0 !important;
    }
}

/* ─── 40. Select2 Dropdowns ──────────────────────────────── */
@media (max-width: 575px) {
    .select2-container {
        width: 100% !important;
    }

    .select2-dropdown {
        max-width: calc(100vw - 30px);
    }
}

/* ─── 41. Rating Stars ───────────────────────────────────── */
@media (max-width: 575px) {
    .stars-4,
    .rating-stars {
        font-size: 12px !important;
    }
}

/* ─── 42. Certificate Page ───────────────────────────────── */
@media (max-width: 767px) {
    .certificate-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .certificate-container {
        min-width: 600px;
    }
}

/* ─── 43. Cookie Security Dialog ─────────────────────────── */
@media (max-width: 575px) {
    .cookie-security-dialog,
    .cookie-bar {
        flex-direction: column !important;
        text-align: center;
        padding: 12px !important;
        gap: 10px;
    }

    .cookie-bar .btn {
        width: 100% !important;
    }
}

/* ─── 44. Advertise Modal ────────────────────────────────── */
@media (max-width: 575px) {
    .advertise-modal .modal-dialog {
        margin: 8px auto !important;
    }

    .advertise-modal img {
        max-height: 220px;
        object-fit: cover;
    }
}

/* ─── 45. Loading Overlay ────────────────────────────────── */
.loading-overlay {
    position: fixed;
    z-index: 99999;
}

/* ─── 46. Tablet-specific tweaks (768–991px) ─────────────── */
@media (min-width: 768px) and (max-width: 991px) {
    #navbar .navbar-brand {
        width: 128px;
        max-width: 128px;
        height: 48px;
        flex: 0 0 128px;
    }

    #navbar .navbar-brand .navbar-logo {
        max-height: 42px;
    }

    .slider-content h1 {
        font-size: 28px !important;
    }

    .blog-grid-card .blog-grid-img {
        height: 210px;
    }

    .footer .row > .col-6.col-md-3 {
        margin-bottom: 16px;
    }
}

/* Tablet landscape / small desktop: reserve enough space for the complete logo. */
@media (min-width: 992px) and (max-width: 1199px) {
    #navbar .navbar-brand {
        width: 118px;
        min-width: 118px;
        height: 50px;
        flex: 0 0 118px;
    }

    #navbar .navbar-brand .navbar-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    #navbar .navbar-toggle-content {
        margin-left: 12px !important;
        margin-right: 12px !important;
    }
}

/* ─── 47. Desktop Large (≥1200px) — ensure no overflow ──── */
@media (min-width: 1200px) {
    .container {
        max-width: 1170px;
    }
}

/* ─── 48. Touch Device Overrides ─────────────────────────── */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets */
    .btn {
        min-height: 40px;
    }

    .nav-link {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    .page-link {
        min-width: 36px;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ─── 49. Print ──────────────────────────────────────────── */
@media print {
    .top-navbar,
    #navbar,
    .footer,
    #scrollToTopBtn,
    .cookie-security-dialog,
    .floating-bar {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    a[href]::after {
        content: none !important;
    }
}

/* ─── 50. Learning Page (Course Player) ─────────────────────── */
@media (max-width: 991px) {
    .learning-page > .d-flex.position-relative {
        flex-direction: column !important;
    }

    .learning-page-content {
        width: 100% !important;
        min-height: 0 !important;
    }

    .learning-page-tabs {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 50vh;
        overflow-y: auto;
        border-left: none !important;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 575px) {
    .learning-page-tabs .nav-tabs {
        font-size: 12px !important;
    }

    .learning-page-tabs .nav-tabs .nav-link {
        padding: 8px 10px !important;
    }

    .learning-page-tabs-link-text {
        display: none !important;
    }
}

/* ─── 51. Marketing / Programs Hero ─────────────────────────── */
@media (max-width: 991px) {
    .programs-hero {
        padding: 50px 0 70px !important;
    }

    .programs-hero h1 {
        font-size: 2.2rem !important;
    }

    .programs-hero p {
        font-size: 1rem !important;
    }

    .programs-section {
        padding: 40px 0 60px !important;
    }
}

@media (max-width: 767px) {
    .programs-hero h1 {
        font-size: 1.9rem !important;
    }

    .wave-divider svg {
        height: 40px !important;
    }
}

@media (max-width: 575px) {
    .programs-hero {
        padding: 36px 0 55px !important;
    }

    .programs-hero h1 {
        font-size: 1.5rem !important;
    }

    .programs-hero p {
        font-size: 0.9rem !important;
    }

    .hero-badge {
        font-size: 0.75rem !important;
        padding: 5px 14px !important;
    }

    .discount-circle {
        width: 56px !important;
        height: 56px !important;
        top: 12px !important;
        right: 12px !important;
    }

    .discount-number {
        font-size: 1.1rem !important;
    }

    .program-card-header {
        padding: 20px 20px 14px !important;
    }

    .program-card-body {
        padding: 18px 20px !important;
    }

    .programs-section {
        padding: 28px 0 40px !important;
    }
}

/* ─── 52. Cart / Checkout ────────────────────────────────────── */
@media (max-width: 767px) {
    .cart-banner {
        min-height: 140px !important;
        padding: 30px 0 !important;
    }

    .webinar-card.webinar-list-cart {
        margin-bottom: 12px;
    }

    .cart-order-detail,
    .payment-detail-card {
        margin-top: 24px;
    }
}

@media (max-width: 575px) {
    .webinar-card.webinar-list-cart .col-4 {
        flex: 0 0 40%;
        max-width: 40%;
    }

    .webinar-card.webinar-list-cart .col-8 {
        flex: 0 0 60%;
        max-width: 60%;
    }

    .cart-total-row {
        flex-direction: column !important;
        gap: 10px;
    }

    .cart-total-row .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ─── 53. Forum Page ─────────────────────────────────────────── */
@media (max-width: 767px) {
    .forum-hero-section {
        padding: 40px 0 !important;
    }

    .forum-hero-section h1,
    .forum-hero-title {
        font-size: 22px !important;
    }

    .forum-stat-section {
        padding: 16px !important;
    }

    .forum-topic-row {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 575px) {
    .forum-stat-section .col-6 {
        margin-bottom: 12px;
    }

    .forum-filters-row {
        flex-direction: column !important;
        gap: 8px;
    }
}

/* ─── 54. User Panel Sub-pages ──────────────────────────────── */
@media (max-width: 991px) {
    .user-panel-content,
    .panel-content-wrapper {
        width: 100% !important;
        overflow-x: hidden;
    }
}

@media (max-width: 767px) {
    .panel-section-header,
    .panel-page-header {
        flex-wrap: wrap !important;
        gap: 10px;
    }

    .panel-section-header .btn,
    .panel-page-header .btn {
        width: 100%;
    }

    /* Panel table action buttons */
    .panel-table-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Panel stat cards */
    .panel-stat-cards .col-6 {
        margin-bottom: 12px;
    }
}

@media (max-width: 575px) {
    /* Panel financial — amount display */
    .financial-item {
        flex-wrap: wrap !important;
        gap: 8px;
    }

    /* Panel certificate card */
    .certificate-card {
        flex-direction: column !important;
    }

    /* Panel meeting card */
    .meeting-card,
    .appointment-card {
        flex-direction: column !important;
    }
}

/* ─── 55. Course Detail Extras ───────────────────────────────── */
@media (max-width: 991px) {
    /* Sticky sidebar becomes static on tablet */
    .course-content-sidebar {
        position: static !important;
        top: auto !important;
    }
}

@media (max-width: 767px) {
    /* Course tabs — horizontal scroll */
    .course-overview-tabs .nav-tabs,
    .webinar-tabs .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .course-overview-tabs .nav-tabs::-webkit-scrollbar,
    .webinar-tabs .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .course-overview-tabs .nav-item,
    .webinar-tabs .nav-item {
        flex-shrink: 0;
    }

    /* Course instructor row */
    .course-instructor .d-flex {
        flex-wrap: wrap;
        gap: 12px;
    }
}

@media (max-width: 575px) {
    /* Course share/action row */
    .course-action-row,
    .webinar-action-row {
        flex-wrap: wrap !important;
        gap: 8px;
    }

    .course-action-row .btn,
    .webinar-action-row .btn {
        flex: 1 1 auto;
    }
}

/* ─── 56. User Financial / Payment Summary ──────────────────── */
@media (max-width: 767px) {
    .financial-summary-top {
        flex-direction: column !important;
        gap: 12px;
    }

    .transaction-item,
    .payment-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .transaction-meta {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px;
    }
}

/* ─── 57. Upcoming Courses ──────────────────────────────────── */
@media (max-width: 575px) {
    .upcoming-webinar-card {
        flex-direction: column !important;
    }

    .upcoming-webinar-card .time-section {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
}

/* ─── 58. Notification / Alert Bars ─────────────────────────── */
@media (max-width: 575px) {
    .not-verified-alert,
    .alert-bar-wrapper {
        flex-direction: column !important;
        gap: 10px;
        text-align: center;
    }

    .not-verified-alert .btn,
    .alert-bar-wrapper .btn {
        width: 100% !important;
    }
}

/* ─── 59. Panel Setting / Account Form ──────────────────────── */
@media (max-width: 575px) {
    .create-webinar-footer {
        flex-direction: column !important;
        gap: 10px;
    }

    .create-webinar-footer > .d-flex.align-items-center {
        width: 100%;
        justify-content: space-between;
    }

    /* Avatar upload */
    .avatar-uploader,
    .user-avatar-wrap {
        margin-bottom: 20px;
    }
}

/* ─── 60. Auth / Login / Register Pages ─────────────────────── */
@media (max-width: 767px) {
    .auth-card,
    .login-card {
        margin: 16px !important;
        padding: 24px 20px !important;
    }

    .auth-logo {
        margin-bottom: 20px;
    }

    .social-login {
        flex-direction: column !important;
        gap: 10px;
    }

    .social-login .btn {
        width: 100% !important;
    }
}

/* ─── 61. Blog / Single Post / List ─────────────────────────── */
@media (max-width: 767px) {
    .blog-single-header {
        flex-direction: column !important;
        gap: 10px;
    }

    .blog-single-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .blog-author-card {
        flex-direction: column !important;
        text-align: center;
    }

    .blog-author-card img {
        margin: 0 auto 12px !important;
    }
}

/* ─── 62. Contact / About Pages ─────────────────────────────── */
@media (max-width: 767px) {
    .contact-map-wrapper {
        height: 250px !important;
    }

    .contact-page-header {
        flex-direction: column !important;
        gap: 12px;
    }

    .about-stat-item {
        margin-bottom: 24px;
    }
}

/* ─── 63. Bundle Detail Page ─────────────────────────────────── */
@media (max-width: 767px) {
    .bundle-content-list .d-flex {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ─── 64. Webinar / Live Class ──────────────────────────────── */
@media (max-width: 767px) {
    .webinar-sessions-table,
    .webinar-meeting-times {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ─── 65. Gifts Page ─────────────────────────────────────────── */
@media (max-width: 575px) {
    .gift-card-row {
        flex-direction: column !important;
    }
}

/* ─── 66. Certificate Page ───────────────────────────────────── */
@media (max-width: 575px) {
    .certificate-actions {
        flex-direction: column !important;
        gap: 8px;
    }

    .certificate-actions .btn {
        width: 100% !important;
    }
}

/* ─── 67. Instructor Profile / Finder ───────────────────────── */
@media (max-width: 767px) {
    .instructor-profile-header {
        flex-direction: column !important;
        text-align: center;
        gap: 16px;
    }

    .instructor-profile-header img {
        margin: 0 auto !important;
    }

    .instructor-stats-row {
        flex-wrap: wrap;
        gap: 16px;
    }

    .instructor-stat-item {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }
}

/* ─── 68. Reward / Cashback / Points ────────────────────────── */
@media (max-width: 575px) {
    .reward-card,
    .cashback-card {
        flex-direction: column !important;
        gap: 12px;
    }

    .reward-info {
        width: 100% !important;
    }
}

/* ─── 69. Quiz / Assignment Page ────────────────────────────── */
@media (max-width: 767px) {
    .quiz-question-card {
        padding: 16px !important;
    }

    .quiz-options .form-check {
        padding: 10px 12px !important;
    }

    .quiz-timer {
        font-size: 16px !important;
    }
}

/* ─── 70. Product / Store Page ──────────────────────────────── */
@media (max-width: 767px) {
    .product-detail-gallery {
        margin-bottom: 20px;
    }

    .product-options-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .product-quantity-row {
        flex-direction: column !important;
        gap: 10px;
    }
}

/* ─── 71. Home / Landing Page ───────────────────────────────── */
/* Tablet + Mobile: section header row alignment */
@media (max-width: 991px) {
    .home-sections > .d-flex.justify-content-between {
        align-items: center;
    }

    .home-sections .btn-border-white {
        font-size: 12px !important;
        padding: 6px 12px !important;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Feature slider min height — pastikan background image terlihat */
    .feature-slider-container .feature-slider {
        min-height: 300px;
    }

    /* Trending category card image height */
    .trending-card .trending-image {
        height: 120px !important;
    }

    /* Testimonials card */
    .testimonials-container .testimonials-card {
        padding: 20px 16px !important;
    }
}

/* Phone: more compact home sections */
@media (max-width: 575px) {
    /* Kurangi jarak antar section */
    .home-sections {
        margin-top: 50px !important;
    }

    /* Section header bisa wrap jika button tidak cukup tempat */
    .home-sections > .d-flex.justify-content-between {
        flex-wrap: wrap;
        gap: 6px;
    }

    .home-sections .btn-border-white {
        font-size: 11px !important;
        padding: 5px 10px !important;
    }

    /* Feature slider lebih pendek di phone */
    .feature-slider-container .feature-slider {
        min-height: 220px;
    }

    .feature-slider .feature-slider-card {
        max-width: 100% !important;
    }

    .feature-slider .feature-footer .feature-price-box {
        font-size: 13px !important;
        padding: 8px 10px !important;
    }

    .feature-slider .duration,
    .feature-slider .date-published {
        font-size: 12px !important;
    }

    /* Trending category image */
    .trending-card .trending-image {
        height: 90px !important;
    }

    .trending-card h3 {
        font-size: 12px !important;
    }

    .trending-card .item-count {
        font-size: 11px !important;
    }

    /* Testimonials */
    .testimonials-container .testimonials-card {
        padding: 16px 12px !important;
    }

    .testimonials-container .testimonials-card .testimonials-user-avatar {
        width: 56px !important;
        height: 56px !important;
    }

    /* Stats container overlap reduction */
    .stats-container:not(.page-has-hero-section-2) {
        top: -20px !important;
    }

    /* Home sections first child margin */
    .home-sections:first-child {
        margin-top: 30px !important;
    }
}

/* ─── 72. Webinar Card — School Name Badge ───────────────────── */

/* Mobile (≤575px) */
@media (max-width: 575px) {
    .webinar-card .webinar-school-name {
        font-size: 11px !important;
        padding: 4px 8px 4px 6px !important;
        margin-top: 6px !important;
    }
    .webinar-card .webinar-school-name span {
        max-width: calc(100vw - 80px);
    }
    .webinar-card .webinar-school-icon {
        width: 11px !important;
        height: 11px !important;
    }
}

/* Tablet (576px–991px) */
@media (min-width: 576px) and (max-width: 991px) {
    .webinar-card .webinar-school-name {
        font-size: 12px !important;
        padding: 5px 9px 5px 7px !important;
    }
}

/* Desktop (≥992px) */
@media (min-width: 992px) {
    .webinar-card .webinar-school-name {
        font-size: 13px;
        padding: 5px 10px 5px 8px;
    }
}

/* ─── 73. Panel — Webinar List / Cart / Dashboard (mobile) ───── */
@media (max-width: 991px) {
    /* panel-content already 100% via _public.scss, but ensure no overflow */
    .panel-content {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }
    /* webinar list card: stack image on top */
    .panel-content .webinar-card.webinar-list,
    .panel-content .webinar-card.webinar-list-cart {
        flex-direction: column !important;
    }
    .panel-content .webinar-card.webinar-list .image-box,
    .panel-content .webinar-card.webinar-list-cart .image-box {
        width: 100% !important;
        height: 180px !important;
        border-radius: 10px 10px 0 0 !important;
    }
    .panel-content .webinar-card.webinar-list .image-box::after {
        border-radius: 10px 10px 0 0 !important;
    }
    .panel-content .webinar-card.webinar-list .webinar-card-body,
    .panel-content .webinar-card.webinar-list-cart .webinar-card-body {
        padding: 16px !important;
    }
    /* stats row inside card: allow wrap */
    .panel-content .webinar-card .d-flex.flex-wrap {
        gap: 0;
    }
    /* cart page: price/remove row */
    .cart-row .col-6 {
        margin-top: 10px;
    }
}

@media (max-width: 575px) {
    .panel-content {
        padding: 12px 10px 24px !important;
    }
    .panel-content .webinar-card.webinar-list .image-box,
    .panel-content .webinar-card.webinar-list-cart .image-box {
        height: 160px !important;
    }
    /* dashboard banner: already handled but ensure no overflow */
    .dashboard-banner-container img {
        max-width: 100% !important;
        height: auto !important;
    }
    /* cart banner text */
    .cart-banner h1 { font-size: 20px !important; }
    .cart-banner .payment-hint { font-size: 14px !important; }
    /* cart totals: stack */
    #cartForm .row.mt-30 > [class*="col-"] {
        margin-bottom: 16px;
    }
}

