/* RTL Support */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] body {
    text-align: right;
}

/* Bootstrap RTL adjustments */
html[dir="rtl"] .navbar-nav {
    flex-direction: row-reverse;
}

html[dir="rtl"] .navbar-nav.ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .navbar-nav.me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .dropdown-menu {
    text-align: right;
}

html[dir="rtl"] .dropdown-menu-end {
    right: 0;
    left: auto;
}

html[dir="rtl"] .breadcrumb {
    padding-right: 0;
}

html[dir="rtl"] .breadcrumb-item + .breadcrumb-item {
    padding-right: 0.5rem;
    padding-left: 0;
}

html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: "\\";
    padding-left: 0.5rem;
    padding-right: 0;
}

html[dir="rtl"] .breadcrumb-item.active::before {
    content: none;
}

/* Sidebar RTL */
html[dir="rtl"] .main-sidebar {
    left: auto;
    right: 0;
}

html[dir="rtl"] .content-wrapper {
    margin-right: 250px;
    margin-left: 0;
}

html[dir="rtl"] .main-footer {
    margin-right: 250px;
    margin-left: 0;
}

/* Card and table adjustments */
html[dir="rtl"] .card-header {
    text-align: right;
}

html[dir="rtl"] .table {
    text-align: right;
}

html[dir="rtl"] .table th,
html[dir="rtl"] .table td {
    text-align: right;
}

/* Form adjustments */
html[dir="rtl"] .form-floating > label {
    right: 0;
    left: auto;
}

html[dir="rtl"] .input-group > .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

html[dir="rtl"] .input-group > .input-group-text {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

/* Button and icon adjustments */
html[dir="rtl"] .btn-group > .btn:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

html[dir="rtl"] .btn-group > .btn:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Pagination */
html[dir="rtl"] .pagination {
    flex-direction: row-reverse;
}

/* Modal adjustments */
html[dir="rtl"] .modal-header {
    text-align: right;
}

html[dir="rtl"] .modal-footer {
    justify-content: flex-start;
}

/* Alert adjustments */
html[dir="rtl"] .alert {
    text-align: right;
}

/* List group */
html[dir="rtl"] .list-group-item {
    text-align: right;
}

/* Nav tabs */
html[dir="rtl"] .nav-tabs {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-tabs .nav-link {
    border-left: 1px solid #dee2e6;
    border-right: none;
}

html[dir="rtl"] .nav-tabs .nav-item:first-child .nav-link {
    border-top-right-radius: 0.375rem;
    border-top-left-radius: 0;
}

/* Progress bar text */
html[dir="rtl"] .progress {
    text-align: right;
}

/* Small box */
html[dir="rtl"] .small-box {
    text-align: right;
}

html[dir="rtl"] .small-box-footer {
    text-align: right;
}

/* Timeline */
html[dir="rtl"] .timeline {
    direction: rtl;
}

html[dir="rtl"] .timeline-item {
    text-align: right;
}

/* Badge adjustments */
html[dir="rtl"] .badge {
    margin-right: 0;
    margin-left: 0.25rem;
}

/* Icon spacing */
html[dir="rtl"] .me-1,
html[dir="rtl"] .me-2,
html[dir="rtl"] .me-3 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

html[dir="rtl"] .ms-1,
html[dir="rtl"] .ms-2,
html[dir="rtl"] .ms-3 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

/* Float adjustments */
html[dir="rtl"] .float-start {
    float: right !important;
}

html[dir="rtl"] .float-end {
    float: left !important;
}

/* Text alignment utilities */
html[dir="rtl"] .text-start {
    text-align: right !important;
}

html[dir="rtl"] .text-end {
    text-align: left !important;
}

/* Margin and padding utilities for RTL */
html[dir="rtl"] .me-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

html[dir="rtl"] .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Form check */
html[dir="rtl"] .form-check {
    padding-right: 1.25rem;
    padding-left: 0;
}

html[dir="rtl"] .form-check-input {
    margin-right: -1.25rem;
    margin-left: 0;
}

/* Card tools */
html[dir="rtl"] .card-tools {
    margin-right: 0;
    margin-left: auto;
}

/* Pagination */
html[dir="rtl"] .pagination-sm .page-item:first-child .page-link {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

html[dir="rtl"] .pagination-sm .page-item:last-child .page-link {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    html[dir="rtl"] .content-wrapper,
    html[dir="rtl"] .main-footer {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}
.room-image {
    width: 780px;
    height: 355px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

/* Apartments - hero image on the apartment details header card. Mirrors .room-image but
   stays fluid so the header stacks cleanly on tablets and phones. */
.apartment-hero-image {
    width: 240px;
    height: 160px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

@media (max-width: 767.98px) {
    .apartment-hero-image {
        width: 100%;
        height: 180px;
    }
}