/* X-Large devices (large desktops, 1200px and up) */
@media only screen and (min-width: 1200px) and (max-width: 1399.98px) {
  :root {
    --font-base: 15px;
  }

  .home-banner.home-banner-4 .bg-img {
    background-position: top;
  }

  .filter-form-area .filter-form .grid {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 0;
  }

  .filter-form-area .filter-form .noUi-target {
    width: 100%;
  }

  .product-inline {
    flex-direction: column;
    align-items: start;
  }

  .product-inline .product-img {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .product-inline .product-details {
    flex: 0 0 100%;
    max-width: 100%;
    padding-inline-start: 0;
    padding-top: 20px;
  }

  .blog-details-area .comments .comment-list .comment .children .comment-body {
    padding-inline-start: 25px;
  }

  .blog-details-area
    .comments
    .comment-list
    .comment
    .comment-body
    .comment-content
    p {
    font-size: 14px;
  }

  .blog-details-area .sidebar-widget-area .widget {
    padding: 25px;
  }

  .sidebar-widget-area .widget-post .article-item {
    flex-direction: column;
  }

  .sidebar-widget-area .widget-post .article-item .image {
    max-width: 100%;
  }

  .sidebar-widget-area .widget-post .article-item .content {
    max-width: 100%;
    padding: 20px 0 0 0;
  }
}

/* Medium devices (tablets, laptops between 992px to 1200px) */
@media only screen and (min-width: 992px) and (max-width: 1024px) {
  :root {
    --font-size--h1: 44px;
    --font-size--h2: 32px;
    --font-base: 15px;
  }

  .home-banner .banner-filter-form .grid .grid-item {
    flex: auto !important;
    width: calc(50% - 15px) !important;
  }

  .home-banner.home-banner-1 {
    padding-top: 160px;
    padding-bottom: 100px;
  }

  .home-banner.home-banner-2 {
    padding-top: 160px;
    padding-bottom: 100px;
  }

  .home-banner.home-banner-3 {
    padding-top: 160px;
    padding-bottom: 60px;
  }

  .home-banner .banner-filter-form .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .home-banner .banner-filter-form .form-group {
    padding-bottom: 20px;
  }

  .home-banner .banner-filter-form .form-group::after {
    width: 100%;
    height: 1px;
    right: 0;
    left: 0;
    bottom: 0;
    top: unset;
  }

  .home-banner .banner-filter-form .noUi-target {
    width: 95%;
  }

  .filter-form-area .filter-form .grid {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 0;
  }

  .filter-form-area .filter-form .noUi-target {
    width: 100%;
  }

  .pricing-item {
    padding: 30px;
  }

  .testimonial-area .slider-item {
    padding-bottom: 15px;
    padding-inline-end: 15px;
  }

  .testimonial-3 .slider-item .client-info,
  .testimonial-3 .slider-item .quote,
  .testimonial-2 .slider-item .client-info,
  .testimonial-2 .slider-item .quote {
    padding: 25px;
  }



  .product-inline {
    flex-direction: column;
    align-items: start;
  }

  .product-inline .product-img {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .product-inline .product-details {
    flex: 0 0 100%;
    max-width: 100%;
    padding-inline-start: 0;
    padding-top: 20px;
  }

  .agent-box .agent-img .lazy-container::before {
    padding-bottom: 125%;
  }

  .blog-details-area .comments .comment-list .comment .children .comment-body {
    padding-inline-start: 25px;
  }

  .blog-details-area
    .comments
    .comment-list
    .comment
    .comment-body
    .comment-content
    p {
    font-size: 14px;
  }

  .blog-details-area .sidebar-widget-area .widget {
    padding: 25px;
  }

  .sidebar-widget-area .widget-post .article-item {
    flex-direction: column;
  }

  .sidebar-widget-area .widget-post .article-item .image {
    max-width: 100%;
  }

  .sidebar-widget-area .widget-post .article-item .content {
    max-width: 100%;
    padding: 20px 0 0 0;
  }
}

/* Medium devices (tablets, Between 768px to 992px) */
@media only screen and (min-width: 768px) and (max-width: 991.98px) {
  :root {
    --font-size--h1: 44px;
    --font-size--h2: 38px;
    --font-size--h3: 22px;
    --font-size--h4: 22px;
  }

  .home-banner .banner-filter-form .grid .grid-item {
    flex: auto !important;
    width: calc(50% - 15px) !important;
  }

  .home-banner.home-banner-1 {
    padding-bottom: 100px;
  }

  .home-banner.home-banner-2 {
    padding-top: 160px;
    padding-bottom: 100px;
  }

  .home-banner.home-banner-3 {
    padding-top: 160px;
    padding-bottom: 60px;
  }

  .home-banner.home-banner-3 .filter-form .btn {
    width: 100%;
    padding-block: 18px;
  }

  .home-banner .banner-filter-form .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .home-banner .banner-filter-form .form-group {
    padding-bottom: 20px;
  }

  .home-banner .banner-filter-form .form-group::after {
    width: 100%;
    height: 1px;
    right: 0;
    left: 0;
    bottom: 0;
    top: unset;
  }

  .home-banner .banner-filter-form .noUi-target {
    width: 100%;
  }

  .filter-form-area .filter-form .grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0;
  }

  .filter-form-area .filter-form .noUi-target {
    width: 100%;
  }

  .shopping-area tbody td {
    min-width: 140px;
  }



  .product-inline .product-details {
    padding-inline-start: 20px;
  }

  .product-inline .product-title {
    font-size: var(--font-size--h4);
    margin-bottom: 5px;
  }

  .product-inline .product-info {
    margin-top: 5px;
    gap: 15px;
  }

  .product-inline .product-info i {
    font-size: var(--font-base);
  }

  .product-inline .product-price .new-price,
  .product-inline .product-info,
  .product-inline .product-location {
    font-size: var(--font-base);
  }
}

@media only screen and (max-width: 991.98px) {
  .shape {
    display: none;
  }

  .agent-column .agent-details {
    padding: 20px;
  }

  .agent-column .social-link {
    top: 10px;
    margin-inline-end: 10px;
    transform: unset;
  }

  .agent-column .social-link a {
    color: var(--color-white);
  }
}

/* Small devices (landscape phones, less than 768px) */
@media only screen and (max-width: 767.98px) {
  /* Reset CSS */
  :root {
    --font-sm: 12px;
    --font-xsm: 10px;
    --font-lg: 16px;
    --font-size--h1: 36px;
    --font-size--h2: 32px;
    --font-size--h3: 22px;
    --font-size--h4: 18px;
    --font-size--h5: 18px;
    --font-size--h6: 16px;
  }

  body {
    margin-top: -5px;
  }

  .ptb-100 {
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .ptb-70 {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .pt-100 {
    padding-top: 70px;
  }

  .pt-120 {
    padding-top: 70px;
  }

  .pt-90 {
    padding-top: 40px;
  }

  .pb-100 {
    padding-bottom: 60px;
  }

  .pb-120 {
    padding-bottom: 70px;
  }

  .pb-90 {
    padding-bottom: 40px;
  }

  .pb-75 {
    padding-bottom: 45px;
  }

  .pb-70 {
    padding-bottom: 40px;
  }

  .pb-60 {
    padding-bottom: 20px !important;
  }

  .pb-30 {
    padding-bottom: 20px !important;
  }

  .px-5 {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .px-60 {
    padding-inline: 20px;
  }

  .btn-lg,
  .btn-md {
    padding: 12px 26px;
    font-size: var(--font-base);
  }

  .w-sm-100 {
    width: 100% !important;
  }

  .w-sm-75 {
    width: 100% !important;
  }

  .go-top {
    width: 35px;
    height: 35px;
    font-size: 22px;
  }

  .section-title .title,
  .content-title h2 {
    margin-top: -4px;
  }

  .title-md {
    font-size: 22px;
  }

  .home-banner .banner-filter-form .grid .grid-item {
    flex: auto !important;
    width: 100% !important;
  }

  .home-banner.home-banner-1 {
    /* padding-top: 130px; */
    padding-bottom: 70px;
  }

  .home-banner.home-banner-2 {
    padding-top: 130px;
    padding-bottom: 70px;
  }

  .home-banner.home-banner-2 > div {
    display: flex;
    flex-direction: column;
  }

  .home-banner.home-banner-2 > div .swiper {
    flex: 0 0 auto;
    width: 100%;
    order: 1;
  }

  .home-banner.home-banner-2 > div .banner-filter-form {
    order: 3;
  }

  .home-banner.home-banner-2 > div .swiper-pagination {
    order: 2;
  }

  .home-banner.home-banner-3 {
    padding-top: 130px;
    padding-bottom: 30px;
    border-radius: 0 0 30px 30px;
  }

  .about-area .img-content .absolute-text {
    width: 150px;
    height: 150px;
  }

  .about-area .img-content .absolute-text #curveText .char {
    transform-origin: 0 70px;
    font-size: 12px;
  }

  .about-area.about-2 .img-content {
    padding-bottom: 60px;
  }

  .testimonial-area .overlay-bg {
    top: 0;
    transform: none;
  }

  .newsletter-area .newsletter-form .input-group {
    flex-wrap: wrap;
    flex-direction: column;
    gap: 15px;
    border: unset;
  }

  .newsletter-area .newsletter-form .input-group .form-control {
    border: 1px solid var(--border-color);
    border-radius: 5px !important;
  }

  .newsletter-area .newsletter-form .input-group * {
    width: 100%;
  }

  .pricing-item {
    padding: 30px;
  }

  .tabs-navigation {
    overflow: hidden;
    overflow-x: auto;
  }

  .tabs-navigation .nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow: unset;
  }

  .tabs-navigation .nav li {
    flex: 0 0 auto;
  }

  .tabs-navigation.tabs-navigation-3 .nav .nav-item {
    width: calc(50% - 10px);
  }

  .shopping-area tbody td {
    min-width: 140px;
  }

  .blog-details-area
    .comments
    .comment-list
    .comment
    .comment-body
    .comment-author {
    max-width: 60px;
  }

  .footer-area,
  .testimonial-2.with-radius,
  .with-radius.testimonial-3 {
    border-radius: 30px 30px 0 0;
  }



  .map-area .ratio.ratio-21-8::before {
    padding-bottom: 65%;
  }

  .product-single .product-single-slider {
    max-width: 100%;
  }

  .product-single .product-single-gallery {
    padding-bottom: 0;
  }

  .product-single .slider-thumbnails {
    position: static;
    transform: none;
    margin-top: 20px;
    max-width: 100%;
  }

  .product-single .slider-navigation .slider-btn {
    z-index: 3;
  }

  .blog-details-area .comments .comment-list .comment .children .comment-body {
    padding-inline-start: 25px;
  }

  .blog-details-area
    .comments
    .comment-list
    .comment
    .comment-body
    .comment-content
    p {
    font-size: 14px;
  }

  .blog-details-area .sidebar-widget-area .widget {
    padding: 25px;
  }

  .sidebar-widget-area .widget-post .article-item {
    flex-direction: column;
  }

  .sidebar-widget-area .widget-post .article-item .image {
    max-width: 100%;
  }

  .sidebar-widget-area .widget-post .article-item .content {
    max-width: 100%;
    padding: 20px 0 0 0;
  }

  .dataTables_length {
    margin-bottom: 10px;
  }
}

/* Small devices (landscape phones, between 576px to 768px) */
@media only screen and (min-width: 576px) and (max-width: 767.98px) {
  .product-default:not(.product-column, .product-inline) .product-info li {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .product-inline .product-details {
    padding-inline-start: 20px;
  }

  .product-inline .product-title {
    font-size: var(--font-size--h4);
    margin-bottom: 5px;
  }

  .product-inline .product-info {
    margin-top: 5px;
    gap: 15px;
  }

  .product-inline .product-info i {
    font-size: var(--font-base);
  }

  .product-inline .product-price .new-price,
  .product-inline .product-info,
  .product-inline .product-location {
    font-size: var(--font-base);
  }

  .home-banner .banner-filter-form .grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .home-banner .banner-filter-form .form-group {
    padding-bottom: 20px;
  }

  .home-banner .banner-filter-form .form-group::after {
    width: 100%;
    height: 1px;
    right: 0;
    left: 0;
    bottom: 0;
    top: unset;
  }

  .home-banner .banner-filter-form .noUi-target {
    width: 100%;
  }

  .filter-form-area .filter-form .grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 0;
  }

  .filter-form-area .filter-form .noUi-target {
    width: 100%;
  }

  .projects-details-area .project-gallery .grid {
    -moz-columns: 2 auto;
    columns: 2 auto;
  }
}

@media only screen and (max-width: 575.98px) {
  .p-25 {
    padding: 20px !important;
  }

  .testimonial-area .slider-item {
    padding-bottom: 15px;
    padding-inline-end: 15px;
  }

  .choose-area .content .choose-grid {
    grid-template-columns: repeat(2, 1fr);
    place-items: start;
  }

  .home-banner .banner-filter-form .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .home-banner .banner-filter-form .form-group {
    padding-bottom: 20px;
  }

  .home-banner .banner-filter-form .form-group::after {
    width: 100%;
    height: 1px;
    right: 0;
    left: 0;
    bottom: 0;
    top: unset;
  }

  .home-banner .banner-filter-form .noUi-target {
    width: 100%;
  }

  .home-banner.home-banner-3 .filter-form .price-slider {
    flex-direction: column;
    height: auto;
    padding-block: 15px;
    align-items: start;
    line-height: normal;
    gap: 15px;
  }

  .filter-form-area .filter-form .grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .filter-form-area .filter-form .noUi-target {
    width: 100%;
  }

  .testimonial-area.testimonial-3 .slider-item .client-info {
    align-items: start !important;
    flex-direction: column;
    gap: 12px;
  }

  .testimonial-area.testimonial-3 .slider-item .client-info .client-img {
    margin-inline-end: 0;
  }

  .testimonial-area.testimonial-3 .slider-item .client-info .content {
    padding: 0;
  }

  .testimonial-area.testimonial-3 .slider-item .client-info .content::after {
    content: none;
  }

  .review-box .review-list .review .review-body {
    flex-wrap: wrap;
  }
}

/* Property Details: moved from inline <style> in details.blade.php */
@media (max-width: 768px) {
  .product-single {
    padding-top: 60px !important;
    padding-bottom: 40px !important;
  }
  .container {
    width: 100% !important;
    padding: 0 15px !important;
  }
  .header-bar {
    padding: 10px 15px !important;
    margin-bottom: 15px !important;
  }
  .back-btn {
    font-size: 14px !important;
  }
  .action-btn {
    width: 35px !important;
    height: 35px !important;
  }
  .action-btn i {
    font-size: 12px !important;
  }
  .product-single-gallery .row {
    margin: 0 !important;
  }
  .product-single-gallery .col-lg-8,
  .product-single-gallery .col-lg-4 {
    padding: 0 !important;
    margin-bottom: 10px;
  }
  .main-image-container {
    margin-bottom: 10px;
  }
  .product-single-gallery .col-lg-4 .d-flex {
    flex-direction: row !important;
    gap: 10px;
  }
  .product-single-gallery .col-lg-4 .mb-3,
  .product-single-gallery .col-lg-4 .flex-grow-1 {
    flex: 1;
    margin-bottom: 0 !important;
  }
  .product-single-details .row {
    margin: 0 !important;
  }
  .product-single-details .col-md-8,
  .product-single-details .col-md-4 {
    padding: 0 !important;
    width: 100% !important;
  }
  .new-price-detial {
    font-size: 24px !important;
    display: block;
  }
  .product-title {
    font-size: 20px !important;
    margin-bottom: 15px !important;
  }
  .product-location {
    margin-bottom: 15px !important;
  }
  .product-info {
    flex-wrap: nowrap !important;
    gap: 10px !important;
  }
  .product-info li {
    border-right: none !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 10px;
  }
  .col-md-4.d-none.d-md-block {
    display: none !important;
  }
  .d-block.d-md-none {
    display: block !important;
    margin-bottom: 20px;
  }
  .d-block.d-md-none .d-flex {
    flex-direction: column !important;
    gap: 15px;
  }
  .d-block.d-md-none .product-price {
    text-align: center;
    margin-bottom: 15px;
  }
  .d-block.d-md-none .d-flex.align-items-center {
    justify-content: center;
    gap: 15px;
  }
  .d-block.d-md-none .user-img {
    width: 50px !important;
    height: 50px !important;
  }
  .product-desc {
    margin-bottom: 30px !important;
  }
  .product-desc h3 {
    font-size: 18px !important;
  }
  .product-desc p {
    font-size: 14px !important;
    line-height: 1.6;
  }
  .row.mb-40 .col-lg-4 {
    width: 100% !important;
    margin-bottom: 15px;
  }
  .product-video.bg-white {
    padding: 20px 15px !important;
    margin-bottom: 30px !important;
  }
  .product-video h3 {
    font-size: 18px !important;
    margin-bottom: 15px !important;
  }
  .accordion-item {
    margin-bottom: 10px;
  }
  .accordion-button {
    font-size: 14px !important;
    padding: 12px 15px !important;
  }
  .form-group {
    margin-bottom: 15px !important;
  }
  .form-group label {
    font-size: 14px !important;
  }
  .form-control {
    font-size: 14px !important;
  }
  .calcBtn {
    width: 100% !important;
    padding: 12px !important;
    font-size: 14px !important;
  }
  .product-planning {
    padding: 20px 15px !important;
    margin-bottom: 30px !important;
  }

  .row.bg-white {
    padding: 20px 15px !important;
    margin-bottom: 30px !important;
  }
  .row.bg-white .col-lg-4 {
    width: 100% !important;
    margin-bottom: 15px;
  }
  .col-lg-3.col-xl-4 {
    width: 100% !important;
    margin-top: 30px;
  }
  .widget-form {
    padding: 20px 15px !important;
  }
  .widget-form .user {
    margin-bottom: 20px !important;
  }
  .widget-form .user-img {
    width: 60px !important;
    height: 60px !important;
    margin-bottom: 21px;
  }
  .widget-form .user-info h4 {
    font-size: 16px !important;
  }
  .widget-form .user-info a {
    font-size: 14px !important;
  }
  .widget-form .form-group {
    margin-bottom: 15px !important;
  }
  .widget-form button {
    padding: 12px !important;
    font-size: 14px !important;
  }
  .col-lg-4.col-xl-4 {
    width: 100% !important;
    margin-top: 30px;
  }
  .property-card {
    width: 100% !important;
    height: auto !important;
    margin-bottom: 20px !important;
  }
  .property-image-container {
    height: 200px !important;
  }
  .property-image-container img {
    width: 100% !important;
    height: 200px !important;
  }
  .property-card .p-3 {
    padding: 15px !important;
  }
  .property-card h6 {
    font-size: 14px !important;
    line-height: 1.4;
  }
  .property-card .text-muted {
    font-size: 12px !important;
  }
  .property-card .spec-item {
    margin-right: 15px !important;
  }
  .property-card .spec-item span {
    font-size: 12px !important;
  }
  .property-card .price-section span {
    font-size: 16px !important;
  }
  .property-card .btn {
    font-size: 11px !important;
    padding: 6px 12px !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .product-single {
    padding-top: 80px !important;
    padding-bottom: 50px !important;
  }
  .container {
    width: 100% !important;
    padding: 0 20px !important;
  }
  .header-bar {
    padding: 12px 20px !important;
    margin-bottom: 18px !important;
  }
  .product-single-gallery .col-lg-8 {
    width: 60% !important;
  }
  .product-single-gallery .col-lg-4 {
    width: 40% !important;
  }
  .product-single-details .col-md-8 {
    width: 70% !important;
  }
  .product-single-details .col-md-4 {
    width: 30% !important;
  }
  .new-price-detial {
    font-size: 28px !important;
  }
  .product-title {
    font-size: 22px !important;
  }
  .d-block.d-md-none {
    display: none !important;
  }
  .col-md-4.d-none.d-md-block {
    display: block !important;
  }
  .product-desc h3 {
    font-size: 20px !important;
  }
  .product-desc p {
    font-size: 15px !important;
  }
  .row.mb-40 .col-lg-4 {
    width: 50% !important;
  }
  .product-video.bg-white {
    padding: 25px 20px !important;
  }
  .product-video h3 {
    font-size: 20px !important;
  }
  .accordion-button {
    font-size: 15px !important;
  }
  .form-control {
    font-size: 15px !important;
  }
  .product-planning {
    padding: 25px 20px !important;
  }
  .product-location {
    padding: 25px 20px !important;
  }
  .row.bg-white {
    padding: 25px 20px !important;
  }
  .row.bg-white .col-lg-4 {
    width: 50% !important;
  }
  .col-lg-3.col-xl-4 {
    width: 100% !important;
    margin-top: 40px;
  }
  .widget-form {
    padding: 25px 20px !important;
  }
  .widget-form .user-img {
    width: 70px !important;
    height: 70px !important;
  }
  .widget-form .user-info h4 {
    font-size: 18px !important;
  }
  .col-lg-4.col-xl-4 {
    width: 100% !important;
    margin-top: 40px;
  }
  .property-card {
    width: 100% !important;
    height: auto !important;
    margin-bottom: 25px !important;
  }
  .property-image-container {
    height: 180px !important;
  }
  .property-image-container img {
    width: 100% !important;
    height: 180px !important;
  }
  .property-card .p-3 {
    padding: 20px !important;
  }
  .property-card h6 {
    font-size: 15px !important;
  }
  .property-card .text-muted {
    font-size: 13px !important;
  }
  .property-card .spec-item span {
    font-size: 13px !important;
  }
  .property-card .price-section span {
    font-size: 17px !important;
  }
  .property-card .btn {
    font-size: 12px !important;
    padding: 8px 15px !important;
  }
}

/* Social Media Modal (moved) */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 20px !important;
  }
  .modal-content {
    border-radius: 15px !important;
  }
  .modal-header {
    padding: 15px 20px !important;
  }
  .modal-body {
    padding: 30px !important;
    min-height: 200px !important;
  }

  .action-btn:nth-child(n+4) {
    margin-top:25px !important;
  }
  
  /* RTL support for Arabic */
  [dir="rtl"] .action-btn span {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    display: block !important;
  }
  
  [dir="rtl"] .actions {
    direction: rtl !important;
  }
  
  [dir="rtl"] .action-btn {
    text-align: center !important;
  }
  .actions {
    flex-wrap: wrap !important;
    gap: 15px !important;
  }
  .action-btn {
    flex: 1 1 calc(33.333% - 10px) !important;
    text-align: center;
  }
  .action-btn .btn {
    width: 40px !important;
    height: 40px !important;
    margin-bottom: 8px !important;
  }
  .action-btn span {
    font-size: 10px !important;
    line-height: 1.2 !important;
    margin-top: 5px !important;
  }
  
  /* Additional RTL spacing */
  [dir="rtl"] .action-btn span {
    font-size: 9px !important;
    line-height: 1.3 !important;
    margin-top: 8px !important;
    padding: 0 2px !important;
  }
  
  /* Keep mortgage calculator completely LTR even in Arabic */
  [dir="rtl"] .product-video,
  [dir="rtl"] .product-video *,
  [dir="rtl"] .paymentCalc,
  [dir="rtl"] .paymentCalc *,
  [dir="rtl"] .accordion,
  [dir="rtl"] .accordion *,
  [dir="rtl"] .accordion-item,
  [dir="rtl"] .accordion-item *,
  [dir="rtl"] .accordion-body,
  [dir="rtl"] .accordion-body *,
  [dir="rtl"] .form-group,
  [dir="rtl"] .form-group *,
  [dir="rtl"] .form-control,
  [dir="rtl"] .calcBtn {
    direction: ltr !important;
    text-align: left !important;
  }
  
  /* Force LTR for all mortgage calculator elements */
  [dir="rtl"] #paymentResults,
  [dir="rtl"] #paymentResults *,
  [dir="rtl"] #pricipal_price,
  [dir="rtl"] #pricipal_price *,
  [dir="rtl"] #mortgage_price,
  [dir="rtl"] #mortgage_price *,
  [dir="rtl"] #property_price,
  [dir="rtl"] #property_price *,
  [dir="rtl"] #home_price,
  [dir="rtl"] #home_price *,
  [dir="rtl"] #hoa_price,
  [dir="rtl"] #hoa_price *,
  [dir="rtl"] #utility_price,
  [dir="rtl"] #utility_price *,
  [dir="rtl"] .property_yearly_payment,
  [dir="rtl"] .property_yearly_payment * {
    direction: ltr !important;
    text-align: center !important;
  }
  
  /* Keep form labels and inputs in LTR */
  [dir="rtl"] .paymentCalc label,
  [dir="rtl"] .paymentCalc input,
  [dir="rtl"] .paymentCalc select,
  [dir="rtl"] .paymentCalc span {
    direction: ltr !important;
    text-align: left !important;
  }
  
  [dir="rtl"] .paymentCalc .form-group {
    direction: ltr !important;
  }
  
  /* Fix accordion button layout - label left, price right */
  [dir="rtl"] .accordion-button {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    direction: ltr !important;
    text-align: left !important;
    flex-wrap: nowrap !important;
  }
  
  [dir="rtl"] .accordion-button span {
    margin-left: auto !important;
    margin-right: 0 !important;
    direction: ltr !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  
  /* Force accordion button content to stay LTR */
  [dir="rtl"] .accordion-button * {
    direction: ltr !important;
    unicode-bidi: normal !important;
  }
  
  /* Specific fix for accordion button text content */
  [dir="rtl"] .accordion-button::before,
  [dir="rtl"] .accordion-button::after {
    direction: ltr !important;
  }
  
  /* Override the absolute positioning from style.css */
  [dir="rtl"] button.accordion-button span {
    position: static !important;
    right: auto !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }
  
  /* Force accordion button to use flex layout */
  [dir="rtl"] .accordion-header button.accordion-button {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .modal-dialog {
    margin: 30px !important;
  }
  .actions {
    gap: 20px !important;
  }
  .action-btn .btn {
    width: 60px !important;
    height: 60px !important;
  }
  .action-btn span {
    font-size: 13px !important;
  }
}

.agent-properties-grid,
.similar-properties-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  margin-top: 20px;
}
.agent-properties-grid .property-card,
.similar-properties-grid .property-card {
  flex: 0 0 auto;
  margin-bottom: 0 !important;
}
@media (max-width: 768px) {
  .agent-properties-grid,
  .similar-properties-grid {
    flex-direction: column;
    gap: 15px;
  }
  .agent-properties-grid .property-card,
  .similar-properties-grid .property-card {
    width: 100% !important;
    max-width: 100%;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .agent-properties-grid,
  .similar-properties-grid {
    gap: 18px;
  }
  .agent-properties-grid .property-card,
  .similar-properties-grid .property-card {
    flex: 0 0 calc(50% - 9px);
  }
}
