/* Additional components used across inner pages */

/* ------- Search bar (Home/Kaufen hero) ------- */
.search-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 0;
  background: var(--ivory-100);
  border: 1px solid var(--line-on-light);
  box-shadow: 0 20px 40px rgba(8, 26, 23, 0.12);
  margin-top: 32px;
}
.search-bar__field {
  padding: 18px 22px;
  border-right: 1px solid var(--line-on-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.search-bar__field:last-of-type { border-right: 0; }
.search-bar__label {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mink-taupe);
}
.search-bar__select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: 0.95rem/1.4 var(--font-sans);
  color: var(--graphite-ink);
  outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%230B2520' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: 18px;
  /* Prevent overflow when option text is longer than the column */
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.search-bar__field { min-width: 0; }
.search-bar { min-width: 0; }
.search-bar__button {
  background: var(--access-green);
  color: var(--ivory-stone);
  padding: 0 36px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.3s var(--ease);
}
.search-bar__button:hover { background: var(--deep-forest); }
@media (max-width: 900px) {
  .search-bar { grid-template-columns: 1fr 1fr; }
  .search-bar__field { border-right: 0; border-bottom: 1px solid var(--line-on-light); }
  .search-bar__field:nth-child(odd) { border-right: 1px solid var(--line-on-light); }
  .search-bar__button { grid-column: span 2; padding: 18px; justify-content: center; }
}

/* ------- Quote / Claim box ------- */
.quote-box {
  background: var(--ivory-200);
  padding: 48px 40px;
  position: relative;
  border: 1px solid var(--line-on-light);
}
.quote-box__mono {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--access-green);
  margin-bottom: 20px;
}
.quote-box__mono img { width: 28px; height: auto; }
.quote-box__text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--access-green);
  line-height: 1.4;
  margin-bottom: 16px;
}
.quote-box__author {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mink-taupe);
}

/* ------- Icon service tile (home & services) ------- */
.icon-tile {
  text-align: center;
  padding: 32px 20px;
}
.icon-tile__icon {
  width: 56px; height: 56px;
  margin: 0 auto 24px;
  border: 1px solid var(--line-on-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--access-green);
}
.section--dark .icon-tile__icon { border-color: var(--line-on-dark); color: var(--champagne-sand); }
.section--deep .icon-tile__icon { border-color: var(--line-on-dark); color: var(--champagne-sand); }

.icon-tile__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 0 0 10px;
  color: var(--access-green);
}
.section--dark .icon-tile__title,
.section--deep .icon-tile__title { color: var(--ivory-stone); }
.icon-tile__text {
  font-size: 0.88rem;
  color: var(--graphite-ink);
  opacity: 0.75;
  margin: 0;
  max-width: 28ch;
  margin-left: auto; margin-right: auto;
}
.section--dark .icon-tile__text,
.section--deep .icon-tile__text { color: rgba(243, 238, 230, 0.78); opacity: 1; }

/* ------- Timeline (process steps) ------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), 1fr);
  gap: 20px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute; top: 28px; left: 6%; right: 6%; height: 1px;
  background: var(--line-on-light);
  z-index: 0;
}
.section--dark .timeline::before,
.section--deep .timeline::before { background: var(--line-on-dark); }

.step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 10px;
}
.step__dot {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  background: var(--ivory-100);
  border: 1px solid var(--line-on-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--access-green);
  font-family: var(--font-serif);
  font-size: 1.1rem;
}
.section--dark .step__dot {
  background: var(--access-green);
  border-color: var(--champagne-sand);
  color: var(--champagne-sand);
}
.section--deep .step__dot {
  background: var(--deep-forest);
  border-color: var(--champagne-sand);
  color: var(--champagne-sand);
}
.step__label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mink-taupe);
  margin-bottom: 8px;
}
.step__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--access-green);
  margin: 0 0 6px;
}
.section--dark .step__title,
.section--deep .step__title { color: var(--ivory-stone); }
.step__text {
  font-size: 0.82rem;
  color: var(--graphite-ink);
  opacity: 0.7;
  margin: 0;
}
.section--dark .step__text,
.section--deep .step__text { color: rgba(243, 238, 230, 0.75); opacity: 1; }

@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr 1fr; }
  .timeline::before { display: none; }
}
@media (max-width: 560px) {
  .timeline { grid-template-columns: 1fr; }
}

/* ------- FAQ ------- */
.faq {
  border-top: 1px solid var(--line-on-light);
}
.faq__item {
  border-bottom: 1px solid var(--line-on-light);
}
.faq__q {
  width: 100%;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--access-green);
  gap: 20px;
}
.faq__q::after {
  content: "+";
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--champagne-sand);
  transition: transform 0.3s var(--ease);
}
.faq__item.is-open .faq__q::after { content: "−"; }
.faq__a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease);
}
.faq__item.is-open .faq__a { max-height: 600px; }
.faq__a-inner {
  padding: 0 0 24px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--graphite-ink);
  opacity: 0.8;
  max-width: 75ch;
}

/* ------- Detail page (property detail) ------- */
.detail-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #2a4a42 0%, #0B2520 100%);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.detail-media__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.detail-media__thumbs > div {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #355652 0%, #0B2520 100%);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-on-light);
  margin: 32px 0;
}
.spec-grid > div {
  padding: 24px 20px;
  border-right: 1px solid var(--line-on-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.spec-grid > div:last-child { border-right: 0; }
.spec-grid__label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mink-taupe);
}
.spec-grid__value {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--access-green);
}
@media (max-width: 700px) {
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .spec-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-on-light); }
  .spec-grid > div:nth-child(2) { border-right: 0; }
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag {
  font-size: 0.78rem;
  padding: 8px 14px;
  border: 1px solid var(--line-on-light);
  color: var(--access-green);
  background: var(--ivory-100);
  letter-spacing: 0.02em;
}

/* ------- Team cards ------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }

.team {
  text-align: left;
}
.team__photo {
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #c9b99a 0%, #9b8a70 100%);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.team__photo::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.14  0 0 0 0 0.1  0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
.team__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--access-green);
  margin: 0 0 4px;
}
.team__role {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mink-taupe);
  margin-bottom: 10px;
}
.team__bio { font-size: 0.88rem; color: var(--graphite-ink); opacity: 0.78; margin: 0; }

/* ------- Map placeholder ------- */
.map {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(11, 37, 32, 0.04), rgba(216, 199, 163, 0.08)),
    repeating-linear-gradient(0deg, rgba(11, 37, 32, 0.06) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(90deg, rgba(11, 37, 32, 0.06) 0 1px, transparent 1px 60px),
    var(--ivory-200);
  border: 1px solid var(--line-on-light);
  position: relative;
  overflow: hidden;
}
.map__pin {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -100%);
  width: 36px; height: 36px;
  background: var(--access-green);
  border-radius: 50% 50% 50% 0;
  transform-origin: center;
  transform: translate(-50%, -100%) rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.map__pin::after {
  content: "";
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--champagne-sand);
}
.map__btn {
  position: absolute;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  background: var(--ivory-100);
  border: 1px solid var(--line-on-light);
  padding: 10px 18px;
  font-size: 0.82rem;
  color: var(--access-green);
  font-weight: 500;
  white-space: nowrap;
}

/* ------- Form message ------- */
.form__msg {
  font-size: 0.88rem;
  color: var(--access-green);
  padding: 14px 18px;
  background: var(--ivory-200);
  border: 1px solid var(--champagne-sand);
  display: none;
}
.form__msg.is-visible { display: block; }

/* ------- Chart (market page) ------- */
.chart { display: grid; gap: 12px; }
.chart__row { display: grid; grid-template-columns: 140px 1fr 80px; gap: 16px; align-items: center; }
.chart__label { font-size: 0.88rem; color: var(--graphite-ink); }
.chart__bar { height: 10px; background: var(--ivory-200); border-radius: 2px; overflow: hidden; }
.chart__fill { height: 100%; background: linear-gradient(90deg, var(--access-green), #1e4a42); border-radius: 2px; }
.chart__value { font-family: var(--font-serif); color: var(--access-green); font-size: 0.95rem; }

/* ------- Reveal animation ------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ------- Reelly skeletons (loading state) ------- */
.prop--skeleton {
  pointer-events: none;
  position: relative;
  overflow: hidden;
}
.prop--skeleton::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 200%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  animation: skel 1.6s ease-in-out infinite;
}
@keyframes skel {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0%); }
}

/* When [data-reelly] is also a .prop-grid, keep grid spacing intact */
[data-reelly].prop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
}
@media (max-width: 900px) { [data-reelly].prop-grid { grid-template-columns: 1fr; } }

/* ===================================================
   REELLY-INTEGRATION (Cards, Pagination, Detail, Tabs)
   =================================================== */

/* Card with WhatsApp action */
.prop {
  position: relative;
  background: var(--ivory-100);
  overflow: hidden;
  border: 1px solid var(--line-on-light);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.prop:hover { transform: translateY(-6px); box-shadow: 0 30px 60px rgba(8, 26, 23, 0.18); }

.prop__main { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.prop__main:hover { color: inherit; }
.prop:hover .prop__media img { transform: scale(1.06); }
.prop__placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1e4a42 0%, #0B2520 100%);
}

.prop__eur {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--mink-taupe);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.prop__wa {
  position: absolute;
  bottom: 18px; right: 18px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  z-index: 3;
}
.prop__wa:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 18px rgba(37, 211, 102, 0.5);
  color: white;
}

/* Reelly grid wrapper */
.reelly-shell { display: flex; flex-direction: column; gap: 32px; }
.reelly-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
}
@media (max-width: 900px) { .reelly-grid { grid-template-columns: 1fr; } }

.reelly-empty {
  grid-column: 1 / -1;
  padding: 48px 24px;
  text-align: center;
  color: var(--mink-taupe);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
}

/* Pagination */
.reelly-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.reelly-page {
  min-width: 38px; height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-on-light);
  background: var(--ivory-100);
  color: var(--access-green);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.reelly-page:hover:not(:disabled) {
  background: var(--access-green);
  color: var(--ivory-stone);
  border-color: var(--access-green);
}
.reelly-page.is-current {
  background: var(--access-green);
  color: var(--ivory-stone);
  border-color: var(--access-green);
}
.reelly-page:disabled { opacity: 0.4; cursor: default; }
.reelly-page-ellipsis { color: var(--mink-taupe); padding: 0 6px; }

/* Page-size switcher */
.reelly-page-size {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.reelly-page-size__label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mink-taupe);
  margin-right: 8px;
}
.reelly-page-size button {
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--graphite-ink);
  background: transparent;
  border: 1px solid var(--line-on-light);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.reelly-page-size button:hover { border-color: var(--access-green); color: var(--access-green); }
.reelly-page-size button.is-active {
  background: var(--access-green);
  color: var(--ivory-stone);
  border-color: var(--access-green);
}

/* WhatsApp full-width button */
.btn--whatsapp {
  background: #25D366;
  color: white;
  border-color: #25D366;
}
.btn--whatsapp:hover { background: #1ebe5a; border-color: #1ebe5a; color: white; }

/* Detail page layout */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
}
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-main { min-width: 0; }
.detail-title { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 12px; }
.detail-aside .detail-cta {
  position: sticky; top: 100px;
  background: var(--ivory-200);
  padding: 32px;
  border: 1px solid var(--line-on-light);
}

.detail-thumbs__more {
  display: flex; align-items: center; justify-content: center;
  background: var(--access-green);
  color: var(--ivory-stone);
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

/* Unit-Tabs */
.unit-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line-on-light);
  margin: 8px 0 24px;
  flex-wrap: wrap;
}
.unit-tab {
  padding: 12px 20px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--graphite-ink);
  opacity: 0.6;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.unit-tab:hover { opacity: 1; }
.unit-tab.is-active {
  opacity: 1;
  color: var(--access-green);
  border-bottom-color: var(--access-green);
}
.unit-panel { display: none; }
.unit-panel.is-active { display: block; }
.unit-spec {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  background: var(--ivory-200);
  padding: 24px;
  border: 1px solid var(--line-on-light);
}
.unit-spec > div { display: flex; flex-direction: column; gap: 6px; }
.unit-spec .muted { color: var(--mink-taupe); font-weight: 400; font-size: 0.9rem; }
@media (max-width: 700px) { .unit-spec { grid-template-columns: 1fr; } }

/* Payment plan table */
.payment-plan {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 24px;
}
.payment-plan td {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-on-light);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--graphite-ink);
}
.payment-plan tr:last-child td { border-bottom: 0; }

/* Floor plans lead-capture */
.floorplans__locked {
  background: var(--ivory-200);
  padding: 28px;
  border: 1px solid var(--line-on-light);
  border-radius: 0;
}
.floorplans__form { gap: 14px; }
.floorplans__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.floorplans__list li {
  padding: 12px 16px;
  background: var(--ivory-200);
  border: 1px solid var(--line-on-light);
}

/* OpenStreetMap embed */
.osm-map {
  width: 100%;
  height: 360px;
  border: 1px solid var(--line-on-light);
  margin-top: 8px;
}

/* Detail media */
.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Muted text */
.muted { color: var(--mink-taupe); font-weight: 400; }

/* ------- Radio & checkbox (valuation form) ------- */
.radio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 700px) { .radio-grid { grid-template-columns: repeat(2, 1fr); } }
.radio-tile {
  border: 1px solid var(--line-on-light);
  padding: 18px 16px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--graphite-ink);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  background: var(--ivory-100);
}
.radio-tile:hover, .radio-tile.is-active {
  border-color: var(--access-green);
  color: var(--access-green);
  background: var(--ivory-200);
}
.radio-tile__icon { display: block; margin: 0 auto 8px; color: var(--access-green); }
