:root {
    --bg: #fbfaf7;
    --ink: #16201b;
    --muted: #6b756f;
    --accent: red;
    --field-h: 44px; /* gemeinsame Feldhöhe (auch Touch-Mindestgröße) */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.hero {
    padding-block: 20vh;
}

.eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.eyebrow::before {
    content: "";
    width: 1.75rem;
    height: 1px;
    background: var(--accent);
}

.headline {
    font-family: "Bricolage Grotesque", system-ui, sans-serif;
    font-weight: 700;
    line-height: 1.95;
    letter-spacing: -0.02em;
    font-size: clamp(2.1rem, 7vw, 4.75rem);
    display: flex;
    flex-wrap: wrap; /* Mobil: darf umbrechen */
    align-items: baseline;
    gap: 0 0.3em;
    margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}
@media (min-width: 768px) {
    .headline {
        flex-wrap: nowrap;
    } /* Ab Tablet: eine Zeile */
}
@media (max-width: 768px) {
    .headline {
        line-height: 1.3;
    }
}

/* Rotator: unsichtbarer Sizer gibt Breite + Grundlinie vor */
.rotator {
    position: relative;
    display: inline-block;
    overflow: hidden;
    vertical-align: baseline;
    color: var(--accent);
    white-space: nowrap;
}
.rotator__sizer {
    visibility: hidden;
}
.rotator__track {
    position: absolute;
    inset: 0;
}
.rotator__word {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(100%);
}
.rotator__word.is-in {
    opacity: 1;
    transform: translateY(0);
    transition:
        transform 0.55s var(--ease),
        opacity 0.4s var(--ease);
}
.rotator__word.is-out {
    opacity: 0;
    transform: translateY(-100%);
    transition:
        transform 0.55s var(--ease),
        opacity 0.4s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
    .rotator__word.is-in,
    .rotator__word.is-out {
        transition: opacity 0.25s linear;
        transform: none;
    }
}

/* ---- Formularfelder alle auf gleiche Höhe ---- */
#inseratSuchen .form-select,
#inseratSuchen .form-control,
#inseratSuchen .btn {
    height: var(--field-h);
}

/* ---- Google-Autocomplete (Web-Component) ----
   Nur border, border-radius, background-color, color-scheme, :focus-within
   werden zuverlässig übernommen. Feste Höhe = kein Springen beim Laden. */
gmp-place-autocomplete {
    width: 100%;
    height: var(--field-h);
    box-sizing: border-box;
    color-scheme: light;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}
gmp-place-autocomplete:focus-within {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}
.cities-section {
    padding: 3rem;
    background: #fafafa;
    margin: 3rem 0 3rem 0;
}
.cities-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.cities-country {
    margin-bottom: 1.5rem;
}
.cities-country-name {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.cities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.city-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    text-decoration: none;
    color: #111;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.city-link:hover {
    border-color: #e2001a;
    color: #e2001a;
}
.city-count {
    background: #f0f0f0;
    color: #666;
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}
.city-link:hover .city-count {
    background: #e2001a;
    color: #fff;
}
.latest-listings {
    margin: 3rem 0;
}
.latest-listings h2 {
    margin-bottom: 1.5rem;
}
.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.latest-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.latest-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.latest-card-img {
    aspect-ratio: 4/3;
    background: #f5f5f5;
}
.latest-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.latest-card-noimg {
    width: 100%;
    height: 100%;
    background: #eee;
}
.latest-card-body {
    padding: 1rem;
}
.latest-card-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.latest-card-city {
    color: #666;
    font-size: 0.9rem;
}
.latest-card-price {
    margin-top: 0.5rem;
    font-weight: 700;
}
@media (max-width: 768px) {
    .latest-grid {
        grid-template-columns: 1fr;
    }
}
/* View-Badge auf beliebten Inseraten */
.latest-card-img {
    position: relative;
}
.view-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(17, 17, 17, 0.8);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    z-index: 2;
}
.view-badge svg {
    flex-shrink: 0;
}
