/* ==========================================================================
   Moradia na Maia — Single-property showcase site
   ========================================================================== */

:root {
	--color-bg: #ffffff;
	--color-bg-alt: #f7f5f2;
	--color-text: #1f2937;
	--color-text-light: #6b7280;
	--color-primary: #b45309;
	--color-primary-dark: #92400e;
	--color-border: #e5e7eb;
	--font-heading: Manrope, 'Segoe UI', sans-serif;
	--font-body: Manrope, 'Segoe UI', sans-serif;
	--max-width: 1140px;
	--radius: 6px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--color-text);
	background: var(--color-bg);
	line-height: 1.6;
	font-weight: 400;
	letter-spacing: 0;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
	font-family: var(--font-heading);
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.2;
	margin: 0 0 0.5em;
}

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

a {
	color: var(--color-primary-dark);
}

.container {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 1.25rem;
}

#top {
	text-align: center;
}

#details {
	text-align: center;
}

.section {
	padding: 4rem 0;
}

.section-alt {
	background: var(--color-bg-alt);
}

.btn {
	display: inline-block;
	padding: 0.75rem 1.75rem;
	border-radius: var(--radius);
	text-decoration: none;
	font-weight: 600;
	border: none;
	cursor: pointer;
	font-size: 1rem;
}

.btn-primary {
	background: var(--color-primary);
	color: #fff;
	transition: background 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
	background: var(--color-primary-dark);
}

:focus-visible {
	outline: 3px solid var(--color-primary-dark);
	outline-offset: 2px;
}

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--color-border);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 0.85rem;
	padding-bottom: 0.85rem;
}

.logo {
	font-family: var(--font-heading);
	font-size: 1.4rem;
	font-weight: 400;
	text-decoration: none;
	color: var(--color-text);
	white-space: nowrap;
}

.logo span {
	color: var(--color-primary);
}

.main-nav ul {
	list-style: none;
	display: flex;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
}

.main-nav a {
	text-decoration: none;
	color: var(--color-text);
	font-weight: 500;
}

.main-nav a:hover {
	color: var(--color-primary);
}

.lang-switcher {
	display: flex;
	gap: 0.4rem;
}

.lang-btn {
	background: none;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 0.3rem 0.55rem;
	font-size: 0.8rem;
	cursor: pointer;
	color: var(--color-text-light);
}

.lang-btn.active {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 26px;
	height: 20px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
}

.nav-toggle span {
	display: block;
	height: 2px;
	background: var(--color-text);
	border-radius: 1px;
}

/* ---------- Hero ---------- */

.hero {
	position: relative;
	min-height: 78vh;
	display: flex;
	align-items: center;
	background: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?auto=format&fit=crop&w=1920&q=70') center/cover no-repeat;
	color: #fff;
}

.hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55));
}

.hero-content {
	position: relative;
	z-index: 1;
	max-width: 620px;
}

.hero-content h1 {
	font-size: clamp(2rem, 5vw, 3.2rem);
}

.hero-content p {
	font-size: 1.15rem;
	margin-bottom: 1.5rem;
}

.hero-property-summary {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	margin: 1.5rem 0;
	padding: 1rem 0;
	border-top: 1px solid rgba(255, 255, 255, 0.45);
	border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.hero-price {
	font-family: var(--font-heading);
	font-size: 2rem;
	font-weight: 400;
	line-height: 1;
}

.hero-property-summary .hero-facts {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
}

.hero-badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin-bottom: 1.75rem;
}

.badge {
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.4);
	color: #fff;
	padding: 0.35rem 0.9rem;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	backdrop-filter: blur(2px);
}

.hero-content .btn-primary {
	display: block;
	width: fit-content;
	margin: 0 auto;
}

/* ---------- Gallery ---------- */

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75rem;
}

.gallery-item {
	position: relative;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	overflow: hidden;
	border-radius: var(--radius);
	aspect-ratio: 3 / 2;
}

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

.gallery-item:hover img {
	transform: scale(1.05);
}

.gallery-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
	color: #fff;
	font-size: 0.8rem;
	font-weight: 600;
	text-align: left;
	padding: 1.5rem 0.6rem 0.5rem;
	pointer-events: none;
}

/* ---------- Floor plans ---------- */

.floorplan-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.floorplan-card h3 {
	font-size: 1.05rem;
	margin-bottom: 0.75rem;
}

.floorplan-item {
	aspect-ratio: 4 / 3;
	width: 100%;
	background: var(--color-bg-alt);
}

.floorplan-item img {
	object-fit: contain;
}

/* ---------- Details ---------- */

.features-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
	margin: 2rem 0;
	text-align: center;
}

.feature {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 0 0 calc((100% - 1.5rem) / 2);
	gap: 0.25rem;
}

.feature svg {
	width: 32px;
	height: 32px;
	stroke: var(--color-primary);
	fill: none;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.feature-value {
	font-size: 1.3rem;
	font-weight: 700;
}

.feature-label {
	font-size: 0.85rem;
	color: var(--color-text-light);
}

.description p {
	color: var(--color-text-light);
	max-width: 70ch;
	margin-left: auto;
	margin-right: auto;
}

.description h4 {
	margin-top: 1.5rem;
	font-size: 1rem;
}

.check-list {
	list-style: none;
	padding: 0;
	margin: 0.75rem 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	font-size: 0.92rem;
	color: var(--color-text-light);
}

.check-list li {
	padding-left: 1.4rem;
	position: relative;
}

.check-list li::before {
	content: '\2713';
	position: absolute;
	left: 0;
	color: var(--color-primary);
	font-weight: 700;
}

#details .check-list {
	width: fit-content;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

.floorplan-intro {
	margin-top: 0.75rem;
	font-weight: 600;
	font-size: 0.95rem;
}

/* ---------- Location ---------- */

.address {
	color: var(--color-text-light);
	margin-bottom: 1.25rem;
}

.map-wrapper {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--color-border);
}

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

/* ---------- Contact ---------- */

.contact-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
}

.contact-info ul {
	list-style: none;
	padding: 0;
	margin: 1.5rem 0 0;
}

.contact-info li {
	margin-bottom: 0.6rem;
}

.contact-highlight {
	background: var(--color-bg);
	border-left: 3px solid var(--color-primary);
	padding: 0.75rem 1rem;
	border-radius: var(--radius);
	font-size: 0.9rem;
	margin: 1rem 0 0;
}

.contact-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	background: var(--color-bg);
	padding: 1.5rem;
	border-radius: var(--radius);
	border: 1px solid var(--color-border);
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.form-field-inline {
	display: grid;
	grid-template-columns: 5.5rem minmax(0, 1fr);
	align-items: center;
	column-gap: 0.75rem;
}

.form-field label {
	font-weight: 600;
	font-size: 0.9rem;
}

.form-field input,
.form-field textarea {
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	font-family: inherit;
	font-size: 1rem;
}

.form-field-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-status {
	min-height: 1.2em;
	font-size: 0.9rem;
}

.form-status.success {
	color: #15803d;
}

.form-status.error {
	color: #b91c1c;
}

/* ---------- Footer ---------- */

.site-footer {
	padding: 1.5rem 0;
	text-align: center;
	color: var(--color-text-light);
	font-size: 0.85rem;
	border-top: 1px solid var(--color-border);
}

/* ---------- Lightbox ---------- */

.lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	align-items: center;
	justify-content: center;
	z-index: 100;
}

.lightbox[hidden] {
	display: none;
}

.lightbox img {
	max-width: 90vw;
	max-height: 85vh;
	border-radius: var(--radius);
}

.lightbox-caption {
	color: #fff;
	font-size: 0.95rem;
	text-align: center;
	max-width: 90vw;
	margin: 0;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
	position: absolute;
	background: none;
	border: none;
	color: #fff;
	font-size: 2rem;
	cursor: pointer;
	padding: 0.5rem 1rem;
}

.lightbox-close {
	top: 1rem;
	right: 1rem;
}

.lightbox-prev {
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

.lightbox-next {
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
	.nav-toggle {
		display: flex;
	}

	.main-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		border-bottom: 1px solid var(--color-border);
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.25s ease;
	}

	.main-nav.open {
		max-height: 320px;
	}

	.main-nav ul {
		flex-direction: column;
		gap: 0;
	}

	.main-nav li {
		border-top: 1px solid var(--color-border);
	}

	.main-nav a {
		display: block;
		padding: 0.85rem 1.25rem;
	}

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

@media (min-width: 600px) {
	.feature {
		flex-basis: calc((100% - 4.5rem) / 4);
	}
}

@media (min-width: 768px) {
	.gallery-grid {
		grid-template-columns: repeat(3, 1fr);
	}

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

@media (min-width: 900px) {
	.contact-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 1024px) {
	.feature {
		flex-basis: calc((100% - 9rem) / 7);
	}
}