: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;
}

h1,
h2 {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

h1:focus,
h2:focus,
h1::selection,
h2::selection {
    background: transparent;
    color: inherit;
    outline: none;
}

.public-appbar {
    position: sticky;
    top: 0;
    z-index: 1100;
    gap: 0.5rem;
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    background-color: color-mix(in srgb, var(--surface) 78%, transparent) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
}

.brand-text {
    margin-right: 0;
}

.public-nav-links {
    align-items: center;
    flex-wrap: wrap;
}

.public-nav-links .mud-button-root {
    min-width: 0;
    padding-inline: 0.85rem;
    color: var(--text-muted) !important;
    font-weight: 600;
    text-transform: none;
}

.public-nav-links .mud-button-root:hover,
.public-nav-links .mud-button-root:focus-visible {
    color: var(--text) !important;
}

.book-now-button {
    margin-right: 0.25rem;
    text-transform: none;
    font-weight: 700;
}

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

.home-page,
.home-hero,
.home-section,
.listing-section,
.house-detail {
    width: 100%;
    margin-inline: auto;
}

.home-hero {
    padding: 0 0 1.5rem;
}

.home-hero__container,
.home-section .mud-container,
.listing-section {
    padding-inline: clamp(1rem, 2vw, 2rem);
}

.home-hero__container {
    padding-inline: 0;
}

.home-hero__panel {
    position: relative;
    top: -30px;
    overflow: hidden;
    border-radius: 0;
    padding: clamp(0.9rem, 2vw, 1.5rem) clamp(1rem, 3vw, 2.5rem);
    min-height: clamp(18rem, 34vw, 24rem);
    color: #f8fafc;
    background-image:
        linear-gradient(135deg, rgba(15, 23, 42, 0.64), rgba(37, 99, 235, 0.38)),
        url('/images/hero-mobile.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
}

@media (min-width: 768px) {
    .home-hero__panel {
        background-image:
            linear-gradient(135deg, rgba(15, 23, 42, 0.58), rgba(37, 99, 235, 0.32)),
            url('/images/hero-desktop.jpg');
    }
}

.home-hero__content {
    position: relative;
    z-index: 1;
    justify-content: center;
}

.home-hero__content--search-only {
    min-height: inherit;
}

.home-hero__copy {
    max-width: 48rem;
}

.home-hero__title {
    margin: 0;
    max-width: 12ch;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    line-height: 1.02;
    color: #ffffff;
    text-shadow: 0 6px 24px rgba(15, 23, 42, 0.35);
}

.home-hero__description {
    max-width: 44rem;
    color: rgba(248, 250, 252, 0.92);
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.home-hero__actions {
    flex-wrap: wrap;
}

.home-search-panel {
    width: min(48rem, 100%);
    margin-inline: auto;
    padding: clamp(1rem, 2vw, 1.5rem);
    border-radius: 22px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 42%, transparent), color-mix(in srgb, var(--surface) 18%, transparent));
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid color-mix(in srgb, var(--border) 42%, transparent);
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.home-search-panel .mud-input-control,
.home-search-panel .mud-input-label,
.home-search-panel .mud-input-helper-text,
.home-search-panel .mud-input-slot,
.home-search-panel .mud-input-adornment,
.home-search-panel .mud-input-adornment .mud-icon-root,
.home-search-panel .mud-input-adornment .mud-svg-icon,
.home-search-panel .mud-button-root,
.home-search-panel .mud-form-label {
    color: #ffffff !important;
}

.home-search-panel .mud-input-slot::placeholder {
    color: rgba(255, 255, 255, 0.82) !important;
    opacity: 1;
}

.home-search-panel .mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.48) !important;
}

.home-search-panel .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.74) !important;
}

.home-search-panel .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.92) !important;
}

:root[data-theme='dark'] .home-search-panel {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.62), rgba(30, 41, 59, 0.34));
    border-color: rgba(148, 163, 184, 0.26);
    box-shadow:
        0 18px 45px rgba(2, 6, 23, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.home-search-panel__title {
    font-weight: 700;
}

.home-search-panel__actions {
    gap: 0.75rem;
    flex-wrap: wrap;
}

.home-search-panel__buttons {
    flex-wrap: wrap;
}

.home-section {
    padding: 0.75rem 0 2.5rem;
}

.house-card-media {
    min-height: 12rem;
    background-color: color-mix(in srgb, var(--surface) 70%, transparent);
    background-size: cover;
    background-position: center;
}

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

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

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

.house-grid .mud-grid-item {
    display: flex;
}

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

.house-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    background: var(--surface);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.house-card:hover,
.house-card:focus-within {
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.house-card-body {
    padding: 0.9rem 0.95rem 1rem;
    flex: 1 1 auto;
}

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

.house-card-header {
    gap: 0.75rem;
}

.house-card-title {
    margin: 0;
    flex: 1 1 auto;
}

.minimum-price-group {
    margin-top: 4px;
    white-space: nowrap;
}

.minimum-price-inline {
    white-space: nowrap;
    font-weight: 700;
    color: var(--text-primary);
}

.minimum-price-info {
    color: var(--text-muted);
}

.minimum-price-info:hover,
.minimum-price-info:focus-visible {
    color: var(--text-primary);
}

.snippet {
    margin: 0.45rem 0 0;
}



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

.house-booking-quote {
    padding-inline: clamp(0.75rem, 2vw, 1.5rem);
}

.house-booking-quote__header {
    flex: 0 0 auto;
    min-width: 0;
}

.house-booking-quote__house-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.house-booking-quote__content {
    width: 100%;
    min-width: 0;
}

@media (max-width: 599.98px) {
    .house-booking-quote {
        padding-inline: 0.25rem !important;
    }

    .house-booking-quote__content {
        width: 100%;
    }

    .house-booking-quote .mud-stepper {
        margin: 0.25rem;
    }

    .house-booking-quote .mud-stepper-content {
        padding-inline: 0;
    }

    .house-booking-quote .mud-table-root .mud-table-cell,
    .house-booking-quote .mud-table-root .mud-typography {
        font-size: 0.875rem;
        line-height: 1.43;
    }

    .house-booking-quote .booking-payment-due-date {
        font-size: 0.75rem !important;
        line-height: 1.33;
        white-space: nowrap;
    }

    .house-booking-quote .booking-stay-summary {
        margin-top: 0.5rem;
    }
}

.house-facts {
    margin-left: 2px;
    flex-wrap: wrap;
}

.house-gallery {
    margin: 1rem 0;
}

.house-gallery img,
.house-image-lightbox img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.house-gallery-desktop {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr);
    gap: 1rem;
    align-items: start;
}

.house-gallery-preview {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.house-gallery-preview:focus-visible {
    outline: none;
}

.house-gallery-preview:focus-visible .mud-paper,
.house-gallery-preview:hover .mud-paper {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.house-gallery-spotlight,
.house-gallery-thumbnail,
.house-gallery-mobile-spotlight {
    overflow: hidden;
    border-radius: 12px;
}

.house-gallery-spotlight {
    min-height: min(52vh, 32rem);
}

.house-gallery-sidebar {
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 1rem;
}

.house-gallery-thumbnail {
    min-height: 0;
}

.house-gallery-mobile {
    display: grid;
    gap: 1rem;
}

.house-gallery-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-weight: 500;
}

.house-gallery-mobile-spotlight {
    max-height: min(60vh, 26rem);
}

.house-images-page {
    padding-bottom: 3rem;
}

.house-images-grid {
    column-count: 3;
    column-gap: 1rem;
}

.house-image-tile {
    display: block;
    width: 100%;
    margin: 0 0 1rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
    cursor: pointer;
    break-inside: avoid;
}

.house-image-tile img {
    width: 100%;
    height: auto;
    display: block;
}

.house-image-tile:focus-visible,
.house-image-tile:hover {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.house-image-lightbox-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(17, 24, 39, 0.82);
    backdrop-filter: blur(6px);
}

.house-image-lightbox {
    position: relative;
    max-width: min(92vw, 75rem);
    max-height: 90vh;
}

.house-image-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
}

.house-image-lightbox-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(17, 24, 39, 0.7);
    color: #fff !important;
}

@media (max-width: 959.98px) {
    .house-images-grid {
        column-count: 2;
    }
}

@media (max-width: 599.98px) {
    .house-images-grid {
        column-count: 1;
    }

    .house-gallery-mobile-spotlight img {
        aspect-ratio: 4 / 3;
    }
}

@media (min-width: 960px) {
    .house-gallery-spotlight img {
        height: min(52vh, 32rem);
    }

    .house-gallery-thumbnail img {
        height: calc((min(52vh, 32rem) - 1rem) / 2);
    }
}

.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;
    display: block;
    margin-top: 0.75rem;
    border-radius: 10px;
    overflow: hidden;
}

.search-details-page {
    padding: 1.5rem 0 2.5rem;
}

.search-results-layout {
    align-items: start;
}

.search-filters-panel,
.search-results-toolbar,
.search-results-map-panel {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
}

.search-filters-panel {
    position: sticky;
    top: 5.5rem;
}

.search-filters-actions,
.search-view-toggle {
    flex-wrap: wrap;
}

.search-results-toolbar__layout {
    gap: 1rem;
    flex-wrap: wrap;
}

.search-results-toolbar__summary {
    min-width: 0;
}

.search-details-back-button {
    flex: 0 0 auto;
}

.search-results-toolbar__controls {
    width: auto;
    margin-left: auto;
}

.search-view-toggle .mud-button-root {
    min-width: 7.5rem;
}

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

.search-results-list {
    min-width: 0;
}

.search-results-map {
    width: 100%;
    min-height: 32rem;
    margin-top: 0.5rem;
    border-radius: 18px;
    overflow: hidden;
}

.search-map-popup {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 180px;
}

.search-map-popup-thumb {
    width: 100%;
    max-height: 110px;
    object-fit: cover;
    border-radius: 8px;
}

.search-map-popup-title {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.search-map-popup-title:hover,
.search-map-popup-title:focus-visible {
    text-decoration: underline;
}

.search-map-popup-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-map-popup-action {
    color: var(--brand);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.search-map-popup-action:hover,
.search-map-popup-action:focus-visible {
    text-decoration: underline;
}

.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;
}

.cancellation-policy-content ul {
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
}

.cancellation-policy-content li {
    margin-bottom: 0.5rem;
}

.cancellation-policy-content li:last-child {
    margin-bottom: 0;
}

.cancellation-policy-caption {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.85em;
    color: var(--text-muted);
}

.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: 1279.98px) {
    .search-results-map {
        min-height: 26rem;
    }
}

@media (max-width: 959.98px) {
    .home-hero__panel {
        top: 0;
    }

    .search-filters-panel {
        position: static;
    }

    .search-results-toolbar__layout {
        flex-direction: column;
        align-items: stretch;
    }

    .search-results-toolbar__controls {
        width: 100%;
        justify-content: stretch;
    }

    .search-sort-select {
        width: 100%;
        min-width: 0;
    }

    .search-view-toggle {
        width: 100%;
    }

    .search-view-toggle .mud-button-root {
        flex: 1 1 0;
    }
}

@media (max-width: 600px) {
    .search-details-page {
        padding-inline: 0.5rem;
    }

    .search-filters-actions,
    .search-view-toggle {
        width: 100%;
    }

    .search-filters-actions .mud-button-root,
    .search-view-toggle .mud-button-root {
        width: 100%;
    }

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