/* ============================================
   ImmoMatch – Frontend Layout & Komponenten
   Keine Typografie/Button-Overrides – Kadence CI gilt
   ============================================ */

/* ---- Container ---- */
.immomatch-container {
    max-width: var(--global-content-width, 1400px);
    margin: 0 auto;
    padding: 0;
}

/* ---- Karte volle Breite ---- */
.immomatch-hero-map {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}
.immomatch-hero-map .immomatch-map-wrap {
    margin: 0;
}
.immomatch-hero-map #immomatch-map {
    border-radius: 0 !important;
}


/* ---- Hero ---- */
.immomatch-hero {
    padding: 80px 0 20px;
}
.immomatch-hero-title {
    margin: 0 0 8px;
    text-align: center;
}
.immomatch-hero-title span {
    color: #b8a98e;
}
.immomatch-hero-sub {
    text-align: center;
    margin: 0 0 32px;
}

/* ---- Filterleiste ---- */
.immomatch-filters {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.immomatch-filter-bar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.immomatch-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 160px;
}
.immomatch-filter-group label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.immomatch-filter-group select {
    height: 40px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}
.immomatch-filter-group select:focus {
    outline: none;
    border-color: #b8a98e;
    box-shadow: 0 0 0 3px rgba(184, 169, 142, 0.15);
}
.immomatch-filter-actions {
    flex-direction: row !important;
    gap: 8px;
    flex: 0 0 auto;
    min-width: auto !important;
}

/* ---- Ergebnisse ---- */
.immomatch-results {
    padding: 0 0 64px;
    min-height: 60vh;
}
.immomatch-results-info {
    margin: 0 0 20px;
}

/* ---- Profil-Grid ---- */
.immomatch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
}

/* ---- Profilkarte ---- */
.immomatch-card {
    background: #fff;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #c0c0c0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.immomatch-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}
.immomatch-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Foto */
.immomatch-card-photo {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f4f6;
}
.immomatch-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.immomatch-card-nophoto {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b8a98e 0%, #a18e6c 100%);
}
.immomatch-card-nophoto span {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.7);
}

/* Inhalt */
.immomatch-card-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.immomatch-card-name {
    margin: 8px 0 6px;
}
.immomatch-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0 12px;
    margin-bottom: 10px;
}
.immomatch-card-ort::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 4px;
    vertical-align: -1px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}
.immomatch-card-desc {
    margin: 0 0 10px;
}
.immomatch-card-wishes {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: auto;
    font-size: 0.9em;
}
.immomatch-card-wishes li {
    padding: 2px 0 2px 16px;
    position: relative;
}
.immomatch-card-wishes li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #b8a98e;
    font-weight: 700;
}

/* Badges */
.immomatch-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
    margin-left: -3px;
}
.immomatch-single-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.immomatch-badge {
    display: inline-block;
    font-size: 0.875em;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 3px;
    text-decoration: none;
    line-height: 1.4;
}
.badge-region {
    background: #8a9bae;
    color: #fff;
}
.badge-budget {
    background: #7ea88e;
    color: #fff;
}
.badge-type {
    background: #c4a67a;
    color: #fff;
}

/* ---- Interstitial (gleiche Größe wie Profilkarte) ---- */
.immomatch-interstitial {
    border-radius: 3px;
    background: #b8a98e;
    display: flex;
}
.immomatch-interstitial-inner {
    padding: 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}
.immomatch-interstitial-inner h2 {
    color: #fff;
    font-size: 48px;
    line-height: 1.1em;
    margin-bottom: 30px;
}
.immomatch-interstitial-inner h3 {
    color: #fff;
    margin-bottom: 20px;
}
.immomatch-interstitial-inner p {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 22px;
}
.immomatch-interstitial-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.immomatch-interstitial-actions .kb-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
    box-sizing: border-box;
    background: #fff !important;
    color: #b8a98e !important;
}

/* ---- Pagination ---- */
.immomatch-pagination {
    margin-top: 40px;
    text-align: center;
}
.immomatch-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 2px;
    border-radius: 3px;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d1d5db;
    transition: all 0.15s ease;
}
.immomatch-pagination .page-numbers:hover {
    border-color: #b8a98e;
}
.immomatch-pagination .page-numbers.current {
    background: #b8a98e;
    color: #fff;
    border-color: #b8a98e;
}

/* ---- Leere Ergebnisse ---- */
.immomatch-empty {
    text-align: center;
    padding: 80px 20px;
}

/* ============================================
   SINGLE PROFILE
   ============================================ */

.immomatch-single {
    padding: 80px 0;
    min-height: 70vh;
}

/* Zurück */
.immomatch-back {
    margin-top: 40px;
}

/* Äußeres Layout: Profildaten links (66%) | CTA-Sidebar rechts (34%) */
.immomatch-single-outer {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 120px;
    align-items: start;
}

/* Foto */
.immomatch-single-photo {
    padding: 15px 0 40px;
}
.immomatch-single-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.immomatch-single-nophoto {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b8a98e 0%, #a18e6c 100%);
}
.immomatch-single-nophoto span {
    font-size: 96px;
    color: rgba(255, 255, 255, 0.6);
}
.immomatch-single-badges {
    margin-top: 0;
}
.immomatch-single-badges .immomatch-badge {
    font-size: 0.85em;
    padding: 4px 12px;
}

/* Details */
.immomatch-single-name {
    margin: 0 0 4px;
    padding-top: 30px;
}
.immomatch-single-title {
    margin: 0 0 20px;
    font-style: italic;
}
.immomatch-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}
.immomatch-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.immomatch-meta-item svg {
    color: #b8a98e;
    flex-shrink: 0;
}
.immomatch-profil-id {
    font-family: monospace;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 3px;
}

/* Sektionen */
.immomatch-single-section {
    margin-bottom: 28px;
}
.immomatch-single-wishes {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}
.immomatch-single-wishes li {
    padding: 8px 0 8px 28px;
    position: relative;
    border-bottom: 1px solid #f3f4f6;
}
.immomatch-single-wishes li:last-child {
    border-bottom: none;
}
.immomatch-single-wishes li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #b8a98e;
    font-weight: 700;
}

/* Sidebar */
.immomatch-single-sidebar {
    position: sticky;
    top: 100px;
}

/* Ähnliche Interessenten */
.immomatch-similar {
    margin-top: 24px;
}
.immomatch-similar .immomatch-card {
    margin-top: 40px;
}

/* Wünsche + CTA zweispaltig */
.immomatch-single-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: stretch;
}
.immomatch-single-bottom .immomatch-single-section {
    margin-bottom: 0;
}

/* CTA-Box */
.immomatch-single-cta {
    background: rgba(184, 169, 142, 0.1);
    border: 1px solid #b8a98e;
    border-radius: 0;
    padding: 28px;
}
.immomatch-single-cta-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .immomatch-single-outer {
        grid-template-columns: 1fr 340px;
        gap: 28px;
    }
    .immomatch-single {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    .immomatch-hero {
        padding: 32px 0 20px;
    }
    /* Filter: 2x2 Grid, keine Labels */
    .immomatch-filter-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .immomatch-filter-group {
        min-width: 0;
    }
    .immomatch-filter-group label {
        display: none;
    }
    .immomatch-filter-actions {
        flex-direction: row !important;
        gap: 8px;
    }
    .immomatch-container {
        padding: 0 20px;
    }
    /* Karten: horizontal kompakt */
    .immomatch-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .immomatch-card-link {
        flex-direction: row;
    }
    .immomatch-card-photo {
        aspect-ratio: 1 / 1;
        width: 120px;
        flex-shrink: 0;
    }
    .immomatch-card-body {
        padding: 14px 16px;
    }
    .immomatch-card-name {
        margin: 4px 0 4px;
        font-size: 1em;
        font-weight: 700;
    }
    .immomatch-card-badges {
        display: none;
    }
    .immomatch-card-desc {
        display: none;
    }
    .immomatch-card-nophoto span {
        font-size: 36px;
    }
    .immomatch-interstitial-inner {
        padding: 24px;
    }
    .immomatch-interstitial-inner h2 {
        margin-bottom: 6px;
    }
    .immomatch-interstitial-inner h3 {
        margin-bottom: 20px;
    }
    .immomatch-interstitial-inner p {
        display: none;
    }

    .immomatch-single {
        padding: 50px 0;
    }

    /* Single: Stack */
    .immomatch-single-outer {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .immomatch-single-name,
    .immomatch-single-title {
        text-align: center;
    }
    .immomatch-single-meta {
        justify-content: center;
    }
    .immomatch-single-badges {
        justify-content: center;
    }
    .immomatch-single-sidebar {
        position: static;
        margin-top: 50px;
        text-align: center;
    }
    .immomatch-similar .immomatch-card {
        text-align: left;
    }
    .immomatch-single-bottom {
        grid-template-columns: 1fr;
    }
    .immomatch-single-cta-actions {
        flex-direction: column;
    }
}
