:root {
    --bg: #f5f6fa;
    --surface: #ffffff;
    --text: #111827;
    --text-muted: #4b5563;
    --border: #e5e7eb;
    --brand: #2563eb;
    --brand-contrast: #ffffff;
}

:root[data-theme='dark'] {
    --bg: #0f172a;
    --surface: #111827;
    --text: #e5e7eb;
    --text-muted: #9ca3af;
    --border: #1f2937;
    --brand: #60a5fa;
    --brand-contrast: #0b1220;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.public-appbar {
    backdrop-filter: blur(14px);
    background-color: color-mix(in srgb, var(--surface) 88%, transparent) !important;
    border-bottom: 1px solid var(--border);
}

.brand-link {
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
}

.brand-text {
    margin-right: 1rem;
}

.appbar-link {
    margin-right: 0.75rem;
    color: var(--text-muted) !important;
    font-weight: 600;
}

.page-content {
    min-height: calc(100dvh - 64px);
}

.hero,
.listing-section,
.house-detail {
    width: min(1100px, 100% - 2rem);
    margin-inline: auto;
}

.hero {
    padding: 1.5rem 0 1rem;
}

.hero-panel {
    border-radius: 20px;
    overflow: hidden;
}

.hero-image-panel {
    padding: clamp(2rem, 4vw, 3.5rem);
    color: #f8fafc;
    background-image:
        linear-gradient(135deg, rgba(15, 23, 42, 0.5), rgba(30, 64, 175, 0.35)),
        url('/images/hero-mobile.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (min-width: 768px) {
    .hero-image-panel {
        background-image:
            linear-gradient(135deg, rgba(15, 23, 42, 0.5), rgba(30, 64, 175, 0.35)),
            url('/images/hero-desktop.jpg');
    }
}

.hero-content {
    width: 100%;
    max-width: none;
}

.hero h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #ffffff;
}

.hero-description {
    color: rgba(248, 250, 252, 0.92);
}

.hero-filter-panel {
    background: color-mix(in srgb, #ffffff 65%, transparent);
    border: 1px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(4px);
}

.hero-filter-panel .mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(71, 85, 105, 0.45) !important;
}

.hero-filter-panel .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(51, 65, 85, 0.7) !important;
}

.hero-filter-panel .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--brand) !important;
}

:root[data-theme='dark'] .hero-filter-panel {
    background: color-mix(in srgb, #0b1220 78%, transparent);
    border-color: rgba(148, 163, 184, 0.35);
}

:root[data-theme='dark'] .hero-filter-panel .mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, 0.72) !important;
}

:root[data-theme='dark'] .hero-filter-panel .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(226, 232, 240, 0.85) !important;
}

.hero-filter-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.hero-filter-actions {
    display: flex;
    justify-content: center;
}

.hero-filter-buttons {
    flex-wrap: wrap;
}

.hero-filter-buttons .mud-button-root {
    min-width: 8.5rem;
}

.results-summary {
    color: var(--text-muted);
}

.listing-section {
    padding-bottom: 2rem;
}

.section-copy,
.empty-state,
.location,
.meta,
.snippet {
    color: var(--text-muted);
}

.house-grid {
    margin-top: 0.25rem;
}

.house-card-link {
    display: block;
    height: 100%;
}

.house-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
}

.house-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.house-card-body {
    padding: 0.9rem;
}

.house-card h3 {
    margin: 0 0 0.35rem;
}

.snippet {
    margin: 0.45rem 0 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pagination button {
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 0.55rem 1rem;
    cursor: pointer;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: default;
}

.house-detail {
    padding: 1.2rem 0 2rem;
}

.gallery {
    margin: 1rem 0;
    height: min(52vh, 30rem);
}

.gallery-carousel-slide,
.gallery-carousel-item {
    height: 100%;
}

.gallery-carousel-item {
    overflow: hidden;
    border-radius: 12px;
}

.gallery-carousel-nav {
    background: rgba(17, 24, 39, 0.72);
    color: #fff !important;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.28);
}

.gallery-carousel-nav:hover,
.gallery-carousel-nav:focus-visible {
    background: rgba(17, 24, 39, 0.88);
}

.gallery img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.detail-copy,
.detail-facts {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}


.house-map-panel {
    overflow: hidden;
}

.house-map-embed {
    width: 100%;
    height: 280px;
    border: 0;
    display: block;
    margin-top: 0.75rem;
    border-radius: 10px;
}

.house-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.65rem 1rem;
    margin-top: 0.35rem;
}

.house-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.house-feature-icon {
    color: #16a34a;
    font-size: 1.1rem;
    flex: 0 0 auto;
}

.house-feature-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.practical-info-list {
    padding-left: 0;
}

.practical-info-list .mud-list-item-gutters {
    padding-left: 0;
    padding-right: 0;
}

.detail-copy p {
    white-space: pre-line;
}

.back-link {
    color: var(--brand);
}

.cookie-consent-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1400;
}

.cookie-consent-panel {
    max-width: 720px;
    margin-inline: auto;
    background: var(--surface);
    border-color: var(--border);
}

.cookie-consent-actions {
    flex-wrap: wrap;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1rem;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 600px) {
    .hero-filter-actions {
        width: 100%;
    }

    .hero-filter-buttons {
        width: 100%;
        flex-direction: column;
    }

    .hero-filter-buttons .mud-button-root {
        width: 100%;
        min-width: 0;
    }

    .accommodations-heading {
        font-size: 1.6rem !important;
    }
}
