
:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-strong: #111827;
    --text: #172033;
    --muted: #5d6780;
    --line: #dde3ef;
    --primary: #16355c;
    --accent: #d15d22;
    --accent-soft: #fef0e8;
    --success: #0f766e;
    --danger: #be123c;
    --danger-soft: #fff1f2;
    --shadow: 0 22px 55px rgba(17, 24, 39, 0.08);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Manrope", sans-serif;
    background: radial-gradient(circle at top, #edf3ff 0%, #f6f7fb 40%, #f6f7fb 100%);
    color: var(--text);
}

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    min-height: 100vh;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(221, 227, 239, 0.9);
}

.site-nav__inner,
.site-footer__inner,
.section,
.page-header__inner,
.admin-shell {
    width: min(calc(100% - 2rem), var(--max-width));
    margin: 0 auto;
}

.site-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand__logo {
    display: block;
    width: auto;
    height: 40px;
}

.brand__logo--footer {
    height: 48px;
    filter: brightness(0) invert(1);
}

.nav-links,
.nav-actions,
.lang-switcher,
.property-meta,
.property-facts,
.stats-grid,
.filters-grid,
.card-grid,
.detail-layout,
.footer-grid {
    display: flex;
    gap: 1rem;
}

.nav-links {
    align-items: center;
}

.nav-links a {
    color: var(--muted);
    font-weight: 600;
}

.nav-links a.is-active,
.nav-links a:hover {
    color: var(--accent);
}

.nav-actions {
    align-items: center;
}

.lang-switcher {
    align-items: center;
    gap: 0.2rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.2rem;
}

.lang-switcher button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 0.55rem 0.7rem;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1;
}

.lang-flag {
    display: block;
    flex: 0 0 auto;
    width: 1.3rem;
    height: 0.95rem;
    border: 1px solid rgba(221, 227, 239, 0.95);
    border-radius: 3px;
    object-fit: cover;
}

.lang-switcher button.is-active {
    background: var(--primary);
    color: white;
}

.btn,
.btn-outline,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 999px;
    padding: 0.9rem 1.3rem;
    border: 0;
    font-weight: 800;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn {
    background: var(--accent);
    color: white;
}

.btn-outline {
    background: white;
    color: var(--primary);
    border: 1px solid var(--line);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn:hover,
.btn-outline:hover,
.btn-danger:hover {
    transform: translateY(-1px);
}

.hero {
    width: 100%;
    margin: 0;
    overflow: hidden;
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    background:
        linear-gradient(135deg, rgba(22, 53, 92, 0.96), rgba(20, 39, 73, 0.7)),
        url("https://lh3.googleusercontent.com/aida-public/AB6AXuAljCgiI886T9-BeUasJchZe6ChqziRmdzCiuASXK292u1eKm-SYSlpQ_KdUbe3CLu_sqbzwvmB9AdOCpEFc-1x9lqGvWZbFmLvI1lLTtpON1sCNJZbKNoZpuRK1MCitOFDdHz57gRaK0M6fbQak36EqEVPMixIhNVtcDOrmVOZ0GOjWAot5nSaS9JBhkSJSVzLGkomFrZkIfEVbGVdKlmKSscWRndRHO9lre3Zt4JqctCLdzKLPuTi53-bHN-jrElxyOFg2-Ijzzg") center/cover no-repeat;
}

.hero__content {
    position: relative;
    z-index: 1;
    width: min(100% - 3rem, 960px);
    margin: 0 auto;
    text-align: center;
    color: white;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1,
.page-header h1 {
    margin: 1rem 0;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 0.94;
    letter-spacing: -0.04em;
}

.page-header h1 {
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: 1.08;
}

.hero p {
    margin-inline: auto;
}

.hero p,
.page-header p {
    margin: 0;
    max-width: 48rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.08rem;
    line-height: 1.7;
}

.search-card,
.panel,
.property-card,
.admin-card,
.detail-card,
.modal__card,
.empty-state,
.contact-card,
.metrics-bar {
    background: var(--surface);
    border: 1px solid rgba(221, 227, 239, 0.85);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.search-card {
    margin-top: 2rem;
    padding: 1rem;
}

.search-grid,
.filters-grid,
.form-grid,
.footer-grid,
.detail-layout,
.stats-grid,
.card-grid {
    display: grid;
}

.search-grid {
    grid-template-columns: 1.6fr 1fr auto;
    gap: 0.75rem;
}

.search-grid input,
.search-grid select {
    min-height: 3rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
    color: var(--text);
}

.section {
    padding: 4.5rem 0;
}

.section__head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.section__head h2 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: -0.03em;
}

.section__head p {
    margin: 0.4rem 0 0;
    color: var(--muted);
}

.card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.card-grid--results,
.card-grid--contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.property-card {
    overflow: hidden;
}

.property-card > a {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.property-card__media,
.gallery-main,
.gallery-thumb,
.similar-card__media {
    position: relative;
    overflow: hidden;
}

.property-card__media img,
.gallery-main img,
.gallery-thumb img,
.similar-card__media img,
.lightbox__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-card__media {
    height: 260px;
}

.property-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.3rem;
}

.property-card__price,
.detail-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.property-card__title,
.detail-title {
    margin: 0.5rem 0 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.property-card__title {
    min-height: 2.8em;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.property-card__description {
    max-height: 4.65em;
    margin: 0.35rem 0 0;
    color: var(--muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.property-card__location,
.detail-location,
.muted {
    color: var(--muted);
}

.property-card__location {
    min-height: 3em;
    margin-top: 0.35rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.property-card__body .property-meta {
    margin-top: auto;
    padding-top: 0.9rem;
}

.property-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pill--accent {
    background: var(--accent-soft);
    color: var(--accent);
}

.pill--dark {
    background: #edf2f7;
    color: var(--primary);
}

.property-facts {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.92rem;
}

.sold-ribbon {
    position: absolute;
    left: -28%;
    right: -28%;
    top: 1.8rem;
    transform: rotate(28deg);
    background: rgba(190, 18, 60, 0.96);
    color: white;
    text-align: center;
    padding: 0.95rem 0;
    font-weight: 900;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    box-shadow: 0 20px 42px rgba(17, 24, 39, 0.22);
}

.page-header {
    padding: 0;
    background: #0f172a;
    color: white;
}

.page-header__inner {
    width: min(calc(100% - 3rem), 1440px);
    padding: 4rem 0;
    text-align: center;
}

.page-header__inner h1 {
    margin-top: 0;
}

.page-header__inner p {
    margin-inline: auto;
}

.pagination,
.pagination__pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.pagination {
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination__nav,
.pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    color: var(--primary);
    font-weight: 800;
}

.pagination__nav {
    padding: 0.65rem 1rem;
}

.pagination__page {
    width: 2.75rem;
}

.pagination__page.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.pagination__nav.is-disabled {
    opacity: 0.4;
}

.filters-grid {
    grid-template-columns: 310px minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
}

.panel,
.detail-card,
.admin-card,
.contact-card {
    padding: 1.5rem;
}

.filter-form {
    display: grid;
    gap: 1rem;
}

.field,
.field textarea,
.field input,
.field select {
    width: 100%;
}

.field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary);
}

.field input,
.field select,
.field textarea {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
    color: var(--text);
    padding: 0.9rem 1rem;
    min-height: 3rem;
}

.field textarea {
    min-height: 7rem;
    resize: vertical;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.results-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--muted);
}

.gallery {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 0.85rem;
}

.gallery-main {
    min-height: 460px;
    border-radius: var(--radius-xl);
}

.gallery-side {
    display: grid;
    gap: 0.85rem;
}

.gallery-thumb {
    min-height: 222px;
    border-radius: var(--radius-lg);
}

.gallery-button {
    border: 0;
    padding: 0;
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
}

.detail-layout {
    grid-template-columns: minmax(0, 1.7fr) 360px;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.detail-title {
    font-size: 2.25rem;
}

.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.5rem;
}

.stat {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}

.stat__label {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat__value {
    margin-top: 0.45rem;
    font-weight: 800;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.similar-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
}

.similar-card__media {
    height: 180px;
}

.similar-card__body {
    padding: 1rem;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 80;
    padding: 1rem;
}

.lightbox.is-open {
    display: flex;
}

.lightbox__frame {
    position: relative;
    width: min(100%, 1200px);
}

.lightbox__image {
    max-width: 100%;
    max-height: 84vh;
    border-radius: 24px;
    object-fit: contain;
}

.lightbox__button,
.mobile-menu__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
}

.lightbox__button {
    position: absolute;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    color: white;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__button--prev {
    left: 1rem;
}

.lightbox__button--next {
    right: 1rem;
}

.lightbox__button--close {
    top: 1rem;
    right: 1rem;
    transform: none;
}

.lightbox__meta {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    background: rgba(17, 24, 39, 0.76);
    color: white;
    border-radius: 999px;
    padding: 0.8rem 1rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.admin-shell {
    padding: 2rem 0 4rem;
}

.metrics-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.15rem;
    margin-bottom: 1.5rem;
}

.metric {
    padding: 1rem 1.15rem;
    border-radius: 22px;
    background: linear-gradient(135deg, #fbfcff 0%, #eef4ff 100%);
    border: 1px solid var(--line);
}

.metric strong {
    display: block;
    font-size: 1.8rem;
    color: var(--primary);
}

.admin-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-form-page {
    width: min(100%, 960px);
    margin: 0 auto;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.admin-property-main td {
    padding-bottom: 0.35rem;
    border-bottom: 0;
}

.admin-property-main td:first-child {
    width: 60%;
}

.admin-property-actions td {
    padding-top: 0.35rem;
    padding-bottom: 1.2rem;
}

.table-actions button,
.ghost-link {
    border: 1px solid var(--line);
    background: white;
    color: var(--primary);
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-weight: 700;
}

.danger-note {
    border: 1px solid rgba(244, 63, 94, 0.16);
    background: var(--danger-soft);
    color: var(--danger);
    padding: 1rem 1.1rem;
    border-radius: 18px;
    font-weight: 700;
}

.upload-note {
    color: var(--muted);
    font-size: 0.86rem;
}

.image-strip {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.image-strip img {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--line);
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 90;
    padding: 1rem;
}

.modal.is-open {
    display: flex;
}

.modal__card {
    width: min(100%, 460px);
    padding: 1.5rem;
}

.site-footer {
    padding: 4rem 0 2rem;
    background: #0f172a;
    color: white;
    margin-top: 3rem;
}

.footer-grid {
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 1.25rem;
}

.site-footer p,
.site-footer li,
.site-footer a {
    color: rgba(255, 255, 255, 0.72);
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.7rem;
}

.footer-bottom {
    width: min(calc(100% - 2rem), var(--max-width));
    margin: 2rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.52);
    text-align: center;
}

.mobile-menu {
    display: none;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--muted);
}

.loading-screen {
    min-height: calc(100vh - 78px);
    display: grid;
    place-items: center;
    padding: 2rem;
    background:
        radial-gradient(circle at center, rgba(209, 93, 34, 0.1) 0%, rgba(209, 93, 34, 0) 32%),
        var(--bg);
}

.loading-screen__content {
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    text-align: center;
    animation: loading-rise 0.35s ease both;
}

.loading-screen__mark {
    position: relative;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    margin-bottom: 0.45rem;
    border-radius: 26px;
    background: white;
    box-shadow: 0 18px 45px rgba(22, 53, 92, 0.18);
}

.loading-screen__mark::before {
    content: "";
    position: absolute;
    inset: -7px;
    border: 3px solid rgba(22, 53, 92, 0.12);
    border-top-color: var(--accent);
    border-right-color: var(--accent);
    border-radius: 30px;
    animation: loading-spin 1s linear infinite;
}

.loading-screen__mark img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.loading-screen__content strong {
    color: var(--primary);
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.loading-screen__content span {
    color: var(--muted);
    font-size: 0.92rem;
}

@keyframes loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loading-rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-screen__content,
    .loading-screen__mark::before {
        animation: none;
    }
}

.hide-desktop {
    display: none;
}

@media (max-width: 1024px) {
    .card-grid,
    .similar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-grid--contact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filters-grid,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery-main {
        min-height: 340px;
    }

    .gallery-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .site-nav__inner {
        flex-wrap: wrap;
        padding: 0.75rem 0;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-menu {
        display: block;
        width: 100%;
        padding-bottom: 0.6rem;
    }

    .mobile-menu summary {
        list-style: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: var(--primary);
        font-weight: 700;
    }

    .mobile-menu__panel {
        display: grid;
        gap: 0.8rem;
        padding-top: 1rem;
    }

    .hero {
        min-height: 620px;
    }

    .hero__content {
        margin: 2rem auto;
        width: min(100% - 2rem, 100%);
    }

    .page-header__inner {
        width: min(calc(100% - 2rem), 1440px);
    }

    .search-grid,
    .card-grid,
    .stats-grid,
    .metrics-bar,
    .field-row {
        grid-template-columns: 1fr;
    }

    .brand__logo {
        height: 34px;
    }

    .section__head,
    .results-top {
        flex-direction: column;
        align-items: start;
    }

    .gallery-thumb {
        min-height: 160px;
    }

    .sold-ribbon {
        left: -44%;
        right: -44%;
        top: 1rem;
        font-size: 0.74rem;
        letter-spacing: 0.22em;
    }

    .hide-mobile {
        display: none;
    }

    .hide-desktop {
        display: inline-flex;
    }
}
