/* Rodrigues Aluguéis – styles that theme.json can't express. */

/* ---- Header ---- */
.ra-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.ra-header .ra-logo img { height: 48px; width: auto; display: block; }
.ra-header .wp-block-navigation a { color: var(--wp--preset--color--ink); text-decoration: none; }
.ra-header .wp-block-navigation a:hover { color: var(--wp--preset--color--navy); }

/* ---- Buttons ---- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1.5px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--navy);
	padding-top: calc(0.95rem - 1.5px); padding-bottom: calc(0.95rem - 1.5px);
}
.ra-on-dark .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff; }
.ra-btn-light .wp-block-button__link { background: #fff; color: var(--wp--preset--color--navy); }
.ra-btn-light .wp-block-button__link:hover { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--navy-dark); }
.ra-wa .wp-block-button__link::before {
	content: ""; display: inline-block; width: 1.1em; height: 1.1em; margin-right: 0.5em; vertical-align: -0.2em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8.5 8.5 0 0 1-12.6 7.4L3 21l1.6-5.2A8.5 8.5 0 1 1 21 12z'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8.5 8.5 0 0 1-12.6 7.4L3 21l1.6-5.2A8.5 8.5 0 1 1 21 12z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---- Brand pattern on navy sections ---- */
.ra-pattern { background-image: url("../img/pattern.png"); background-size: 142px 68.5px; }

/* ---- Hero ---- */
.ra-eyebrow { font-family: var(--wp--preset--font-family--display); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
.ra-hero-img img, .ra-capa-vazia { display: block; border-radius: 10px; width: 100%; height: 420px; object-fit: cover; }
@media (max-width: 781px) { .ra-hero-img img, .ra-capa-vazia { height: 240px; } }

/* ---- Unit cards ---- */
.ra-cards { list-style: none; padding: 0; }
.ra-card {
	position: relative; height: 100%; display: flex; flex-direction: column;
	border: 1px solid var(--wp--preset--color--line); border-radius: 10px; overflow: hidden; background: #fff;
	transition: box-shadow .15s ease, border-color .15s ease;
}
.ra-card:hover { border-color: #9AB3CB; box-shadow: 0 6px 20px rgba(10, 72, 122, 0.08); }
.ra-card .wp-block-post-featured-image { margin: 0; position: relative; }
.ra-card .wp-block-post-featured-image img,
.ra-card .ra-sem-foto { display: block; width: 100%; height: 180px; object-fit: cover; }
.ra-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.ra-card .wp-block-post-title { margin: 0; font-size: 1.1875rem; }
.ra-card .wp-block-post-title a { color: var(--wp--preset--color--navy); text-decoration: none; }
.ra-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.ra-card p { margin: 0; }
.ra-card__meta { color: var(--wp--preset--color--muted); font-size: 0.875rem; }
.ra-card__foot {
	margin-top: auto !important; padding-top: 0.75rem; border-top: 1px solid #E3EAF1;
	display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem;
}
.ra-card__area { font-size: 0.9375rem; }
.ra-card__preco { font-weight: 600; font-size: 1.0625rem; }
.wp-block-post.ra-status-alugada .ra-card__preco,
.wp-block-post.ra-status-reforma .ra-card__preco { font-weight: 400; font-size: 0.9375rem; color: var(--wp--preset--color--muted); }
.ra-sem-foto { background: var(--wp--preset--color--navy) url("../img/pattern.png") 0 0 / 142px 68.5px; }

/* Status badge */
.ra-badge {
	display: inline-block; font-size: 0.75rem !important; font-weight: 600; line-height: 1;
	padding: 0.4em 0.75em; border-radius: 999px; background: var(--wp--preset--color--navy); color: #fff;
}
.ra-card .ra-badge { position: absolute; top: 0.85rem; right: 0.85rem; z-index: 2; }
.wp-block-post.ra-status-reforma .ra-badge, .ra-pagina-reforma .ra-unidade .ra-badge { background: #fff; color: var(--wp--preset--color--navy); box-shadow: inset 0 0 0 1px var(--wp--preset--color--navy); }
.wp-block-post.ra-status-alugada .ra-badge, .ra-pagina-alugada .ra-unidade .ra-badge { background: var(--wp--preset--color--muted); }
.wp-block-post.ra-status-alugada .ra-card .wp-block-post-featured-image img { filter: saturate(0.6); }

/* ---- Unit page ---- */
.ra-precos { border: 1px solid var(--wp--preset--color--line); border-radius: 12px; }
.ra-linha { display: flex; justify-content: space-between; gap: 1rem; margin: 0 !important; }
.ra-linha--total { border-top: 1px dashed var(--wp--preset--color--line); padding-top: 0.5rem; font-weight: 600; }
.ra-ficha { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; border-top: 1px solid #E3EAF1; }
.ra-ficha > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid #E3EAF1; }
.ra-ficha dt { color: var(--wp--preset--color--muted); }
.ra-ficha dd { margin: 0; font-weight: 500; text-align: right; }
@media (max-width: 600px) { .ra-ficha { grid-template-columns: 1fr; } }
.ra-galeria img, .ra-galeria .ra-sem-foto { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 10px; }
.ra-nota { font-size: 0.8125rem; color: var(--wp--preset--color--muted); }

/* ---- Click-to-load map ---- */
.ra-mapa {
	min-height: 320px; border-radius: 10px; background: var(--wp--preset--color--surface);
	border: 1.5px dashed #9AB3CB; display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 0.6rem; padding: 1.5rem; text-align: center; color: var(--wp--preset--color--muted);
}
.ra-mapa p { margin: 0; }
.ra-mapa__btn {
	font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; padding: 0.7rem 1.3rem; border-radius: 6px;
	border: 1.5px solid var(--wp--preset--color--navy); background: #fff; color: var(--wp--preset--color--navy);
}
.ra-mapa__btn:hover { background: var(--wp--preset--color--navy); color: #fff; }
.ra-mapa__aviso { font-size: 0.8125rem; }
.ra-mapa.is-loaded { padding: 0; border: 0; overflow: hidden; }
.ra-mapa iframe { width: 100%; height: 100%; min-height: 360px; border: 0; }

/* ---- Footer ---- */
.ra-footer a { color: #D5E2EE; }
.ra-footer a:hover { color: #fff; }
.ra-footer p { margin: 0; }

/* ---- Fixed WhatsApp bar on phones ---- */
.ra-wa-bar { display: none; }
@media (max-width: 781px) {
	.ra-wa-bar {
		display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
		padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom)); background: #fff;
		box-shadow: 0 -4px 16px rgba(10, 72, 122, 0.15);
	}
	.ra-wa-bar .wp-block-button, .ra-wa-bar .wp-block-button__link { width: 100%; text-align: center; }
	body { padding-bottom: 76px; }
}

/* Hide empty bound values (e.g. no IPTU). */
.ra-card p:empty, .ra-precos p:empty { display: none; }

/* Keyboard focus */
a:focus-visible, button:focus-visible { outline: 3px solid var(--wp--preset--color--caribe); outline-offset: 2px; }

/* ---- Filter pills ---- */
.ra-filtros { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ra-filtros a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; border-radius: 999px;
	border: 1.5px solid #9AB3CB; color: var(--wp--preset--color--navy); text-decoration: none; font-size: 0.9375rem;
}
.ra-filtros a:hover { border-color: var(--wp--preset--color--navy); }
.ra-filtros a.is-active { background: var(--wp--preset--color--navy); border-color: var(--wp--preset--color--navy); color: #fff; }

/* ---- Building cards ---- */
.ra-predios { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.5rem; }
.ra-predio { position: relative; background: #fff; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.ra-predio > img, .ra-predio > .ra-sem-foto { display: block; width: 100%; height: 300px; object-fit: cover; }
.ra-predio__body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.ra-predio h3 { margin: 0; }
.ra-predio h3 a { text-decoration: none; color: var(--wp--preset--color--navy); }
.ra-predio h3 a::after { content: ""; position: absolute; inset: 0; }
.ra-predio p { margin: 0; }
.ra-predio__end { color: var(--wp--preset--color--muted); }
.ra-predio__link { font-weight: 600; color: var(--wp--preset--color--navy); }

/* ---- Addresses + maps ---- */
.ra-enderecos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.ra-enderecos li { display: flex; gap: 0.75rem; align-items: flex-start; }
.ra-enderecos svg { color: var(--wp--preset--color--navy); flex: none; margin-top: 2px; }
.ra-enderecos div { display: flex; flex-direction: column; gap: 0.15rem; }
.ra-enderecos span { color: var(--wp--preset--color--muted); }
.ra-enderecos a { font-weight: 600; }
.ra-mapa--grande { min-height: 420px; }
/* Google My Maps embeds start with a title bar (map name, "made with My Maps", owner).
   Shift the map up inside the box so that bar is cut off; Google's logo and terms at the bottom stay visible. */
.ra-mapa--grande.is-loaded { position: relative; height: 420px; }
.ra-mapa--grande.is-loaded iframe { position: absolute; left: 0; right: 0; top: -72px; width: 100%; height: calc(100% + 72px); min-height: 0; }
.ra-predio-info { color: var(--wp--preset--color--muted); }

/* ---- Unit photos: main photo, strip (scrolls sideways), enlarged view ---- */
.ra-foto-principal { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; overflow: hidden; }
.ra-foto-principal img, span.ra-foto-principal { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.ra-foto-principal:hover img { opacity: 0.92; }
.ra-fotos { position: relative; margin-top: 0.75rem; }
.ra-fotos__lista {
	list-style: none; margin: 0; padding: 0 0 0.25rem; display: flex; gap: 0.6rem;
	overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth; scrollbar-width: thin;
}
.ra-fotos__lista li { flex: 0 0 auto; scroll-snap-align: start; }
.ra-fotos__item { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; overflow: hidden; }
.ra-fotos__item img { display: block; width: 136px; height: 102px; object-fit: cover; transition: opacity .15s; }
.ra-fotos__item:hover img { opacity: 0.85; }
.ra-fotos__seta {
	position: absolute; top: calc(50% - 0.125rem); transform: translateY(-50%); z-index: 2;
	width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255,255,255,0.92); color: var(--wp--preset--color--navy); font-size: 1.6rem; line-height: 1;
	box-shadow: 0 2px 8px rgba(10,72,122,0.25);
}
.ra-fotos__seta--ant { left: 6px; } .ra-fotos__seta--prox { right: 6px; }
.ra-fotos__seta[hidden] { display: none; }

.ra-lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 22, 38, 0.94); color: #fff; }
.ra-lightbox::backdrop { background: rgba(6, 22, 38, 0.94); }
.ra-lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem; padding: 3.5rem 4.5rem 2.5rem; box-sizing: border-box; }
.ra-lightbox img { max-width: 100%; max-height: calc(100dvh - 9rem); object-fit: contain; border-radius: 6px; }
.ra-lightbox figcaption { font-size: 1rem; text-align: center; max-width: 60ch; color: #E6EEF5; }
.ra-lightbox__contador { position: absolute; top: 1.1rem; left: 1.25rem; margin: 0; font-size: 0.9rem; color: #D5E2EE; }
.ra-lightbox button { position: absolute; border: 0; background: rgba(255,255,255,0.12); color: #fff; cursor: pointer; border-radius: 50%; width: 48px; height: 48px; font-size: 1.8rem; line-height: 1; }
.ra-lightbox button:hover { background: rgba(255,255,255,0.25); }
.ra-lightbox button[hidden] { display: none; }
.ra-lightbox__fechar { top: 0.75rem; right: 0.75rem; }
.ra-lightbox__nav { top: 50%; transform: translateY(-50%); }
.ra-lightbox__nav--ant { left: 0.75rem; } .ra-lightbox__nav--prox { right: 0.75rem; }
@media (max-width: 600px) {
	.ra-lightbox figure { padding: 3.5rem 0.75rem 5rem; }
	.ra-lightbox__nav { top: auto; bottom: 1rem; transform: none; }
}
