/* =========================
   PROPERTIES LIST / CARDS
   ========================= */

/* Use CSS Grid for stable layout (left-aligned last row) */
.property-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding: 20px;
  align-items: stretch;
}

/* Card */
.property-card {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    background-color 0.3s ease;
  min-width: 0; /* critical for text overflow inside flex/grid */
  background: #fff;
}

.property-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border-color: #004d00;
  background-color: #f0f0f0;
}

/* Link wrapper */
.property-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  min-width: 0;
}

/* Image (single image or slider container) */
.property-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  display: block;
}

/* Details */
.property-details {
  margin-top: 10px;
  text-align: center;
  width: 100%;
  min-width: 0;
}

.property-details h2 {
  margin: 10px 0;
  font-size: 1.2em;
  color: #000;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.property-details p {
  margin: 10px 0;
  font-size: 1em;
  color: #000;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* =========================
   IMAGE SLIDER (if used)
   ========================= */

.property-image-slider {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}
.property-image {
  position: relative; /* kluczowe dla .banner */
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.property-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.property-image-slider img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.5s ease-in-out;
}

.property-image-slider .prev,
.property-image-slider .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  line-height: 1;
  padding: 0;
}

.property-image-slider .prev {
  left: 10px;
}
.property-image-slider .next {
  right: 10px;
}

/* FORCE FILTERS INTO ROWS */
.filter-form {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  align-items: flex-end !important;
}

/* wrapper rows should also wrap */
.filter-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  width: 100% !important;
}

/* 3 kolumny na desktop */
.filter-field {
  flex: 0 0 calc(33.333% - 12px) !important;
  min-width: 220px !important;
  display: flex !important;
  flex-direction: column !important;
}

/* button field */
.filter-button {
  flex: 0 0 auto !important;
}

/* Mobile */
@media (max-width: 768px) {
  .filter-field {
    flex: 0 0 calc(50% - 12px) !important; /* 2 kolumny */
    min-width: 180px !important;
  }
}

@media (max-width: 480px) {
  .filter-field {
    flex: 0 0 100% !important; /* 1 kolumna */
  }
}
/* =========================
   JUMBOTRON (video background)
   ========================= */

.jumbotron {
  position: relative;
  overflow: hidden;
  padding: 15px 0 0 0;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: black;
  width: 100%;
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  filter: blur(3px);
}

#background-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 15px;
  left: 0;
}

.jumbotron-content {
  color: #000;
  padding: 0 20px 20px 20px;
  text-align: center;
  margin: 0;
  background-color: transparent;
}

.jumbotron-content h1 {
  margin: 0;
  padding: 0;
}

.jumbotron-content p {
  font-size: 1.75rem;
  margin: 0;
  padding: 10px;
}

.jumbotron-content-below {
  color: #000;
  padding: 0px;
  text-align: center;
}

.jumbotron-content-below p {
  font-size: 1.75rem;
}

.jumbotron-content-below a {
  font-size: 1.25rem;
  font-weight: normal;
}

@media (max-width: 768px) {
  .jumbotron {
    padding: 1rem;
    height: auto;
    min-height: 320px;
  }
}

/* =========================
   SERVICES
   ========================= */

.service-image {
  max-width: 150px;
  max-height: 150px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  padding-bottom: 5px;
}

.services h3 {
  margin-top: 5px;
}

/* =========================
   RESERVED / SOLD BANNERS
   ========================= */

.banner {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  color: #fff;
  padding: 5px 10px;
  font-size: 14px;
  text-transform: uppercase;
  border-top-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.reserved-banner {
  background-color: #0000ff;
}
.sold-banner {
  background-color: #ff0000;
}
.lower_price_banner {
  background-color: #004d00;
}

.reserved-banner-small,
.sold-banner-small {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
  z-index: 10;
}

.reserved-banner-small {
  background-color: #0000ff;
}
.sold-banner-small {
  background-color: #8b0000;
}

/* =========================
   CONTACT PAGE
   ========================= */

.contact-info {
  list-style: none;
  padding: 0;
}

.contact-info li {
  margin-bottom: 10px;
  font-size: 1.2em;
}

.business-card {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #f8f8f8;
  margin-bottom: 20px;
}

.contact-image {
  max-width: 50%;
  height: auto;
  border-radius: 10px;
  margin-top: 20px;
}

.contact-name {
  font-size: 1.5em;
  font-weight: bold;
  margin-top: 10px;
}

/* =========================
   PAGINATION
   ========================= */

.pagination {
  display: flex;
  justify-content: center;
  list-style-type: none;
  padding: 0;
}

.pagination li {
  margin: 0 5px;
}

.pagination a {
  color: #007bff;
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid #007bff;
  border-radius: 5px;
  transition:
    background-color 0.3s,
    color 0.3s;
}

.pagination a:hover {
  background-color: #007bff;
  color: #fff;
}

.pagination .current {
  background-color: #007bff;
  color: #fff;
  border: 1px solid #007bff;
  padding: 8px 12px;
  border-radius: 5px;
  pointer-events: none;
}

/* =========================
   OTHER
   ========================= */

@media (max-width: 765px) {
  .carousel-inner {
    width: 100% !important;
    height: auto;
  }
}

.filter-form input:focus,
.filter-form select:focus {
  outline: 0;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Bootstrap-like button */
.filter-form button[type="submit"] {
  display: inline-block;
  font-weight: 400;
  color: #fff;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  background-color: #007bff;
  border: 1px solid #007bff;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  cursor: pointer;
}

.filter-form button[type="submit"]:hover {
  background-color: #0069d9;
  border-color: #0062cc;
}