*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    overflow-x: hidden;
}

img,
video,
canvas,
svg {
    max-width: 100%;
}

img {
    height: auto;
}

table {
    overflow-wrap: anywhere;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.card,
.alert,
.btn,
.form-control,
.form-select,
.input-group,
.badge {
    max-width: 100%;
}

.btn {
    white-space: normal;
}

.form-control,
.form-select,
textarea {
    min-width: 0;
}

.container,
.container-fluid {
    min-width: 0;
}

.row > * {
    min-width: 0;
}

.text-break-mobile {
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .container,
    .container-fluid {
        padding-left: 14px;
        padding-right: 14px;
    }

    .card {
        border-radius: 10px !important;
    }

    .table {
        font-size: 0.82rem;
    }

    .table th,
    .table td {
        white-space: normal;
        vertical-align: middle;
    }

    .d-flex.justify-content-between,
    .d-flex.align-items-center.justify-content-between {
        gap: 0.65rem;
    }

    .navbar,
    .topbar,
    header {
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 0.94rem;
    }

    h1,
    .h1 {
        font-size: 1.65rem;
        line-height: 1.2;
    }

    h2,
    .h2 {
        font-size: 1.4rem;
        line-height: 1.25;
    }

    h3,
    .h3 {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    h4,
    .h4 {
        font-size: 1.05rem;
    }

    h5,
    .h5 {
        font-size: 0.98rem;
    }

    .container,
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .p-4 {
        padding: 1rem !important;
    }

    .p-5 {
        padding: 1.15rem !important;
    }

    .py-5 {
        padding-top: 1.35rem !important;
        padding-bottom: 1.35rem !important;
    }

    .px-4,
    .px-5 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .my-5,
    .mt-5 {
        margin-top: 1.35rem !important;
    }

    .my-5,
    .mb-5 {
        margin-bottom: 1.35rem !important;
    }

    .row {
        --bs-gutter-x: 0.85rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn,
    button,
    input[type="submit"] {
        min-height: 38px;
    }

    .btn-group,
    .btn-toolbar,
    .input-group {
        flex-wrap: wrap;
    }

    .input-group > .form-control,
    .input-group > .form-select,
    .input-group > .btn {
        min-width: 0;
    }

    .table-responsive {
        border-radius: 8px;
    }

    .table-responsive > .table {
        min-width: 640px;
    }

    .sidebar {
        min-height: auto !important;
        width: 100% !important;
        float: none !important;
        position: relative !important;
        height: auto !important;
    }

    .sidebar .nav {
        gap: 0.25rem;
    }

    .sidebar .nav-link {
        white-space: normal;
    }

    [style*="width: 250px"],
    [style*="width:250px"] {
        max-width: 100% !important;
    }

    [style*="max-width: 1300px"],
    [style*="max-width:1300px"],
    [style*="max-width: 950px"],
    [style*="max-width:950px"],
    [style*="max-width: 800px"],
    [style*="max-width:800px"] {
        max-width: 100% !important;
    }

    .form-section-title,
    .section-title {
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .modal-dialog {
        margin: 0.75rem;
    }

    .navbar .container,
    .navbar .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .navbar-brand {
        max-width: calc(100vw - 82px);
        white-space: normal;
        line-height: 1.2;
    }

    .navbar-brand img {
        flex: 0 0 auto;
    }

    .navbar-collapse {
        padding-top: 0.75rem;
    }

    .navbar-nav {
        align-items: stretch !important;
        gap: 0.25rem;
    }

    .navbar-nav .nav-link,
    .navbar-nav .btn {
        width: 100%;
        text-align: left;
    }

    .hero-section {
        aspect-ratio: 4 / 5 !important;
        margin-top: 58px !important;
        max-width: 100% !important;
    }

    .hero-section video {
        min-height: 100%;
    }

    /* TAMBAHAN BARU UNTUK MERAPIKAN TEKS DI ATAS VIDEO DI HP */
    .hero-section h1, 
    .hero-section .h1,
    .hero-section h2 {
        font-size: 1.3rem !important;
        line-height: 1.2 !important;
    }

    .hero-section .container, 
    .hero-section .hero-content {
        padding-top: 1rem !important;
    }
    /* ---------------------------------------------------- */

    .section-title {
        margin-bottom: 1.8rem !important;
        font-size: 1.25rem;
    }

    .card-custom:hover,
    .clickable-card .card-custom:hover {
        transform: none !important;
    }

    .table-biaya {
        border-radius: 8px !important;
    }

    .login-card,
    .register-card {
        margin-left: 0.35rem;
        margin-right: 0.35rem;
    }

    .main-content,
    .main-content-full,
    .content-wrapper {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .profile-header,
    .page-header,
    .dashboard-header {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .border-end {
        border-right: 0 !important;
        border-bottom: 1px solid var(--bs-border-color) !important;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 575.98px) {
    .d-flex.justify-content-between,
    .d-flex.align-items-center.justify-content-between {
        align-items: stretch !important;
        flex-direction: column;
    }

    .d-flex.flex-wrap {
        align-items: stretch !important;
    }

    .btn,
    .form-control,
    .form-select {
        font-size: 0.9rem;
    }

    .badge {
        white-space: normal;
        line-height: 1.25;
    }

    .table-responsive > .table {
        min-width: 560px;
    }

    .w-50,
    .w-75 {
        width: 100% !important;
    }

    .text-end {
        text-align: left !important;
    }

    .justify-content-end {
        justify-content: flex-start !important;
    }
}

@media print {
    html,
    body {
        overflow: visible;
    }
}