/* ============================================================
   Block: Aktuelle Bauobjekte (Akkordeon)
   ============================================================ */

.block-aktuelle-bauobjekte {
  padding: 40px 0 90px;
  background: transparent;
  --ff-head: "Jost", sans-serif;
  --blue: #15325a;
  --red: #cd021c;
  --line: rgba(21, 50, 90, 0.12);
  --line-2: rgba(21, 50, 90, 0.08);
  --bg: #f4f8ff;
  --ink: #1f2937;
  --ink-2: #4f5568;
  --muted: #6b727c;
  --radius: 8px;
  --radius-lg: 8px;
  --shadow-sm: 0 12px 22px rgba(34, 56, 97, 0.05);
  --shadow-md: 0 18px 35px rgba(34, 56, 97, 0.1);
  --blue-tint: rgba(21, 50, 90, 0.05);
  --blue-dark: #11284a;
  width: 100vw;
  left: 50%;
  position: relative;
  background: rgba(21, 50, 90, 0.025);
  transform: translateX(-50%);
  button:focus {
    outline: 0;
  }
  border-top: 1px solid var(--line);
}

.block-aktuelle-bauobjekte .wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 8px;
}

/* Header */
.abo-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.abo-header h2 {
  font-family: var(--ff-head);
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: 12px;
}

.abo-header h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  background: var(--blue);
  border-radius: 2px;
}

.abo-subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-top: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.abo-count {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.abo-sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.abo-sort-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.abo-sort-select {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  padding: 9px 30px 9px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b727c' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.abo-sort-select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(251, 0, 36, 0.12);
}

/* Akkordeon */
.abo-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.abo-item {
  background: #fff;
  border: 1px solid rgba(21, 50, 90, 0.12);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition:
    box-shadow 0.18s,
    border-color 0.18s;
}

.abo-item.abo-item--open {
  box-shadow: 0 24px 38px rgba(34, 56, 97, 0.16);
  border-color: rgba(21, 50, 90, 0.18);
  border-top: 3px solid #15325a;
}

/* Akkordeon Header */
.abo-head {
  display: grid;
  grid-template-columns: 76px 1fr 160px 140px 130px 44px;
  align-items: center;
  gap: 20px;
  padding: 16px 22px;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.abo-head:hover {
  background: rgba(21, 50, 90, 0.03);
}

.abo-item.abo-item--open .abo-head {
  background: transparent;
}

/* Thumbnail */
.abo-thumb {
  width: 76px;
  height: 60px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  position: relative;
}

.abo-thumb::after {
  content: "";
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: oklch(0.62 0.13 150);
}

.abo-thumb--reserviert::after {
  background: oklch(0.68 0.13 70);
}

.abo-thumb--verkauft::after {
  background: oklch(0.6 0.01 250);
}

.abo-badge--teilw_reserviert::after {
  background: lab(67.83% -1.09 66.33);
}

.abo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.abo-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    135deg,
    #e9ebef 0 7px,
    #eef0f3 7px 14px
  );
  display: grid;
  place-items: center;
  font-size: 7px;
  text-transform: uppercase;
  color: #98a0ab;
  font-weight: 700;
}

/* Info */
.abo-info {
  min-width: 0;
}

.abo-info h3 {
  font-family: var(--ff-head);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 3px;
  line-height: 1.1;
}

.abo-location {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.abo-location svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Facts */
.abo-facts {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}

.abo-fact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 600;
  white-space: nowrap;
}

.abo-fact svg {
  width: 15px;
  height: 15px;
  color: var(--blue);
  flex-shrink: 0;
}

/* Badge */
.abo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 100px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  justify-self: center;
}

.abo-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.abo-badge--verfuegbar {
  color: oklch(0.62 0.13 150);
  background: oklch(0.95 0.04 150);
}

.abo-badge--reserviert {
  color: oklch(0.68 0.13 70);
  background: oklch(0.95 0.05 80);
}

.abo-badge--teilw_reserviert {
  color: oklch(0.62 0.14 55);
  background: oklch(0.95 0.06 60);
}

.abo-badge--verkauft {
  color: oklch(0.6 0.01 250);
  background: oklch(0.93 0.005 250);
}

/* Price */
.abo-price {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
}

.abo-price b {
  font-family: var(--ff-head);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.abo-price span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

/* Chevron */
.abo-chev {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition:
    transform 0.2s,
    background 0.15s;
  flex-shrink: 0;
}

.abo-chev svg {
  width: 18px;
  height: 18px;
  color: var(--ink-2);
}

.abo-item.abo-item--open .abo-chev {
  background: var(--blue);
  transform: rotate(180deg);
}

.abo-item.abo-item--open .abo-chev svg {
  color: #fff;
}

/* Panel */
.abo-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  display: flex;
  align-items: flex-start;
}

.abo-item.abo-item--open .abo-panel {
  max-height: 1400px;
}

.abo-content {
  flex: 0 0 58%;
  min-width: 0;
  padding: 22px 22px 24px;
  border-top: 1px solid rgba(21, 50, 90, 0.08);
  opacity: 0;
  transition: opacity 0.26s ease;
}

.abo-item.abo-item--open .abo-content {
  opacity: 1;
}

/* Tabs */
.abo-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.abo-tab-btn {
  border: none;
  background: none;
  padding: 10px 4px;
  margin-right: 18px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--muted);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  cursor: pointer;
  font-family: inherit;
}

.abo-tab-btn:hover {
  color: var(--ink);
}

.abo-tab-btn.abo-tab-btn--active {
  color: #15325a;
  border-color: #15325a;
}

/* Tab Content */
.abo-tab-content {
  margin-bottom: 16px;
}

.abo-tab-pane {
  display: none;
}

.abo-tab-pane.abo-tab-pane--active {
  display: block;
  animation: aboTabFadeIn 0.25s ease forwards;
}

.abo-tab-pane.abo-tab-pane--leaving {
  display: block;
  animation: aboTabFadeOut 0.15s ease forwards;
  pointer-events: none;
}

@keyframes aboTabFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes aboTabFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Gallery */
.abo-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.abo-gallery-main {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.abo-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.18s ease;
}

.abo-gallery-placeholder {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  background: repeating-linear-gradient(
    135deg,
    #e9ebef 0 14px,
    #eef0f3 14px 28px
  );
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #98a0ab;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.abo-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.abo-thumb-btn {
  aspect-ratio: 4 / 3;
  border: 2px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
  background: none;
  padding: 0;
}

.abo-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.abo-thumb-btn.abo-thumb-btn--active {
  border-color: var(--blue);
}

/* Documents */
.abo-doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.abo-doc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.abo-doc:hover {
  border-color: #15325a;
  background: rgba(21, 50, 90, 0.06);
}

.abo-doc-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--blue-tint);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.abo-doc-icon svg {
  width: 18px;
  height: 18px;
}

.abo-doc-info {
  flex: 1;
}

.abo-sidebar {
  flex: 0 0 42%;
  min-width: 0;
  padding: 22px 24px 24px;
  border-top: 1px solid rgba(21, 50, 90, 0.08);
}

.abo-data-box h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
  color: #15325a;
  font-family: "Jost", sans-serif;
}

.abo-data-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(21, 50, 90, 0.1);
}

.abo-data-item:last-of-type {
  border-bottom: none;
}

.abo-data-label {
  color: #6b727c;
  font-size: 14px;
  flex: 0 0 auto;
}

.abo-data-value {
  color: #1f2937;
  font-weight: 700;
  text-align: right;
  flex: 1;
}

.abo-price-big {
  margin: 20px 0 0;
  padding-top: 20px;
}

.abo-price-big b {
  display: block;
  font-size: 24px;
  line-height: 1.2;
  color: #1f2937;
  font-weight: 700;
}

.abo-price-big span {
  font-size: 13px;
  color: #6b727c;
  display: block;
  margin-bottom: 10px;
}

.abo-cta {
  display: grid;
  gap: 12px;
}

.abo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.18s,
    transform 0.18s,
    color 0.18s;
}

.abo-btn:hover {
  transform: translateY(-1px);
}

.abo-btn--primary {
  background: #cd021c;
  color: #fff;
}

.abo-btn--primary:hover {
  background: #a40016;
}

.abo-btn--secondary {
  background: #15325a;
  color: #fff;
}

.abo-btn--secondary:hover {
  background: #11284a;
}

.abo-btn-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.abo-desc {
  line-height: 1.88;
  color: #424a55;
  margin-bottom: 30px;
}

.abo-empty {
  color: #6b727c;
  font-size: 14px;
}

.abo-doc-info b {
  font-size: 14.5px;
  font-weight: 700;
  display: block;
}

.abo-doc-dl {
  color: var(--muted);
  transition: color 0.15s;
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.abo-doc-dl svg {
  width: 18px;
  height: 18px;
}

.abo-doc:hover .abo-doc-dl,
a.abo-doc:hover .abo-doc-dl {
  color: var(--blue);
}

/* Description */
.abo-desc p {
  color: var(--ink-2);
  font-size: 16px;
  margin: 0 0 14px;
  line-height: 1.6;
}

.abo-empty {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  padding: 20px;
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 30px;
}

/* Sidebar inner layout */
.abo-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.abo-data-box {
  background: var(--blue-tint);
  border: 1px solid #d6e4f3;
  border-radius: var(--radius-lg);
  padding: 20px;
}

.abo-data-box h4 {
  font-family: var(--ff-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--blue-dark);
  margin: 0 0 12px;
}

.abo-data-item {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #dbe7f4;
  font-size: 14px;
}

.abo-data-item:last-of-type {
  border-bottom: none;
}

.abo-data-label {
  color: var(--muted);
  font-weight: 600;
}

.abo-data-value {
  font-weight: 700;
  color: var(--ink);
  text-align: right;
}

.abo-price-big {
  margin: 14px 0 30px;

  display: flex;
  flex-direction: column;
  gap: 4px;
}

.abo-price-big b {
  font-family: var(--ff-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
}

.abo-price-big span {
  font-size: 13px;
  color: var(--muted);
  display: block;
}

/* CTA Button */
.abo-cta {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 14px;
}

.abo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14.5px;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
}

.abo-btn svg {
  width: 16px;
  height: 16px;
}

.abo-btn--primary {
  background: var(--red);
  color: #fff;
}

.abo-btn--primary:hover {
  background: #a40016;
  color: #fff;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 1080px) {
  .abo-head {
    grid-template-columns: 60px 1fr 130px 120px 110px 36px;
    gap: 12px;
    padding: 12px 16px;
  }

  .abo-thumb {
    width: 60px;
    height: 50px;
  }

  .abo-panel {
    flex-direction: column;
  }

  .abo-content,
  .abo-sidebar {
    flex: 0 0 100%;
    width: 100%;
  }

  .abo-price b {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .abo-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Facts + Badge auf Mobile ausblenden */
  .abo-facts,
  .abo-badge {
    display: none;
  }

  /* Zwei-Spalten-Layout nur auf Mobile:
     Spalte 1: Thumb (überspannt beide Zeilen)
     Spalte 2: Titel (Zeile 1) + Preis (Zeile 2)
     Spalte 3: Chevron (überspannt beide Zeilen) */
  .abo-head {
    grid-template-columns: 52px 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "thumb info  chev"
      "thumb price chev";
    column-gap: 12px;
    row-gap: 4px;
    padding: 12px 14px;
    align-items: center;
  }

  .abo-thumb {
    grid-area: thumb;
    width: 52px;
    height: 52px;
    align-self: center;
  }

  .abo-info {
    grid-area: info;
    align-self: end;
  }

  .abo-price {
    grid-area: price;
    align-self: start;
    justify-content: flex-start;
  }

  .abo-chev {
    grid-area: chev;
    align-self: center;
    width: 32px;
    height: 32px;
  }

  .abo-chev svg {
    width: 16px;
    height: 16px;
  }

  .abo-info h3 {
    font-size: 16px;
  }

  .abo-location {
    font-size: 12px;
  }

  .abo-price b {
    font-size: 16px;
  }

  .abo-tabs {
    flex-wrap: wrap;
    gap: 2px;
  }

  .abo-tab-btn {
    margin-right: 10px;
    padding: 8px 2px;
    font-size: 13px;
  }

  .abo-gallery-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Placeholder labels via CSS attr() */
.abo-gallery-placeholder::after {
  content: attr(data-label);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #98a0ab;
  text-align: center;
}

.abo-thumb-placeholder::after {
  content: attr(data-label);
  display: block;
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #98a0ab;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  padding: 0 4px;
  line-height: 1.3;
}

/* IS24 Button */
.abo-btn--is24 {
  background: transparent;
  border: 1px solid rgba(21, 50, 90, 0.18);
  color: var(--ink);
  justify-content: flex-start;
  gap: 16px;
  padding: 10px 14px;
}

.abo-btn--is24:hover {
  background: rgba(21, 50, 90, 0.05);
  text-decoration: none;
  transform: none;
}

.abo-is24-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;

  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  svg {
    width: 36px;
    height: 36px;
  }
}

.abo-btn--is24 .abo-btn-icon {
  margin-left: auto;
  color: var(--muted);
}

/* Price-big label fix */
.abo-price-big span:empty {
  display: none;
}
