:root {
    --villa-page-container: 1180px;
}

/* Shared inner width for inner pages */
.villa-page-container {
    width: min(var(--villa-page-container), calc(100% - 72px));
    margin: 0 auto;
}

/* Villa hero slider */
.villa-hero {
    position: relative;
    min-height: 88vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    color: #fff;
    background: #102719;
}

.villa-hero-slides,
.villa-hero-slide,
.villa-hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.villa-hero-slide {
    opacity: 0;
    transform: scale(1.035);
    transition: opacity .75s ease, transform 5s ease;
}

.villa-hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.villa-hero-slide img {
    object-fit: cover;
}

.villa-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 72% 38%, rgba(0,0,0,.08), rgba(0,0,0,.45) 58%),
        linear-gradient(90deg, rgba(8, 18, 12, .84) 0%, rgba(8, 18, 12, .55) 42%, rgba(8, 18, 12, .2) 100%),
        linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.42));
}

.villa-hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--villa-page-container), calc(100% - 72px));
    margin: 0 auto;
    padding-top: 86px;
}

.villa-hero-content h1 {
    margin: 14px 0 0;
    font-family: "Playfair Display", serif;
    font-size: clamp(4rem, 7vw, 7.4rem);
    line-height: .92;
    letter-spacing: -.06em;
}

.villa-hero-script {
    margin: 8px 0 0;
    font-family: "Caveat", cursive;
    color: var(--gold-2, #e1bb65);
    font-size: clamp(2.1rem, 4vw, 4.2rem);
    line-height: .9;
}

.villa-hero-text {
    max-width: 520px;
    margin: 28px 0 0;
    color: rgba(255,255,255,.9);
    font-size: 1.08rem;
}

.villa-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.villa-slider-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    background: rgba(10,20,14,.32);
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    transition: .2s ease;
}

.villa-slider-arrow:hover {
    background: var(--gold, #c99a3a);
    color: var(--green, #183a28);
    border-color: transparent;
}

.villa-slider-prev { left: 24px; }
.villa-slider-next { right: 24px; }

.villa-slider-thumbs {
    position: absolute;
    z-index: 4;
    left: max(36px, calc((100vw - var(--villa-page-container)) / 2));
    bottom: 38px;
    display: flex;
    gap: 12px;
}

.villa-slider-thumbs button {
    width: 104px;
    height: 68px;
    padding: 0;
    border: 2px solid rgba(255,255,255,.45);
    border-radius: 13px;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
    opacity: .72;
    transition: .2s ease;
}

.villa-slider-thumbs button.is-active,
.villa-slider-thumbs button:hover {
    opacity: 1;
    border-color: var(--gold, #c99a3a);
    transform: translateY(-2px);
}

.villa-slider-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.villa-slider-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.villa-slider-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.45);
    cursor: pointer;
}

.villa-slider-dots button.is-active {
    width: 28px;
    background: var(--gold, #c99a3a);
}

/* Info + map */
.villa-info-section {
    padding: 88px 0 70px;
    background: var(--cream, #faf7f0);
}

.villa-info-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 56px;
    align-items: center;
}

.villa-info-copy h2,
.villa-section-heading h2,
.villa-reservation-card h2 {
    margin: 8px 0 0;
    font-family: "Playfair Display", serif;
    font-size: clamp(2.35rem, 4vw, 3.55rem);
    line-height: 1;
    letter-spacing: -.04em;
}

.villa-info-copy p {
    color: var(--muted, #6d6a63);
    font-size: 1rem;
}

.villa-info-note {
    margin: 22px 0 0;
    padding: 16px 18px;
    border-radius: 16px;
    background: #fff8e7;
    border: 1px solid rgba(201,154,58,.24);
    color: #5f4a1a;
}

.villa-contact-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.villa-contact-strip a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    color: var(--green, #183a28);
    border: 1px solid rgba(24,58,40,.1);
    font-weight: 800;
    font-size: .88rem;
}

.villa-map-card {
    overflow: hidden;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(24,58,40,.16);
}

.villa-map-card iframe {
    display: block;
    width: 100%;
    height: 420px;
    border: 0;
    filter: saturate(.9) contrast(.98);
}

.villa-map-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    background: #fff;
}

.villa-map-caption strong,
.villa-map-caption p {
    margin: 0;
}

.villa-map-caption p {
    color: var(--muted, #6d6a63);
    font-size: .9rem;
}

.villa-map-caption a {
    flex: 0 0 auto;
    color: var(--green, #183a28);
    font-weight: 850;
    font-size: .85rem;
    text-transform: uppercase;
}

/* Features */
.villa-features-section {
    padding: 78px 0;
    background:
        radial-gradient(circle at 12% 20%, rgba(201,154,58,.08), transparent 28%),
        linear-gradient(180deg, #fffaf2 0%, var(--cream, #faf7f0) 100%);
}

.villa-section-heading {
    margin-bottom: 34px;
}

.villa-section-heading.centered {
    text-align: center;
}

.villa-section-heading.centered .section-kicker {
    justify-content: center;
}

.villa-section-heading.centered > p {
    max-width: 660px;
    margin: 12px auto 0;
    color: var(--muted, #6d6a63);
}

.villa-features-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    overflow: hidden;
    border-radius: 26px;
    background: rgba(24,58,40,.12);
    box-shadow: 0 18px 60px rgba(24,58,40,.08);
}

.villa-feature-card {
    min-height: 190px;
    padding: 26px 18px;
    text-align: center;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(14px);
}

.villa-feature-card span {
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--green-soft, #edf4ee);
    color: var(--green, #183a28);
    font-size: 2.1rem;
}

.villa-feature-card h3 {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: 1.15rem;
}

.villa-feature-card p {
    margin: 8px 0 0;
    color: var(--muted, #6d6a63);
    font-size: .88rem;
    line-height: 1.45;
}

/* Gallery */
.villa-gallery-section {
    padding: 88px 0 96px;
    background: var(--cream, #faf7f0);
}

.villa-gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 34px;
}

.villa-gallery-filters button {
    min-height: 40px;
    padding: 9px 18px;
    border: 1px solid rgba(24,58,40,.13);
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    color: var(--green, #183a28);
    font-weight: 850;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .035em;
    cursor: pointer;
    transition: .2s ease;
}

.villa-gallery-filters button.is-active,
.villa-gallery-filters button:hover {
    background: var(--green, #183a28);
    color: #fff;
}

.villa-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 180px;
    gap: 14px;
}

.villa-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: var(--cream-2, #f2eadc);
    box-shadow: 0 16px 42px rgba(24,58,40,.08);
    isolation: isolate;
    transition: opacity .22s ease, transform .22s ease;
}

.villa-gallery-item.is-hidden {
    display: none;
}

.villa-gallery-item.is-large {
    grid-row: span 2;
}

.villa-gallery-item.is-wide {
    grid-column: span 2;
}

.villa-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease, filter .45s ease;
}

.villa-gallery-item:hover img {
    transform: scale(1.08);
    filter: saturate(1.08);
}

.villa-gallery-item span {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(8,18,12,.62);
    color: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    font-size: .82rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(8px);
    transition: .2s ease;
}

.villa-gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.42));
    opacity: 0;
    transition: .2s ease;
}

.villa-gallery-item:hover span,
.villa-gallery-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* Reservation CTA */
.villa-reservation-section {
    padding: 0 0 80px;
    background: var(--cream, #faf7f0);
}

.villa-reservation-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 42px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--green, #183a28), #102719);
    color: #fff;
    box-shadow: 0 24px 70px rgba(24,58,40,.18);
}

.villa-reservation-card p {
    max-width: 650px;
    margin: 14px 0 0;
    color: rgba(255,255,255,.76);
}

.villa-reservation-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 1180px) {
    .villa-features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .villa-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 920px) {
    .villa-page-container,
    .villa-hero-content {
        width: min(100% - 32px, var(--villa-page-container));
    }

    .villa-hero {
        min-height: 760px;
    }

    .villa-info-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .villa-map-card iframe {
        height: 360px;
    }

    .villa-slider-thumbs {
        display: none;
    }

    .villa-slider-dots {
        bottom: 28px;
    }

    .villa-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 190px;
    }

    .villa-gallery-item.is-wide {
        grid-column: span 1;
    }

    .villa-reservation-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .villa-reservation-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .villa-page-container,
    .villa-hero-content {
        width: min(100% - 28px, var(--villa-page-container));
    }

    .villa-hero-content h1 {
        font-size: clamp(3.4rem, 18vw, 4.8rem);
    }

    .villa-hero-script {
        font-size: 2.4rem;
    }

    .villa-hero-actions,
    .villa-reservation-actions {
        width: 100%;
    }

    .villa-slider-arrow {
        top: auto;
        bottom: 26px;
        width: 44px;
        height: 44px;
        font-size: 2rem;
    }

    .villa-slider-prev {
        left: 18px;
    }

    .villa-slider-next {
        right: 18px;
    }

    .villa-slider-dots {
        bottom: 40px;
    }

    .villa-info-section,
    .villa-features-section,
    .villa-gallery-section {
        padding: 62px 0;
    }

    .villa-map-caption {
        align-items: flex-start;
        flex-direction: column;
    }

    .villa-features-grid {
        grid-template-columns: 1fr;
    }

    .villa-gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }

    .villa-gallery-item.is-large {
        grid-row: span 1;
    }

    .villa-reservation-card {
        padding: 30px 24px;
    }
}


/* V3 small fixes */
.villa-slider-thumbs {
    display: none !important;
}

.villa-slider-dots {
    bottom: 42px;
}

@media (max-width: 920px) {
    .villa-slider-dots {
        bottom: 28px;
    }
}

@media (max-width: 640px) {
    .villa-slider-dots {
        bottom: 38px;
    }
}


/* V4: no CTA buttons in villa hero */
.villa-hero .villa-hero-actions {
    display: none !important;
}


/* Hero 2 - lower hero for inner/static pages
   Use with: <section class="villa-hero hero-2">
   This does not affect existing .villa-hero sections unless hero-2 is added.
*/

.villa-hero.hero-2 {
    min-height: 66vh;
}

.villa-hero.hero-2 .villa-hero-content {
    padding-top: 84px;
}

/* Hide slider controls automatically if hero-2 is used as a single-image hero */
.villa-hero.hero-2:not([data-villa-slider]) .villa-slider-arrow,
.villa-hero.hero-2:not([data-villa-slider]) .villa-slider-dots,
.villa-hero.hero-2:not([data-villa-slider]) .villa-slider-thumbs {
    display: none !important;
}

@media (max-width: 920px) {
    .villa-hero.hero-2 {
        min-height: 460px;
    }

    .villa-hero.hero-2 .villa-hero-content {
        padding-top: 84px;
    }
}

@media (max-width: 640px) {
    .villa-hero.hero-2 {
        min-height: 460px;
    }

    .villa-hero.hero-2 .villa-hero-content h1 {
        font-size: clamp(3rem, 16vw, 4.4rem);
    }

    .villa-hero.hero-2 .villa-hero-script {
        font-size: 2.25rem;
    }

    .villa-hero.hero-2 .villa-hero-text {
        margin-top: 18px;
        font-size: .98rem;
    }
}