:root {
    --bg: #f7f2ea;
    --paper: rgba(255, 255, 255, .9);
    --paper-solid: #fffdf8;
    --text: #1d2529;
    --muted: #68737a;
    --line: rgba(32, 55, 60, .12);
    --accent: #176b75;
    --accent-dark: #0f4e56;
    --accent-soft: #e9f4f3;
    --gold: #c59b57;
    --gold-soft: #f4e9d6;
    --shadow: 0 20px 50px rgba(28, 43, 48, .12);
    --shadow-soft: 0 12px 32px rgba(28, 43, 48, .08);
    --radius: 28px;
    --max: 1180px;
    --safe-bottom-offset: 92px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    background-image: url("assets/backgrounds/villa-sea-hero.avif");
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    line-height: 1.6;
}

body::before,
body::after {
    content: none;
    display: none;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.topbar {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 73px;
    padding: 16px max(24px, calc((100vw - var(--max)) / 2));
    background: rgba(255, 253, 248, .78);
    border-bottom: 1px solid rgba(255, 255, 255, .68);
    box-shadow: 0 12px 34px rgba(35, 49, 53, .06);
}

.brand {
    text-decoration: none;
    font-size: 1.04rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-height: 40px;
}

.contact-link,
.btn-primary,
.btn-secondary,
.small-action,
.floating-whatsapp {
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, filter .25s ease;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 15px;
    border-radius: 999px;
    color: #fff;
    font-size: .92rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(23, 38, 44, .14);
}

.contact-link--whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.contact-link--telegram { background: linear-gradient(135deg, #2aabee, #1f95d4); }
.contact-link--instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.contact-link--vk { background: linear-gradient(135deg, #4c75a3, #2787f5); }
.contact-link--phone { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); }

.contact-link:hover,
.btn-primary:hover,
.btn-secondary:hover,
.small-action:hover,
.floating-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(23, 38, 44, .18);
}

.header,
.catalog-head,
.catalog,
.seo-section,
.lead-box,
.footer,
.back-nav,
.villa-details {
    width: min(var(--max), calc(100% - 40px));
    margin-inline: auto;
}

.header {
    height: 510px;
    min-height: 510px;
    display: flex;
    align-items: center;
    padding: 64px 0 44px;
}

.hero-shell {
    width: min(760px, 100%);
    padding: clamp(28px, 5vw, 54px);
    border-radius: 36px;
    background: rgba(255, 253, 248, .28);
    border: 1px solid rgba(255, 255, 255, .58);
    box-shadow: 0 18px 42px rgba(29, 37, 41, .08);
    animation: revealUp .65s ease both;
}

.header .eyebrow,
.header h1 {
    text-shadow: 0 2px 16px rgba(255, 253, 248, .55);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .16em;
}

h1,
h2,
h3,
p { margin-top: 0; }

.header h1,
.villa-header h1 {
    margin-bottom: 18px;
    font-size: clamp(2.3rem, 6vw, 5rem);
    line-height: .98;
    letter-spacing: -.055em;
}

.header p:not(.eyebrow),
.seo-intro p,
.lead-box p,
.description-box p,
.contact-box p {
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-actions,
.btn-row,
.object-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn-primary,
.btn-secondary,
.small-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 19px;
    border-radius: 999px;
    font-weight: 850;
}

.lead-box .btn-primary {
    min-width: 180px;
    min-height: 68px;
    padding: 12px 24px;
    text-align: center;
    line-height: 1.25;
    white-space: normal;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 14px 26px rgba(23, 107, 117, .23);
}

.btn-secondary,
.small-action {
    color: var(--accent-dark);
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(23, 107, 117, .18);
}

.catalog-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 0 14px;
}

.catalog-head h2,
.seo-intro h2,
.lead-box h2,
.similar-section h2 {
    margin-bottom: 8px;
    font-size: clamp(1.65rem, 3vw, 2.6rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

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

.sort-control {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .88rem;
}

.sort-control select {
    min-width: 210px;
    padding: 12px 42px 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .78);
    color: var(--text);
    font: inherit;
}

.catalog {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding: 18px 0 54px;
}

.villa-card,
.seo-grid article,
.description-box,
.video-section,
.contact-box,
.gallery-card,
.similar-card,
.purchase-steps,
.lead-box,
.error-message {
    background: var(--paper);
    border: 1px solid rgba(255, 255, 255, .74);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.villa-card {
    overflow: hidden;
    animation: revealUp .55s ease both;
    transition: transform .28s ease, box-shadow .28s ease;
}

.villa-card:nth-child(2) { animation-delay: .08s; }
.villa-card:nth-child(3) { animation-delay: .16s; }

.villa-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.villa-card--unique {
    position: relative;
    border-color: rgba(197, 155, 87, .95);
    background: linear-gradient(180deg, rgba(255, 252, 244, .96), rgba(255, 255, 255, .9));
    box-shadow: 0 24px 58px rgba(147, 104, 31, .22);
}

.villa-card--unique::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
    background:
        linear-gradient(135deg, rgba(197, 155, 87, .2), transparent 42%),
        radial-gradient(circle at 16% 8%, rgba(244, 233, 214, .72), transparent 34%);
}

.villa-card--unique > * {
    position: relative;
    z-index: 1;
}

.villa-card--unique:hover {
    box-shadow: 0 30px 70px rgba(147, 104, 31, .28);
}


.villa-card--unique .price-tag {
    color: #936724;
}

.villa-card--unique .small-action {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--gold), #a7772d);
    box-shadow: 0 12px 24px rgba(147, 103, 36, .2);
}

.more-villas-card {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: 26px;
    overflow: hidden;
    text-align: center;
    background: rgba(255, 253, 248, .92);
    border: 1px solid rgba(197, 155, 87, .72);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.more-villas-card__inner {
    display: grid;
    justify-items: center;
    gap: 14px;
}

.more-villas-card__eyebrow {
    color: var(--gold);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.more-villas-card h3 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.more-villas-card p {
    max-width: 330px;
    margin: 0;
    color: var(--muted);
}

.more-villas-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 14px 30px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(23, 107, 117, .22);
    transition: transform .25s ease, box-shadow .25s ease;
}

.more-villas-card__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(23, 107, 117, .28);
}


.villa-image-link {
    position: relative;
    display: block;
    height: 260px;
    overflow: hidden;
    background: var(--gold-soft);
}

.villa-image,
.similar-card img,
.gallery-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.villa-image {
    transition: transform .55s ease, filter .55s ease;
}

.villa-card:hover .villa-image {
    transform: scale(1.045);
    filter: saturate(1.04);
}

.badge {
    position: absolute;
    left: 16px;
    top: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 78, 86, .88);
    font-weight: 800;
    font-size: .82rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
}

.villa-info { padding: 22px; }
.villa-info h3 { margin-bottom: 6px; font-size: 1.28rem; }
.villa-info h3 a { text-decoration: none; }

.specs-mini,
.full-specs,
.details-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spec-chip,
.feature-chip {
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: .86rem;
    font-weight: 750;
}

.card-description { color: var(--muted); }

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
}

.price-tag,
.price {
    color: var(--accent-dark);
    font-size: 1.22rem;
    font-weight: 900;
}

.seo-section {
    margin-bottom: 54px;
    padding: clamp(24px, 5vw, 52px);
    border-radius: 36px;
    background: linear-gradient(135deg, rgba(255, 253, 248, .9), rgba(250, 244, 235, .78));
    border: 1px solid rgba(255, 255, 255, .72);
    box-shadow: var(--shadow-soft);
    content-visibility: auto;
    contain-intrinsic-size: 980px;
}

.seo-intro {
    width: min(760px, 100%);
    margin-bottom: 24px;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.seo-grid article {
    padding: 24px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.seo-grid article:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.seo-card-number {
    display: inline-flex;
    margin-bottom: 16px;
    color: var(--gold);
    font-weight: 950;
    letter-spacing: .08em;
}

.seo-grid h3 { margin-bottom: 8px; font-size: 1.2rem; }
.seo-grid p { margin-bottom: 0; color: var(--muted); }

.purchase-steps {
    margin-top: 20px;
    overflow: hidden;
}

.purchase-steps summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    cursor: pointer;
    list-style: none;
    color: var(--accent-dark);
    font-size: 1.1rem;
    font-weight: 900;
}

.purchase-steps summary::-webkit-details-marker { display: none; }

.purchase-steps summary strong {
    color: var(--text);
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--gold-soft);
    white-space: nowrap;
}

.steps-content {
    display: grid;
    gap: 12px;
    padding: 0 20px 22px;
}

.steps-content article {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .58);
    border: 1px solid var(--line);
}

.steps-content article > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-weight: 900;
}

.steps-content h3 { margin-bottom: 4px; }
.steps-content p { margin-bottom: 0; color: var(--muted); }

.lead-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 30px;
    margin-bottom: 50px;
    content-visibility: auto;
    contain-intrinsic-size: 260px;
}

.lead-box p { margin-bottom: 0; }

.footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 26px 0 calc(28px + env(safe-area-inset-bottom));
    color: var(--muted);
    font-size: .92rem;
}

.floating-whatsapp {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 14px 22px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #25d366, #128c7e);
    font-weight: 900;
    box-shadow: 0 16px 36px rgba(18, 140, 126, .28);
    animation: floatBreath 3.8s ease-in-out infinite;
}

.back-nav { padding: 22px 0 4px; }
.back-nav a { color: var(--accent-dark); font-weight: 800; text-decoration: none; }

.villa-details {
    --media-card-height: 450px;
    padding: 24px 0 50px;
}

.villa-header {
    width: min(820px, 100%);
    margin-bottom: 26px;
    animation: revealUp .55s ease both;
}

.details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    grid-template-areas:
        "media media"
        "description contact"
        "similar contact";
    gap: 24px;
    align-items: start;
}

.media-grid {
    grid-area: media;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.media-grid--no-plans,
.media-grid--no-video {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-grid--no-plans.media-grid--no-video {
    grid-template-columns: minmax(0, 1fr);
}

.gallery-card,
.media-grid .video-section {
    overflow: hidden;
}

.media-grid > .gallery-card,
.media-grid > .video-section {
    display: flex;
    flex-direction: column;
    height: var(--media-card-height);
    min-height: 0;
    margin-bottom: 0;
}

.gallery-stage,
.plans-stage,
.video-container,
.video-placeholder {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: hidden;
}

.gallery-stage {
    background: var(--gold-soft);
    cursor: zoom-in;
}

.gallery-main-image {
    cursor: zoom-in;
}

.plans-stage {
    display: grid;
    place-items: center;
    background: var(--gold-soft);
}

.plans-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
}

.plans-card[hidden],
.video-section[hidden] {
    display: none;
}

.plans-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 72px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.plans-head h2 {
    margin: 0;
    font-size: 1.2rem;
}

.plans-head span {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 800;
}

.gallery-thumbs,
.plans-thumbs {
    display: flex;
    gap: 10px;
    flex: 0 0 104px;
    min-height: 104px;
    padding: 14px;
    overflow-x: auto;
}

.gallery-thumb,
.plans-thumb {
    flex: 0 0 88px;
    height: 66px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
}

.gallery-thumb.active,
.plans-thumb.active {
    border-color: var(--gold);
}

.gallery-thumb img,
.plans-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-fullscreen-button,
.gallery-nav,
.gallery-lightbox-close,
.gallery-lightbox-nav,
.video-fullscreen-button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.gallery-fullscreen-button,
.video-fullscreen-button {
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 78, 86, .86);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.gallery-fullscreen-button:hover,
.video-fullscreen-button:hover {
    background: rgba(15, 78, 86, 1);
}

.gallery-controls {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 253, 248, .82);
    box-shadow: var(--shadow-soft);
}

.gallery-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-size: 1.4rem;
}

.gallery-count {
    min-width: 54px;
    text-align: center;
    color: var(--text);
    font-weight: 850;
}

.video-section {
    padding: 24px;
}

.video-section h2,
.description-box h2,
.contact-box h2 {
    margin-bottom: 12px;
}

.video-placeholder {
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 22px;
    background-size: cover;
    background-position: center;
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.video-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 24, .32);
}

.video-placeholder span {
    position: relative;
    z-index: 1;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

.video-container {
    border-radius: 22px;
    background: #111;
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-container:fullscreen,
.video-container:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    padding: 0;
    border-radius: 0;
    background: #000;
}

.video-container:fullscreen iframe,
.video-container:-webkit-full-screen iframe {
    width: 100%;
    height: 100%;
}

.description-box {
    grid-area: description;
    margin-bottom: 0;
    padding: 24px;
}

.full-specs { margin: 18px 0; }

.details-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spec-item {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .58);
    color: var(--muted);
}

.spec-item b {
    display: block;
    color: var(--text);
}

.similar-section { grid-area: similar; }

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

.similar-card {
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.similar-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.similar-card-body {
    display: grid;
    gap: 4px;
    padding: 16px;
}

.similar-card span { color: var(--muted); }
.similar-price { color: var(--accent-dark) !important; font-weight: 900; }

.contact-box {
    grid-area: contact;
    margin-bottom: 0;
    padding: 24px;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: calc(var(--lightbox-vh, 1vh) * 100);
    max-height: 100vh;
    overflow: hidden;
    background: rgba(10, 20, 24, .94);
    color: #fff;
}

.gallery-lightbox.open { display: grid; }

.gallery-lightbox-top,
.gallery-lightbox-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.gallery-lightbox-close {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text);
    background: #fff;
    font-weight: 850;
}

.gallery-lightbox-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    height: calc(100vh - 130px);
    overflow: hidden;
}

.gallery-lightbox-image {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: calc(100vh - 130px);
    object-fit: contain !important;
    object-position: center center;
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    font-size: 2rem;
}

.gallery-lightbox-prev { left: 20px; }
.gallery-lightbox-next { right: 20px; }
.lightbox-open { overflow: hidden; }
.error-message { max-width: 680px; margin: 60px auto; padding: 34px; text-align: center; }

.more-objects-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(8, 19, 23, .58);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.more-objects-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.more-objects-modal[hidden] {
    display: none;
}

.more-objects-modal__panel {
    position: relative;
    width: min(520px, 100%);
    padding: clamp(28px, 5vw, 44px);
    border-radius: 32px;
    background: rgba(255, 253, 248, .96);
    border: 1px solid rgba(255, 255, 255, .82);
    box-shadow: 0 28px 80px rgba(5, 15, 19, .28);
}

.more-objects-modal__panel h2 {
    margin-bottom: 12px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.more-objects-modal__panel p:not(.eyebrow) {
    color: var(--muted);
}

.more-objects-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.more-objects-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.modal-open {
    overflow: hidden;
}

@keyframes revealUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floatBreath {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

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

    .header {
        height: auto;
        min-height: 430px;
        padding-top: 46px;
    }

    .details-layout {
        display: flex;
        flex-direction: column;
        gap: 22px;
    }

    .media-grid,
    .media-grid--no-plans,
    .media-grid--no-video {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .media-grid > .gallery-card,
    .media-grid > .video-section {
        height: 430px;
    }

    .description-box,
    .similar-section,
    .contact-box {
        width: 100%;
    }

    .video-section { padding: 24px; }
}

@media (max-width: 760px) {
    body { background-attachment: scroll; }

    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 14px;
        min-height: 0;
    }

    .brand {
        min-width: 0;
    }

    .site-menu {
        justify-self: end;
    }

    .contacts {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .catalog-head,
    .lead-box,
    .footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .catalog,
    .seo-grid,
    .similar-grid {
        grid-template-columns: 1fr;
    }

    .sort-control,
    .sort-control select { width: 100%; }
    .details-list { grid-template-columns: 1fr; }
    .purchase-steps summary { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
    .header,
    .catalog-head,
    .catalog,
    .seo-section,
    .lead-box,
    .footer,
    .back-nav,
    .villa-details {
        width: min(100% - 28px, var(--max));
    }

    .hero-shell,
    .seo-section,
    .lead-box,
    .media-grid > .gallery-card,
    .media-grid > .video-section {
        border-radius: 24px;
    }

    .contact-link { flex: 1 1 auto; }
    .hero-actions a,
    .btn-row a { width: 100%; }

    .media-grid > .gallery-card,
    .media-grid > .video-section {
        height: 340px;
    }

    .plans-head {
        flex-basis: 62px;
        padding: 14px 16px;
    }

    .plans-head h2,
    .video-section h2 {
        font-size: 1.45rem;
    }

    .gallery-thumbs,
    .plans-thumbs {
        flex-basis: 92px;
        min-height: 92px;
        padding: 12px;
    }

    .gallery-thumb,
    .plans-thumb {
        flex-basis: 78px;
        height: 58px;
    }

    .villa-image-link,
    .similar-card img { height: 220px; }

    .floating-whatsapp {
        left: 14px;
        right: 14px;
        bottom: 14px;
    }

    .footer { padding-bottom: calc(var(--safe-bottom-offset) + env(safe-area-inset-bottom)); }
}


/* SEO content pages and hamburger navigation */
.site-menu {
    position: relative;
    z-index: 60;
    flex: 0 0 auto;
}

.site-menu-dropdown {
    position: relative;
}

.site-menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: 1px solid rgba(255, 255, 255, .72);
    cursor: pointer;
    list-style: none;
    box-shadow: 0 12px 26px rgba(23, 107, 117, .22);
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.site-menu-toggle::-webkit-details-marker {
    display: none;
}

.site-menu-toggle:hover,
.site-menu-dropdown[open] .site-menu-toggle {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(23, 38, 44, .18);
    filter: saturate(1.04);
}

.hamburger-icon {
    position: relative;
    display: grid;
    gap: 4px;
    width: 18px;
}

.hamburger-icon span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .22s ease, opacity .22s ease;
}

.site-menu-dropdown[open] .hamburger-icon span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.site-menu-dropdown[open] .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.site-menu-dropdown[open] .hamburger-icon span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.site-menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.site-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    z-index: 70;
    display: grid;
    gap: 8px;
    width: min(320px, calc(100vw - 28px));
    padding: 12px;
    border-radius: 22px;
    background: rgba(255, 253, 248, .98);
    border: 1px solid rgba(255, 255, 255, .86);
    box-shadow: 0 22px 54px rgba(28, 43, 48, .18);
}

.site-menu-list::before {
    content: "";
    position: absolute;
    right: 18px;
    top: -7px;
    width: 14px;
    height: 14px;
    background: rgba(255, 253, 248, .98);
    border-left: 1px solid rgba(255, 255, 255, .86);
    border-top: 1px solid rgba(255, 255, 255, .86);
    transform: rotate(45deg);
}

.site-menu-list a {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 13px;
    border-radius: 16px;
    color: var(--accent-dark);
    background: rgba(255, 255, 255, .58);
    border: 1px solid rgba(23, 107, 117, .1);
    text-decoration: none;
    font-size: .94rem;
    font-weight: 850;
    line-height: 1.2;
    transition: background .22s ease, transform .22s ease, box-shadow .22s ease;
}

.site-menu-list a:hover {
    background: var(--accent-soft);
    transform: translateX(-2px);
    box-shadow: 0 8px 20px rgba(28, 43, 48, .08);
}

.content-page,
.section-links {
    width: min(var(--max), calc(100% - 40px));
    margin-inline: auto;
}

.content-page {
    padding: 24px 0 54px;
}

.page-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 18px;
    color: var(--muted);
    font-size: .92rem;
}

.page-breadcrumbs a {
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: none;
}

.content-hero {
    width: min(920px, 100%);
    margin-bottom: 26px;
    padding: clamp(28px, 5vw, 54px);
    border-radius: 36px;
    background: rgba(255, 253, 248, .84);
    border: 1px solid rgba(255, 255, 255, .74);
    box-shadow: var(--shadow-soft);
}

.content-hero h1,
.article-body h1 {
    margin-bottom: 16px;
    font-size: clamp(2.1rem, 5vw, 4.35rem);
    line-height: 1;
    letter-spacing: -.05em;
}

.content-hero p:not(.eyebrow),
.section-head p,
.article-lead {
    color: var(--muted);
    font-size: 1.08rem;
}

.content-section,
.section-links {
    margin-bottom: 28px;
    padding: clamp(24px, 4vw, 38px);
    border-radius: 32px;
    background: var(--paper);
    border: 1px solid rgba(255, 255, 255, .74);
    box-shadow: var(--shadow-soft);
}

.content-section--narrow {
    width: min(900px, 100%);
}

.section-head {
    width: min(820px, 100%);
    margin-bottom: 20px;
}

.section-head h2,
.content-section h2,
.section-links h2 {
    margin-bottom: 10px;
    font-size: clamp(1.6rem, 3vw, 2.45rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.content-card-grid,
.section-link-grid,
.news-grid,
.page-villa-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.content-card,
.news-card,
.section-link-grid a,
.process-step,
.contact-panel__item,
.infographic-note {
    border-radius: 24px;
    background: rgba(255, 255, 255, .62);
    border: 1px solid var(--line);
    box-shadow: 0 10px 26px rgba(28, 43, 48, .06);
}

.content-card,
.news-card,
.section-link-grid a,
.infographic-note {
    padding: 22px;
}

.content-card h3,
.news-card h3,
.section-link-grid strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1.2;
}

.content-card p,
.news-card p,
.section-link-grid span,
.process-step p,
.content-section p,
.faq-list p {
    color: var(--muted);
}

.section-link-grid a,
.news-card a {
    text-decoration: none;
}

.page-villa-grid .villa-card {
    animation: none;
}

.process-grid {
    display: grid;
    gap: 14px;
}

.process-step {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 16px;
    padding: 18px;
}

.process-step > span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    font-weight: 900;
}

.process-step h3 {
    margin-bottom: 4px;
}

.content-list,
.source-list {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding-left: 20px;
    color: var(--muted);
}

.source-list a {
    color: var(--accent-dark);
    font-weight: 800;
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-list details {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .62);
    border: 1px solid var(--line);
}

.faq-list summary {
    cursor: pointer;
    color: var(--accent-dark);
    font-weight: 900;
}

.faq-list p {
    margin: 12px 0 0;
}

.infographic-note {
    border-color: rgba(197, 155, 87, .34);
    background: linear-gradient(135deg, rgba(244, 233, 214, .74), rgba(255, 255, 255, .62));
}

.infographic-note span,
.news-card span {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--gold);
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.contact-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.contact-panel__item {
    display: grid;
    gap: 4px;
    padding: 20px;
    text-decoration: none;
}

.contact-panel__item b {
    color: var(--accent-dark);
}

.contact-panel__item span {
    color: var(--muted);
}

.article-body h2 {
    margin: 26px 0 10px;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.article-cta {
    margin-top: 24px;
    padding: 22px;
    border-radius: 24px;
    background: var(--gold-soft);
}

.content-cta .btn-primary {
    min-width: 190px;
    text-align: center;
}

@media (max-width: 1100px) {
    .topbar {
        gap: 14px;
    }
}

@media (max-width: 980px) {
    .content-card-grid,
    .section-link-grid,
    .news-grid,
    .page-villa-grid,
    .contact-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-menu-list {
        right: 0;
    }
}

@media (max-width: 560px) {
    .content-page,
    .section-links {
        width: min(100% - 28px, var(--max));
    }

    .content-hero,
    .content-section,
    .section-links {
        border-radius: 24px;
    }

    .content-card-grid,
    .section-link-grid,
    .news-grid,
    .page-villa-grid,
    .contact-panel {
        grid-template-columns: 1fr;
    }

    .process-step {
        grid-template-columns: 1fr;
    }
}
