*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #f5f5f5; color: #333; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 3px solid #009688;
  padding: 12px 20px;
  text-align: center;
}
.logo { text-decoration: none; display: inline-block; }
.logo svg { display: block; height: 42px; width: auto; }

/* Search Section */
.search-section {
  background: #878787;
  padding: 24px 20px;
}
.search-box {
  background: #fff;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 4px;
  padding: 18px 20px;
}
.search-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.search-tabs {
  display: flex;
  gap: 0;
}
.search-tab {
  padding: 8px 22px;
  font-size: 14px;
  font-weight: bold;
  font-family: 'Merriweather', serif;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #e0e0e0;
  color: #555;
  user-select: none;
}
.search-tab:first-child { border-radius: 3px 0 0 3px; }
.search-tab:last-child { border-radius: 0 3px 3px 0; border-left: none; }
.search-tab.active {
  background: #009688;
  color: #fff;
  border-color: #009688;
}
.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  align-items: stretch;
}
.search-row input[type="text"],
.search-row select {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
  color: #333;
  background: #fff;
  height: 36px;
}
.location-wrap {
  position: relative;
  flex: 1 1 320px;
  min-width: 200px;
}
.input-location {
  width: 100%;
}
.location-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 3px 3px;
  z-index: 1000;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}
.location-suggestion-group {
  padding: 6px 12px 4px;
  font-size: 11px;
  font-weight: bold;
  color: #009688;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #f7faf9;
  border-bottom: 1px solid #e4ecea;
  border-top: 1px solid #e4ecea;
}
.location-suggestion-group:first-child { border-top: none; }
.location-suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}
.location-suggestion-item:last-child { border-bottom: none; }
.location-suggestion-item:hover,
.location-suggestion-item.active { background: #e8f5f3; }
.location-suggestion-level {
  font-size: 11px;
  color: #888;
  margin-left: 8px;
  white-space: nowrap;
}

/* Custom dropdown trigger */
.custom-dropdown {
  position: relative;
  flex: 0 0 180px;
}
.custom-dropdown.wide { flex: 0 0 160px; }
.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
  color: #333;
  background: #fff;
  cursor: pointer;
  height: 36px;
  white-space: nowrap;
  user-select: none;
}
.dropdown-trigger:after {
  content: '▾';
  margin-left: 8px;
  font-size: 12px;
  color: #666;
}
.dropdown-trigger.open { border-color: #009688; }

/* Dropdown panel */
.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 3px;
  z-index: 200;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 8px 0 0;
}
.dropdown-panel.open { display: block; }
.dropdown-panel.wide { min-width: 240px; }

.dp-group-label {
  font-size: 13px;
  font-weight: bold;
  color: #333;
  padding: 6px 14px 4px;
}
.dp-option {
  display: flex;
  align-items: center;
  padding: 5px 14px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}
.dp-option:hover { background: #f0f0f0; }
.dp-option.selected { color: #009688; font-weight: bold; }
.dp-option input[type="radio"] { margin-right: 8px; accent-color: #009688; }

.dp-range {
  display: flex;
  gap: 6px;
  padding: 8px 14px 6px;
}
.dp-range input[type="text"] {
  width: 70px;
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 13px;
}
.dp-confirm {
  display: block;
  width: calc(100% - 28px);
  margin: 4px 14px 10px;
  padding: 7px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}
.dp-confirm:hover { background: #f5f5f5; }

.btn-search {
  background: #009688;
  color: #fff;
  border: none;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: bold;
  font-family: 'Merriweather', serif;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  margin-left: auto;
  height: 36px;
}
.btn-search:hover { background: #00796b; }

/* Content */
.content {
  max-width: 1140px;
  margin: 0 auto;
  padding: 30px 20px 50px;
}
.section-title {
  color: #009688;
  font-size: 13px;
  font-weight: bold;
  font-family: 'Merriweather', serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 2px solid #009688;
  padding-bottom: 8px;
  margin-bottom: 22px;
}

/* Swiper wrapper with room for outside arrows */
.swiper-outer {
  position: relative;
  padding: 0 40px;
}
.swiper { width: 100%; padding-bottom: 36px !important; }
.swiper-slide { height: auto; display: flex; }

/* Property Card */
.property-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}
.property-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.13); }
.card-img-wrap { position: relative; overflow: hidden; flex-shrink: 0; }
.card-img-wrap img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.property-card:hover .card-img-wrap img { transform: scale(1.04); }
.card-type-badge {
  position: absolute;
  top: 10px;
  left: 0;
  background: #009688;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 10px;
  letter-spacing: 0.5px;
}
.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-title {
  font-size: 14px;
  font-weight: bold;
  font-family: 'Merriweather', serif;
  color: #009688;
  text-decoration: none;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.card-title:hover { text-decoration: underline; }
.card-price {
  font-size: 14px;
  font-weight: bold;
  color: #222;
}
.card-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.card-agency {
  font-size: 10px;
  color: #888;
  text-align: right;
  line-height: 1.2;
  flex-shrink: 0;
}
.card-agency-logo {
  max-width: 120px;
  max-height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}
.card-meta {
  font-size: 13px;
  color: #444;
}
.card-address {
  font-size: 13px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-address svg { flex-shrink: 0; }
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #212338;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background-color 0.15s ease;
}
.card-cta img {
  height: 14px;
  width: auto;
  display: block;
  transform: translateY(1px);
}
.property-card:hover .card-cta { background: #2e3150; }

/* Swiper nav – round buttons outside the track */
.swiper-button-next,
.swiper-button-prev {
  width: 36px !important;
  height: 36px !important;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 6px rgba(0,0,0,0.22);
  color: #555 !important;
  top: 40% !important;
}
.swiper-button-next::after,
.swiper-button-prev::after { font-size: 14px !important; font-weight: bold; }
.swiper-button-prev { left: 0 !important; }
.swiper-button-next { right: 0 !important; }
.swiper-pagination-bullet-active { background: #009688 !important; }

/* Footer */
.site-footer {
  background: #009688;
  color: #fff;
  padding: 24px 20px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 180px;
}
.footer-links a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
}
.footer-links a:hover { text-decoration: underline; }
.footer-right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.footer-social {
  display: flex;
  gap: 10px;
}
.footer-social a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 13px;
}
.footer-social a:hover { background: rgba(255,255,255,0.15); }
.footer-legal {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.footer-legal a {
  color: #fff;
  text-decoration: none;
  font-size: 12px;
}
.footer-legal a:hover { text-decoration: underline; }

/* Search results */
#search-results { display: none; background: #f0f4f4; padding: 24px 20px 32px; }
.results-inner { max-width: 1140px; margin: 0 auto; }
.results-title { font-size: 13px; font-weight: bold; font-family: 'Merriweather', serif; color: #009688; letter-spacing: 2px; text-transform: uppercase; border-bottom: 2px solid #009688; padding-bottom: 8px; margin-bottom: 22px; }
.results-count { font-weight: normal; color: #555; letter-spacing: 0; text-transform: none; }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.results-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; }
.page-btn { min-width: 36px; height: 36px; padding: 0 10px; background: #fff; border: 1px solid #d0d6d6; color: #333; font-size: 14px; font-family: inherit; border-radius: 3px; cursor: pointer; line-height: 1; }
.page-btn:hover:not(:disabled):not(.active) { border-color: #009688; color: #009688; }
.page-btn.active { background: #009688; border-color: #009688; color: #fff; font-weight: bold; cursor: default; }
.page-btn:disabled { color: #b0b6b6; cursor: not-allowed; background: #f7f9f9; }
.page-btn.page-nav { font-size: 18px; font-weight: bold; }
.page-ellipsis { color: #888; padding: 0 4px; user-select: none; }
.results-more { text-align: center; margin-top: 24px; }
.results-more a { display: inline-block; padding: 10px 24px; background: #009688; color: #fff; border-radius: 3px; text-decoration: none; font-size: 14px; font-weight: bold; font-family: 'Merriweather', serif; }
.results-more a:hover { background: #00796b; }
.results-status { text-align: center; padding: 20px; font-size: 14px; }
.results-status.error { color: #cc0000; }

@media (max-width: 768px) {
  .results-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .results-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .search-section { padding: 16px 12px; }
  .search-box { padding: 14px 12px; }

  /* Row 1: location full width, then type side by side */
  .search-row:first-of-type {
    flex-wrap: wrap;
    gap: 8px;
  }
  .search-row:first-of-type .location-wrap {
    flex: 1 1 100%;
  }
  .search-row:first-of-type #dd-proptype {
    flex: 1 1 100%;
    min-width: 0;
  }

  /* Row 2: 2-column grid for filters, button full width */
  .search-row:last-of-type {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .search-row:last-of-type .btn-search {
    grid-column: 1 / -1;
    margin-left: 0;
    width: 100%;
  }

  /* Reset flex overrides for grid children */
  .custom-dropdown { width: auto; flex: unset; }

  .footer-right { margin-left: 0; align-items: flex-start; }
}

/* Page layout: main content + right ad column (kurier.at pattern) */
.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.main-content {
  display: block;
  flex: 1 1 auto;
}
@media (min-width: 992px) {
  .main-content {
    display: flex;
    flex-flow: row nowrap;
    align-items: stretch;
    /* clip (not a fixed main-column width) is what stops the skyscraper from
       stealing space — same approach as .page-layout on the other pages. */
    overflow: clip;
  }
}
.col-mid {
  flex: 1 1 0%;
  min-width: 0;
}


/* ============================================================
   Ads
   ============================================================ */

/* Superbanner (top of page) */
.ad-superbanner { background: #f0f0f0; text-align: center; padding: 6px 0; }
.ad-superbanner-desktop { display: none; }
.ad-superbanner-mobile { display: block; }
@media (min-width: 768px) {
  .ad-superbanner-desktop { display: inline-block; }
  .ad-superbanner-mobile { display: none; }
}

/* Covercorner ad next to search bar */
.search-inner { display: flex; align-items: center; justify-content: center; gap: 12px; }
.search-inner .search-box { flex: 1; max-width: 1100px; }
.ad-covercorner { display: none; flex-shrink: 0; }
@media (min-width: 1200px) {
  .ad-covercorner { display: block; }
}

/* Right skyscraper column */
.col-right-space {
  display: none;
}
@media (min-width: 1440px) {
  .col-right-space {
    display: block;
    flex: 0 0 160px;
    width: 160px;
    overflow: clip;
  }
}
@media (min-width: 1639px) {
  .col-right-space {
    flex: 0 0 300px;
    width: 300px;
  }
}

/* Two ads above footer */
.ad-row-above-footer {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background: #f0f0f0;
  text-align: center;
}

/* GPT ad wrapper — mirrors bb-gpt-ad component */
.gpt-ad {
  display: block;
  font-size: 0;
  text-align: center;
  overflow: hidden;
}
.gpt-ad.skyscraper {
  position: sticky;
  top: 0;
  left: 0;
  text-align: left;
  z-index: 105;
  overflow: hidden;
}
.gpt-ad .inner {
  display: inline-block;
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.seo-listings {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* SEO content block (below search results) */
.seo-content {
  max-width: 1140px;
  margin: 0 auto;
  padding: 30px 20px 40px;
}
.seo-content .section-title { margin-bottom: 18px; }
.seo-content .seo-h1 {
  font-family: 'Merriweather', serif;
  font-size: 26px;
  line-height: 1.25;
  color: #009688;
  font-weight: bold;
  margin: 14px 0 14px;
}
.seo-content .seo-h2 {
  font-family: 'Merriweather', serif;
  font-size: 20px;
  line-height: 1.3;
  color: #009688;
  font-weight: bold;
  margin: 28px 0 12px;
}
.seo-content p {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  margin: 0 0 18px;
}
.seo-content a {
  color: #009688;
  text-decoration: none;
  font-weight: bold;
}
.seo-content a:hover { text-decoration: underline; }

.seo-districts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 40px;
  margin-top: 18px;
}
.seo-district-col h3 {
  font-family: 'Merriweather', serif;
  font-size: 17px;
  font-weight: bold;
  color: #009688;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #d0d6d6;
}
.seo-district-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.seo-district-col li { margin: 0 0 6px; }
.seo-district-col a {
  font-weight: normal;
  font-size: 14px;
  color: #009688;
}

@media (max-width: 600px) {
  .seo-districts { grid-template-columns: 1fr; gap: 18px; }
  .seo-content .seo-h1 { font-size: 22px; }
  .seo-content .seo-h2 { font-size: 18px; }
}
