/* ==========================================================================
   Arribas · Inmuebles: buscador tipo portal y ficha del inmueble
   ========================================================================== */

:root {
	--aai-navy: #0a2c3d;
	--aai-navy-2: #0e394e;
	--aai-sage: #88a082;
	--aai-sage-dark: #6f8a69;
	--aai-grey: #f5f5f5;
	--aai-line: #e4e8e6;
	--aai-text: #4a5a62;
	--aai-muted: #7d8a90;
	--aai-sale: #0a2c3d;
	--aai-rent: #6f8a69;
}

.aai-wrap {
	padding-left: 24px;
	padding-right: 24px;
}

@media (min-width: 1280px) {
	.aai-wrap {
		padding-left: 12px;
		padding-right: 12px;
	}
}

.aai-portal svg,
.aai-results svg,
.aai-single svg,
.aai-lightbox svg {
	width: 18px;
	height: 18px;
	flex: none;
}

/* --------------------------------------------------------------------------
   Cabecera del buscador
   -------------------------------------------------------------------------- */

.aai-portal {
	padding: 250px 0 44px;
	background-color: var(--aai-navy);
	background-image:
		radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px),
		linear-gradient(180deg, var(--aai-navy-2) 0%, var(--aai-navy) 100%);
	background-size: 22px 22px, 100% 100%;
	color: #fff;
}

@media (max-width: 1023px) {
	.aai-portal {
		padding-top: 40px;
	}
}

.aai-tabs {
	display: inline-flex;
	gap: 4px;
	margin-bottom: 22px;
	padding: 4px;
	background: rgba(255, 255, 255, .08);
}

.aai-tabs a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 20px;
	color: rgba(255, 255, 255, .8);
	font-family: Rajdhani, sans-serif;
	font-size: 1.1rem;
	font-weight: 700;
	text-decoration: none;
}

.aai-tabs a span {
	padding: 0 7px;
	border-radius: 20px;
	background: rgba(255, 255, 255, .14);
	font-family: Nunito, sans-serif;
	font-size: .75rem;
}

.aai-tabs a:hover {
	color: #fff;
}

.aai-tabs a.is-on {
	background: #fff;
	color: var(--aai-navy);
}

.aai-tabs a.is-on span {
	background: var(--aai-grey);
}

.aai-portal h1 {
	margin: 0 0 10px;
	color: #fff;
	opacity: 1;
	font-family: Rajdhani, sans-serif;
	font-size: 2.2rem;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -1px;
	text-align: left;
}

@media (min-width: 1024px) {
	.aai-portal h1 {
		font-size: 3rem;
	}
}

.aai-lead {
	max-width: 640px;
	margin: 0 0 26px;
	color: rgba(255, 255, 255, .78);
	font-family: Nunito, sans-serif;
	font-size: 1.05rem;
	line-height: 1.6;
}

/* Barra de filtros */
.aai-filters {
	display: grid;
	gap: 2px;
	padding: 2px;
	background: rgba(255, 255, 255, .1);
	box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

@media (min-width: 900px) {
	.aai-filters {
		grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
	}
}

@media (min-width: 560px) and (max-width: 899px) {
	.aai-filters {
		grid-template-columns: 1fr 1fr;
	}
}

.aai-filters label,
.aai-sort label {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 10px 16px;
	background: #fff;
}

.aai-filters label span,
.aai-sort label span {
	color: var(--aai-muted);
	font-family: Nunito, sans-serif;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.aai-filters select,
.aai-sort select {
	width: 100%;
	margin: 0;
	padding: 2px 22px 2px 0;
	border: 0;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a2c3d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right center / 16px no-repeat;
	color: var(--aai-navy);
	font-family: Nunito, sans-serif;
	font-size: 1rem;
	font-weight: 700;
	appearance: none;
	cursor: pointer;
	box-shadow: none;
}

.aai-filters select:focus,
.aai-sort select:focus {
	outline: 2px solid var(--aai-sage);
	outline-offset: 4px;
}

.aai-search-btn {
	min-height: 58px;
	padding: 0 36px;
	border: 0;
	background: var(--aai-sage-dark);
	color: #fff;
	font-family: Rajdhani, sans-serif;
	font-size: 1.2rem;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s;
}

.aai-search-btn:hover {
	background: var(--aai-sage);
}

@media (min-width: 560px) and (max-width: 899px) {
	.aai-search-btn {
		grid-column: 1 / -1;
	}
}

/* --------------------------------------------------------------------------
   Resultados
   -------------------------------------------------------------------------- */

.aai-results {
	padding: 32px 0 72px;
	background: var(--aai-grey);
	scroll-margin-top: 120px;
}

.aai-results-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 22px;
}

.aai-results-bar p {
	margin: 0;
	color: var(--aai-text);
	font-family: Nunito, sans-serif;
}

.aai-results-bar strong {
	color: var(--aai-navy);
	font-family: Rajdhani, sans-serif;
	font-size: 1.6rem;
}

.aai-results-bar a {
	color: var(--aai-sage-dark);
	font-weight: 700;
}

.aai-sort label {
	flex-direction: row;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	border: 1px solid var(--aai-line);
}

.aai-sort select {
	width: auto;
}

/* Rejilla de fichas */
.aai-grid {
	display: grid;
	gap: 22px;
}

@media (min-width: 640px) {
	.aai-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.aai-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.aai-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 0 var(--aai-line), 0 10px 30px rgba(10, 44, 61, .06);
	transition: transform .25s ease, box-shadow .25s ease;
}

.aai-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 1px 0 var(--aai-line), 0 18px 40px rgba(10, 44, 61, .14);
}

.aai-card-media {
	position: relative;
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: #e9ecea;
}

.aai-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}

.aai-card:hover .aai-card-media img {
	transform: scale(1.05);
}

.aai-badge {
	display: inline-block;
	padding: 5px 10px;
	background: var(--aai-sale);
	color: #fff;
	font-family: Nunito, sans-serif;
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.aai-badge.is-rent {
	background: var(--aai-rent);
}

.aai-badge.is-off {
	background: #b5462f;
}

.aai-card-media .aai-badge {
	position: absolute;
	top: 14px;
	left: 14px;
}

.aai-card-media .aai-badge.is-off {
	left: auto;
	right: 14px;
}

.aai-photos {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 20px;
	background: rgba(10, 44, 61, .75);
	color: #fff;
	font-family: Nunito, sans-serif;
	font-size: .8rem;
	font-weight: 700;
}

.aai-photos svg {
	width: 15px;
	height: 15px;
}

.aai-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 18px 20px 20px;
}

.aai-price {
	margin: 0 0 4px;
	color: var(--aai-navy);
	font-family: Rajdhani, sans-serif;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.1;
}

.aai-price small {
	margin-left: 6px;
	color: var(--aai-muted);
	font-family: Nunito, sans-serif;
	font-size: .82rem;
	font-weight: 600;
}

.aai-card-title {
	margin: 0 0 6px;
	font-family: Nunito, sans-serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0;
}

.aai-card-title a {
	color: var(--aai-navy);
	text-decoration: none;
}

.aai-card-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.aai-card {
	position: relative;
}

.aai-card-title a:hover {
	color: var(--aai-sage-dark);
}

.aai-city {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	color: var(--aai-text);
	font-family: Nunito, sans-serif;
	font-size: .92rem;
}

.aai-city svg {
	width: 16px;
	height: 16px;
	color: var(--aai-sage-dark);
}

.aai-feats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: auto 0 0;
	padding: 14px 0 0;
	border-top: 1px solid var(--aai-line);
	list-style: none;
	transform: translateY(8px);
}

.aai-feats li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	color: var(--aai-navy);
	font-family: Nunito, sans-serif;
	font-size: .88rem;
	font-weight: 600;
}

.aai-feats li::before {
	content: none !important;
}

.aai-feats svg {
	color: var(--aai-sage-dark);
}

.aai-card.is-off .aai-card-media img {
	filter: grayscale(.6);
	opacity: .8;
}

.aai-empty {
	padding: 48px 24px;
	background: #fff;
	text-align: center;
	font-family: Nunito, sans-serif;
}

.aai-empty-title {
	color: var(--aai-navy);
	font-family: Rajdhani, sans-serif;
	font-size: 1.5rem;
	font-weight: 700;
}

/* Aviso «no encuentras lo que buscas» */
.aai-alert {
	display: grid;
	align-items: center;
	gap: 18px 28px;
	margin-top: 40px;
	padding: 0 28px;
	background: var(--aai-navy);
	color: #fff;
	overflow: hidden;
}

@media (min-width: 900px) {
	.aai-alert {
		grid-template-columns: 150px 1fr auto;
	}
}

.aai-alert img {
	display: block;
	align-self: end;
	width: 150px;
	height: 170px;
	margin-top: 18px;
	object-fit: cover;
	object-position: center top;
}

@media (max-width: 899px) {
	.aai-alert {
		padding: 26px 22px;
	}

	.aai-alert img {
		display: none;
	}
}

.aai-alert-title {
	margin: 0 0 4px;
	color: #fff;
	font-family: Rajdhani, sans-serif;
	font-size: 1.6rem;
	font-weight: 700;
}

.aai-alert-text p:not(.aai-alert-title) {
	margin: 0;
	color: rgba(255, 255, 255, .8);
	font-family: Nunito, sans-serif;
	line-height: 1.6;
}

.aai-alert-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 20px;
	padding-bottom: 4px;
}

.aai-alert .btn {
	padding: 13px 28px;
	background: var(--aai-sage-dark);
}

.aai-alert .btn:hover {
	background: #fff;
	color: var(--aai-navy);
}

.aai-alert-tel {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	font-family: Rajdhani, sans-serif;
	font-size: 1.3rem;
	font-weight: 700;
}

/* La parte corporativa empieza con aire tras el buscador. */
.aal-page .aai-results + .aal-intro {
	padding-top: 88px;
}

/* --------------------------------------------------------------------------
   Ficha del inmueble
   -------------------------------------------------------------------------- */

.aai-single {
	padding: 220px 0 72px;
	background: #fff;
}

@media (max-width: 1023px) {
	.aai-single {
		padding-top: 28px;
	}
}

.aai-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 18px;
	color: var(--aai-muted);
	font-family: Nunito, sans-serif;
	font-size: .85rem;
}

.aai-crumbs a {
	color: var(--aai-text);
}

.aai-crumbs a:hover {
	color: var(--aai-sage-dark);
}

.aai-notice {
	margin: 0 0 18px;
	padding: 14px 18px;
	border-left: 4px solid #b5462f;
	background: #fbf1ee;
	color: var(--aai-navy);
	font-family: Nunito, sans-serif;
	font-weight: 600;
}

.aai-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: 22px;
}

.aai-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.aai-tag,
.aai-ref {
	padding: 4px 10px;
	background: var(--aai-grey);
	color: var(--aai-navy);
	font-family: Nunito, sans-serif;
	font-size: .78rem;
	font-weight: 700;
}

.aai-ref {
	background: transparent;
	color: var(--aai-muted);
}

.aai-single h1 {
	margin: 0 0 6px;
	color: var(--aai-navy);
	opacity: 1;
	font-family: Rajdhani, sans-serif;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -.5px;
	text-align: left;
}

@media (min-width: 1024px) {
	.aai-single h1 {
		font-size: 2.6rem;
	}
}

.aai-head-price {
	text-align: right;
}

.aai-head-price .aai-price {
	font-size: 2.4rem;
}

.aai-m2 {
	margin: 0;
	color: var(--aai-muted);
	font-family: Nunito, sans-serif;
}

/* Galería tipo portal: grande + 4 */
.aai-gallery {
	position: relative;
	display: grid;
	gap: 6px;
	margin-bottom: 36px;
}

@media (min-width: 768px) {
	.aai-gallery {
		grid-template-columns: 2fr 1fr 1fr;
		grid-template-rows: 230px 230px;
	}

	.aai-gallery .is-main {
		grid-row: 1 / 3;
	}

	.aai-gallery.is-few {
		grid-template-columns: 2fr 1fr;
	}
}

.aai-gal-item {
	position: relative;
	display: block;
	overflow: hidden;
	margin: 0;
	padding: 0;
	border: 0;
	background: #e9ecea;
	cursor: zoom-in;
}

@media (max-width: 767px) {
	.aai-gal-item:not(.is-main) {
		display: none;
	}

	.aai-gal-item.is-main {
		aspect-ratio: 4 / 3;
	}
}

.aai-gal-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease, filter .3s;
}

.aai-gal-item:hover img {
	transform: scale(1.03);
	filter: brightness(.92);
}

.aai-gal-all {
	position: absolute;
	right: 16px;
	bottom: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border: 0;
	background: #fff;
	color: var(--aai-navy);
	font-family: Nunito, sans-serif;
	font-weight: 800;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
	cursor: pointer;
}

.aai-gal-all:hover {
	background: var(--aai-navy);
	color: #fff;
}

/* Dos columnas: contenido + contacto fijo */
.aai-layout {
	display: grid;
	gap: 36px;
}

@media (min-width: 1024px) {
	.aai-layout {
		grid-template-columns: minmax(0, 1fr) 360px;
		gap: 56px;
		align-items: start;
	}
}

.aai-keyfacts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.aai-keyfacts li {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 12px 18px;
	background: var(--aai-grey);
	color: var(--aai-navy);
	font-family: Nunito, sans-serif;
	font-weight: 700;
}

.aai-keyfacts li::before {
	content: none !important;
}

.aai-keyfacts svg {
	width: 22px;
	height: 22px;
	color: var(--aai-sage-dark);
}

.aai-block {
	margin-bottom: 36px;
	padding-bottom: 32px;
	border-bottom: 1px solid var(--aai-line);
}

.aai-block h2,
.aai-similar h2 {
	margin: 0 0 16px;
	color: var(--aai-navy);
	opacity: 1;
	font-family: Rajdhani, sans-serif;
	font-size: 1.7rem;
	font-weight: 700;
	letter-spacing: -.3px;
}

.aai-desc,
.aai-desc p {
	color: var(--aai-text);
	font-family: Nunito, sans-serif;
	font-size: 1.02rem;
	line-height: 1.8;
}

.aai-desc p + p {
	margin-top: 12px;
}

.aai-specs {
	display: grid;
	gap: 0 40px;
	margin: 0;
}

@media (min-width: 640px) {
	.aai-specs {
		grid-template-columns: 1fr 1fr;
	}
}

.aai-specs div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid var(--aai-line);
	font-family: Nunito, sans-serif;
}

.aai-specs dt {
	color: var(--aai-muted);
}

.aai-specs dd {
	margin: 0;
	color: var(--aai-navy);
	font-weight: 700;
}

.aai-help {
	border-bottom: 0;
}

.aai-help-grid {
	display: grid;
	gap: 12px;
}

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

.aai-help-grid a {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px;
	border-top: 3px solid var(--aai-sage);
	background: var(--aai-grey);
	text-decoration: none;
	transition: background .2s;
}

.aai-help-grid a:hover {
	background: #eef1ed;
}

.aai-help-grid strong {
	color: var(--aai-navy);
	font-family: Rajdhani, sans-serif;
	font-size: 1.2rem;
}

.aai-help-grid span {
	color: var(--aai-text);
	font-family: Nunito, sans-serif;
	font-size: .9rem;
	line-height: 1.5;
}

/* Tarjeta de contacto */
.aai-contact {
	padding: 24px;
	border-top: 4px solid var(--aai-sage);
	background: #fff;
	box-shadow: 0 1px 0 var(--aai-line), 0 18px 44px rgba(10, 44, 61, .12);
}

@media (min-width: 1024px) {
	.aai-side {
		position: sticky;
		top: 140px;
	}
}

.aai-contact-price {
	margin: 0 0 16px;
	color: var(--aai-navy);
	font-family: Rajdhani, sans-serif;
	font-size: 2rem;
	font-weight: 700;
}

.aai-agent {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 18px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--aai-line);
	font-family: Nunito, sans-serif;
}

.aai-agent-photo {
	width: 64px;
	height: 64px;
	flex: none;
	overflow: hidden;
	border-radius: 50%;
	background: var(--aai-sage);
}

.aai-agent-photo img {
	display: block;
	width: 100%;
	height: auto;
	margin-top: 4px;
}

.aai-agent strong {
	display: block;
	color: var(--aai-navy);
	font-family: Rajdhani, sans-serif;
	font-size: 1.2rem;
}

.aai-agent em {
	color: var(--aai-muted);
	font-size: .85rem;
	font-style: normal;
}

.aai-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 10px;
	padding: 14px;
	border: 1px solid var(--aai-navy);
	color: var(--aai-navy);
	font-family: Rajdhani, sans-serif;
	font-size: 1.15rem;
	font-weight: 700;
	text-decoration: none;
	transition: background .2s, color .2s;
}

.aai-cta:hover {
	background: var(--aai-navy);
	color: #fff;
}

.aai-cta.is-primary {
	border-color: var(--aai-sage-dark);
	background: var(--aai-sage-dark);
	color: #fff;
}

.aai-cta.is-primary:hover {
	border-color: var(--aai-navy);
	background: var(--aai-navy);
}

.aai-cta.is-wa {
	border-color: #1f9d6a;
	color: #157a52;
}

.aai-cta.is-wa:hover {
	background: #1f9d6a;
	color: #fff;
}

.aai-contact-note {
	margin: 6px 0 0;
	color: var(--aai-muted);
	font-family: Nunito, sans-serif;
	font-size: .85rem;
	line-height: 1.5;
	text-align: center;
}

/* Similares */
.aai-similar {
	margin-top: 24px;
	padding-top: 40px;
	border-top: 1px solid var(--aai-line);
}

.aai-similar-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
}

.aai-similar-head a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--aai-sage-dark);
	font-family: Nunito, sans-serif;
	font-weight: 800;
}

/* Visor de fotos */
.aai-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(6, 22, 31, .96);
}

.aai-lightbox[hidden] {
	display: none;
}

.aai-lightbox figure {
	margin: 0;
	text-align: center;
}

.aai-lightbox img {
	max-width: 92vw;
	max-height: 84vh;
	object-fit: contain;
}

.aai-lightbox figcaption {
	margin-top: 10px;
	color: rgba(255, 255, 255, .75);
	font-family: Nunito, sans-serif;
}

.aai-lightbox button {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .1);
	color: #fff;
	cursor: pointer;
}

.aai-lightbox button:hover {
	background: rgba(255, 255, 255, .22);
}

.aai-lightbox button svg {
	width: 26px;
	height: 26px;
}

.aai-lb-close {
	top: 20px;
	right: 20px;
}

.aai-lb-prev {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.aai-lb-next {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
}

/* Botón Buscar: ocupa toda la altura de la barra y se alinea con los campos. */
.aai-filters {
	align-items: stretch;
}

.aai-portal .aai-search-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	height: auto;
	min-height: 64px;
	margin: 0;
	border-radius: 0;
	line-height: 1;
	box-shadow: none;
	align-self: stretch;
}

.aai-filters select {
	padding-left: 0 !important;
	text-indent: 0;
}

/* El tema ajusta por JS el padding superior de la cabecera a la altura del menú fijo: el aire va dentro. */
@media (min-width: 1024px) {
	.aai-portal .aai-tabs {
		margin-top: 44px;
	}
}

@media (min-width: 1024px) {
	.aai-single .aai-crumbs {
		margin-top: 36px;
	}
}
