/* =========================================================================
   Nouvilas Child — estils base (v0.1)
   Valors extrets de la web original (Hooba): Roboto, teal #00857C
   ========================================================================= */

:root {
	--nv-primary: #00857c;
	--nv-primary-dark: #006d65;
	--nv-primary-light: #17a19a;
	--nv-text: #000;
	--nv-text-soft: #333;
	--nv-muted: #444;
	--nv-line: #e5e5e5;
	--nv-bg-soft: #f6f6f6;
	--nv-container: 1072px;
	--nv-font: 'Roboto', Arial, sans-serif;
}

/* Elementor: que el kit hereti la tipografia i els colors del lloc */
body[class*="elementor-kit-"] {
	--e-global-color-primary: #00857c;
	--e-global-color-secondary: #333333;
	--e-global-color-text: #000000;
	--e-global-color-accent: #17a19a;
	--e-global-typography-primary-font-family: 'Roboto';
	--e-global-typography-secondary-font-family: 'Roboto';
	--e-global-typography-text-font-family: 'Roboto';
	--e-global-typography-accent-font-family: 'Roboto';
	--container-max-width: 1072px;
}

/* Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--nv-font);
	font-size: 16px;
	line-height: 1.4;
	color: var(--nv-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--nv-primary); }
h1, h2, h3, h4 { font-family: var(--nv-font); line-height: 1.2; color: var(--nv-text); }

.nv-skip {
	position: absolute; left: -9999px; top: 0; z-index: 1000;
	background: #fff; padding: 8px 14px; color: var(--nv-text);
}
.nv-skip:focus { left: 8px; top: 8px; }

/* Botó -------------------------------------------------------------------- */
a.nv-btn,
button.nv-btn,
.elementor-widget.nv-btn .elementor-button {
	display: inline-block;
	background: var(--nv-primary);
	color: #fff;
	border: 1px solid var(--nv-primary-light);
	border-radius: 0;
	padding: 11px 30px;
	font-family: var(--nv-font);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease;
}
a.nv-btn:hover,
button.nv-btn:hover,
.elementor-widget.nv-btn .elementor-button:hover { background: var(--nv-primary-dark); color: #fff; }
.nv-btn--header { padding: 14px 30px; font-size: 16px; font-weight: 600; white-space: nowrap; }

/* Capçalera --------------------------------------------------------------- */
.nv-header { background: #fff; position: relative; z-index: 50; }
.nv-header__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 40px 60px;
}
.nv-logo { display: block; flex: 0 0 auto; line-height: 0; }
.nv-logo img { display: block; width: 176px; height: auto; }
.nv-logo__text { font-size: 20px; font-weight: 600; color: var(--nv-text); line-height: 1.2; }

.nv-panel {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.nv-nav { flex: 1; display: flex; justify-content: center; }
.nv-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 34px; }
.nv-menu > li { position: relative; }
.nv-menu a {
	display: block;
	padding: 8px 0;
	color: var(--nv-text-soft);
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
	transition: color .2s ease;
}
.nv-menu a:hover,
.nv-menu .current-menu-item > a,
.nv-menu .current-menu-ancestor > a,
.nv-menu .current-page-ancestor > a { color: var(--nv-primary); }

.nv-menu .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 9px; height: 9px;
	margin: 0 0 3px 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) scale(.8);
}
.nv-menu .sub-menu {
	list-style: none; margin: 0; padding: 8px 0;
	position: absolute; top: 100%; left: -16px; min-width: 220px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.nv-menu li:hover > .sub-menu,
.nv-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nv-menu .sub-menu a { padding: 9px 20px; font-weight: 400; white-space: nowrap; }

.nv-panel__right { display: flex; align-items: center; gap: 28px; }

/* Selector d'idioma */
.nv-lang { position: relative; }
.nv-lang__btn {
	display: inline-flex; align-items: center; gap: 6px;
	background: none; border: 0; padding: 8px 0; cursor: pointer;
	font: 500 16px/1 var(--nv-font); color: var(--nv-text-soft);
}
.nv-chev { fill: none; stroke: currentColor; stroke-width: 2.4; }
.nv-lang__list {
	list-style: none; margin: 0; padding: 6px 0;
	position: absolute; top: 100%; right: 0; min-width: 130px;
	background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	display: none; z-index: 10;
}
.nv-lang.is-open .nv-lang__list { display: block; }
.nv-lang__list a {
	display: flex; gap: 10px; align-items: baseline;
	padding: 8px 18px; color: var(--nv-text-soft); text-decoration: none; font-weight: 500;
}
.nv-lang__list a:hover { color: var(--nv-primary); }
.nv-lang__name { font-weight: 400; font-size: 13px; color: var(--nv-muted); }

/* Controls mòbil (amagats a escriptori) */
.nv-mobile { display: none; align-items: center; gap: 6px; margin-left: auto; }
.nv-icon { display: inline-flex; padding: 8px; color: #bebebe; }
.nv-icon:hover { color: var(--nv-text-soft); }
.nv-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nv-burger { background: none; border: 0; padding: 10px; cursor: pointer; display: inline-flex; flex-direction: column; gap: 5px; }
.nv-burger span { display: block; width: 24px; height: 2px; background: var(--nv-text-soft); transition: transform .2s ease, opacity .2s ease; }
.nv-header.is-open .nv-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nv-header.is-open .nv-burger span:nth-child(2) { opacity: 0; }
.nv-header.is-open .nv-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Molla de pa ----------------------------------------------------------- */
.nv-breadcrumb { max-width: var(--nv-container); margin: 0 auto; padding: 8px 24px 0; font-size: 13px; }
.nv-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.nv-breadcrumb li { color: var(--nv-text-soft); }
.nv-breadcrumb li + li::before { content: '>'; margin: 0 8px; color: var(--nv-text-soft); }
.nv-breadcrumb a { color: var(--nv-primary); text-decoration: none; }
.nv-breadcrumb a:hover { text-decoration: underline; }

.nv-main { min-height: 40vh; }

/* Peu ------------------------------------------------------------------- */
.nv-footer__main {
	background: var(--nv-primary);
	color: #fff;
	text-align: center;
	padding: 44px 24px 38px;
}
.nv-footer__main a { color: #fff; text-decoration: none; }
.nv-footer__logo { display: inline-block; line-height: 0; margin-bottom: 14px; }
.nv-footer__logo img { width: 220px; height: auto; }
.nv-footer__name { margin: 0 0 8px; font-size: 14px; font-weight: 700; text-transform: uppercase; }
.nv-footer__line { margin: 0 0 6px; font-size: 14px; font-weight: 500; line-height: 1.5; }
.nv-footer__line svg { fill: currentColor; stroke: currentColor; stroke-width: 0; vertical-align: -2px; margin-right: 6px; }

.nv-footer__bar { background: #000; color: #fff; }
.nv-footer__bar-inner {
	max-width: 1440px; margin: 0 auto; padding: 26px 58px;
	display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.nv-legal__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; max-width: 520px; }
.nv-legal__list a { color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; }
.nv-legal__list a:hover { text-decoration: underline; }
.nv-kd { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 16px; }
.nv-kd img { display: block; height: 40px; width: auto; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1024px) {
	.nv-header__inner { padding: 18px 20px; gap: 12px; }
	.nv-logo img { width: 120px; }
	.nv-mobile { display: flex; }

	.nv-panel {
		display: none;
		position: absolute; top: 100%; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 0;
		background: #fff; border-top: 1px solid var(--nv-line);
		box-shadow: 0 12px 24px rgba(0, 0, 0, .1);
		padding: 8px 20px 24px;
		max-height: calc(100vh - 80px); overflow-y: auto;
	}
	.nv-header.is-open .nv-panel { display: flex; }

	.nv-nav { justify-content: flex-start; }
	.nv-menu { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
	.nv-menu > li { border-bottom: 1px solid var(--nv-line); }
	.nv-menu a { padding: 14px 0; }
	.nv-menu .menu-item-has-children > a::after { display: none; }
	.nv-menu .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; padding: 0 0 8px 16px; min-width: 0;
	}
	.nv-menu .sub-menu a { padding: 9px 0; }

	.nv-panel__right { flex-direction: column; align-items: stretch; gap: 16px; padding-top: 18px; }
	.nv-lang__btn { padding: 4px 0; }
	.nv-lang__list { position: static; box-shadow: none; padding: 4px 0 0 0; }
	.nv-lang.is-open .nv-lang__list { display: flex; gap: 6px 24px; flex-wrap: wrap; }
	.nv-lang__list a { padding: 6px 0; }
	.nv-btn--header { text-align: center; }

	.nv-breadcrumb { padding: 4px 20px 0; }
	.nv-footer__bar-inner { padding: 22px 20px; flex-direction: column; align-items: flex-start; }
	.nv-kd img { height: 34px; }
}

/* =========================================================================
   Contingut d'Elementor (plantilles generades per build-pages.mjs)
   ========================================================================= */
.elementor .nv-h1 .elementor-heading-title {
	font-family: var(--nv-font); font-size: 30px; font-weight: 400; line-height: 1.2;
	color: #000; text-transform: none; margin: 0;
}
.elementor .nv-h2 .elementor-heading-title {
	font-family: var(--nv-font); font-size: 28px; font-weight: 400; line-height: 1.2; color: #000; margin: 0;
}
.elementor .nv-center,
.elementor .nv-center .elementor-heading-title { text-align: center; }
.elementor .nv-lead { font-size: 16px; line-height: 1.5; color: #000; }
.elementor .nv-lead p { margin: 0 0 12px; font-size: 16px; line-height: 1.5; color: #000; }
.elementor .nv-lead p:last-child { margin-bottom: 0; }

/* Galeria: 1 foto gran + 9 miniatures amb lightbox */
.nv-gallery { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); gap: 8px; align-items: start; }
.nv-gallery a { display: block; overflow: hidden; line-height: 0; }
.nv-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nv-gallery__main { aspect-ratio: 1 / 1; }
.nv-gallery__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.nv-gallery__thumb { aspect-ratio: 1 / 1; }
@media (max-width: 767px) {
	.nv-gallery { grid-template-columns: 1fr; }
	.nv-gallery__thumbs { grid-template-columns: repeat(2, 1fr); }
}

/* Carrusel genèric (serveis i valoracions) */
.nv-carousel { position: relative; padding: 0 44px; }
.nv-carousel__track {
	list-style: none; margin: 0; padding: 0; display: flex;
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
}
.nv-carousel__track::-webkit-scrollbar { display: none; }
.nv-carousel__track > li { flex: 0 0 calc(100% / var(--per, 4)); scroll-snap-align: start; padding: 0 8px; box-sizing: border-box; }
.nv-carousel__btn {
	position: absolute; top: 45%; transform: translateY(-50%);
	width: 36px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.nv-carousel__btn::before {
	content: ''; display: block; width: 14px; height: 14px;
	border-left: 2px solid var(--nv-primary); border-bottom: 2px solid var(--nv-primary);
}
.nv-carousel__btn--prev { left: 0; }
.nv-carousel__btn--prev::before { transform: rotate(45deg); }
.nv-carousel__btn--next { right: 0; }
.nv-carousel__btn--next::before { transform: rotate(-135deg); }
.nv-carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.nv-carousel__dots span { width: 9px; height: 9px; border-radius: 50%; background: #e5e5e5; }
.nv-carousel__dots span.is-active { background: var(--nv-primary); }
.nv-carousel.is-static { padding: 0; }
.nv-carousel.is-static .nv-carousel__btn,
.nv-carousel.is-static .nv-carousel__dots { display: none; }

.nv-amen__item { text-align: center; }
.nv-amen__item img { display: block; width: 200px; max-width: 100%; height: auto; margin: 0 auto; }
.nv-amen__item p { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.3; color: var(--nv-primary-light); }
.nv-amen__note { margin: 12px 0 0; text-align: center; font-size: 14px; color: #000; }
.nv-reviews__item img { display: block; width: 100%; height: auto; }

/* Dues imatges (Activitats) */
.nv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.nv-pair img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (max-width: 767px) { .nv-pair { grid-template-columns: 1fr; } }

/* Targetes del llistat d'apartaments */
.nv-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.nv-card a { position: relative; display: block; overflow: hidden; line-height: 0; text-decoration: none; }
.nv-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s ease; }
.nv-card a:hover img { transform: scale(1.04); }
.nv-card h3 {
	position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center;
	background: rgba(0, 0, 0, .32); color: #fff; font-size: 22px; font-weight: 500; line-height: 1.2; text-align: center;
}
@media (max-width: 1024px) { .nv-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .nv-cards { grid-template-columns: 1fr; } }
