/* ── Casa da Vila — design tokens from Figma ─────────────────────── */
:root {
	--cdv-bg: #F7F4EF;
	--cdv-bg-alt: #EDE8E0;
	--cdv-ink: #2C2825;
	--cdv-ink-deep: #1C1916;
	--cdv-accent: #8B7D6B;
	--cdv-muted: #6B5F55;
	--cdv-cream: #F7F4EF;
	--cdv-serif: 'Playfair Display', serif;
	--cdv-sans: 'DM Sans', sans-serif;
}

body {
	background: var(--cdv-bg);
	color: var(--cdv-ink);
	font-family: var(--cdv-sans);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	margin: 0;
}

html { scroll-behavior: smooth; }

a { text-decoration: none; }

/* Elementor wraps every widget — never let it add spacing of its own. */
.elementor-widget-container > *:first-child { margin-top: 0; }
.elementor-widget-container > *:last-child { margin-bottom: 0; }

.cdv-container {
	max-width: 80rem;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}
@media (min-width: 768px) {
	.cdv-container { padding-left: 3rem; padding-right: 3rem; }
}

/* ── Shared type helpers ─────────────────────────────────────────── */
.cdv-label {
	font-size: 0.75rem;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: var(--cdv-accent);
	font-weight: 500;
	margin: 0 0 1.5rem;
}
.cdv-heading {
	font-family: var(--cdv-serif);
	font-weight: 400;
	font-size: 1.875rem;
	line-height: 1.2;
	margin: 0 0 2rem;
	color: inherit;
}
@media (min-width: 768px) { .cdv-heading { font-size: 2.5rem; } }
@media (min-width: 1024px) { .cdv-heading { font-size: 3rem; } }

.cdv-hairline {
	width: 3rem;
	height: 1px;
	background: var(--cdv-accent);
	border: none;
	margin: 0 0 2rem;
}

.cdv-body {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--cdv-muted);
	font-weight: 300;
	margin: 0;
}
.cdv-body--sm { font-size: 0.875rem; max-width: 380px; }

.cdv-section-head > *:last-child { margin-bottom: 0; }

.cdv-only-mobile { display: block; }
.cdv-only-desktop { display: none !important; }
@media (min-width: 768px) {
	.cdv-only-mobile { display: none !important; }
	.cdv-only-desktop { display: block !important; }
	.cdv-only-desktop.cdv-gallery { display: grid !important; }
}

/* ── NAV ─────────────────────────────────────────────────────────── */
.cdv-nav {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 500;
	transition: background 0.5s, backdrop-filter 0.5s, border-color 0.5s;
	background: transparent;
	border-bottom: 1px solid transparent;
}
.cdv-nav.is-scrolled {
	background: rgba(247, 244, 239, 0.97);
	backdrop-filter: blur(8px);
	border-bottom-color: rgba(44, 40, 37, 0.1);
}
.cdv-nav__inner {
	max-width: 80rem;
	margin: 0 auto;
	padding: 0 1.5rem;
	height: 4rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
@media (min-width: 768px) { .cdv-nav__inner { padding: 0 3rem; } }

.cdv-nav__logo {
	font-family: var(--cdv-serif);
	font-weight: 500;
	font-size: 1.05rem;
	letter-spacing: 0.08em;
	color: var(--cdv-cream);
	transition: color 0.5s;
}
.cdv-nav.is-scrolled .cdv-nav__logo { color: var(--cdv-ink); }

.cdv-nav__right { display: flex; align-items: center; gap: 1.5rem; }

.cdv-nav__langs {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	font-weight: 500;
	color: rgba(247, 244, 239, 0.8);
	transition: color 0.5s;
}
.cdv-nav.is-scrolled .cdv-nav__langs { color: var(--cdv-accent); }
.cdv-nav__langs a { color: inherit; opacity: 0.45; transition: opacity 0.3s; }
.cdv-nav__langs a:hover, .cdv-nav__langs a.is-active { opacity: 1; }
.cdv-nav__sep { opacity: 0.4; }

.cdv-nav__cta {
	padding: 0.5rem 1.25rem;
	font-size: 0.75rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 500;
	transition: background 0.3s, color 0.5s, border-color 0.5s;
	border: 1px solid rgba(247, 244, 239, 0.7);
	color: var(--cdv-cream);
}
.cdv-nav.is-scrolled .cdv-nav__cta { border-color: var(--cdv-ink); color: var(--cdv-ink); }
.cdv-nav.is-scrolled .cdv-nav__cta:hover { background: var(--cdv-ink); color: var(--cdv-cream); }

/* ── HERO ────────────────────────────────────────────────────────── */
.cdv-hero {
	position: relative;
	width: 100%;
	height: 100vh;
	min-height: 600px;
	background: var(--cdv-bg-alt);
	overflow: hidden;
	margin: 0;
}
.cdv-hero__imgwrap {
	position: absolute;
	inset: 0;
	margin: 0;
	overflow: hidden;
}
.cdv-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: brightness(0.82);
}
.cdv-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.55) 100%);
	pointer-events: none;
}
.cdv-hero__text {
	position: absolute;
	bottom: 0; left: 0; right: 0;
	padding: 0 2rem 5rem;
	z-index: 2;
}
@media (min-width: 768px) { .cdv-hero__text { padding: 0 4rem 7rem; } }

.cdv-hero__location {
	font-size: 0.75rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	margin: 0 0 1rem;
	color: rgba(247, 244, 239, 0.7);
	font-weight: 300;
}
.cdv-hero__title {
	font-family: var(--cdv-serif);
	font-weight: 400;
	font-size: 3rem;
	line-height: 1;
	margin: 0 0 1.25rem;
	color: var(--cdv-cream);
	letter-spacing: -0.02em;
}
@media (min-width: 768px) { .cdv-hero__title { font-size: 4.5rem; } }
@media (min-width: 1024px) { .cdv-hero__title { font-size: 6rem; } }

.cdv-hero__subtitle {
	font-size: 1rem;
	max-width: 28rem;
	color: rgba(247, 244, 239, 0.8);
	font-weight: 300;
	margin: 0;
}
@media (min-width: 768px) { .cdv-hero__subtitle { font-size: 1.125rem; } }

.cdv-hero__scroll {
	position: absolute;
	bottom: 2rem; right: 2.5rem;
	width: 1px;
	height: 3rem;
	background: rgba(247, 244, 239, 0.4);
	animation: cdv-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
	z-index: 2;
}
@keyframes cdv-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── DETAILS LIST ────────────────────────────────────────────────── */
.cdv-details__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 1rem 0;
	border-bottom: 1px solid rgba(44, 40, 37, 0.1);
	margin: 0;
}
.cdv-details > .cdv-details__row:first-child { border-top: 1px solid rgba(44, 40, 37, 0.1); }
.cdv-details__label {
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cdv-accent);
	min-width: 120px;
}
.cdv-details__value {
	font-size: 0.875rem;
	text-align: right;
	color: var(--cdv-ink);
	font-weight: 300;
}

/* ── CAROUSEL ────────────────────────────────────────────────────── */
.cdv-carousel {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: var(--cdv-bg-alt);
	aspect-ratio: var(--cdv-ratio-mobile, 9 / 16);
}
@media (min-width: 768px) {
	.cdv-carousel { aspect-ratio: var(--cdv-ratio-desktop, 16 / 9); }
}

.cdv-carousel__track {
	display: flex;
	flex-wrap: nowrap;
	height: 100%;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
	margin: 0;
}
.cdv-carousel__slide {
	height: 100%;
	flex-shrink: 0;
	width: 100%;
	margin: 0;
}
.cdv-carousel__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cdv-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 2rem; height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(44, 40, 37, 0.45);
	border: none;
	cursor: pointer;
	color: #F7F4EF;
	opacity: 0.8;
	transition: opacity 0.3s, background 0.3s;
	z-index: 3;
	padding: 0;
}
.cdv-carousel__arrow:hover { opacity: 1; background: rgba(44, 40, 37, 0.7); }
.cdv-carousel__arrow--prev { left: 0.75rem; }
.cdv-carousel__arrow--next { right: 0.75rem; }

.cdv-carousel__dots {
	position: absolute;
	bottom: 0.75rem; left: 0; right: 0;
	display: flex;
	justify-content: center;
	gap: 0.375rem;
	z-index: 3;
}
.cdv-carousel__dot {
	width: 6px; height: 6px;
	border-radius: 9999px;
	border: none;
	cursor: pointer;
	background: rgba(247, 244, 239, 0.45);
	transition: all 0.3s;
	padding: 0;
}
.cdv-carousel__dot.is-active { width: 20px; background: #F7F4EF; }

/* ── GALLERY ─────────────────────────────────────────────────────── */
.cdv-gallery {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	grid-auto-rows: 220px;
	gap: 0.75rem;
}
.cdv-gallery__item { overflow: hidden; background: var(--cdv-bg); margin: 0; }
.cdv-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdv-gallery__item--large { grid-column: span 8; grid-row: span 2; }
.cdv-gallery__item--tall { grid-column: span 4; grid-row: span 2; }
.cdv-gallery__item--small { grid-column: span 5; }
.cdv-gallery__item--wide { grid-column: span 7; }

.cdv-gallery__strip {
	margin: 0.75rem 0 0;
	height: 240px;
	overflow: hidden;
	background: var(--cdv-bg);
}
.cdv-gallery__strip img {
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

/* ── CONDITIONS ──────────────────────────────────────────────────── */
.cdv-conditions__row {
	display: grid;
	grid-template-columns: 2fr 3fr;
	gap: 1rem;
	padding: 1.5rem 0;
	border-bottom: 1px solid rgba(44, 40, 37, 0.1);
	margin: 0;
}
.cdv-conditions__items > .cdv-conditions__row:first-child { border-top: 1px solid rgba(44, 40, 37, 0.1); }
.cdv-conditions__title {
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1.7;
	color: var(--cdv-accent);
	margin: 0;
}
.cdv-conditions__body {
	font-size: 0.875rem;
	line-height: 1.7;
	color: var(--cdv-ink);
	font-weight: 300;
	margin: 0;
}

/* ── DARK SECTION (host / location) ──────────────────────────────── */
.cdv-section--dark {
	background: var(--cdv-ink);
	color: var(--cdv-cream);
}
.cdv-section--dark .cdv-heading,
.cdv-section--dark .cdv-host__name,
.cdv-section--dark .cdv-host__place { color: var(--cdv-cream); }
.cdv-section--dark .cdv-body { color: rgba(247, 244, 239, 0.65); }

/* Host name variant — applied via the widget's CSS Classes field. */
.cdv-head--host .cdv-heading {
	font-style: italic;
	font-size: 2.25rem;
}
@media (min-width: 768px) { .cdv-head--host .cdv-heading { font-size: 3rem; } }

.cdv-host__place {
	font-family: var(--cdv-serif);
	font-weight: 400;
	font-size: 1.5rem;
	color: var(--cdv-cream);
	margin: 0 0 1rem;
}
@media (min-width: 768px) { .cdv-host__place { font-size: 1.875rem; } }

.cdv-host__signature {
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cdv-accent);
	margin: 0;
}

.cdv-host__contacts { margin-top: 3rem; display: flex; flex-direction: column; gap: 0.75rem; }
.cdv-contact-row { display: flex; align-items: center; gap: 1rem; margin: 0; }
.cdv-contact-row__label {
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cdv-accent);
	min-width: 80px;
}
.cdv-contact-row__value {
	font-size: 0.875rem;
	font-weight: 300;
	color: rgba(247, 244, 239, 0.55);
}
.cdv-contact-row:hover .cdv-contact-row__value { color: var(--cdv-cream); }

.cdv-host__mapframe {
	overflow: hidden;
	min-height: 340px;
	width: 100%;
}
.cdv-host__mapframe.is-muted { filter: grayscale(100%) contrast(0.85) brightness(0.9); }
.cdv-host__mapframe iframe { border: 0; display: block; width: 100%; height: 100%; }

/* ── FOOTER ──────────────────────────────────────────────────────── */
.cdv-footer {
	background: var(--cdv-ink-deep);
	border-top: 1px solid rgba(247, 244, 239, 0.06);
	padding: 3rem 0;
	margin: 0;
}
@media (min-width: 768px) { .cdv-footer { padding: 4rem 0; } }

.cdv-footer p { margin: 0; }

.cdv-footer__inner {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	justify-content: space-between;
}
@media (min-width: 768px) { .cdv-footer__inner { flex-direction: row; align-items: flex-end; } }

.cdv-footer__brand {
	font-family: var(--cdv-serif);
	font-weight: 500;
	font-size: 1.1rem;
	letter-spacing: 0.1em;
	color: var(--cdv-cream);
	margin-bottom: 0.75rem;
}
.cdv-footer__tagline {
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cdv-accent);
	font-weight: 300;
}
.cdv-footer__address p { font-size: 0.75rem; line-height: 2; color: rgba(247, 244, 239, 0.3); font-weight: 300; }
@media (min-width: 768px) { .cdv-footer__address { text-align: center; } }
.cdv-footer__rights p { font-size: 0.75rem; color: rgba(247, 244, 239, 0.2); font-weight: 300; }
.cdv-footer__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.75rem;
	font-size: 0.75rem;
	font-weight: 300;
}
.cdv-footer__links a {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	color: rgba(247, 244, 239, 0.45);
	transition: color 0.3s;
}
.cdv-footer__links a:hover { color: var(--cdv-cream); }
.cdv-footer__sep { color: rgba(247, 244, 239, 0.2); }
@media (min-width: 768px) { .cdv-footer__links { justify-content: flex-end; } }
@media (min-width: 768px) { .cdv-footer__rights { text-align: right; } }

/* ── Plain pages (legal / info) ──────────────────────────────────── */
.cdv-page {
	padding-top: 8rem;
	padding-bottom: 6rem;
	max-width: 48rem;
}
.cdv-prose h2 {
	font-family: var(--cdv-serif);
	font-weight: 400;
	font-size: 1.5rem;
	line-height: 1.3;
	margin: 2.5rem 0 1rem;
	color: var(--cdv-ink);
}
.cdv-prose p, .cdv-prose li { margin: 0 0 1rem; }
.cdv-prose ul { padding-left: 1.25rem; }
.cdv-prose a { color: var(--cdv-accent); text-decoration: underline; }
.cdv-prose a:hover { color: var(--cdv-ink); }

/* ── Mobile hardening ────────────────────────────────────────────── */

/* The logo, langs and CTA are one flex row. Below ~430px their intrinsic
   widths exceed the viewport and the logo wraps to a second line, breaking
   out of the 4rem bar and landing on the hero image. */
.cdv-nav__logo {
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	min-height: 24px;
}

@media (max-width: 480px) {
	.cdv-nav__inner { padding: 0 1rem; }
	.cdv-nav__logo { font-size: 0.875rem; letter-spacing: 0.05em; }
	.cdv-nav__right { gap: 0.75rem; }
	.cdv-nav__langs { gap: 0.25rem; }
	.cdv-nav__cta { padding: 0.5rem 0.75rem; letter-spacing: 0.1em; }
}

/* Tap targets. Each of these renders below the 24px minimum, so the hit area
   is grown without changing the visual size. */
.cdv-nav__langs a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	min-height: 24px;
}

.cdv-carousel__dot { position: relative; }
.cdv-carousel__dot::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 24px;
	height: 24px;
	transform: translate(-50%, -50%);
}
@media (max-width: 767px) { .cdv-carousel__dots { gap: 1rem; } }

.cdv-contact-row__value {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
}

/* ── WP / Elementor chrome ───────────────────────────────────────── */
body.admin-bar .cdv-nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar .cdv-nav { top: 46px; } }
.cdv-main { display: block; }
