/* Phone layout for the existing Partener theme. Desktop styles stay in style.css. */
.mobile-estate-gallery, .mobile-estate-actions { display: none; }
.mobile-search-filters > summary { display: none; }
@media screen and (max-width: 767px) {
  html { scroll-padding-top: 90px; }
  body { font-size: 16px; line-height: 1.5; }
  *, *::before, *::after { box-sizing: border-box; }
  .container { width: 100%; max-width: 100%; padding-left: 16px; padding-right: 16px; }
  .row { margin-left: -8px; margin-right: -8px; }
  [class*="col-xs-"], [class*="col-sm-"], [class*="col-md-"] { padding-left: 8px; padding-right: 8px; }
  img { max-width: 100%; }
  input, select, textarea { font-size: 16px !important; max-width: 100%; }
  button, .button-sq, .btn, .select2-container .select2-selection--single { min-height: 44px; }
  .select2-container { max-width: 100%; width: 100% !important; }
  .select2-container .select2-selection--single { display: flex; align-items: center; }
  .select2-container .select2-selection__arrow { top: 9px; }
  .select2-dropdown { font-size: 16px; }
  .select2-results__option { padding: 10px 12px; }
  .site-header { padding: 10px 0; background: #fff; }
  #branding { padding: 0; margin: 0; display: block; }
  #branding .logo { width: 82px; height: 72px; object-fit: contain; margin: 0; }
  .menu-toggle { width: 48px; height: 48px; padding: 10px; margin-top: 10px; border-radius: 8px; }
  .mobile-navigation { clear: both; padding: 10px 0; }
  .mobile-navigation .menu, .mobile-navigation .submenu { padding-left: 0; margin: 0; list-style: none; }
  .mobile-navigation a { display: block; padding: 12px 16px; min-height: 44px; }
  .mobile-navigation .submenu { position: static; width: 100%; display: block; box-shadow: none; background: #f4f8fa; }
  .mobile-navigation .submenu a { padding-left: 28px; }
  .homepage .hero-slider { display: flex; flex-direction: column; min-height: 0; height: auto; margin: 0; padding: 0; }
  .homepage .hero-slider > .slides { order: 0; height: 170px; overflow: hidden; margin: 0; }
  .homepage .hero-slider > .slides > li { height: 170px; min-height: 170px; padding: 0; background-size: cover; background-position: center; }
  .homepage .hero-slider .flex-direction-nav { display: none; }
  .homepage .homeSearch { order: 1; position: static !important; width: 100%; margin: 0; padding: 18px 16px; background: #f0f6f9; transform: none; }
  #mainSearch .form-group { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
  #mainSearch .form-group::before, #mainSearch .form-group::after { display: none; }
  #mainSearch .form-group > div { width: 100%; float: none; padding: 0; left: auto; }
  #mainSearch button { width: 100%; min-height: 48px; border-radius: 6px; }
  .fullwidth-block { padding: 28px 0; }
  .fullwidth-block.image-block { min-height: 100px; background-attachment: scroll !important; background-size: cover !important; }
  h2.entry-title, .entry-title { font-size: 23px; line-height: 1.3; overflow-wrap: anywhere; }
  .entry-title .price { display: block; padding-top: 8px; color: #287fa5; font-weight: bold; }
  .separator { margin: 16px 0; }
  .map-toggle { display: inline-block; padding: 10px 0; }
  .mobile-search-filters { margin: 0 0 20px; border: 1px solid #d9e5eb; border-radius: 8px; background: #f6fafc; }
  .mobile-search-filters > summary { display: list-item; padding: 14px 18px; cursor: pointer; font-weight: bold; color: #236f91; }
  .mobile-search-filters #sidebarSearch { padding: 16px; margin: 0; }
  .project { margin-bottom: 24px; padding-bottom: 16px; height: auto !important; border-bottom: 1px solid #e2e9ed; }
  .project-thumbnail { width: 100%; height: auto !important; aspect-ratio: 4 / 3; overflow: hidden; margin: 0 0 12px; border-radius: 10px; }
  .project-thumbnail a { display: block; width: 100%; height: 100%; }
  .project-thumbnail img { width: 100% !important; height: 100% !important; max-width: 100% !important; object-fit: cover; position: static !important; transform: none !important; }
  .project-title { font-size: 20px; line-height: 1.35; margin: 10px 0; height: auto !important; }
  .project .attributes { display: flex; flex-wrap: wrap; gap: 6px 12px; }
  .project .attributes .price { width: 100%; font-size: 21px; color: #287fa5; }
  .project .description { font-size: 15px; height: auto !important; margin-top: 12px; }
  .estate-content-row { display: flex; flex-direction: column; }
  .estate-details { order: 0; width: 100%; }
  .estate-sidebar { order: 1; width: 100%; margin-top: 24px; scroll-margin-top: 20px; }
  .estate-details #jssor_1 { display: none !important; }
  .mobile-estate-gallery { display: block; width: 100%; margin-top: 12px; }
  .mobile-photo-track { display: flex; width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; border-radius: 10px; background: #eef2f5; }
  .mobile-photo-track figure { flex: 0 0 100%; min-width: 0; margin: 0; position: relative; scroll-snap-align: start; }
  .mobile-photo-track img { display: block; width: 100%; height: 280px; object-fit: contain; }
  .mobile-photo-track figcaption { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 20px; background: rgba(0,0,0,.7); color: #fff; font-size: 13px; }
  .mobile-estate-gallery > p { font-size: 13px; color: #596772; text-align: center; padding: 7px; margin: 0; }
  .estate-details .features { overflow-wrap: anywhere; }
  .estate-details .col1, .estate-details .col2, .estate-details .col3 { float: none; width: 100%; }
  .estate-details #map { height: 280px !important; }
  .mobile-estate-actions { display: flex; position: fixed; z-index: 900; bottom: 0; left: 0; right: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 10px; background: #fff; box-shadow: 0 -2px 12px #0002; }
  .mobile-estate-actions a { flex: 1; padding: 12px 8px; text-align: center; border: 1px solid #287fa5; border-radius: 7px; color: #236f91; font-size: 15px; text-decoration: none; }
  .mobile-estate-actions .mobile-call { background: #287fa5; color: #fff; }
  body:has(.mobile-estate-actions) { padding-bottom: 85px; }
  .alert-cookies { width: calc(100% - 24px) !important; max-width: 460px; left: 12px !important; top: auto !important; bottom: 12px; max-height: 85vh; overflow-y: auto; }
  .site-footer { padding: 28px 0; overflow-wrap: anywhere; }
  .site-footer .row > div { width: 100%; float: none; }
  .site-footer .privacy-links, .site-footer .copyright { text-align: left; }
  nav[aria-label="Pagination Navigation"] a { display: inline-block; padding: 12px 8px; }
}
@media screen and (max-width: 380px) {
  .mobile-photo-track img { height: 230px; }
  h2.entry-title { font-size: 21px; }
}
@media print { .mobile-estate-gallery, .mobile-estate-actions { display: none !important; } }
@media screen and (max-width: 767px) {
  .project .description, .project-title, .project-subtitle, .features, .testimonial-slider { overflow-wrap: anywhere; word-break: normal; }
  #estateListing > .row:first-child .pull-right { float: none !important; }
  #estateListing > .row:first-child .map-toggle { padding: 8px 0; }
}

/* Imported descriptions can contain long nonbreaking-space sequences. */
.project .description { overflow-wrap: anywhere; }
@media screen and (max-width: 767px) {
  #mainSearch { min-width: 0; max-width: 100%; overflow-x: clip; }
  #mainSearch .form-group { grid-template-columns: minmax(0, 1fr); }
  #mainSearch .form-group > div { min-width: 0; }
}
