@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700;800&display=swap");

body {
  min-height: 100vh;
  font-family: "Poppins", Arial, sans-serif;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

/* Globalne style kontenera */
.container {
  max-width: 1600px !important;
}

/* Ujednolicenie typografii w opisie oferty i neutralizacja wklejonych styli */
.offer-desc,
.offer-desc * {
  font-family: "Poppins", Arial, sans-serif !important;
  color: #111 !important;
}
.offer-desc {
  font-size: 1rem;
  line-height: 1.6;
}
.offer-desc h2,
.offer-desc h3,
.offer-desc h4 {
  font-weight: 700;
  margin: 1.2em 0 0.6em;
  font-size: 1.25rem;
}
.offer-desc p {
  margin: 0 0 0.8em 0;
}
.offer-desc ul,
.offer-desc ol {
  margin: 0 0 1em 1.2em;
}
.offer-desc a {
  color: #e30613 !important;
  text-decoration: underline;
}
.offer-desc img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.navbar-custom,
.island-menu,
.navbar-nav,
.nav-link,
.navbar-brand {
  font-family: "Source Sans Pro", Arial, sans-serif !important;
}

.navbar-custom {
  background: #ffffff;
  backdrop-filter: blur(10px);
  position: fixed;
  border-radius: 50px;
  margin: 20px auto 0 auto;
  padding: 1rem 2rem;
  width: 95%;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  z-index: 1050;
  top: 0;
  transition:
    transform 0.28s ease,
    opacity 0.2s ease;
  will-change: transform, opacity;
}

.navbar-custom.is-hidden-on-scroll {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 24px));
}

/* Ujednolicenie szerokości kontenera w nawigacji */
.navbar-custom .container {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Ujednolicenie szerokości kontenera w wyszukiwarce */
section.container.my-4 {
  max-width: 1600px !important;
  margin: 0 auto !important;
  padding: 0 2rem !important;
}

.navbar-brand span {
  color: #e30613;
  font-weight: bold;
}

.menu-item {
  padding: 3px;
}

.menu-item a {
  color: #000;
  margin: 0;
  border-radius: 20px;
  padding: 8px 8px;
  transition: all 0.3s ease;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
}

.menu-item-mega-chevron {
  display: none;
}

.island-menu .nav-link.active,
.menu-item a:hover {
  background: #e30613;
  color: #fff;
  transform: translateY(-1px);
}

/* Przycisk Zgłoś nieruchomość */
.btn-report-property {
  background: linear-gradient(135deg, #e30613 0%, #c0050f 100%);
  color: #fff !important;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(227, 6, 19, 0.3);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.btn-report-property:hover {
  background: linear-gradient(135deg, #c0050f 0%, #a0040c 100%);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(227, 6, 19, 0.4);
  text-decoration: none;
}

.btn-report-property:focus {
  color: #fff !important;
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.3);
  text-decoration: none;
}

/* Jeden box kontaktowy w menu */
.contact-box {
  display: flex;
  align-items: center;
}

.contact-unified {
  border-radius: 55px;
  padding: 5px 25px;
  border: 1px solid rgba(227, 6, 19, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.contact-unified:hover {
  background: rgba(227, 6, 19, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(227, 6, 19, 0.1);
  border-color: rgba(227, 6, 19, 0.2);
}

.contact-line {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.contact-line:last-child {
  margin-bottom: 0;
}

.contact-line i {
  color: #e30613;
  font-size: 11px;
  width: 12px;
  text-align: center;
  margin-right: 6px;
  transition: all 0.3s ease;
}

.contact-unified:hover .contact-line i {
  color: #c0050f;
  transform: scale(1.1);
}

.contact-link {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 11px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.contact-link:hover {
  color: #e30613;
  text-decoration: none;
}

/* Responsywność dla sekcji kontaktowej */
@media (max-width: 1200px) {
  .contact-unified {
    padding: 6px 10px;
    min-width: 160px;
  }

  .contact-link {
    font-size: 10px;
  }

  .contact-line i {
    font-size: 10px;
    width: 10px;
    margin-right: 4px;
  }
}

@media (max-width: 991px) {
  .contact-box {
    display: none;
  }

  /* Kontakt mobilny */
  .contact-info-mobile .btn {
    background: #e30613;
    border-color: #e30613;
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
  }

  .contact-info-mobile .btn:hover {
    background: #c0050f;
    border-color: #c0050f;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
  }
}

/* Mega Menu Styles - Minimalist */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 60px;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
  padding: 2rem 0;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  border: none;
  margin-top: 0px;
  pointer-events: none; /* Wyłącz interakcję gdy ukryte */
}

/* Przycisk Wróć - ukryty na desktop */
.mega-menu-back-btn {
  display: none !important;
}

/* Mostek między menu-item a mega-menu - zapobiega zamykaniu przy przejściu */
.menu-item::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
  z-index: 2999;
  pointer-events: none; /* Mostek nie blokuje interakcji */
}

.menu-item:hover .mega-menu,
.menu-item .mega-menu:hover,
.menu-item.mega-menu-open .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto; /* Włącz interakcję gdy widoczne */
}

.mega-menu-content {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) repeat(3, 1fr); /* lewa kolumna intro + 3 kolumny treści */
  gap: 2rem;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2rem;
}

.mega-menu-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 2rem;
  border-right: 1px solid #f0f0f0;
}

.mega-menu-intro-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: #ffcb05;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.mega-menu-intro-icon i {
  font-size: 28px;
  color: #000;
}

.mega-menu-intro-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.mega-menu-intro-text {
  font-size: 0.95rem;
  color: #555;
}

.mega-menu-section {
  padding: 0;
  position: relative;
  background-size: contain;
  border-radius: 0;
  border: none;
  transition: none;
}
.mega-menu-intro {
  background: #fff url("img/wzor.png") no-repeat right bottom;
  background-size: contain;
  border-radius: 0;
  border: none;
  transition: none;
}
.mega-menu-section:hover {
  background: transparent;
  border-color: transparent;
  transform: none;
  box-shadow: none;
}

.mega-menu-section h4 {
  color: #333;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
  position: relative;
  text-transform: none;
  letter-spacing: 0;
}

.mega-menu-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-menu-section ul li {
  margin-bottom: 0.3rem;
  position: relative;
}

.mega-menu-section ul li::before {
  display: none;
}

.mega-menu-section ul li a {
  color: #555;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  display: block;
  transition: all 0.2s ease;
  border-radius: 0;
  position: relative;
  background: transparent;
  border-left: none;
  margin: 0;
}

.mega-menu-section ul li a:hover {
  color: #e30613;
  background: transparent;
  padding-left: 8px;
  border-left: 2px solid #e30613;
  transform: none;
  box-shadow: none;
}

/* Responsywność dla mega menu */
@media (max-width: 1200px) {
  .mega-menu-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 0 1.5rem;
  }
}

@media (max-width: 991px) {
  /* Ukryj mega menu domyślnie w wersji mobilnej */
  .mega-menu {
    display: none;
  }

  /* Pełnoekranowy panel — renderowany w body (JS), poza navbar z will-change:transform */
  body.mega-menu-mobile-active .navbar-custom {
    will-change: auto;
  }

  .mega-menu.mega-menu-mobile-open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    z-index: 10050;
    background: #fff;
    border-radius: 0;
    margin: 0;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    overflow: hidden;
    pointer-events: auto;
    box-sizing: border-box;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    padding: 0.5rem 1.25rem 1.5rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    gap: 0.35rem;
    box-sizing: border-box;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-content > *:not(.mega-menu-intro) {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    grid-column: 1 / -1 !important;
  }

  /* Link powrotu — zawsze widoczny nad scrollem treści */
  .mega-menu-back-btn {
    display: none !important;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-back-btn {
    display: flex !important;
    position: sticky;
    top: 0;
    z-index: 2;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    width: 100%;
    margin: 0;
    padding: calc(0.85rem + env(safe-area-inset-top, 0px)) 1.25rem 0.85rem;
    border: none;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #e30613;
    text-align: left;
    text-decoration: none;
    transition:
      background 0.2s ease,
      color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-back-btn .mega-menu-back-label {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-back-btn:hover,
  .mega-menu.mega-menu-mobile-open .mega-menu-back-btn:focus-visible {
    background: #fff8f8;
    color: #c0050f;
    outline: none;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-back-btn:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(227, 6, 19, 0.35);
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-back-btn i {
    font-size: 1.1rem;
    color: #e30613;
    flex-shrink: 0;
  }

  .mega-menu-content {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  /* Intro tylko na desktop — na mobile zajmuje za dużo miejsca */
  .mega-menu.mega-menu-mobile-open .mega-menu-intro {
    display: none !important;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-section {
    border-bottom: 1px solid #eef1f4;
    padding: 0.35rem 0 0.65rem;
    margin: 0 0 0.65rem;
    width: 100%;
    max-width: 100%;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0.25rem;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-section h4 {
    font-size: 0.95rem;
    margin: 0.35rem 0 0.5rem;
    padding: 0.15rem 0 0.55rem;
    border-bottom: 1px solid #f0f0f0;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-section h4::after {
    display: none;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-section ul {
    max-height: none;
    overflow: visible;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-section ul li {
    margin-bottom: 0;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-section ul li a {
    display: block;
    font-size: 0.95rem;
    line-height: 1.45;
    padding: 0.85rem 0.15rem;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 1px solid #f5f6f8;
    border-left: none;
    margin: 0;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-section ul li:last-child a {
    border-bottom: none;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-section ul li a:hover,
  .mega-menu.mega-menu-mobile-open .mega-menu-section ul li a:focus-visible {
    color: #e30613;
    background: #fff9f9;
    outline: none;
    padding-left: 0;
    border-left: none;
  }

  .mega-menu-aktualnosci.mega-menu-mobile-open .mega-menu-content {
    max-width: 100%;
    overflow-x: hidden;
    gap: 0.75rem;
  }

  .mega-menu-aktualnosci.mega-menu-mobile-open .aktualnosci-post-card {
    max-width: 100%;
    min-width: 0;
    padding: 0.75rem;
  }

  .mega-menu-aktualnosci.mega-menu-mobile-open .aktualnosci-post-card img {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .mega-menu.mega-menu-mobile-open .mega-menu-content {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-section h4 {
    font-size: 0.9rem;
  }

  .mega-menu.mega-menu-mobile-open .mega-menu-section ul li a {
    font-size: 0.9rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }
}

/* Menu Aktualności - najnowsze wpisy */
.aktualnosci-mega-menu {
  min-height: 260px;
}

.mega-menu-aktualnosci .mega-menu-content {
  padding: 1.5rem 2rem;
}

.aktualnosci-post-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  padding: 1rem;
  border-radius: 12px;
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.aktualnosci-post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  background: #fff; /* Bez koloru tła na hover – tylko cień */
}

/* Wyłącz wszelkie globalne tła na hover wewnątrz megamenu Aktualności */
.mega-menu-aktualnosci .aktualnosci-post-card a:hover {
  background: transparent !important;
}

.aktualnosci-post-card h5 {
  font-size: 0.95rem;
  line-height: 1.4;
  min-height: 2.6em;
}

.aktualnosci-post-card p {
  font-size: 0.85rem;
}

/* Ikony w menu Oferta */
.mega-menu-section h4 i {
  color: #ffcb05;
}

/* Mega menu Kontakt - zakładki miast i kafelki oddziałów */
.kontakt-mega-menu .mega-menu-content {
  gap: 1.25rem;
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) 4.3fr;
}

.kontakt-mega-menu .mega-menu-intro {
  padding-right: 1.25rem;
  border-right: 1px solid #f0f0f0;
}

/* Moduł z tabami i kafelkami (kolumna 2) */
.kontakt-tabs-branches-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Zakładki miast */
.kontakt-city-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 0.5rem;
}

.kontakt-city-tab {
  background: transparent;
  border: none;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s ease;
  position: relative;
}

.kontakt-city-tab:hover {
  color: #ffcb05;
}

.kontakt-city-tab.active {
  color: #ffcb05;
  border-bottom-color: #ffcb05;
  font-weight: 600;
}

/* Siatka oddziałów */
.kontakt-branches-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

/* Kafelki oddziałów - podobne do aktualności */
.kontakt-branch-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border-radius: 10px;
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.kontakt-branch-card:hover {
  transform: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.kontakt-branch-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  padding-left: 0 !important;
  border-left: none !important;
}

.kontakt-branch-card a:hover {
  color: inherit !important;
  background: transparent !important;
  padding-left: 0 !important;
  border-left: none !important;
}

.kontakt-branch-card-img {
  width: 100%;
  height: 115px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.kontakt-branch-card-content {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.kontakt-branch-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.25;
  color: #000;
  min-height: 2.5em;
}

.kontakt-branch-card-address,
.kontakt-branch-card-phone {
  font-size: 0.86rem;
  color: #666;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  line-height: 1.3;
}

.kontakt-branch-card-address-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
}

.kontakt-branch-card-address i,
.kontakt-branch-card-phone i {
  color: #ffcb05;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.kontakt-branch-card-phone {
  margin-bottom: 0;
}

/* Responsywność */
@media (max-width: 1200px) {
  .kontakt-branches-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .kontakt-mega-menu .mega-menu-content {
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
  }
}

@media (max-width: 991px) {
  .kontakt-mega-menu .mega-menu-content {
    grid-template-columns: none;
    gap: 0.75rem;
  }

  .kontakt-mega-menu.mega-menu-mobile-open .mega-menu-content {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0.5rem 1.25rem 1.5rem !important;
  }

  .kontakt-mega-menu.mega-menu-mobile-open .kontakt-tabs-branches-wrapper {
    min-height: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .kontakt-city-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.25rem;
    padding-bottom: 0.35rem;
  }

  .kontakt-city-tabs::-webkit-scrollbar {
    display: none;
  }

  .kontakt-city-tab {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
  }

  .kontakt-branches-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .kontakt-branch-card-img {
    height: 120px;
  }
}

@media (max-width: 768px) {
  .kontakt-city-tab {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .kontakt-branches-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .kontakt-branch-card-img {
    height: 150px;
  }
}

/* Ulubione - serduszko w menu */
.favorites-link {
  color: #e30613;
  text-decoration: none;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  padding: 8px;
  border-radius: 50%;
  display: inline-block;
}

.favorites-icon {
  font-size: 1.5rem;
}

.favorites-count {
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
}

.favorites-count:empty {
  display: none;
}

/* Licznik na stronie ulubionych - spójny z motywem */
.favorites-total-count {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffcb05 !important;
  color: #111 !important;
  border: 1px solid #e0b700;
  font-weight: 700;
  line-height: 1;
}

/* Przyciski ulubionych */
.favorite-btn {
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(5px);
}

.favorite-btn:hover {
  background: #e30613 !important;
  color: white !important;
  border-color: #e30613 !important;
  transform: scale(1.1);
}

.favorite-btn.active {
  background: #e30613 !important;
  color: white !important;
  border-color: #e30613 !important;
}

.favorite-btn.active i {
  color: white !important;
}

.favorite-btn i {
  font-size: 14px;
  transition: all 0.3s ease;
}

.favorite-btn-list {
  z-index: 2;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(5px);
}

.favorite-btn-list:hover {
  background: #e30613 !important;
  color: white !important;
  border-color: #e30613 !important;
  transform: scale(1.1);
}

.favorite-btn-list.active {
  background: #e30613 !important;
  color: white !important;
  border-color: #e30613 !important;
}

.favorite-btn-list.active i {
  color: white !important;
}

.favorite-btn-list i {
  font-size: 14px;
  transition: all 0.3s ease;
}

/* Notyfikacje ulubionych */
.favorites-notification {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Grid dla ulubionych - użyj flexbox */
#favorites-container {
  display: flex !important;
  flex-wrap: wrap;
  margin: 0 -12px;
}

#favorites-container .col-lg-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
  padding: 0 12px;
  margin-bottom: 24px;
}

@media (max-width: 991.98px) {
  #favorites-container .col-lg-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 575.98px) {
  #favorites-container .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Dodatkowe style dla lepszego wyglądu */
#favorites-container .offer-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#favorites-container .offer-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Kontener hero - wrapper dla slidera i wyszukiwarki */
.hero-section-wrapper {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  border-radius: 28px;
  overflow: hidden;
}

/* Slider hero */
.hero-swiper {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  border-radius: 28px;
  overflow: hidden;
}

/* Pojedynczy slajd w sliderze */
.hero-slide {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 5vw;
  background: #000 url("img/banner.jpg") center center/cover no-repeat;
  position: relative;
  border-radius: 28px;
}

.hero-slide::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
  border-radius: 28px;
}

.hero-text {
  position: relative;
  z-index: 4;
  margin-top: 100px;
  max-width: 50%;
}

/* Kontener wyszukiwarki - na stałe, poza sliderem */
.hero-search-container {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding-right: 5vw;
  margin-top: 100px;
  pointer-events: none; /* Nie blokuj kliknięć w przyciski hero */
  overflow: visible;
}

.search-box {
  background: #ffffff;
  border-radius: 30px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  max-width: 540px;
  min-width: 350px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: visible; /* pozwól dropdownowi wyjść poza box */
  pointer-events: auto; /* Włącz interakcję dla wyszukiwarki */
}

/* Na stronie listy ofert - pełna szerokość (klasa .search-box została usunięta) */
.container > .shadow:has(#offer-list-search-form),
.container > div.shadow:has(form#offer-list-search-form) {
  max-width: 100% !important;
  min-width: auto;
  width: 100% !important;
}

/* Margin-top dla wyszukiwarki na liście ogłoszeń, aby nie była zakryta przez menu */
.container.my-4:has(#offer-list-search-form),
.container:has(form#offer-list-search-form) {
  margin-top: 120px !important;
}

@media (max-width: 767.98px) {
  .container.my-4:has(#offer-list-search-form),
  .container:has(form#offer-list-search-form) {
    margin-top: 30px !important;
    padding-top: 6px !important;
  }
}

/* ===== Wyszukiwarka listy ofert – układ jak na sadurscy.pl ===== */
.offer-list-scroll-target {
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

@media (max-width: 991.98px) {
  .offer-list-scroll-target {
    scroll-margin-top: 12px;
  }
}

.offer-list-search-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  padding: 1.75rem 1.5rem;
}

.offer-list-search-section {
  margin-bottom: 1.25rem;
}
.offer-list-search-section:last-child {
  margin-bottom: 0;
}

.offer-list-search-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 0.35rem;
  display: block;
}

.location-with-radius-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.location-with-radius-col .location-clearable-wrapper {
  width: 100%;
}

.location-radius-bar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-top: 0.55rem;
  width: 100%;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition:
    max-height 0.28s ease,
    opacity 0.22s ease,
    transform 0.22s ease,
    margin-top 0.22s ease;
  pointer-events: none;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.location-radius-bar.is-visible {
  max-height: 4.5rem;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.location-radius-bar__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #777;
  white-space: nowrap;
}

.location-radius-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.location-radius-pills::-webkit-scrollbar {
  display: none;
}

.location-radius-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: #444;
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.location-radius-pill:hover {
  border-color: rgba(0, 0, 0, 0.22);
  background: #fafafa;
}

.location-radius-pill.is-active {
  background: #ffcb05;
  border-color: #e6b800;
  color: #1a1a1a;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

@media (max-width: 767px) {
  .location-radius-bar {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .location-radius-bar.is-visible {
    max-height: 5.5rem;
  }
}

@media (min-width: 768px) {
  .offer-list-search-row-main .row {
    row-gap: 0.75rem;
  }
}

/* Główny wiersz: Typ, Obiekt, Lokalizacja, Rynek — wyrównanie od góry, żeby promień nie podnosił pola lokalizacji */
.offer-list-search-row-main .row {
  align-items: flex-start;
}

.offer-list-search-row-main .form-select,
.offer-list-search-row-main .location-input {
  min-height: calc(1.5em + 0.75rem + 2px);
}

#offer-list-market-block .offer-list-market-switches {
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  min-height: calc(1.5em + 0.75rem + 2px);
  align-items: center;
}
#offer-list-market-block .offer-list-market-switches .form-check.form-switch {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Siatka 3 kolumny dla Cena / Powierzchnia / Pokoje i filtrów zaawansowanych */
.offer-list-search-grid-3 > [class*="col-"] {
  min-width: 0;
}
@media (min-width: 768px) {
  .offer-list-search-grid-3 .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

/* Wiersz akcji: Wyczyść | Więcej filtrów | Szukaj */
.offer-list-search-row-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.offer-list-search-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.offer-list-search-actions-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.offer-list-search-actions .btn-link {
  font-size: 0.9rem;
}
.offer-list-search-actions .btn-link:hover {
  text-decoration: underline !important;
}
#search-submit-btn {
  min-width: 140px;
  font-weight: 600;
  border-radius: 12px;
}
/* Jednakowe zaokrąglenia przycisków Szukaj i Pokaż na mapie w wyszukiwarce */
.offer-list-search-actions .d-flex.gap-2 .btn {
  border-radius: 12px;
}

/* Sekcja filtrów zaawansowanych */
.offer-list-search-advanced {
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.offer-list-search-advanced .form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 0.35rem;
}

/* Informacje dodatkowe – etykieta i przyciski w jednym bloku */
#offer-list-search-form .checkbox-buttons-wrapper {
  margin-top: 0.5rem;
}
#offer-list-search-form .feature-toggle-btn {
  margin: 0.2rem;
}

@media (max-width: 767px) {
  .offer-list-search-box {
    padding: 1.25rem 1rem;
  }
  .offer-list-search-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .offer-list-search-actions .d-flex.align-items-center.gap-2 {
    width: 100%;
    flex-direction: column;
    align-items: stretch !important;
  }
  .offer-list-search-actions .d-flex.align-items-center.gap-2 .btn {
    width: 100%;
  }
  .offer-list-search-actions-left {
    order: 2;
    justify-content: center;
  }
  #search-submit-btn {
    order: 1;
    width: 100%;
  }
}

/* Zdejmij przycinanie w obrębie input-group w polu lokalizacji na stronie głównej */
#home-search-form .input-group,
.search-box .input-group {
  overflow: visible;
}

/* Zdejmij przycinanie w obrębie input-group w polu lokalizacji na liście ofert */
#offer-list-search-form .input-group {
  overflow: visible !important;
}

/* Wyklucz dropdown z reguły Bootstrapa, która zeruje border-radius i dodaje border do elementów w input-group */
.input-group > .krk-quarters-dropdown {
  border: none !important;
  border-top-left-radius: 18px !important;
  border-bottom-left-radius: 18px !important;
  border-top-right-radius: 18px !important;
  border-bottom-right-radius: 18px !important;
  margin-left: 0 !important;
}

/* Usuń border-top-right-radius: 0 i border-bottom-right-radius: 0 dla elementów w input-group */
.input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n + 3),
.input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-control,
.input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-select,
.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating) {
  border-top-right-radius: inherit !important;
  border-bottom-right-radius: inherit !important;
}

/* Wyrównaj border-radius pola lokalizacji (oba rogi zaokrąglone) - taki sam jak selecty */
#home-search-form .input-group > .form-control#txtLocation {
  border-top-left-radius: 20px !important;
  border-bottom-left-radius: 20px !important;
  border-top-right-radius: 20px !important;
  border-bottom-right-radius: 20px !important;
}

/* Wersja listy: nowoczesne pole lokalizacji */
.modern-search-form .location-input {
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
}

.search-box label,
.search-box .form-check-label {
  color: #000;
}

/* Style dla strony agenta */
.agent-hero {
  color: #333;
  position: relative;
  overflow: hidden;
  padding: 40px;
  padding-bottom: 100px;
}

.agent-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.agent-hero .container {
  position: relative;
  z-index: 2;
}

.agent-hero .agent-name {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.agent-hero .agent-title .badge {
  font-size: 1rem;
  padding: 0.5rem 1rem;
}

.contact-item i {
  font-size: 1.2rem;
  width: auto;
  text-align: center;
}

.action-buttons .btn {
  min-width: 200px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.action-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.rating-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.rating-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffcb05;
  line-height: 1;
}

.stars {
  color: #ffcb05;
  font-size: 1.2rem;
}

.review-card {
  border: none;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-radius: 15px;
  overflow: hidden;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.review-card .card-body {
  padding: 1.5rem;
}

.review-card .card-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.review-card .stars {
  font-size: 0.9rem;
}

.offers-filters {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 15px;
  margin-bottom: 2rem;
}

.offers-filters .form-select {
  min-width: 150px;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.offers-filters .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.offer-card {
  border: none;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-radius: 15px;
  overflow: hidden;
  height: 100%;
}

.offer-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.offer-image {
  position: relative;
  overflow: hidden;
}

.offer-image img {
  transition: transform 0.3s ease;
}

.offer-card:hover .offer-image img {
  transform: scale(1.05);
}

.offer-badges {
  z-index: 2;
}

.offer-badges .badge {
  margin-right: 5px;
  margin-bottom: 5px;
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
}

.offer-sticker-badges .badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.offer-details {
  border-top: 1px solid #e9ecef;
  padding-top: 1rem;
  margin-top: 1rem;
}

.offer-details strong {
  color: #333;
  font-weight: 600;
}

.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 5px;
}

.rating-input input[type="radio"] {
  display: none;
}

.rating-input label {
  font-size: 1.5rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.3s ease;
}

.rating-input input[type="radio"]:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
  color: #ffcb05;
}

.stat-item {
  text-align: center;
  padding: 1rem;
}

.stat-item h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.stat-item p {
  color: #6c757d;
  margin-bottom: 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.offers-count .badge {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

/* Responsywność dla strony agenta */
@media (max-width: 768px) {
  .agent-hero .agent-name {
    font-size: 2rem;
  }

  .action-buttons .btn {
    min-width: auto;
    width: 100%;
    margin-bottom: 10px;
  }

  .offers-filters .form-select {
    min-width: auto;
    width: 100%;
    margin-bottom: 10px;
  }

  .section-title {
    font-size: 2rem;
  }

  .rating-number {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .agent-hero {
    padding: 2rem 0;
  }

  .agent-hero .agent-name {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .review-card .card-body {
    padding: 1rem;
  }

  .offers-filters {
    padding: 1rem;
  }
}

/* Style dla linku agenta */
.agent-photo-link {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.agent-photo-link:hover {
  transform: scale(1.1) !important;
  border-color: #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.agent-photo-link:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.search-box .form-control,
.search-box .form-select,
.form-select {
  padding: 0.5rem 2rem 0.5rem 0.9rem;
  font-size: 1.2rem;
  border-radius: 20px;
  background-color: #fff;
  border: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  font-weight: 200;
}

.search-box .form-select {
  background-position: right 1rem center;
}

.search-btn {
  background: #ffcb05;
  color: #222;
  font-weight: bold;
  border-radius: 20px;
  border: none;
  padding: 0.75rem 2rem;
  font-size: 1.2rem;
  transition: background 0.2s;
}

.search-btn:hover {
  background: #ffe066;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
}

.hero-subtitle {
  font-size: 1.9rem;
  color: #fff;
  font-weight: 400;
}

.hero-disclaimer {
  font-size: 0.9rem;
  color: #fff;
  font-style: italic;
  opacity: 0.9;
}

.hero-cta-btn {
  background: #ffcb05;
  color: #222;
  font-weight: bold;
  border-radius: 20px;
  border: none;
  padding: 0.75rem 2rem;
  font-size: 1.2rem;
  transition: background 0.2s;
}

.hero-cta-btn:hover {
  background: #ffe066;
}

@media (max-width: 991px) {
  .navbar-custom {
    --mobile-nav-x-pad: 1rem;
  }

  .navbar-custom {
    margin: 0;
    padding: 0.65rem 1rem;
    position: fixed !important;
    top: 10px;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px);
    transform: none !important;
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    z-index: 1060;
    box-sizing: border-box;
    overflow: visible;
  }

  .navbar-custom.is-hidden-on-scroll {
    transform: translateY(calc(-100% - 14px)) !important;
  }

  .navbar-custom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    min-width: 0;
  }

  .navbar-custom .navbar-brand {
    margin-right: 0;
    flex-shrink: 0;
    max-width: calc(100% - 56px);
    overflow: hidden;
  }

  .navbar-custom .navbar-brand .navbar-logo {
    max-width: 100%;
    height: 30px;
    width: auto;
    display: block;
  }

  .navbar-custom .navbar-toggler {
    margin-left: auto;
    order: 2;
    border: 0;
    padding: 0.25rem 0.5rem;
  }

  .navbar-custom .favorites-link,
  .navbar-custom .favorites-count,
  .navbar-custom .badge.text-dark {
    display: none !important; /* zostaje tylko logo i hamburger */
  }

  /* Stabilny panel menu mobile (we wspólnym header.php): bez rozszerzania szerokości i bez "uciekania" poza viewport */
  .navbar-custom .navbar-collapse {
    position: absolute;
    top: calc(100% + 8px);
    left: calc(-1 * var(--mobile-nav-x-pad));
    right: calc(-1 * var(--mobile-nav-x-pad));
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e9ecef;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    max-height: none;
    z-index: 1060;
  }

  .navbar-custom .navbar-collapse:not(.show):not(.collapsing) {
    display: none !important;
  }

  .navbar-custom .navbar-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    gap: 0;
    background: #fff;
    border-radius: 10px;
  }

  .navbar-custom .navbar-nav .menu-item {
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #eef1f4;
  }

  .navbar-custom .navbar-nav .menu-item:last-child {
    border-bottom: 0;
  }

  .navbar-custom .navbar-nav .nav-link,
  .navbar-custom .navbar-nav .menu-item > a {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.9rem 0.35rem;
    border-radius: 0;
    font-size: 0.98rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .navbar-custom .navbar-nav .menu-item-has-mega-menu > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 0.85rem 1rem 0.75rem;
  }

  .navbar-custom .navbar-nav .menu-item-has-mega-menu > a .menu-item-mega-chevron {
    display: inline-block;
    flex-shrink: 0;
    margin-left: auto;
    font-size: 0.78rem;
    color: #9aa3ad;
    transition: color 0.2s ease, transform 0.2s ease;
  }

  .navbar-custom .navbar-nav .menu-item-has-mega-menu > a:hover .menu-item-mega-chevron,
  .navbar-custom .navbar-nav .menu-item-has-mega-menu > a:focus-visible .menu-item-mega-chevron {
    color: #e30613;
  }

  .navbar-custom .navbar-nav .menu-item > a:hover,
  .navbar-custom .navbar-nav .menu-item > a:focus-visible {
    background: #f8f9fb;
    color: #111;
    transform: none;
  }

  .navbar-custom .contact-box,
  .navbar-custom .btn-report-property {
    display: none !important;
  }

  .navbar-custom,
  .navbar-custom * {
    box-sizing: border-box;
  }
  .hero-section-wrapper {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    min-height: auto;
    margin-top: 110px; /* odsunięcie od mobilnego menu */
    border-radius: 22px;
  }
  .hero-swiper {
    position: relative;
    height: auto;
    min-height: 50vh;
    border-radius: 22px;
  }
  .hero-slide {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    min-height: 50vh;
    border-radius: 22px;
  }
  .hero-text {
    max-width: 100%;
    margin-top: 0;
    width: 100%;
    text-align: center;
  }
  .hero-search-container {
    padding-right: 0;
    margin-top: 1.5rem;
    width: 100%;
    justify-content: center;
    position: relative;
    z-index: 4;
  }
  .search-box {
    margin: 0;
    max-width: 100%;
    min-width: unset;
    padding: 1.5rem 1rem;
    width: 100%;
  }
  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  .hero-disclaimer {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
  .hero-cta-btn {
    font-size: 1rem;
    padding: 0.6rem 1.5rem;
    padding: 0.6rem 1.5rem;
  }
}

@media (max-width: 576px) {
  .navbar-custom .navbar-brand .navbar-logo {
    height: 26px;
  }
}

/* === Featured Section === */
.featured-section {
  padding: 3.5rem 5vw 2.5rem 5vw;
  min-height: 180px;
  font-family: "Poppins", Arial, sans-serif;
}

.featured-label {
  position: relative;
}

.featured-bg {
  display: block;
  width: 140px;
  height: 110px;
  background: #ffcb05;
  clip-path: polygon(10% 0%, 67.85% 0.91%, 99.29% 96.37%, 39.29% 96.37%);
  border-bottom-right-radius: 24px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
}

.featured-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 0.2em;
  position: relative;
  z-index: 2;
}

.featured-subtitle {
  font-size: 1.2rem;
  color: #222;
  font-weight: 300;
  position: relative;
  z-index: 2;
}

.featured-label > .ms-4 {
  margin-left: 120px !important;
}

.featured-link {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  margin-left: 2vw;
  transition: color 0.2s;
}

.featured-link:hover {
  color: #e30613;
}

@media (max-width: 991px) {
  .featured-section {
    flex-direction: column;
    align-items: flex-start !important;
    padding: 2rem 1rem;
    min-height: unset;
  }
  .featured-link {
    margin: 2rem 0 0 0;
    font-size: 1.1rem;
  }
  .featured-label > .ms-4 {
    margin-left: 90px !important;
  }
  .featured-bg {
    width: 90px;
    height: 70px;
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
    border-bottom-right-radius: 14px;
  }
  .featured-title {
    font-size: 1.6rem;
  }
  .featured-subtitle {
    font-size: 1.1rem;
  }
}

/* === Categories Section === */
.categories-section {
  background: #fff;
  font-family: "Poppins", Arial, sans-serif;
  margin-bottom: 2.5rem;
}

.category-item {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  padding: 0.3em 1.5em;
  border-radius: 30px;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  display: inline-block;
  line-height: 1.1;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
}

.category-item.active {
  background: #ffcb05;
  color: #111;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

.category-item:hover:not(.active) {
  color: #e30613;
  background: #f5f5f5;
}
.gwarancje-section {
  padding: 150px 0;
  background-image: url("img/wzor-02.png");
  background-size: contain;
  background-position: center left;
  background-repeat: no-repeat;
}
.category-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #ffcb05;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.big-number {
  font-size: 15rem;
}
.category-item:hover::after,
.category-item.active::after {
  width: 80%;
}
.h2-motto {
  font-size: 1.8rem;
  color: #000;
  font-weight: 300;
}

@media (max-width: 991px) {
  .categories-section {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .category-item {
    font-size: 1.2rem;
    padding: 0.3em 1em;
    margin-bottom: 0.5rem;
  }
}

/* === Offers Slider Section === */
.offers-slider-section {
  padding: 0 0 60px 0;
}

.offers-slider-section .row {
  transition: all 0.3s ease-in-out;
  min-height: 400px;
}

.offers-slider-section .col-lg-4 {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: none;
  visibility: visible;
}

.offer-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: scale(0.95);
  visibility: visible;
  height: 100%;
}

.offer-card.show {
  opacity: 1;
  transform: scale(1);
  visibility: visible;
}

.offer-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.offer-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.offer-card:hover .offer-img img {
  transform: scale(1.05);
}

/* Badge'y flag na zdjęciu oferty */
.offer-img .position-absolute.badge,
.offer-img .position-absolute .badge {
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
}

/* Link wewnątrz .offer-img */
.offer-img > a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.offer-body {
  padding: 20px;
  display: block;
  text-decoration: none;
}

/* Style dla kafelków ofert (grid view) - używane na liście ofert i w wyróżnionych */
.offer-grid-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.offer-grid-card .offer-img {
  flex-shrink: 0;
}

.offer-grid-card .offer-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.offer-grid-card .offer-main-info {
  min-height: 0;
}

.offer-grid-card .offer-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  justify-content: space-between;
  align-items: flex-end;
}

.offer-grid-card .offer-specs--card-row {
  width: 100%;
  flex-basis: 100%;
  box-sizing: border-box;
}

.offer-grid-card .offer-spec {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.offer-grid-card .offer-price-section {
  flex-shrink: 0;
  margin-left: 1rem;
  min-width: 120px;
}

.offer-grid-card .offer-price-section .offer-price-value,
.offer-grid-card .offer-price-section .h4.text-danger {
  color: #dc3545 !important;
}

.offer-grid-card .offer-card-top {
  width: 100%;
}

.offer-grid-card .offer-card-top .offer-main-info {
  min-width: 0;
}

.offer-grid-card .offer-title {
  margin-top: 0.15rem;
}

.offer-grid-card .badge {
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
}

.offer-grid-card h4.offer-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

/* Responsive dla grid view */
@media (max-width: 768px) {
  .offer-grid-card .offer-card-top {
    flex-direction: column;
    gap: 0.25rem;
  }

  .offer-grid-card .offer-price-section {
    margin-left: 0;
    margin-top: 0.15rem;
    text-align: left !important;
  }
}

.offer-type {
  font-size: 14px;
  color: #666;
}

.offer-market {
  font-size: 12px;
  color: #999;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
}

.offer-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 10px 0;
  line-height: 1.4;
}

a .offer-title {
  transition: color 0.3s ease;
}

a:hover .offer-title {
  color: #ffcb05;
}

.offer-size {
  font-size: 16px;
  color: #666;
}

.offer-price {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

/* Offer Swiper Styles */
.offer-swiper {
  width: 100%;
  height: 100%;
}

.offer-swiper .swiper-slide {
  width: 100%;
  height: 100%;
}

.offer-swiper .swiper-button-next,
.offer-swiper .swiper-button-prev {
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.offer-swiper .swiper-button-next:after,
.offer-swiper .swiper-button-prev:after {
  font-size: 14px;
}

.offer-swiper .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.7;
}

.offer-swiper .swiper-pagination-bullet-active {
  background: #fff;
  opacity: 1;
}

@media (max-width: 991.98px) {
  .offers-slider-section {
    padding: 40px 0;
  }

  .offer-img {
    aspect-ratio: 4/3;
  }

  .offer-title {
    font-size: 16px;
  }

  .offer-price {
    font-size: 18px;
  }
}

@media (max-width: 767.98px) {
  .offers-slider-section {
    padding: 30px 0;
  }

  .offer-img {
    aspect-ratio: 4/3;
  }
}

.btn-primary-custom {
  background: #f5c637;
  color: #111;
  font-family: "Poppins", Arial, sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  border: none;
  border-radius: 50px;
  padding: 0.5em 1.8em;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  outline: none;
}

.btn-primary-custom:hover,
.btn-primary-custom:focus {
  background: #ffcb05;
  color: #111;
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.13);
}

/* === Services Section === */

.services-section .row {
  align-items: stretch;
}

.service-card {
  background: #fff url("img/wzor.png") no-repeat right bottom;
  background-size: 120px auto;
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.13);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  flex-grow: 1;
  transition:
    transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.service-card:hover {
  transform: translate3d(0, -8px, 0);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.2);
  background-color: #f8f9fa;
}

.service-img {
  background: #111 url("img/service-card.png") no-repeat center center;
  background-size: cover;
  min-height: 180px;
  height: 180px;
  width: 90%;
  margin: 2rem auto 0 auto;
  border-radius: 24px;
}

.service-body {
  padding: 1.2rem 2rem 1.5rem 2rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.service-title {
  font-family: "Poppins", Arial, sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #222;
  margin: 1.2rem 0 1.2rem 0;
  line-height: 1.05;
  text-transform: none;
}

.service-desc {
  font-family: "Poppins", Arial, sans-serif;
  font-size: 1rem;
  color: #444;
  font-weight: 100;
  margin-bottom: 0;
}

.service-link {
  font-family: "Poppins", Arial, sans-serif;
  font-size: 0.95rem;
  color: #e30613;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 1rem;
  transition:
    color 0.3s,
    transform 0.3s;
}

.service-link:hover {
  color: #ffcb05;
  transform: translateX(5px);
}

/* Blog Slider Styles */
.blog-slider {
  padding: 0 0 150px 0;
}
.blog-section {
  background-color: #f4f4f4;
  padding: 100px 0;
}

.blog-card {
  background: #e2e2e2;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-height: 450px;
  width: 100%;
  max-width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: visible;
  box-sizing: border-box;
}

.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  color: rgb(0, 0, 0);
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  opacity: 0;
  transition: all 1s ease-in-out;
  height: 250px;
  width: 650px;
  line-height: 19px;
  transform: translateY(0px);
  pointer-events: none;
}

.slide-content h3 {
  font-weight: bold;
}

.slide-content p {
  height: 100px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.slide-content a {
  color: #000;
  font-weight: bold;
  pointer-events: auto;
}

.slide-content a:hover {
  color: var(--brand-color);
}

.blog-slider-wrapper .swiper-slide-active {
  width: 650px !important;
  transition: all 1s ease-in-out;
}

.blog-card-top-text {
  transition: all 1s ease-in-out;
}

.blog-slider-wrapper .swiper-slide-active .blog-card-top-text {
  opacity: 0;
}

.blog-slider-wrapper .swiper-slide-active .slide-content {
  opacity: 1;
  width: 650px !important;
  transform: translateY(110px);
}

.blog-slider-wrapper .swiper-slide {
  transition: all 1s ease-in-out;
  color: #fff;
}

/* Responsive dla blog-card na mobile */
@media (max-width: 991px) {
  .blog-card {
    padding: 15px;
    min-height: 350px;
  }
  .blog-card.blog-card-bg {
    padding: 60% 16px 16px 16px;
    background-position: center top;
    background-size: cover;
    color: #111;
  }

  .blog-slider-wrapper .swiper-slide-active {
    width: 100% !important;
    max-width: 100%;
  }

  .slide-content {
    position: static;
    opacity: 1 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100%;
    padding: 18px !important;
    height: auto;
    min-height: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    margin-top: 12px;
  }

  .blog-slider-wrapper .swiper-slide-active .slide-content {
    width: 100% !important;
    max-width: 100%;
    transform: none !important;
  }

  .blog-slider-wrapper .swiper-slide {
    width: 100% !important;
    max-width: 100%;
  }
}

@media (max-width: 575px) {
  .blog-card {
    padding: 12px;
    min-height: 300px;
  }
  .blog-card.blog-card-bg {
    padding: 68% 14px 14px 14px;
  }

  .slide-content {
    width: 100% !important;
    padding: 14px !important;
    height: auto;
    min-height: auto;
    margin-top: 10px;
  }

  .blog-slider-wrapper .swiper-slide-active .slide-content {
    width: 100% !important;
    transform: none !important;
  }
}

/* Upewnij się, że wrapper nie blokuje interakcji */
.blog-slider .swiper-wrapper {
  pointer-events: auto;
}
/* Upewnij się, że nawigacja jest na wierzchu slidera */
.blog-slider .swiper-button-next,
.blog-slider .swiper-button-prev {
  z-index: 20;
}

/* Navigation and Pagination */
.swiper-button-prev,
.swiper-button-next {
  color: var(--brand-color);
  z-index: 10;
  pointer-events: auto;
}

.swiper-pagination-bullet {
  width: 15px;
  height: 15px;
  text-align: center;
  line-height: 20px;
  font-size: 12px;
  color: #000;
  opacity: 1;
  background: var(--brand-color);
  border: 1px solid #fff;
}

.swiper-pagination-bullet-active {
  color: #fff;
  background: #fff;
}

@media (max-width: 991px) {
  .service-card {
    min-height: 420px;
    height: 100%;
  }
  .service-title {
    font-size: 1.5rem;
  }
  .service-img {
    min-height: 120px;
    height: 120px;
  }
  .service-body {
    padding: 1rem 1rem 0.5rem 1rem;
  }
}

@media (max-width: 767px) {
  .service-card {
    min-height: 320px;
    height: 100%;
  }
  .service-title {
    font-size: 1.1rem;
  }
  .service-img {
    min-height: 80px;
    height: 80px;
  }
  .service-body {
    padding: 0.7rem 0.5rem 0.5rem 0.5rem;
  }
}

.ghost-btn {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 2px 24px;
  font-weight: 200;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.ghost-btn:hover {
  background: #727272;
  color: #fff;
  transform: translateY(-2px);
}

/* Ghost button na białym tle (np. w wyszukiwarce listy ofert) */
.search-box .ghost-btn,
#offer-list-search-form .ghost-btn,
#show-more-btn {
  background: transparent !important;
  border: 1px solid #333 !important;
  color: #333 !important;
}

.search-box .ghost-btn:hover,
#offer-list-search-form .ghost-btn:hover,
#show-more-btn:hover {
  background: #333 !important;
  color: #fff !important;
  border-color: #333 !important;
}
.cta-section {
  padding: 50px;
  border-radius: 40px;
  background: #fff;
}

.offers-swiper {
  padding: 2rem 0;
  position: relative;
  overflow: hidden;
}

.offers-swiper .swiper-slide {
  width: calc(33.333% - 20px);
  padding: 0 10px;
  transition: transform 0.3s ease;
}

.offers-swiper .swiper-button-next,
.offers-swiper .swiper-button-prev {
  color: #111;
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

.offers-swiper .swiper-button-next:after,
.offers-swiper .swiper-button-prev:after {
  font-size: 18px;
}

.offers-swiper .swiper-pagination {
  bottom: 0;
}

.offers-swiper .swiper-pagination-bullet {
  background: #111;
  opacity: 0.3;
}

.offers-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  background: #111;
}
.list-unstyled {
  margin-top: 30px;
}
.list-unstyled li {
  padding-top: 10px;
  padding-bottom: 10px;
}
.form-check-label {
  color: #000;
}

/* Style dla strony agenta */
.agent-hero {
  color: #333;
  position: relative;
  overflow: hidden;
}

.agent-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.agent-hero .container {
  position: relative;
  z-index: 2;
}

.agent-hero .agent-name {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.agent-hero .agent-title .badge {
  font-size: 1rem;
  padding: 0.5rem 1rem;
}

.contact-item i {
  font-size: 1.2rem;
  width: auto;
  text-align: center;
}

.action-buttons .btn {
  min-width: 200px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.action-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.rating-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.rating-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffcb05;
  line-height: 1;
}

.stars {
  color: #ffcb05;
  font-size: 1.2rem;
}

.review-card {
  border: none;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-radius: 15px;
  overflow: hidden;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.review-card .card-body {
  padding: 1.5rem;
}

.review-card .card-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.review-card .stars {
  font-size: 0.9rem;
}

.offers-filters {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 15px;
  margin-bottom: 2rem;
}

.offers-filters .form-select {
  min-width: 150px;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.offers-filters .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.offer-card {
  border: none;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-radius: 15px;
  overflow: hidden;
  height: 100%;
}

.offer-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.offer-image {
  position: relative;
  overflow: hidden;
}

.offer-image img {
  transition: transform 0.3s ease;
}

.offer-card:hover .offer-image img {
  transform: scale(1.05);
}

.offer-badges {
  z-index: 2;
}

.offer-badges .badge {
  margin-right: 5px;
  margin-bottom: 5px;
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
}

.offer-sticker-badges .badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.offer-details {
  border-top: 1px solid #e9ecef;
  padding-top: 1rem;
  margin-top: 1rem;
}

.offer-details strong {
  color: #333;
  font-weight: 600;
}

.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 5px;
}

.rating-input input[type="radio"] {
  display: none;
}

.rating-input label {
  font-size: 1.5rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.3s ease;
}

.rating-input input[type="radio"]:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
  color: #ffcb05;
}

.stat-item {
  text-align: center;
  padding: 1rem;
}

.stat-item h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.stat-item p {
  color: #6c757d;
  margin-bottom: 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, #ffc008 0%, #846300 100%);
  border-radius: 2px;
}

.offers-count .badge {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

/* Responsywność dla strony agenta */
@media (max-width: 768px) {
  .agent-hero .agent-name {
    font-size: 2rem;
  }

  .action-buttons .btn {
    min-width: auto;
    width: 100%;
    margin-bottom: 10px;
  }

  .offers-filters .form-select {
    min-width: auto;
    width: 100%;
    margin-bottom: 10px;
  }

  .section-title {
    font-size: 2rem;
  }

  .rating-number {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .agent-hero {
    padding: 2rem 0;
  }

  .agent-hero .agent-name {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .review-card .card-body {
    padding: 1rem;
  }

  .offers-filters {
    padding: 1rem;
  }
}

/* Style dla linku agenta */
.agent-photo-link {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.agent-photo-link:hover {
  transform: scale(1.1) !important;
  border-color: #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.agent-photo-link:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Disable horizontal scroll */
body {
  overflow-x: hidden;
}

/* === STYLE Z TEMPLATE-OFFER.PHP === */

/* Search Box SS Styles */
.search-box-ss {
  background: #f5f5f5;
  border-radius: 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  border: 1px solid #ffcb05;
  padding: 32px 32px 40px 32px;
  position: relative;
  margin-top: 150px;
  margin-bottom: 32px;
  min-width: 320px;
  padding: 15px;
}

.btn-search-ss {
  min-width: 500px;
  padding: 10px;
}

.search-box-ss-header {
  top: -32px;
  right: 0;
  background: #ffcb05;
  color: #111;
  font-size: 1.3rem;
  padding: 16px 40px 16px 32px;
  border-radius: 0 0 32px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  z-index: 2;
  letter-spacing: 0.5px;
}

.search-box-ss-form .form-label {
  color: #000 !important;
  font-size: 1rem;
  min-height: 20px;
}

.form-label div {
  color: #000 !important;
}

.search-ss-input,
.search-box-ss-form .form-control,
.search-box-ss-form .form-select {
  border: none;
  font-size: 1.15rem;
  color: #222;
  padding: 0.5rem 0.9rem;
  margin-bottom: 0;
  font-weight: 300;
}

.search-box-ss-form .form-select {
  font-weight: 300;
}

.input-group-text {
  border: unset;
  font-size: 0.9rem;
  color: #222;
  background-color: #fff;
  box-shadow: 0;
}

.input-group {
  border-radius: 15px !important;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.search-box-ss-form .row > .col-auto {
  padding-left: 0;
  padding-right: 0;
  color: #000;
}

.search-ss-btn {
  background: #ffcb05 !important;
  color: #111 !important;
  border-radius: 20px !important;
  font-size: 1.25rem !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  border: none;
  transition:
    background 0.2s,
    color 0.2s;
}

.search-ss-btn:hover {
  background: #ffe066 !important;
  color: #111 !important;
}

@media (max-width: 991px) {
  .search-box-ss {
    padding: 64px 10px 32px 10px;
  }

  .search-box-ss-header {
    font-size: 1.1rem;
    padding: 12px 24px 12px 18px;
    border-radius: 0 0 18px 0;
  }
}

@media (max-width: 767px) {
  .search-box-ss {
    padding: 18px 2vw 18px 2vw;
  }

  .form-label-empty {
    display: none;
  }

  .btn-search-ss {
    min-width: 100%;
  }

  .search-box-ss-header {
    font-size: 1rem;
    padding: 8px 12px 8px 10px;
    border-radius: 0 0 12px 0;
  }
}

/* Pagination Styles */
.pagination {
  gap: 0.5rem;
}

.pagination .page-link {
  border: none;
  color: #111;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination .page-link:hover {
  background-color: #ffcb05;
  color: #111;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pagination .page-item.active .page-link {
  background-color: #ffcb05;
  color: #111;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pagination .page-item.disabled .page-link {
  background-color: #f8f9fa;
  color: #6c757d;
  box-shadow: none;
}

.rounded-4 {
  border-radius: 1.5rem !important;
}

.shadow-sm {
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.07) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #bbb;
}

.breadcrumb {
  --bs-breadcrumb-divider: ">";
}

.btn-warning {
  background: #ffcb05 !important;
  color: #111 !important;
  border: none;
}

.btn-warning:hover {
  background: #ffd84d !important;
  color: #111 !important;
}

.btn-outline-dark {
  border: 2px solid #111 !important;
  color: #111 !important;
}

.btn-outline-dark:hover {
  background: #111 !important;
  color: #fff !important;
}

.sticky-top {
  z-index: 2;
}

@media (max-width: 991.98px) {
  .sticky-top {
    position: static !important;
  }
}

/* Gallery Modal Styles */
.gallery-swiper {
  width: 100%;
  height: calc(100vh - 150px);
}

.gallery-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.gallery-swiper .swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-swiper .swiper-button-next,
.gallery-swiper .swiper-button-prev {
  color: #fff;
}

.gallery-thumbs {
  height: 100px;
  padding: 0 50px;
}

.gallery-thumbs .swiper-slide {
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.gallery-thumbs .swiper-slide-thumb-active {
  opacity: 1;
}

.gallery-thumbs .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.cursor-pointer {
  cursor: pointer;
}

/* ===================================
   FULLSCREEN MODAL STYLES
   =================================== */

/* Modal wrapper - fullscreen */
#fullscreenModal.modal-fullscreen .modal-dialog {
  max-width: 100%;
  height: 100vh;
  margin: 0;
  position: fixed;
  inset: 0;
}

/* Modal content container */
#fullscreenModal .modal-content {
  height: 100vh;
  background: #000;
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

/* Modal body - obraz obszar */
#fullscreenModal .modal-body {
  height: 100%;
  overflow: hidden;
  padding: 0;
  flex: 1;
  position: relative;
}

/* Swiper container */
#fullscreenModal .fullscreen-swiper {
  width: 100%;
  height: 100%;
}

/* Swiper slide */
#fullscreenModal .fullscreen-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  height: 100%;
  padding: 0;
}

/* Image in fullscreen modal - pełny rozmiar */
#fullscreenModal .fullscreen-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  display: block;
  max-width: 100vw;
  max-height: 100vh;
}

/* Swiper navigation arrows */
#fullscreenModal .fullscreen-swiper .swiper-button-next,
#fullscreenModal .fullscreen-swiper .swiper-button-prev {
  color: #fff;
}

/* Responsive dla mobile */
@media (max-width: 768px) {
  #fullscreenModal .fullscreen-swiper .swiper-slide img {
    object-fit: contain !important;
  }
}

/* ===================================
   MOBILE RESPONSIVE STYLES FOR OFFER PAGE
   =================================== */

@media (max-width: 991.98px) {
  /* Galeria główna - pełna szerokość na mobile */
  .gallery-main-swiper {
    height: 300px;
    min-height: 300px;
  }

  .gallery-main-slide {
    height: 300px;
  }

  .gallery-thumbnails {
    height: auto;
    margin-top: 1rem;
  }

  .gallery-thumbnails-top-wrapper {
    flex-direction: column;
  }

  .gallery-thumbnails-top-wrapper .video-thumbnail,
  .gallery-thumbnails-top-wrapper .virtual-tour-thumbnail {
    width: 100%;
    flex: 1 1 100%;
  }

  .gallery-badge-count {
    padding: 15px;
    font-size: 1.5rem;
  }

  .gallery-badge-count .small {
    font-size: 0.7rem;
  }

  .gallery-counter {
    padding: 8px 12px !important;
    font-size: 0.9rem;
  }

  /* Tytuł oferty */
  .offer-main-title {
    font-size: 1.5rem !important;
    line-height: 1.3;
  }

  /* Przycisk ulubionych w nagłówku */
  .offer-header .favorite-btn {
    margin-left: 0.5rem !important;
    padding: 0.5rem;
  }

  /* Informacje o ofercie */
  .offer-header .d-flex.flex-wrap {
    font-size: 0.85rem;
  }

  /* Cena i numer oferty */
  .offer-header .col-lg-3 {
    margin-top: 1rem;
    text-align: left !important;
  }

  .offer-price {
    font-size: 1.5rem;
  }

  /* Sidebar */
  .sidebar-sticky {
    position: relative !important;
    top: 0 !important;
  }

  /* Sekcja opis + sidebar */
  .container.mb-5 .col-lg-9 {
    margin-bottom: 2rem;
  }

  /* Property params */
  .property-params-container {
    gap: 0.5rem;
  }

  .property-param-item {
    font-size: 0.9rem;
    padding: 0.5rem 0;
  }

  /* Sekcja pomieszczeń */
  .rooms-grid .col-lg-6 {
    margin-bottom: 1.5rem;
  }

  /* Przyciski akcji */
  .btn-outline-dark {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 767.98px) {
  /* Galeria główna - mniejsza wysokość */
  .gallery-main-swiper {
    height: 250px;
    min-height: 250px;
  }

  .gallery-main-slide {
    height: 250px;
  }

  /* Tytuł oferty */
  .offer-main-title {
    font-size: 1.3rem !important;
  }

  /* Breadcrumbs */
  .breadcrumb {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }

  /* Informacje o ofercie - jedna linia */
  .offer-header .d-flex.flex-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .offer-header .d-flex.flex-wrap span {
    display: block;
  }

  .offer-header .d-flex.flex-wrap span:not(:last-child)::after {
    content: "";
    display: none;
  }

  /* Offer info mobile - lepsze formatowanie na mobile */
  .offer-info-mobile {
    margin-bottom: 1rem;
  }

  .offer-info-mobile > div {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .offer-info-mobile span {
    display: block;
    line-height: 1.5;
    width: 100%;
    font-size: 0.9rem;
  }

  .offer-info-mobile span.d-none.d-md-inline {
    display: none !important;
  }

  /* Dodatkowe formatowanie dla lepszej czytelności */
  .offer-info-mobile span:first-child {
    font-weight: 500;
    color: #333;
  }

  /* Breadcrumbs - czytelne zawijanie na mobile */
  .offer-header .breadcrumb,
  .offer-breadcrumb-mobile .breadcrumb {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    padding: 0;
    padding-left: 0;
    list-style: none;
    gap: 0.15rem 0.35rem;
    align-items: center;
  }

  .offer-header .breadcrumb-item,
  .offer-breadcrumb-mobile .breadcrumb-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .offer-header .breadcrumb-item + .breadcrumb-item::before,
  .offer-breadcrumb-mobile .breadcrumb-item + .breadcrumb-item::before {
    padding-right: 0.35rem;
  }

  .offer-header .breadcrumb-item a,
  .offer-breadcrumb-mobile .breadcrumb-item a {
    color: #555;
    text-decoration: none;
  }

  .offer-header .breadcrumb-item a:hover,
  .offer-breadcrumb-mobile .breadcrumb-item a:hover {
    text-decoration: underline;
  }

  /* Tytuł oferty + przycisk ulubionych w jednym wierszu (grid) */
  .offer-header .offer-title-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 0.75rem;
    align-items: start;
    margin-bottom: 0.5rem;
  }

  .offer-header .offer-title-row .offer-title-stack {
    grid-column: 1;
    min-width: 0;
  }

  .offer-header .offer-main-title {
    font-size: 1.25rem !important;
    line-height: 1.35;
    margin-bottom: 0;
    word-wrap: break-word;
    hyphens: auto;
    min-width: 0;
  }

  .offer-header .offer-title-row .favorite-btn {
    grid-column: 2;
    grid-row: 1;
    flex-shrink: 0;
    margin-left: 0;
  }

  /* Przycisk ulubionych - kompaktowy na mobile */
  .offer-header .favorite-btn {
    padding: 0.4rem;
    font-size: 0.9rem;
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Header container - mniejsze paddingi na mobile */
  .offer-header > .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    margin-bottom: 1rem;
  }

  /* Offer info mobile - kompaktowy układ */
  .offer-info-mobile {
    margin-bottom: 0.5rem;
  }

  .offer-info-mobile > div {
    gap: 0.3rem !important;
    margin-bottom: 0;
    align-items: flex-start;
  }

  .offer-info-mobile span {
    font-size: 0.8rem;
    line-height: 1.3;
    display: inline-block;
  }

  .offer-info-mobile span:not(:last-child) {
    margin-right: 0.5rem;
  }

  /* Sekcja z ceną i numerem oferty - bardziej kompaktowa */
  .offer-header .col-lg-3 {
    margin-top: 0.5rem;
    padding: 0.6rem;
    background: #f8f9fa;
    border-radius: 8px;
  }

  .offer-header .col-lg-3 > div {
    line-height: 1.3;
  }

  .offer-header .offer-header-price-block {
    padding-bottom: 1rem;
    margin-bottom: 0;
  }

  .offer-header .offer-price {
    font-size: 1.2rem;
    margin-top: 0.1rem;
  }

  .offer-header .col-lg-3 .small {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  /* Ogólne zmniejszenie marginesów w headerze */
  .offer-header .row {
    margin-bottom: 0;
  }

  .offer-header .col-12.col-lg-9 {
    margin-bottom: 0;
  }

  /* Cena i numer oferty - pełna szerokość */
  .offer-header .col-lg-3 {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
  }

  /* Gallery nav bar - mobile */
  .gallery-nav-bar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
  }

  .gallery-nav-center {
    order: 3;
    width: 100%;
    margin-top: 0.5rem;
    justify-content: center;
  }

  .gallery-nav-left,
  .gallery-nav-right {
    flex: 1;
  }

  .gallery-nav-right {
    justify-content: flex-end;
  }

  /* Modal gallery - mobile */
  #galleryModal .modal-body {
    padding: 1rem !important;
  }

  .gallery-grid {
    gap: 0.5rem;
  }

  .gallery-item {
    margin-bottom: 0.5rem;
  }

  /* Property params table - mobile */
  .property-params-table {
    margin-bottom: 1.5rem;
  }

  .section-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.6rem;
  }

  .section-subtitle::before {
    width: 52px;
    height: 40px;
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
    border-bottom-right-radius: 8px;
  }

  .section-subtitle-text {
    margin-left: 54px;
  }

  /* Sidebar - pełna szerokość na mobile */
  .col-lg-3.sidebar {
    margin-top: 2rem;
  }

  /* Przyciski - pełna szerokość */
  .btn-outline-dark,
  .btn-warning {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  /* Video thumbnail - mobile */
  .video-thumbnail,
  .virtual-tour-thumbnail {
    margin-bottom: 1rem;
  }

  /* Plans section - mobile */
  .plans-section {
    margin-bottom: 1.5rem;
  }

  /* Przyciski akcji - mobile */
  .action-buttons {
    flex-direction: column;
  }

  /* H2-motto - pełna szerokość na mobile, bez układu kolumnowego */
  .container.d-flex.justify-content-between.align-items-center {
    flex-direction: row !important;
    flex-wrap: wrap;
  }

  .h2-motto {
    width: 100% !important;
    flex: 0 0 100% !important;
    margin-bottom: 1rem;
  }

  .results-header,
  .similar-offers-header {
    width: 100% !important;
    flex: 0 0 100% !important;
  }

  .action-buttons .btn {
    width: 100%;
    margin-bottom: 0.75rem;
  }

  /* Sekcja opis - mobile */
  .offer-description-title {
    font-size: 1.2rem;
  }

  /* Property params - mobile */
  .property-params-table {
    margin-bottom: 1rem;
  }

  /* Rooms grid - mobile */
  .rooms-grid .col-lg-6 {
    margin-bottom: 1rem;
  }

  /* Map container - mobile */
  .map-container {
    height: 300px !important;
  }

  /* Video container - mobile */
  .video-container {
    margin-bottom: 1rem;
  }
}

@media (max-width: 575.98px) {
  /* Galeria główna - jeszcze mniejsza */
  .gallery-main-swiper {
    height: 200px;
    min-height: 200px;
  }

  .gallery-main-slide {
    height: 200px;
  }

  /* Tytuł oferty */
  .offer-main-title {
    font-size: 1.1rem !important;
  }

  /* Gallery nav bar - bardzo małe ekrany */
  .gallery-nav-bar {
    padding: 0.5rem;
  }

  .btn-filter {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
  }

  .btn-filter span {
    display: none;
  }

  .btn-nav-icon,
  .btn-nav-back {
    padding: 0.4rem;
    font-size: 1rem;
  }

  /* Modal - mobile */
  .modal-body {
    padding: 0.5rem !important;
  }

  /* Property params - mobile */
  .property-param-label {
    font-size: 0.85rem;
  }

  .property-param-value {
    font-size: 0.85rem;
  }
}

.nav-arrow {
  opacity: 0.7;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.nav-arrow:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .nav-arrow {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
}

/* Modal Close Button Styles */
.modal .btn-close {
  background-color: #ffcb05;
  opacity: 1;
  padding: 0.75rem;
  margin: 0.5rem;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  background-image: none;
  position: relative;
  z-index: 1051;
  flex-shrink: 0;
}

.modal .btn-close:hover {
  background-color: #ffd84d;
  transform: scale(1.1);
}

.modal .btn-close::before {
  content: "×";
  color: #111;
  font-size: 1.5rem;
  line-height: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Rzuty: pełna szerokość, wysokość auto, contain; nadpisuje globalne style galerii */
.plan-item {
  aspect-ratio: auto;
  overflow: visible;
}

.plan-item img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block;
}

.modal .btn-close-white::before {
  color: #111;
}

.modal-header {
  background: transparent;
  border: none;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1050;
  top: 0;
  padding: 0.5rem 0.5rem 0 0;
  justify-content: flex-end;
  pointer-events: none;
}
.modal-header .btn-close {
  pointer-events: auto;
}

/* Modal z mapą – pełny ekran bez dodatkowego paddingu (zamknięcie w UI mapy) */
#allResultsMapModal .modal-body {
  padding-top: 0;
  overflow: hidden;
}

#allResultsMapModal .modal-content,
#allResultsMapModal .modal-dialog {
  overflow: hidden;
  max-width: 100vw;
}

#fullscreenModal .modal-header {
  background: transparent;
  border: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1050;
  padding: 0.5rem;
  justify-content: flex-start;
}

#fullscreenModal .btn-nav-back--fullscreen {
  color: #fff;
  font-size: 1.4rem;
  padding: 0.35rem 0.45rem;
}

#fullscreenModal .btn-nav-back--fullscreen:hover {
  opacity: 0.85;
}

#fullscreenModal .fullscreen-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  position: relative;
  z-index: 2147483646;
}

#fullscreenModal .fullscreen-nav-left,
#fullscreenModal .fullscreen-nav-center,
#fullscreenModal .fullscreen-nav-right {
  display: flex;
  align-items: center;
}

#fullscreenModal .fullscreen-nav-center {
  color: #fff;
  font-size: 0.98rem;
  font-weight: 600;
}

#fullscreenModal .fullscreen-nav-right {
  min-width: 2.2rem;
}

/* ===================================
   GALLERY NAVIGATION BAR
   =================================== */

.gallery-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  position: relative;
  z-index: 1050;
}

#galleryModal {
  z-index: 2147483600;
}

#galleryModal + .modal-backdrop {
  z-index: 2147483500;
}

#fullscreenModal {
  z-index: 2147483640;
}

#fullscreenModal + .modal-backdrop {
  z-index: 2147483630;
}

#fullscreenModal .modal-header,
#fullscreenModal .modal-header .btn-close {
  z-index: 2147483646;
}
#wpadminbar {
  top: auto !important;
  bottom: 0 !important;
}

.gallery-nav-left,
.gallery-nav-center,
.gallery-nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.gallery-nav-center {
  flex: 1;
  justify-content: center;
  gap: 0.75rem;
}

/* Przycisk wstecz */
.btn-nav-back {
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: #111;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.btn-nav-back:hover {
  opacity: 0.7;
}

/* Przyciski filtrowania */
.btn-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #d0d0d0;
  background: #fff;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #111;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-filter i {
  font-size: 1rem;
}

.btn-filter-active {
  background: #ffcb05;
  border-color: #ffcb05;
  color: #111;
}

.btn-filter:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-filter:not(.btn-filter-active):hover {
  background: #f5f5f5;
}

/* Ikony po prawej stronie */
.btn-nav-icon {
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: #111;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-nav-icon:hover {
  opacity: 0.7;
}

.btn-nav-icon i {
  font-weight: 300;
}

/* Ikona serca - aktywna (ulubione) */
.btn-nav-icon.favorite-active i.fa-heart {
  color: #e91e63;
  font-weight: 900;
}

/* Responsive */
@media (max-width: 768px) {
  #galleryModal .gallery-nav-bar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    overflow-x: hidden;
  }

  #galleryModal .gallery-nav-left,
  #galleryModal .gallery-nav-right {
    flex: 0 0 auto;
    gap: 0.5rem;
  }

  #galleryModal .gallery-nav-right {
    margin-left: auto;
  }

  #galleryModal .gallery-nav-center {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    margin-top: 0.25rem;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  #galleryModal .btn-filter {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  #galleryModal .btn-filter span {
    display: inline;
  }

  #galleryModal .btn-filter i {
    font-size: 0.9rem;
  }

  #galleryModal .modal-body {
    overflow-x: hidden;
  }

  .modal-open .mobile-bottom-nav,
  .modal-open .navbar-custom {
    display: none !important;
  }

  body.mega-menu-mobile-active .mobile-bottom-nav {
    display: none !important;
  }

  body.mega-menu-mobile-active {
    padding-bottom: 0 !important;
  }

  .fullscreen-gallery-open .mobile-bottom-nav,
  .fullscreen-gallery-open .navbar-custom {
    display: none !important;
  }
}

.list-unstyled li {
  padding-top: 0px;
  padding-bottom: 0px;
}

/* Video Container Styles */
.video-container {
  background: #fff;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.video-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.video-container iframe {
  border-radius: 0.5rem;
}

.video-container .btn {
  transition: all 0.3s ease;
}

.video-container .btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .video-container {
    margin-bottom: 1rem;
  }
}

/* Offers Slider Section */
.offers-slider-section {
  padding: 0 0 60px 0;
}

.offers-slider-section .row {
  transition: all 0.3s ease-in-out;
  min-height: 400px;
}

.offers-slider-section .col-lg-4 {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: none;
  visibility: visible;
}

.offer-card.show {
  opacity: 1;
  transform: scale(1);
  visibility: visible;
}

.offer-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.offer-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.offer-card:hover .offer-img img {
  transform: scale(1.05);
}

.offer-body {
  padding: 20px;
}

.offer-type {
  font-size: 14px;
  color: #666;
}

.offer-market {
  font-size: 12px;
  color: #999;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
}

.offer-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 10px 0;
  line-height: 1.4;
}

.offer-size {
  font-size: 16px;
  color: #666;
}

.offer-price {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

/* Offer Swiper Styles */
.offer-swiper {
  width: 100%;
  height: 100%;
}

.offer-swiper .swiper-slide {
  width: 100%;
  height: 100%;
}

.offer-swiper .swiper-button-next,
.offer-swiper .swiper-button-prev {
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.offer-swiper .swiper-button-next:after,
.offer-swiper .swiper-button-prev:after {
  font-size: 14px;
}

.offer-swiper .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.7;
}

.offer-swiper .swiper-pagination-bullet-active {
  background: #fff;
  opacity: 1;
}

@media (max-width: 991.98px) {
  .offers-slider-section {
    padding: 40px 0;
  }

  .offer-img {
    aspect-ratio: 4/3;
  }

  .offer-title {
    font-size: 16px;
  }

  .offer-price {
    font-size: 18px;
  }
}

@media (max-width: 767.98px) {
  .offers-slider-section {
    padding: 30px 0;
  }

  .offer-img {
    aspect-ratio: 4/3;
  }
}

.btn-primary-custom {
  background: #f5c637;
  color: #111;
  font-family: "Poppins", Arial, sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  border: none;
  border-radius: 50px;
  padding: 0.5em 1.8em;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  outline: none;
}

.btn-primary-custom:hover,
.btn-primary-custom:focus {
  background: #ffcb05;
  color: #111;
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.13);
}

.h2-motto {
  font-size: 1.8rem;
  color: #000;
  font-weight: 300;
}

/* Pagination theme colors (brand: yellow/black) */
.pagination {
  --bs-pagination-border-color: transparent;
}

.page-item .page-link {
  color: #111;
  background: #f5f5f5;
  border-radius: 12px;
  margin: 0 4px;
  border: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.page-item .page-link:hover {
  color: #111;
  background: #ffe066;
  border-color: #ffcb05;
}

.page-item.active .page-link {
  color: #111;
  font-weight: 700;
  background: #ffcb05;
  border-color: #ffcb05;
}

.page-item.disabled .page-link {
  color: #999;
  background: #fafafa;
}

/* UI Autocomplete Styles */
.ui-autocomplete .autocomplete-badge {
  background: #ffcb05;
  color: #000;
  border-radius: 16px;
  padding: 0.2em 0.9em;
  font-size: 0.8em;
  font-weight: 700;
  margin-left: 1em;
  min-width: 2.5em;
  text-align: center;
  display: inline-block;
}

/* Filter Chips Styles */
.filter-chip {
  border: 1px solid #ddd;
  border-radius: 18px;
  padding: 8px 12px;
}

/* Wspólne style: filtry aktywne (lista pod wyszukiwarką + pasek na mapie) – te same paddingi, marginesy, odstępy */
.active-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem 0;
}
#active-filters.active-filters-bar {
  padding: 0.5rem 0;
}
.active-filters-bar .active-filters-label,
.active-filters-bar .map-filters-label {
  font-size: 0.875rem;
  margin-right: 0.25rem;
  margin-bottom: 0;
}
.map-active-filters.active-filters-bar,
.map-filter-chips.active-filters-bar {
  padding: 0;
  font-size: inherit;
}

/* Wspólny styl badge'a aktywnego filtra (lista ofert + mapa) */
.active-filter-badge {
  background-color: #ffcb05 !important;
  color: #000 !important;
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  border-radius: 18px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  max-width: min(100%, 260px);
}

.active-filter-badge__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
  display: inline-block;
  vertical-align: bottom;
}

/* Jedna ikonka × do usuwania filtrów (lista i mapa) – bez żółtego kółka z modala */
.active-filter-badge .btn-close,
.active-filter-badge .map-filter-remove {
  width: 1em;
  height: 1em;
  padding: 0 !important;
  margin: 0 0 0 0.25rem !important;
  background: none !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  opacity: 0.85;
  filter: none;
  cursor: pointer;
  box-sizing: content-box;
  font-size: 1em;
  line-height: 1;
  flex-shrink: 0;
}
.active-filter-badge .btn-close::before,
.active-filter-badge .map-filter-remove::before {
  content: "×";
  display: block;
  color: #000;
  font-size: 1.25em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}
.active-filter-badge .btn-close:hover,
.active-filter-badge .map-filter-remove:hover {
  opacity: 1;
  background: none !important;
  transform: none;
}

/* Autocomplete Item Styles */
.autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.autocomplete-type {
  color: #888;
  font-size: 0.9em;
}

/* Results Header Styles */
.results-header {
  font-size: 1.2rem;
  color: #000;
  font-weight: 600;
}

.results-title {
  font-size: 1.2rem;
}

/* Map Container Styles */
.map-container {
  height: 75vh;
  width: 100%;
}

/* Map Tooltip Styles */
.map-tooltip {
  font-size: 12px;
  line-height: 1.3;
}

/* Footer Section Title Styles */
.footer-section-title {
  color: #111;
}

/* Sekcja kolumn nad footerem: pełna szerokość (w-100) */
.footer-columns-section {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Szablon strony „Na całą szerokość” */
.w100 {
  width: 100%;
  max-width: 100%;
}

body.page-template-template-full-width-php {
  overflow-x: clip;
}

/* Full-bleed footer background (żółty na całą szerokość) */
.footer-section {
  position: relative;
  z-index: 1;
  border-radius: 0 !important;
  overflow: visible;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.footer-section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: #ffcb05; /* dziedziczony kolor tła z footer.php */
  z-index: -1;
}

/* Navbar Logo Styles */
.navbar-logo {
  height: 38px;
  width: auto;
  margin-right: 10px;
  vertical-align: middle;
  display: inline-block;
}

/* Favorite Button Wrapper Styles */
.favorite-btn-wrapper {
  z-index: 10;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Offer Location Styles */
.offer-location {
  font-size: 0.9em;
  color: #666;
  margin-top: 2px;
}

/* Location Input Styles */
.location-input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%23999' viewBox='0 0 16 16'><path d='M8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10zm0-7a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 1rem 1rem;
  padding-right: 35px;
}

/* Gwarancje Section Styles */
.gwarancje-content {
  max-width: 500px;
}

.gwarancje-number {
  line-height: 0.9;
}

.gwarancje-main-title {
  font-size: 2.5rem;
  color: #111;
}

.gwarancje-description {
  font-size: 1.25rem;
  color: #222;
  font-weight: 400;
}

.gwarancje-card-item {
  min-width: 220px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.gwarancje-card-title {
  font-size: 1.4rem;
  color: #fff;
}

/* Gwarancje – wersja mobilna */
@media (max-width: 991px) {
  .gwarancje-section {
    padding: 3rem 0;
  }

  .gwarancje-section .gwarancje-number.big-number {
    font-size: 6rem;
    line-height: 0.95;
  }

  .gwarancje-content {
    max-width: 100%;
    margin-bottom: 2rem !important;
  }

  .gwarancje-section .gwarancje-main-title {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .gwarancje-section .gwarancje-description {
    font-size: 1rem;
    margin-top: 1rem !important;
  }

  .gwarancje-cards {
    width: 100%;
    gap: 1rem !important;
  }

  .gwarancje-card-item {
    min-width: unset;
    width: 100%;
    min-height: 120px;
    padding: 1.5rem 1.25rem !important;
    justify-content: center;
    align-items: center;
  }

  .gwarancje-card-title {
    font-size: 1.15rem;
    margin: 0;
  }
}

@media (max-width: 576px) {
  .gwarancje-section {
    padding: 2rem 0;
  }

  .gwarancje-section .gwarancje-number.big-number {
    font-size: 4.5rem;
  }

  .gwarancje-section .gwarancje-main-title {
    font-size: 1.5rem;
  }

  .gwarancje-section .gwarancje-description {
    font-size: 0.95rem;
  }

  .gwarancje-card-item {
    min-height: 100px;
    padding: 1.25rem 1rem !important;
  }

  .gwarancje-card-title {
    font-size: 1.05rem;
  }
}

/* Blog Card Background Styles */
.blog-card-bg {
  background-image: url("img/blog-temp.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Footer Logo Styles */
.footer-logo {
  height: 38px;
  width: auto;
}

/* House Icon Styles */
.house-icon {
  height: 70px;
  width: auto;
}

/* CTA Section Styles */
.cta-title {
  color: #111;
}

.cta-description {
  font-size: 1.25rem;
  color: #222;
  font-weight: 400;
}

.cta-button {
  font-size: 1.2rem;
  border-radius: 2rem;
}

/* Autocomplete Label Styles */
.autocomplete-label {
  display: flex;
  align-items: center;
}

/* Offer Page Styles */
.offer-main-title {
  font-size: 2.1rem;
}

.offer-symbol {
  font-size: 1.1rem;
}

/* Nagłówek oferty: numer w badge obok tytułu */
.offer-header .offer-number-badge,
.offer-number-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35em 0.75em;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.offer-header-price-block {
  padding-bottom: 1.35rem;
}

.offer-header .offer-price-label {
  letter-spacing: 0.06em;
  font-size: 0.7rem;
}

.offer-header .offer-price-per-m2 {
  display: block;
}

.offer-price {
  color: #d60000;
  font-size: 2rem;
}

.gallery-main-image {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 420px;
  min-width: 0;
  cursor: pointer;
}

/* Slider głównego zdjęcia */
.gallery-main-swiper {
  position: relative;
  height: 420px;
  min-height: 420px;
}

.gallery-main-slide {
  height: 420px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.gallery-main-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-main-swiper .swiper-button-next,
.gallery-main-swiper .swiper-button-prev {
  color: white;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin-top: 0 !important;
  position: absolute !important;
  bottom: auto !important;
}

.gallery-main-swiper .swiper-button-next {
  right: 10px !important;
}

.gallery-main-swiper .swiper-button-prev {
  left: 10px !important;
}

.gallery-main-swiper .swiper-button-next:hover,
.gallery-main-swiper .swiper-button-prev:hover {
  background: rgba(0, 0, 0, 0.7);
}

.gallery-main-swiper .swiper-button-next::after,
.gallery-main-swiper .swiper-button-prev::after {
  font-size: 16px;
  font-weight: bold;
}

.gallery-badge-count {
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 30px;
  border-radius: 20px;
  font-size: 2.5rem;
  font-weight: 100 !important;
  text-align: center;
  transition: all 0.3s ease;
}

.gallery-badge-count:hover {
  background-color: rgba(0, 0, 0, 0.9);
  transform: scale(1.05);
}

.gallery-badge-count .small {
  font-size: 0.8rem;
  font-weight: 100;
}

.gallery-thumbnails {
  height: 420px;
}

.gallery-thumbnail {
  background-size: cover;
  background-position: center;
  min-height: 0;
  min-width: 0;
  cursor: pointer;
  border: 1px solid #eee;
}

.offer-description-title {
  font-size: 1.4rem;
}

.video-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 100;
  position: relative;
}

.offer-map {
  height: 380px;
  width: 100%;
}

.sidebar-sticky {
  top: 120px;
}

/* Mobile styles for sidebar */
@media (max-width: 991.98px) {
  .sidebar-sticky {
    position: relative !important;
    top: 0 !important;
  }

  .sidebar-box {
    margin-bottom: 1.5rem;
  }
}

.sidebar-title {
  font-size: 1.6rem;
}

.agent-photo {
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
  border-radius: 15px;
}

.agent-email {
  text-decoration: none;
}

.agent-phone {
  text-decoration: none;
}

.call-button {
  background: #ffcb05;
  color: #111;
}

.credit-button {
  background: #ffcb05;
  color: #111;
}

.similar-offers-header {
  font-size: 1.2rem;
  color: #000;
  font-weight: 600;
}

.similar-offers-title {
  font-size: 1.2rem;
}

.similar-offers-map {
  height: 70vh;
  width: 100%;
}

/* UI Autocomplete Styles */
.ui-autocomplete {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 0.5rem 0;
  font-family: inherit;
  font-size: 1rem;
  z-index: 10000 !important;
}

.ui-menu-item {
  padding: 0;
}

.ui-menu-item-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  color: #222;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 8px;
  gap: 1rem;
}

.ui-menu-item-wrapper.ui-state-active,
.ui-menu-item-wrapper:hover {
  background: #ccc;
  color: #111;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.ui-autocomplete span {
  color: #888;
  font-size: 0.95em;
  margin-left: 0.5em;
}

.ui-autocomplete .autocomplete-badge {
  background: #ffcb05;
  color: #000;
  border-radius: 16px;
  padding: 0.2em 0.9em;
  font-size: 0.8em;
  font-weight: 700;
  margin-left: 1em;
  min-width: 2.5em;
  text-align: center;
  display: inline-block;
}

.ui-autocomplete .autocomplete-checkbox {
  margin-right: 0.7em;
  accent-color: #22c58b;
}

/* Agent Page Styles */
.agent-hero .agent-name {
  font-size: 2.5rem;
  font-weight: 700;
}

.contact-item i {
  font-size: 1.2rem;
}

.action-buttons .btn {
  min-width: 200px;
}

.rating-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.rating-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffcb05;
}

.stars {
  color: #ffcb05;
}

.review-card {
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.review-card:hover {
  transform: translateY(-5px);
}

.offers-filters .form-select {
  min-width: 150px;
}

.offer-card {
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.offer-card:hover {
  transform: translateY(-5px);
}

.offer-badges .badge {
  margin-right: 5px;
  margin-bottom: 5px;
}

.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 5px;
}

.rating-input input[type="radio"] {
  display: none;
}

.rating-input label {
  font-size: 1.5rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.3s ease;
}

.rating-input input[type="radio"]:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
  color: #ffcb05;
}

.stat-item h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .agent-hero .agent-name {
    font-size: 2rem;
  }

  .action-buttons .btn {
    min-width: auto;
    width: 100%;
    margin-bottom: 10px;
  }

  .offers-filters .form-select {
    min-width: auto;
    width: 100%;
    margin-bottom: 10px;
  }
}
@media (max-width: 991px) {
  .offers-swiper .swiper-slide {
    width: calc(50% - 20px);
  }
  .island-menu .nav-link {
    padding: 14px;
  }

  /* Responsywność dla przycisku Zgłoś nieruchomość */
  .btn-report-property {
    font-size: 12px;
    padding: 8px 16px;
  }

  .btn-report-property i {
    display: none;
  }
}

@media (max-width: 767px) {
  .btn-report-property {
    font-size: 11px;
    padding: 6px 12px;
  }

  .btn-report-property span {
    display: none;
  }

  .btn-report-property::after {
    content: "+";
    font-weight: bold;
  }

  /* Dodatkowe style dla bardzo małych ekranów */
  .contact-box {
    display: none;
  }
}

@media (max-width: 576px) {
  .offers-swiper .swiper-slide {
    width: calc(100% - 20px);
  }
}

.search-box-ss {
  background: #f5f5f5;
  border-radius: 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  border: 1px solid #ffcb05;
  padding: 32px 32px 40px 32px;
  position: relative;
  margin-top: 150px;
  margin-bottom: 32px;
  min-width: 320px;
  padding: 25px;
}
.btn-search-ss {
  min-width: 500px;
  padding: 10px;
}

.search-box-ss-header {
  top: -32px;
  right: 0;
  background: #ffcb05;
  color: #111;
  font-size: 1.3rem;
  padding: 16px 40px 16px 32px;
  border-radius: 0 0 32px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  z-index: 2;
  letter-spacing: 0.5px;
}

.search-box-ss-form .form-label {
  color: #000 !important;
  font-size: 1rem;
  min-height: 20px;
}
.sidebar-box .form-control {
  background-color: #efefef;
}

.form-label div {
  color: #000 !important;
}

.search-ss-input,
.search-box-ss-form .form-control,
.search-box-ss-form .form-select {
  border: none;
  font-size: 1.15rem;
  color: #222;
  padding: 0.5rem 0.9rem;
  margin-bottom: 0;
  font-weight: 300;
}

.search-box-ss-form .form-select {
  font-weight: 300;
}

.input-group-text {
  border: unset;
  font-size: 0.9rem;
  color: #222;
  background-color: #fff;
  box-shadow: 0;
}
.input-group {
  border-radius: 15px !important;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

/* Clearable inputs/selects (X przy końcu pola) */
.clearable-wrapper {
  position: relative;
}
/* Lokalizacja – grid: tekst + badge + przycisk czyszczenia w jednej linii */
.location-clearable-wrapper.location-field-shell {
  display: block;
  width: 100%;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  overflow: visible;
}
.location-clearable-wrapper {
  position: relative;
  isolation: isolate;
}
.location-clearable-wrapper .location-field-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
.location-clearable-wrapper .location-field-inner > #txtLocation.location-input {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  border: 1px solid #dee2e6;
  background-color: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%23adb5bd' viewBox='0 0 16 16'><path d='M8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10zm0-7a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem 1rem;
  padding-right: 2.5rem;
  text-overflow: ellipsis;
  border-radius: 10px !important;
  box-shadow: none;
}
.location-clearable-wrapper.has-location-value .location-field-inner > #txtLocation.location-input,
.location-clearable-wrapper.has-location-type .location-field-inner > #txtLocation.location-input {
  background-image: none;
}
.location-clearable-wrapper.has-location-value:not(.has-location-type) .location-field-inner > #txtLocation.location-input {
  padding-right: 2.85rem;
}
.location-clearable-wrapper.has-location-type:not(.has-location-value) .location-field-inner > #txtLocation.location-input {
  padding-right: 7.25rem;
}
.location-clearable-wrapper.has-location-type.has-location-value .location-field-inner > #txtLocation.location-input {
  padding-right: 9.25rem;
}
.location-clearable-wrapper .location-field-meta {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-right: 0.45rem;
  max-width: min(58%, 12.5rem);
  z-index: 2;
  pointer-events: none;
}
.location-clearable-wrapper .location-type-badge.location-type-text {
  display: none;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 8.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5c6470;
  background: linear-gradient(180deg, #f8f9fb 0%, #eef1f4 100%);
  border: 1px solid #dde2e8;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  line-height: 1.25;
  pointer-events: none;
  position: static !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  height: auto !important;
}
.location-clearable-wrapper .location-type-badge.location-type-text:not([hidden]),
.location-clearable-wrapper.has-location-type .location-type-badge.location-type-text:not([hidden]) {
  display: inline-block;
}
.location-clearable-wrapper .location-clear-btn {
  display: none;
  pointer-events: auto;
  flex-shrink: 0;
  width: 1.625rem;
  height: 1.625rem;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 50%;
  background: #eef0f3;
  color: #5c6470;
  font-size: 0.7rem;
  line-height: 1;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.location-clearable-wrapper.has-location-value .location-clear-btn {
  display: inline-flex;
}
.location-clearable-wrapper .location-clear-btn:hover {
  color: #1a1a1a;
  background: #e2e6eb;
}
.location-clearable-wrapper .location-clear-btn:active {
  transform: scale(0.94);
}
#offer-list-search-form .location-clearable-wrapper .location-type-text.unit-text {
  position: static !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  height: auto !important;
  z-index: auto;
}
.clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: #999;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
  line-height: 1;
  display: none;
}
.clear-btn:hover {
  color: #000;
  background: #eee;
}
.search-box-ss-form .row > .col-auto {
  padding-left: 0;
  padding-right: 0;
  color: #000;
}
.offer-header {
  margin-top: 130px;
  margin-bottom: 20px;
}
.offer-page-section {
  padding-left: 0;
  padding-right: 0;
}
.offer-header h1 {
  color: #111;
}
h1 {
  color: #111;
}
.badge-color-custome {
  background-color: #ffcb05 !important;
  color: #111 !important;
}
.post-categories a {
  background-color: #ffcb05 !important;
  color: #111 !important;
}
.bg-white {
  color: #000;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}
.sidebar-box {
  padding: 40px;
  margin-bottom: 20px;
}
.search-ss-btn {
  background: #ffcb05 !important;
  color: #111 !important;
  border-radius: 20px !important;
  font-size: 1.25rem !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  border: none;
  transition:
    background 0.2s,
    color 0.2s;
}
.btn {
  border-radius: 20px;
  border: 0;
  padding: 10px 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}
.gallery-image-text-count {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: #00000086;
  color: #fff;
  padding: 40px;
  border-radius: 20px;
  font-size: 3rem;
  font-weight: 100 !important;
  z-index: 9;
  text-align: center;
}
.gallery-image-text-count .small {
  font-size: 0.8rem;
  font-weight: 100;
}

.nav-arrow {
  z-index: 1050;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.nav-arrow:hover {
  opacity: 1;
}

/* Gallery Grid Styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 1rem;
  max-width: 1600px;
  margin: 0 auto;
}

.gallery-item {
  cursor: pointer;
  transition: transform 0.3s ease;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 8px;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: box-shadow 0.3s ease;
}

.gallery-item:hover img {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Style dla galerii w modalach - większe zdjęcia */
#galleryModal .gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2rem;
  max-width: none;
}

#galleryModal .gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0f0;
  min-height: 300px;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

#galleryModal .gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

#galleryModal .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

@media (max-width: 1200px) {
  #galleryModal .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .gallery-item {
    aspect-ratio: auto;
  }

  #galleryModal .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem !important;
    padding: 1rem;
    overflow-x: hidden;
  }

  #galleryModal .gallery-item {
    min-height: 170px;
  }
}

.form-label-report-property {
  font-size: 30px;
  font-weight: 700;
  margin-top: 60px;
}

.form-control {
  border-radius: 20px;
  border: 0;
  padding: 10px 20px;
  background-color: #fff;
  font-weight: 100;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  border: 0px !important;
}
.search-ss-btn:hover {
  background: #ffe066 !important;
  color: #111 !important;
}

@media (max-width: 991px) {
  .search-box-ss {
    padding: 64px 10px 32px 10px;
  }
  .search-box-ss-header {
    font-size: 1.1rem;
    padding: 12px 24px 12px 18px;
    border-radius: 0 0 18px 0;
  }
}

@media (max-width: 767px) {
  .search-box-ss {
    padding: 18px 2vw 18px 2vw;
  }
  .form-label-empty {
    display: none;
  }
  .btn-search-ss {
    min-width: 100%;
  }
  .search-box-ss-header {
    font-size: 1rem;
    padding: 8px 12px 8px 10px;
    border-radius: 0 0 12px 0;
  }
}

.form-check-label {
  color: #000;
}

/* Style dla strony agenta */
.agent-hero {
  color: #333;
  position: relative;
  overflow: hidden;
}

.agent-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.agent-hero .container {
  position: relative;
  z-index: 2;
}

.agent-hero .agent-name {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.agent-hero .agent-title .badge {
  font-size: 1rem;
  padding: 0.5rem 1rem;
}

.contact-item i {
  font-size: 1.2rem;
  width: auto;
  text-align: center;
}

.action-buttons .btn {
  min-width: 200px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.action-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.rating-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.rating-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffcb05;
  line-height: 1;
}

.stars {
  color: #ffcb05;
  font-size: 1.2rem;
}

.review-card {
  border: none;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-radius: 15px;
  overflow: hidden;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.review-card .card-body {
  padding: 1.5rem;
}

.review-card .card-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.review-card .stars {
  font-size: 0.9rem;
}

.offers-filters {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 15px;
  margin-bottom: 2rem;
}

.offers-filters .form-select {
  min-width: 150px;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.offers-filters .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.offer-card {
  border: none;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-radius: 15px;
  overflow: hidden;
  height: 100%;
}

.offer-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.offer-image {
  position: relative;
  overflow: hidden;
}

.offer-image img {
  transition: transform 0.3s ease;
}

.offer-card:hover .offer-image img {
  transform: scale(1.05);
}

.offer-badges {
  z-index: 2;
}

.offer-badges .badge {
  margin-right: 5px;
  margin-bottom: 5px;
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
}

.offer-sticker-badges .badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.offer-details {
  border-top: 1px solid #e9ecef;
  padding-top: 1rem;
  margin-top: 1rem;
}

.offer-details strong {
  color: #333;
  font-weight: 600;
}

.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 5px;
}

.rating-input input[type="radio"] {
  display: none;
}

.rating-input label {
  font-size: 1.5rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.3s ease;
}

.rating-input input[type="radio"]:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
  color: #ffcb05;
}

.stat-item {
  text-align: center;
  padding: 1rem;
}

.stat-item h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.stat-item p {
  color: #6c757d;
  margin-bottom: 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.offers-count .badge {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

/* Responsywność dla strony agenta */
@media (max-width: 768px) {
  .agent-hero .agent-name {
    font-size: 2rem;
  }

  .action-buttons .btn {
    min-width: auto;
    width: 100%;
    margin-bottom: 10px;
  }

  .offers-filters .form-select {
    min-width: auto;
    width: 100%;
    margin-bottom: 10px;
  }

  .section-title {
    font-size: 2rem;
  }

  .rating-number {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .agent-hero {
    padding: 2rem 0;
  }

  .agent-hero .agent-name {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .review-card .card-body {
    padding: 1rem;
  }

  .offers-filters {
    padding: 1rem;
  }
}

/* Style dla linku agenta */
.agent-photo-link {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.agent-photo-link:hover {
  transform: scale(1.1) !important;
  border-color: #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.agent-photo-link:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Style dla tabelki parametrów nieruchomości */
.property-params-table {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 3rem;
  margin-top: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.property-params-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.property-param-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
  width: 50%;
  box-sizing: border-box;
}

.property-param-item:nth-child(odd) {
  padding-right: 1rem;
}

.property-param-item:nth-child(even) {
  padding-left: 1rem;
  border-left: 1px solid #f0f0f0;
}

.property-param-item:hover {
  background-color: #f8f9fa;
  border-radius: 8px;
}

.property-param-label {
  color: #999;
  font-size: 0.95rem;
  font-weight: 400;
  flex: 1;
}

.property-param-value {
  color: #333;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
  flex: 0 1 auto;
  max-width: 65%;
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 768px) {
  .property-params-table {
    padding: 1rem;
  }

  .property-param-item {
    padding: 0.5rem 0;
    width: 100%;
  }

  .property-param-item:nth-child(odd),
  .property-param-item:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-left: none;
  }

  .property-param-label {
    font-size: 0.9rem;
  }

  .property-param-value {
    font-size: 0.9rem;
    max-width: 60%;
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

/* Style dla kafelka z filmem w galerii ofert */
.gallery-thumbnails .video-thumbnail {
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden; /* Ukryj nadmiar treści */
  position: relative; /* Dla pozycjonowania elementów wewnętrznych */
  aspect-ratio: 16/9; /* Wymusza proporcje 16:9 */
  max-height: 200px; /* Maksymalna wysokość */
}

/* Style dla kafelka z filmem w sekcji video na stronie głównej */
.video-section .video-thumbnail {
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden; /* Ukryj nadmiar treści */
  position: relative; /* Dla pozycjonowania elementów wewnętrznych */
  aspect-ratio: 9/16; /* Instagram Reels format dla strony głównej */
  max-height: none; /* Bez ograniczenia wysokości na stronie głównej */
  border-radius: 20px 20px 0 0;
}

/* Hover effect dla wszystkich video-thumbnail */
.video-thumbnail:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Style dla ratio w galerii ofert */
.gallery-thumbnails .video-thumbnail .ratio {
  height: 100%;
  width: 100%;
}

/* Style dla ratio w sekcji video na stronie głównej */
.video-section .video-thumbnail .ratio {
  height: 100%;
  width: 100%;
}

/* Style dla iframe w galerii ofert */
.gallery-thumbnails .video-thumbnail iframe {
  object-fit: cover; /* YouTube jako cover */
  width: 100%;
  height: 100%;
  border: none;
}

/* Style dla iframe w sekcji video na stronie głównej */
.video-section .video-thumbnail iframe {
  object-fit: cover; /* YouTube jako cover */
  width: 100%;
  height: 100%;
  border: none;
}

.video-overlay {
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-thumbnail:hover .video-overlay {
  opacity: 1;
}

.video-play-btn {
  width: 60px;
  height: 60px;
  font-size: 20px;
  transition: transform 0.3s ease;
}

.video-thumbnail:hover .video-play-btn {
  transform: scale(1.1);
}

/* Upewnij się, że galeria ma równą wysokość elementów */
.gallery-thumbnails {
  height: 100%;
  min-height: 400px; /* Minimalna wysokość dla galerii */
  display: flex;
  flex-direction: column;
}

/* Wrapper dla pierwszego rzędu - film + wirtualny spacer obok siebie */
.gallery-thumbnails-top-wrapper {
  display: flex;
  flex-direction: row;
  gap: 12px;
  height: 50%;
  min-height: 200px;
}

.gallery-thumbnails-top-wrapper .video-thumbnail,
.gallery-thumbnails-top-wrapper .virtual-tour-thumbnail {
  flex: 1;
  width: 50%;
  height: 100%;
  min-height: 200px;
}

@media (max-width: 991.98px) {
  .gallery-thumbnails-top-wrapper {
    flex-direction: column;
    height: auto;
  }

  .gallery-thumbnails-top-wrapper .video-thumbnail,
  .gallery-thumbnails-top-wrapper .virtual-tour-thumbnail {
    width: 100%;
    flex: 1 1 100%;
  }
}

.gallery-thumbnails .gallery-thumbnail,
.gallery-thumbnails .video-thumbnail {
  flex: 1;
  height: 50%; /* Równa wysokość - każdy element zajmuje połowę */
  min-height: 200px; /* Minimalna wysokość dla każdego elementu */
  overflow: hidden; /* Ukryj nadmiar treści */
  position: relative; /* Dla pozycjonowania elementów wewnętrznych */
}

/* Style dla wirtualnego spaceru */
.virtual-tour-thumbnail {
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
}

.virtual-tour-thumbnail:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.virtual-tour-thumbnail .ratio {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 0 !important;
}

.virtual-tour-thumbnail .ratio::before {
  content: none !important;
  padding-top: 0 !important;
}

.virtual-tour-thumbnail iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
  min-height: 100%;
  min-width: 100%;
  pointer-events: none; /* Pozwól na kliknięcia przez iframe do kontenera */
}

.virtual-tour-overlay {
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.virtual-tour-thumbnail:hover .virtual-tour-overlay {
  opacity: 1;
}

.gallery-thumbnails .video-thumbnail iframe {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Dopasuj treść do kontenera bez zniekształceń */
  border: none;
  position: absolute;
  top: 0;
  left: 0;
}

.gallery-thumbnails .video-thumbnail .ratio {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.gallery-thumbnails .gallery-thumbnail {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Wyrównaj główne zdjęcie do wysokości prawej kolumny */
.gallery-main-image {
  height: 100% !important;
  min-height: 400px; /* Taka sama minimalna wysokość jak galeria */
}

/* Upewnij się, że kontener galerii ma równą wysokość */
.gallery-grid {
  display: flex;
  align-items: stretch; /* Rozciągnij elementy do pełnej wysokości */
}

.gallery-grid .col-lg-7,
.gallery-grid .col-lg-5 {
  display: flex;
  flex-direction: column;
}

.gallery-thumbnail {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.gallery-thumbnail:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Style dla kafelka z rzutem */
.gallery-thumbnail[title*="Rzut"] {
  position: relative;
}

.gallery-thumbnail[title*="Rzut"]::after {
  content: "RZUT";
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  z-index: 2;
}

/* Responsywność dla kafelka z filmem */
@media (max-width: 768px) {
  .video-play-btn {
    width: 50px;
    height: 50px;
    font-size: 16px;
  }

  .gallery-thumbnails {
    min-height: 300px;
  }

  .gallery-thumbnails .gallery-thumbnail,
  .gallery-thumbnails .video-thumbnail {
    min-height: 150px; /* Równa wysokość na mobile */
  }

  .gallery-main-image {
    min-height: 300px; /* Responsywna wysokość na mobile */
  }

  .gallery-main-swiper {
    height: 300px;
    min-height: 300px;
  }

  .gallery-main-slide {
    height: 300px;
  }

  .gallery-badge-count {
    padding: 20px !important;
    font-size: 2rem !important;
  }

  .gallery-badge-count .small {
    font-size: 0.7rem !important;
  }

  .gallery-counter {
    padding: 6px 12px !important;
    font-size: 0.875rem !important;
  }

  /* Sekcja .section-subtitle – wersja mobilna */
  .section-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    min-height: auto;
    flex-wrap: wrap;
  }

  .section-subtitle::before {
    width: 44px;
    height: 34px;
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
    border-bottom-right-radius: 8px;
    flex-shrink: 0;
  }

  .section-subtitle-text {
    margin-left: 48px;
    line-height: 1.3;
    hyphens: none;
    word-break: normal;
    overflow-wrap: normal;
  }

  .room-title {
    font-size: 1rem;
  }

  .gallery-thumbnail[title*="Rzut"]::after {
    font-size: 0.7rem;
    padding: 3px 6px;
  }

  /* Na mobile galeria może być w kolumnie */
  .gallery-grid {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .section-subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
  }

  .section-subtitle::before {
    width: 36px;
    height: 28px;
    border-bottom-right-radius: 6px;
  }

  .section-subtitle-text {
    margin-left: 40px;
  }
}

/* Style dla tytułów sekcji */
.section-subtitle {
  font-size: 2.8rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 0.2em;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
}

.section-subtitle::before {
  content: "";
  display: block;
  width: 65px;
  height: 50px;
  background: #ffcb05;
  clip-path: polygon(10% 0%, 67.85% 0.91%, 99.29% 96.37%, 39.29% 96.37%);
  border-bottom-right-radius: 12px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
}

.section-subtitle-text {
  margin-left: 75px;
  position: relative;
  z-index: 2;
  hyphens: none;
  word-break: normal;
}

/* Nadpisanie .section-subtitle na mobile – po regułach bazowych, żeby wygrało w kaskadzie */
@media (max-width: 991.98px) {
  .section-subtitle {
    font-size: 1.5rem !important;
    font-weight: 700;
    margin-bottom: 0.6rem;
  }
}
@media (max-width: 768px) {
  .section-subtitle {
    font-size: 1.5rem !important;
    margin-bottom: 0.75rem;
  }
}
@media (max-width: 576px) {
  .section-subtitle {
    font-size: 1.5rem !important;
    margin-bottom: 0.6rem;
  }
}

/* Style dla tytułów pomieszczeń */
.room-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
}

/* Style dla pomieszczeń w dwóch kolumnach */
.rooms-grid .property-params-table {
  height: 100%;
  margin-bottom: 0;
}

.rooms-grid .property-params-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rooms-grid .property-param-item {
  width: 100%;
  padding-right: 0;
  padding-left: 0;
  border-left: none;
}

/* Video Section Styles */
.video-section {
  background: #f8f9fa;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 0.5rem;
}

.video-slider-container {
  position: relative;
  padding: 0 50px;
  max-width: 100%;
  box-sizing: border-box;
}

/* Widoczny overflow rozjeżdża stronę w poziomie na mobile (Swiper + loop). */
.video-swiper {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.video-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Usunięto - zastąpione przez .video-section .video-thumbnail */

.video-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-thumbnail:hover .video-placeholder {
  transform: scale(1.05);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-thumbnail:hover .video-overlay {
  opacity: 1;
}

.play-button {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #333;
  transition: transform 0.3s ease;
}

.video-thumbnail:hover .play-button {
  transform: scale(1.1);
}

.youtube-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 20px 20px 0 0;
}

.video-loaded {
  cursor: default;
}

.video-loaded .video-overlay {
  display: none;
}

.video-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.video-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #ffcb05;
  color: #000;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.video-info {
  margin-top: 40px;
  margin-bottom: 20px;
}

.video-info h4 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.2;
}

.video-info p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 4px;
  line-height: 1.3;
}

.agent-info {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.agent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
}

.agent-details {
  flex: 1;
}

.agent-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.agent-branch {
  font-size: 0.8rem;
  color: #666;
  margin: 0;
}

.video-btn {
  background: white;
  border: 2px solid #333;
  color: #333;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  margin: 20px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.video-btn:hover {
  background: #333;
  color: white;
  transform: translateY(-2px);
}

.video-nav-next,
.video-nav-prev {
  color: #000;
  background: #ffcb05;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  border: 1px solid #e0b700;
  transition: all 0.3s ease;
}

.video-nav-next:hover,
.video-nav-prev:hover {
  background: #f2b800;
  color: #111;
  transform: scale(1.1);
}

.video-nav-next:after,
.video-nav-prev:after {
  font-size: 16px;
  font-weight: bold;
}

/* Responsive - video-section mobile (poniżej 768 = 1 slajd w Swiper — unikamy konfliktu z breakpointem 768px) */
@media (max-width: 767.98px) {
  .video-section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
    overflow-x: hidden;
    max-width: 100%;
  }

  .video-section .container {
    max-width: 100%;
    overflow-x: hidden;
  }

  .video-section .featured-section {
    padding: 1rem 0 1.25rem;
    margin-bottom: 1.25rem !important;
    flex-wrap: wrap;
    max-width: 100%;
  }

  .video-section .featured-title {
    font-size: 1.35rem;
  }

  .video-section .featured-subtitle {
    font-size: 0.95rem;
  }

  .video-section .featured-label > .ms-4 {
    margin-left: 70px !important;
  }

  .video-section .featured-bg {
    width: 60px;
    height: 48px;
  }

  .video-slider-container {
    padding: 0 40px;
    margin-left: auto;
    margin-right: auto;
  }

  .video-section .video-swiper .swiper-slide {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  .section-title {
    font-size: 2rem;
  }

  /* Duży kafelek na mobile – pełna szerokość, wysokość z 9/16 */
  .video-section .video-thumbnail {
    aspect-ratio: 9/16;
    min-height: 380px;
    width: 100%;
    border-radius: 16px 16px 0 0;
  }

  .video-section .video-card {
    border-radius: 16px;
    width: 100%; /* duży kafelek na pełną szerokość */
    min-width: 0;
  }

  .video-section .play-button {
    width: 64px;
    height: 64px;
    font-size: 22px;
  }

  .video-content {
    padding: 15px;
  }

  .video-info h4 {
    font-size: 1.2rem;
  }

  .video-btn {
    margin: 12px;
    padding: 10px 18px;
    font-size: 0.8rem;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
  }

  .video-nav-next,
  .video-nav-prev {
    width: 32px;
    height: 32px;
  }

  .video-nav-next:after,
  .video-nav-prev:after {
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  .video-section {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    overflow-x: hidden;
  }

  .video-section .featured-section {
    padding: 0.75rem 0 1rem;
    margin-bottom: 1rem !important;
    max-width: 100%;
  }

  .video-section .featured-title {
    font-size: 1.2rem;
  }

  .video-section .featured-subtitle {
    font-size: 0.85rem;
  }

  .video-section .featured-label > .ms-4 {
    margin-left: 56px !important;
  }

  .video-section .featured-bg {
    width: 50px;
    height: 40px;
  }

  .video-slider-container {
    padding: 0 36px;
  }

  /* Jeszcze większy kafelek na małych ekranach – prawie pełna szerokość */
  .video-section .video-card {
    max-width: 100%;
    min-width: 0;
  }

  .video-section .video-thumbnail {
    min-height: 340px;
  }

  .video-section .play-button {
    width: 56px;
    height: 56px;
    font-size: 18px;
  }

  .video-btn {
    margin: 10px;
    padding: 8px 14px;
    font-size: 0.75rem;
  }

  .video-nav-next,
  .video-nav-prev {
    width: 28px;
    height: 28px;
  }

  .video-nav-next:after,
  .video-nav-prev:after {
    font-size: 10px;
  }
}

/* Offer info styling */
.offer-info {
  margin-top: 0.5rem;
}

.offer-price-large {
  font-size: 1.5rem;
  font-weight: 700;
  color: #d32f2f;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.offer-price-square {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.3;
}

.offer-specs {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: flex-start;
}

.offer-spec {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.4;
}

@media (max-width: 767.98px) {
  .offer-price-large {
    font-size: 1.25rem;
  }
}

/* =========================================
   NOWOCZESNA WYSZUKIWARKA - OtoDom style
   ========================================= */

/* Główny kontener wyszukiwarki */
.modern-search-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 32px;
  margin-top: 100px;
  border: 1px solid #ffcb05;
}

/* Linie wyszukiwarki */
.search-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.search-field {
  flex: 1;
  position: relative;
}

/* Select i input - jednolite style */
.modern-select,
.modern-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  color: #333333;
  background: #ffffff;
  transition: all 0.2s ease;
}

.modern-select:focus,
.modern-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Placeholder */
.modern-input::placeholder {
  color: #999999;
}

.label-rynek {
  font-weight: 200;
  margin-bottom: 4px;
  font-size: 0.75rem;
  color: #666666;
  margin-right: 20px;
}

/* Pole lokalizacji z ikoną */
.location-field-wrapper {
  position: relative;
}

.location-input-container {
  position: relative;
}

.location-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999999;
  pointer-events: none;
}

.location-input {
  padding-right: 40px;
}

/* Linia 1 - Typ, Przedmiot, Lokalizacja */
.search-row-1 .search-field {
  min-width: 0;
}

/* Linia 2 - Ranges */
.range-field {
  display: flex;
  flex-direction: column;
}

.range-label {
  font-size: 13px;
  font-weight: 500;
  color: #666666;
  margin-bottom: 8px;
}

.range-inputs {
  display: flex;
  gap: 8px;
}

.input-with-unit {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-unit input {
  border-radius: 8px;
}

.unit-text {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #666666;
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  line-height: 1;
}

/* Unit-text dla typu lokalizacji - wewnątrz pola (osobne reguły w .location-clearable-wrapper) */
.location-type-text {
  z-index: 2;
  color: #666666;
  font-size: 0.72rem;
}

/* Legacy: padding gdy brak wrappera location-clearable-wrapper */
#txtLocation[data-location-type]:not([data-location-type=""]):not(.location-input),
input.location-input[data-location-type]:not([data-location-type=""]):not(#txtLocation) {
  padding-right: 80px !important;
}

.advanced-dropdown-input {
  padding-right: 40px !important;
}

/* Style dla klikalnych buttonów funkcji (Informacje dodatkowe) */
.feature-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid #d0d0d0;
  background: #fff;
  color: #333;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  margin: 0;
  min-height: 38px;
}

.feature-toggle-btn:hover {
  border-color: #ffcb05;
  background: #fffef0;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(255, 203, 5, 0.2);
}

.feature-toggle-btn.active {
  background: #fff9d6;
  border-color: #ffcb05;
  color: #333;
  border-width: 2px;
}

.feature-toggle-btn.active:hover {
  background: #fff4b3;
}

.feature-toggle-btn.active i {
  color: #ffa500;
  font-size: 0.85rem;
}

.feature-toggle-btn input[type="hidden"] {
  display: none;
}

.feature-toggle-btn span {
  display: inline-block;
}

/* Przyciski pokoi */
.rooms-field {
  display: flex;
  flex-direction: column;
}

.rooms-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.room-btn {
  flex: 1;
  min-width: 50px;
  padding: 10px 16px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  border-radius: 8px;
  font-size: 15px;
  color: #333333;
  cursor: pointer;
  transition: all 0.2s ease;
}

.room-btn:hover {
  background: #f5f5f5;
  border-color: #007bff;
}

.room-btn.active {
  background: #007bff;
  color: #ffffff;
  border-color: #007bff;
}

/* Linia 3 - Akcje */
.search-row-3 {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  justify-content: flex-end;
}

.action-btn {
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #666666;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-btn:hover {
  color: #007bff;
}

.more-filters-btn {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 16px;
}

.more-filters-btn:hover {
  background: #f5f5f5;
}

/* Główny przycisk Wyszukaj */
.search-button {
  flex: 1;
  padding: 14px 24px;
  background: #ffcb05;
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  max-width: 300px;
}

.search-button:hover {
  background: #ffd429;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Panel Więcej filtrów */
.more-filters-panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

.more-filters-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-label {
  font-size: 13px;
  font-weight: 500;
  color: #666666;
  margin-bottom: 8px;
}

/* Checkbox grupa dla rynku */
.checkbox-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #333333;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Autocomplete - nowoczesny styl */

/* Dopasowanie autosugestii (jQuery UI) do stylu nowego selecta */
.ui-autocomplete {
  position: absolute;
  inset: auto 0 auto 0; /* wyrównaj do szerokości rodzica */
  width: 100% !important; /* identyczna szerokość jak pole/krk-quarters-dropdown-list */
  margin-top: 6px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  background: #ffffff;
  padding: 6px 0;
  max-height: 360px;
  overflow-y: auto;
  z-index: 1050;
}

.ui-autocomplete .ui-menu-item {
  padding: 0;
}

.ui-autocomplete .ui-menu-item-wrapper {
  padding: 12px 16px; /* jak w select/room-btn */
  font-size: 15px;
  color: #222222;
  transition:
    background 0.15s ease,
    color 0.15s ease;
  border-radius: 8px;
}

.ui-autocomplete .ui-menu-item-wrapper:hover,
.ui-autocomplete .ui-state-active {
  background: #f7f7f7;
  border: none;
}

.ui-autocomplete .autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ui-autocomplete .autocomplete-type {
  color: #666666;
  font-size: 13px;
  font-weight: 500;
}

.ui-autocomplete .autocomplete-badge {
  background: #ffcb05;
  color: #000000;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 992px) {
  .search-row {
    flex-direction: column;
    gap: 12px;
  }

  .search-row-3 {
    flex-direction: column;
  }

  .search-button {
    width: 100%;
  }

  .rooms-buttons {
    gap: 6px;
  }

  .room-btn {
    min-width: 60px;
    padding: 10px 12px;
  }
}

@media (max-width: 768px) {
  .modern-search-box {
    padding: 16px;
  }

  .range-inputs {
    flex-direction: column;
  }

  .more-filters-content {
    grid-template-columns: 1fr;
  }
}

/* Dropdown dzielnic Krakowa (home + wyszukiwarka) */
.krk-quarters-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 9999 !important; /* bardzo wysoki z-index aby był ponad wszystkimi elementami */
  max-height: 360px;
  overflow: auto;
}

.krk-quarters-dropdown.krk-quarters-dropdown-list {
  border-radius: 10px;
}

.krk-quarters-list,
.krk-quarters-dropdown-list {
  /* alias, jeśli gdzieś użyjesz tej klasy */
  list-style: none;
  margin: 0;
  padding: 6px 0; /* spójny padding wewnętrzny listy */
  border-radius: 10px;
}

.krk-quarter-item {
  padding: 12px 16px; /* takie same jak nowy select */
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #222;
  font-size: 15px;
}

.krk-badge {
  background: #ffcb05;
  color: #000;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 8px;
}

/* Spinner loader dla dropdown */
.spinner-loader {
  width: 24px;
  height: 24px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #ffcb05;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-spinner-item {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  cursor: default;
}

.loading-spinner-item:hover {
  background-color: transparent;
}

.krk-quarter-item:hover,
.krk-quarter-item:focus {
  background: #f7f7f7;
}

/* Sekcje w dropdownie wyszukiwarki lokalizacji (miasto, dzielnica, ulica) */
.location-search-section {
  border-bottom: 1px solid #e5e5e5;
}

.location-search-section:last-child {
  border-bottom: none;
}

.location-search-section-title {
  padding: 10px 16px 6px 16px;
  font-weight: 700;
  font-size: 13px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f9f9f9;
  border-bottom: 1px solid #e5e5e5;
}

.location-search-item {
  padding-left: 24px; /* większe wcięcie dla elementów pod tytułem sekcji */
}

/* Dropdowny dla pól zaawansowanych */
.advanced-dropdown {
  z-index: 2001; /* wyżej niż inne dropdowny */
}

.advanced-dropdown-input {
  cursor: text;
}

.advanced-dropdown-input::placeholder {
  font-weight: 200 !important;
  opacity: 1;
  font-size: 14px;
}

.advanced-dropdown-input::-webkit-input-placeholder {
  font-weight: 200 !important;
  opacity: 1;
  font-size: 14px;
}

.advanced-dropdown-input::-moz-placeholder {
  font-weight: 200 !important;
  opacity: 1;
  font-size: 14px;
}

.advanced-dropdown-input:-ms-input-placeholder {
  font-weight: 200 !important;
  opacity: 1;
  font-size: 14px;
}

/* ============================================
   Wyszukiwarka na liście ofert - nowy układ
   ============================================ */

/* Przycisk wyszukiwania w jednym wierszu z polami */
#offer-list-search-form .search-btn {
  height: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

/* Etykiety nad polami w nowym układzie */
#offer-list-search-form .form-label.small {
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

/* Unit text - wyśrodkowanie w inputach na podstronie z listą ofert (bez typu lokalizacji) */
#offer-list-search-form .position-relative .unit-text:not(.location-type-text) {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #666666;
  font-size: 14px;
  pointer-events: none;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  line-height: 1;
}

/* Przycisk "Pokaż więcej" */
#show-more-btn {
  white-space: nowrap;
}

#show-more-btn i {
  transition: transform 0.3s ease;
}

/* Responsywność dla nowego układu */
@media (max-width: 991px) {
  #offer-list-search-form .row.g-2.mb-3.align-items-end > div {
    margin-bottom: 1rem;
  }

  /* Mobile - usuń margin-bottom */
  @media (max-width: 767.98px) {
    #offer-list-search-form .row.g-2.mb-3.align-items-end > div {
      margin-bottom: 0;
    }
  }

  /* Unit text - wyśrodkowanie w inputach na mobile */
  @media (max-width: 767.98px) {
    .position-relative .unit-text:not(.location-type-text) {
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 0.9rem;
      z-index: 5;
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;
    }

    .position-relative .advanced-dropdown-input {
      padding-right: 40px;
    }
  }

  #offer-list-search-form .col-md-1 {
    width: 100%;
    margin-top: 0.5rem;
  }

  #offer-list-search-form .search-btn {
    width: 100%;
  }
}

/* ============================================
   Mobile compact mode - wyszukiwarki
   ============================================ */
@media (max-width: 767.98px) {
  /* Home search */
  .search-box {
    padding: 0.9rem 0.8rem;
    border-radius: 18px;
    min-width: 0;
    max-width: 100%;
  }

  #home-search-form .row.g-2.mb-2 {
    --bs-gutter-x: 0.4rem;
    --bs-gutter-y: 0.4rem;
    margin-bottom: 0.45rem !important;
  }

  #home-search-form .form-label,
  #home-search-form .form-check-label,
  #home-search-form .label-rynek {
    font-size: 0.78rem;
    margin-bottom: 0.2rem !important;
    line-height: 1.2;
  }

  #home-search-form .form-control,
  #home-search-form .form-select {
    min-height: 36px;
    padding: 0.35rem 0.7rem;
    font-size: 0.9rem;
    border-radius: 14px;
  }

  #home-search-form .search-btn,
  #home-search-form .ghost-btn {
    font-size: 0.88rem;
    padding: 0.45rem 0.8rem;
    border-radius: 12px;
  }

  /* Offer list search */
  .offer-list-search-box {
    padding: 0.95rem 0.8rem;
    border-radius: 18px;
  }

  #offer-list-search-form .row {
    --bs-gutter-y: 0.35rem;
  }

  #offer-list-search-form .mb-3 {
    margin-bottom: 0.5rem !important;
  }

  .offer-list-search-section {
    margin-bottom: 0.5rem;
  }

  .offer-list-search-label,
  #offer-list-search-form .form-label {
    font-size: 0.76rem;
    margin-bottom: 0.15rem;
    line-height: 1.2;
  }

  #offer-list-search-form .form-control,
  #offer-list-search-form .form-select,
  #offer-list-search-form .advanced-dropdown-input {
    min-height: 36px;
    padding: 0.35rem 0.7rem;
    font-size: 0.9rem;
    border-radius: 12px;
  }

  #offer-list-search-form .advanced-dropdown-input {
    padding-right: 1.9rem;
  }

  #offer-list-search-form .position-relative .unit-text:not(.location-type-text) {
    right: 10px;
    font-size: 0.78rem;
  }

  .offer-list-search-actions {
    gap: 0.4rem;
  }

  .offer-list-search-row-actions {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
  }

  .offer-list-search-actions .btn,
  #offer-list-search-form .btn-link,
  #offer-list-search-form .ghost-btn {
    font-size: 0.84rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  /* Nagłówek wyników na liście ofert - mobilnie: czytelny, wyśrodkowany układ */
  #results-header > .container.d-flex.justify-content-between.align-items-center {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.35rem;
    margin-top: 0.35rem !important;
    margin-bottom: 0.45rem !important;
  }

  #results-header .results-header,
  #results-header .h2-motto {
    width: 100% !important;
    text-align: center;
  }

  #results-header .results-title {
    display: block;
    font-size: 0.92rem;
    line-height: 1.35;
  }

  #results-header .h2-motto > div {
    font-size: 0.92rem;
    line-height: 1.3;
    margin-top: 0.2rem;
  }

  #results-header .h2-motto > div .fw-bold {
    font-size: 1.02em;
  }

  #results-header .h2-motto .btn.btn-dark {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    margin-top: 0.4rem;
    border-radius: 12px;
    padding: 0.5rem 0.7rem;
    font-size: 0.92rem;
  }

  #results-header > .container > .d-flex.align-items-center.gap-3 {
    width: 100%;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.45rem !important;
  }

  #results-header > .container > .d-flex.align-items-center.gap-3 .view-toggle {
    flex: 0 0 auto;
    margin: 0;
    align-self: center;
  }

  #results-header > .container > .d-flex.align-items-center.gap-3 .view-toggle .btn {
    height: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }

  #results-header > .container > .d-flex.align-items-center.gap-3 .form-select {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0 !important;
    align-self: center;
    font-size: 0.86rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    height: 48px;
    min-height: 48px;
    line-height: 1.2;
  }
}

/* ============================================
   Offer header - mobile
   ============================================ */
@media (max-width: 767.98px) {
  /* Kontener */
  .offer-header {
    margin-top: 90px !important;
    margin-bottom: 0.75rem !important;
  }

  .offer-header > .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .offer-header .row {
    margin-bottom: 0 !important;
  }

  /* === BREADCRUMBS === */
  .offer-breadcrumb-mobile {
    margin-bottom: 0.5rem;
    overflow: hidden;
  }

  .offer-breadcrumb-mobile .breadcrumb {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0 !important;
    margin-bottom: 0 !important;
    gap: 0;
  }

  .offer-breadcrumb-mobile .breadcrumb::-webkit-scrollbar {
    display: none;
  }

  .offer-breadcrumb-mobile .breadcrumb-item {
    flex: 0 0 auto;
    font-size: 0.72rem;
    padding: 0;
    max-width: none;
    overflow: visible;
    white-space: nowrap;
  }

  .offer-breadcrumb-mobile .breadcrumb-item + .breadcrumb-item::before {
    display: inline-block !important;
    padding: 0 0.3rem;
    color: #bbb;
  }

  .offer-breadcrumb-mobile .breadcrumb-item a {
    color: #888 !important;
    text-decoration: none !important;
  }

  /* === TYTUŁ + SERCE ===
     Prosty flex: tytuł rośnie, serce stoi nieruchomo po prawej */
  .offer-header .offer-title-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 0.6rem !important;
    margin-bottom: 0.4rem !important;
  }

  /* Kolumna tytułu: zajmuje resztę, nie wychodzi poza */
  .offer-header .offer-title-stack {
    flex: 1 1 0% !important;
    min-width: 0 !important;
  }

  /* Wewnętrzny flex (h1 + badge): pionowy układ */
  .offer-header .offer-title-stack > .d-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.3rem !important;
    flex-wrap: nowrap !important;
  }

  .offer-header .offer-main-title {
    display: block !important;
    font-size: 1.45rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 100% !important;
    color: #111 !important;
  }

  .offer-header .offer-number-badge,
  .offer-number-badge {
    font-size: 0.62rem !important;
    padding: 0.25em 0.65em !important;
    align-self: flex-start !important;
    letter-spacing: 0.04em !important;
  }

  /* Przycisk serce: stały rozmiar, nie kurczy się */
  .offer-header .offer-title-row .favorite-btn,
  .offer-header .favorite-btn {
    flex: 0 0 auto !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: flex-start !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12) !important;
    background: #ffffff !important;
    border-width: 2px !important;
    grid-column: unset !important;
    grid-row: unset !important;
  }

  .offer-header .favorite-btn i {
    font-size: 1rem !important;
    pointer-events: none;
  }

  /* === INFO: typ · pokoje · m² === */
  .offer-info-mobile {
    margin-bottom: 0.6rem !important;
  }

  .offer-info-mobile > div {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.35rem 0.45rem !important;
    overflow: visible !important;
    white-space: normal !important;
    margin-bottom: 0 !important;
  }

  .offer-info-mobile .offer-specs {
    gap: 0.35rem 0.45rem !important;
    margin-top: 0 !important;
  }

  .offer-info-mobile .offer-spec {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.8rem !important;
    font-weight: 500;
    line-height: 1.35;
    color: #5f6772 !important;
    background: #f7f8fa;
    border: 1px solid #e7ebf1;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
  }

  .offer-info-mobile .offer-spec i {
    color: #7b8492;
    font-size: 0.78rem;
  }

  /* Ukryj separatory | (widoczne tylko na desktop) */
  .offer-info-mobile .d-none.d-md-inline {
    display: none !important;
  }

  /* === BLOK CENY === */
  .offer-header .col-12.col-lg-9 {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    padding: 0.9rem 0.95rem 0.8rem !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05) !important;
  }

  .offer-header .col-lg-3 {
    width: 100% !important;
    margin-top: 0.75rem !important;
    padding: 0.85rem 1rem !important;
    background: #fffbeb !important;
    border-radius: 12px !important;
    border-left: 4px solid #ffcb05 !important;
    box-shadow: 0 2px 8px rgba(255, 203, 5, 0.15) !important;
  }

  .offer-header .offer-header-price-block {
    display: grid !important;
    grid-template-areas:
      "label label"
      "price perm2" !important;
    grid-template-columns: auto 1fr !important;
    align-items: baseline !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    row-gap: 0 !important;
    column-gap: 0.5rem !important;
  }

  .offer-header .offer-price-label {
    grid-area: label !important;
    font-size: 0.6rem !important;
    letter-spacing: 0.12em !important;
    color: #aaa !important;
    margin-bottom: 0.15rem !important;
    display: block !important;
    text-transform: uppercase !important;
  }

  .offer-header .offer-price {
    grid-area: price !important;
    font-size: 1.7rem !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
  }

  .offer-header .offer-price-per-m2 {
    grid-area: perm2 !important;
    font-size: 0.75rem !important;
    color: #888 !important;
    text-align: right !important;
    align-self: flex-end !important;
    padding-bottom: 0.1rem !important;
  }
}

/* Style dla zaznaczonych checkboxów - żółty kolor jak filtry */
.form-check-input:checked {
  background-color: #ffcb05 !important;
  border-color: #ffcb05 !important;
}

.form-check-input:focus {
  border-color: #ffcb05 !important;
  box-shadow: 0 0 0 0.25rem rgba(255, 203, 5, 0.25) !important;
}

/* ============================================
   Mobile bottom bar
   ============================================ */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 0;
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    margin: 0 auto;
    z-index: 1200;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0.3rem max(0.2rem, env(safe-area-inset-left, 0px)) calc(0.3rem + env(safe-area-inset-bottom, 0px))
      max(0.2rem, env(safe-area-inset-right, 0px));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    border-radius: 12px 12px 0 0;
    box-sizing: border-box;
    overflow: hidden;
  }

  .mobile-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 50px;
    padding: 0 0.2rem;
    color: #5f6772;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.1;
    border-radius: 10px;
    transition:
      color 0.2s ease,
      background 0.2s ease;
    overflow: hidden;
    min-width: 0;
  }

  .mobile-bottom-nav__item span {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    text-align: center;
  }

  .mobile-bottom-nav__item i {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
  }

  .mobile-bottom-nav__item.is-active {
    color: #111;
    background: rgba(255, 203, 5, 0.35);
  }

  .mobile-bottom-nav--5col {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .mobile-bottom-nav--5col .mobile-bottom-nav__item {
    font-size: 0.58rem;
    padding: 0 0.1rem;
  }

  .mobile-bottom-nav--5col .mobile-bottom-nav__item i {
    font-size: 0.9rem;
  }

  /* Elementy z twardymi min-width które powodują poziomy scroll */
  .btn-search-ss,
  .search-box-ss {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .search-form-hero-card {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Kompaktowe sekcje na stronie oferty */
  .property-params-table {
    margin-top: 0.5rem !important;
    margin-bottom: 0.75rem !important;
    padding: 0.75rem !important;
  }

  .section-subtitle {
    font-size: 1.3rem !important;
    margin-bottom: 0.4rem !important;
  }

  .section-subtitle-text {
    margin-left: 44px !important;
  }

  .section-subtitle::before {
    width: 36px !important;
    height: 28px !important;
  }

  /* Zmniejsz pionowe odstępy między sekcjami oferty */
  .container > .row,
  .offer-content .row,
  .offer-content .container {
    margin-bottom: 0 !important;
  }

  /* Odstępy między kartami/sekcjami */
  .rooms-grid .col-lg-6 {
    margin-bottom: 0.5rem !important;
  }

  .col-lg-3.sidebar {
    margin-top: 1rem !important;
  }

  /* Jednolity mały margines boczny dla sekcji oferty */
  .offer-page-section > .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Spójna szerokość elementów na mobile na podstronie oferty */
  .offer-content .col-12.col-lg-9 > .row > .w-100 {
    padding-left: 0;
    padding-right: 0;
  }

  .offer-content .gallery-main-swiper,
  .offer-content .offer-actions,
  .offer-content .offer-details-section,
  .offer-content .section-subtitle,
  .offer-content .property-params-table {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

  .offer-content .offer-actions {
    padding-left: 0;
    padding-right: 0;
  }

  .offer-content .offer-details-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .offer-content .action-buttons .btn {
    width: 100%;
  }
}

/* Podstrona oddziału */
.branch-page-breadcrumb {
  padding-top: 140px;
  padding-bottom: 0.75rem;
  background: #f3f3f3;
}

.branch-page-hero {
  background: #ececec;
  padding: 2.5rem 0 3rem;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.branch-page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1.75rem;
  line-height: 1.15;
}

.branch-btn {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.branch-btn--primary {
  background: #1a1a1a;
  border: 1px solid #1a1a1a;
  color: #fff;
}

.branch-btn--primary:hover,
.branch-btn--primary:focus {
  background: #000;
  border-color: #000;
  color: #fff;
  transform: translateY(-1px);
}

.branch-btn--outline {
  background: #fff;
  border: 1px solid #1a1a1a;
  color: #1a1a1a;
}

.branch-btn--outline:hover,
.branch-btn--outline:focus {
  background: #fff;
  border-color: #1a1a1a;
  color: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.branch-page-hero-media,
.branch-page-hero-img,
.branch-page-hero-placeholder {
  border-radius: 18px;
  overflow: hidden;
}

.branch-page-hero-img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

.branch-page-hero-placeholder {
  min-height: 280px;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 3rem;
}

.branch-page-info {
  padding: 3.5rem 0;
  background: #f3f3f3;
}

.branch-page-agents {
  padding: 3.5rem 0 4rem;
  background: #fff;
}

.branch-page-map {
  padding: 0 0 4rem;
  background: #fff;
}

.branch-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1.25rem;
}

.branch-section-title--large {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin-bottom: 1.75rem;
}

.branch-manager-card {
  background: #fff;
  max-width: 280px;
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.branch-manager-photo {
  line-height: 0;
}

.branch-manager-photo img {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.branch-manager-photo-placeholder {
  width: 100%;
  height: 240px;
  background: #f1f1f1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 2rem;
}

.branch-manager-body {
  padding: 0.9rem 1.15rem 1.15rem;
}

.branch-manager-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #1a1a1a;
  line-height: 1.3;
}

.branch-manager-role {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 0.85rem;
  line-height: 1.4;
}

.branch-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.branch-info-item {
  background: #fff;
  border-radius: 18px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  height: 100%;
}

.branch-info-item--full {
  grid-column: 1 / -1;
}

.branch-info-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  color: #ffcb05;
  font-weight: 700;
  font-size: 1.2rem;
}

.branch-info-label i {
  font-size: 1.35rem;
  width: 1.35rem;
  text-align: center;
  flex-shrink: 0;
}

.branch-info-value {
  margin: 0;
  color: #1a1a1a;
  font-size: 1.1rem;
  line-height: 1.55;
}

.branch-agent-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  padding-bottom: 0.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.branch-agent-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.branch-agent-photo,
.branch-agent-photo img,
.branch-agent-photo-placeholder {
  border-radius: 12px;
  overflow: hidden;
}

.branch-agent-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: #fff;
  display: block;
}

.branch-agent-photo-placeholder {
  aspect-ratio: 4 / 5;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 2rem;
}

.branch-agent-body {
  flex: 1 1 auto;
  padding: 0.9rem 0 1rem;
}

.branch-agent-name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.branch-agent-role {
  font-size: 0.82rem;
  color: #666;
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.branch-agent-contact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.branch-manager-contact {
  margin-bottom: 0.85rem;
}

.branch-agent-contact-link {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #444;
  text-decoration: none;
}

.branch-agent-contact-link:hover {
  color: #1a1a1a;
}

.branch-agent-contact-link i {
  color: #ffcb05;
  width: 0.95rem;
  margin-top: 0.12rem;
  flex-shrink: 0;
  text-align: center;
}

.branch-agent-contact-link span {
  word-break: break-word;
}

.branch-map-canvas {
  height: 360px;
  border-radius: 18px;
  overflow: hidden;
  background: #ececec;
}

@media (max-width: 991.98px) {
  .branch-page-hero {
    padding-top: 2rem;
  }

  .branch-page-title {
    margin-bottom: 1.25rem;
  }

  .branch-page-actions {
    gap: 0.75rem !important;
  }

  .branch-btn {
    width: 100%;
    justify-content: center;
  }

  .branch-info-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .branch-page-info {
    padding-top: 2.5rem;
  }
}

@media (max-width: 575.98px) {
  .branch-page-hero-img,
  .branch-page-hero-placeholder {
    min-height: 220px;
  }

  .branch-map-canvas {
    height: 280px;
  }
}
