/* Azul & Branco — estilos do site */
:root {
  --brand: #3BBDE8;        /* azul do logótipo */
  --brand-600: #1F9BCB;    /* azul para botões e links (melhor contraste) */
  --brand-700: #167CA5;
  --brand-50: #EAF7FC;
  --ink: #0F2A3D;          /* azul-marinho para texto */
  --ink-2: #3D5466;
  --muted: #6B7F8E;
  --line: #DCE6EC;
  --bg: #FFFFFF;
  --bg-alt: #F4F8FA;
  --ok: #1E8E5A; --soon: #1F9BCB; --res: #C47A12; --sold: #6B7F8E;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,42,61,.06), 0 8px 24px rgba(15,42,61,.08);
  --serif: 'Bitter', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--brand-700); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
svg { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: #fff; padding: 8px 12px; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-600); margin: 0 0 .5em; }
.eyebrow.light { color: var(--brand); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.4em; border-radius: 999px; border: 2px solid transparent; font: 700 1rem var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-outline { color: var(--brand-700); border-color: var(--brand-600); background: #fff; }
.btn-outline:hover { background: var(--brand-50); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }

/* Cabeçalho */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.brand img { width: 118px; height: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: .5em .85em; border-radius: 999px; }
.nav a:hover { background: var(--bg-alt); }
.nav a[aria-current="page"] { color: var(--brand-700); background: var(--brand-50); }
.nav .nav-phone { display: inline-flex; align-items: center; gap: .45em; margin-left: 8px; background: var(--ink); color: #fff; }
.nav .nav-phone:hover { background: var(--brand-700); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: .8em 1em; }
  .nav .nav-phone { margin: 8px 0 0; justify-content: center; }
  .brand img { width: 96px; }
}

/* Hero */
.hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(59,189,232,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(59,189,232,.08) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(110deg, transparent 20%, #000 75%); }
.hero::after { content: ""; position: absolute; right: -10%; bottom: -40%; width: 60%; aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(59,189,232,.25); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; padding: clamp(56px, 9vw, 112px) 0; }
.hero h1 span { color: var(--brand); }
.hero .lead { color: #C9D7E0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.quick-search { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.25); display: grid; gap: 14px; }
.quick-search h2 { font-size: 1.35rem; margin: 0 0 4px; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; gap: 32px; } }

/* Formulários */
label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; color: var(--ink-2); }
input, select, textarea { font: 400 1rem var(--sans); color: var(--ink); width: 100%; padding: .75em .9em; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(31,155,203,.18); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%233D5466' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6em center; background-size: 1.3em; padding-right: 2.2em; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand-600); }
.check.inline { align-items: center; align-self: end; padding-bottom: .8em; }
.check.inline input { margin: 0; }
.contact-form { display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: #B42318; }

/* Secções */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 36px; }
.section-head.row { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.link-more { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; text-decoration: none; }
.page-head { background: var(--ink); color: #fff; padding: clamp(48px, 7vw, 80px) 0; position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(59,189,232,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(59,189,232,.08) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(110deg, transparent 30%, #000 85%); }
.page-head .wrap { position: relative; }
.page-head .lead { color: #C9D7E0; margin: 0; }

/* Serviços */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service { display: block; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.service:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.service svg { width: 44px; height: 44px; fill: var(--brand-600); margin-bottom: 16px; }
.service p { color: var(--ink-2); margin: 0; font-size: .97rem; }
@media (max-width: 1000px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }

/* Cartões de imóveis */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15,42,61,.06), 0 16px 40px rgba(15,42,61,.14); }
.card-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.card-media { position: relative; aspect-ratio: 4/3; background: var(--bg-alt); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .badge { position: absolute; top: 12px; left: 12px; }
.card-media .chip { position: absolute; top: 12px; right: 12px; background: rgba(15,42,61,.85); color: #fff; font-size: .78rem; font-weight: 700; padding: .3em .8em; border-radius: 999px; }
.card-body { padding: 18px 20px 22px; }
.card-body h3 { font-size: 1.15rem; margin-bottom: .35em; }
.loc { display: flex; align-items: center; gap: .35em; color: var(--muted); font-size: .95rem; margin: 0 0 .6em; }
.facts { display: flex; gap: 16px; color: var(--ink-2); font-size: .92rem; margin-bottom: .6em; }
.facts span { display: inline-flex; align-items: center; gap: .35em; }
.price { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--ink); margin: 0; }
.price.big { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.card[data-estado="Vendido"] .card-media img, .card[data-estado="Arrendado"] .card-media img { filter: grayscale(.6); opacity: .8; }
.no-photo { height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.no-photo svg { width: 48px; height: 48px; fill: #C3D3DC; }
.no-photo.big { aspect-ratio: 16/7; background: var(--bg-alt); border-radius: var(--radius); margin-bottom: 32px; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .02em; padding: .3em .8em; border-radius: 999px; color: #fff; background: var(--ok); }
.badge-soon { background: var(--soon); }
.badge-res { background: var(--res); }
.badge-sold { background: var(--sold); }

/* Filtros */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; padding: 20px; background: var(--bg-alt); border-radius: var(--radius); margin-bottom: 20px; }
.result-count { color: var(--muted); font-weight: 600; margin-bottom: 20px; }
.empty { padding: 32px; background: var(--bg-alt); border-radius: var(--radius); text-align: center; }

/* Números */
.stats-band { background: var(--brand-600); color: #fff; padding: 56px 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stats strong { display: block; font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; margin-bottom: 8px; }
.stats span { font-size: .98rem; opacity: .95; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Duas colunas */
.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.cta-card { background: var(--ink); color: #fff; padding: 32px; border-radius: var(--radius); }
.cta-card p { color: #C9D7E0; }
.cta-phone { display: flex; align-items: center; gap: .5em; color: #fff; font-weight: 700; margin-top: 16px; text-decoration: none; font-size: 1.1rem; }
.prose p { color: var(--ink-2); }
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

/* Cronologia */
.timeline { list-style: none; margin: 0 0 32px; padding: 0 0 0 20px; border-left: 2px solid var(--brand); }
.timeline li { position: relative; padding: 0 0 22px 16px; }
.timeline li::before { content: ""; position: absolute; left: -29px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-600); }
.timeline strong { display: block; font-family: var(--serif); font-size: 1.2rem; }
.timeline span { color: var(--ink-2); }

/* Página de imóvel */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .92rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.detail { padding-top: 32px; }
.detail-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.detail-head h1 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
.detail-price { text-align: right; }
.detail-price .badge { margin-bottom: 8px; }
@media (max-width: 640px) { .detail-price { text-align: left; } }
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-bottom: 40px; }
.gallery button { position: relative; padding: 0; border: 0; background: var(--bg-alt); cursor: zoom-in; border-radius: 10px; overflow: hidden; display: block; width: 100%; height: 100%; }
.gallery-main { aspect-ratio: 4/3; }
.gallery-main img, .gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.03); }
.gallery-thumbs { display: grid; gap: 12px; grid-auto-rows: 1fr; min-height: 0; }
.gallery-thumbs.n2, .gallery-thumbs.n4 { grid-template-columns: 1fr 1fr; }
.gallery-thumbs.n4 { grid-template-columns: 1fr 1fr; }
.gallery-thumbs.n3 { grid-template-columns: 1fr 1fr; }
.gallery-thumbs.n3 button:first-child { grid-column: 1 / -1; }
.gallery-thumbs.n2 { grid-template-columns: 1fr; }
.gallery .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15,42,61,.55); color: #fff; font-weight: 700; font-size: 1.1rem; }
.gallery:not(:has(.gallery-thumbs)) { grid-template-columns: 1fr; }
.gallery:not(:has(.gallery-thumbs)) .gallery-main { aspect-ratio: 16/8; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } .gallery-thumbs, .gallery-thumbs.n2, .gallery-thumbs.n3, .gallery-thumbs.n4 { grid-template-columns: repeat(4, 1fr); } .gallery-thumbs.n3 button:first-child { grid-column: auto; } .gallery-thumbs button { aspect-ratio: 1; } }
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 560px) { .specs { grid-template-columns: 1fr; } }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: grid; gap: 14px; position: sticky; top: 96px; }
.side-card h2 { font-size: 1.4rem; margin: 0; }
.side-card > p { margin: 0; color: var(--ink-2); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8,20,30,.94); display: grid; place-items: center; padding: 56px 16px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; }
.lb-next { right: 12px; top: 50%; }
.lb-count { position: absolute; bottom: 16px; color: #fff; font-weight: 600; }

/* Obras */
.works { display: grid; gap: 40px; }
.work { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.work:nth-child(even) .work-media { order: 2; }
.work-media { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); }
.work-media img { width: 100%; height: 100%; object-fit: cover; }
.work-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.work-thumbs button { padding: 0; border: 0; aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: zoom-in; }
.work-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 800px) { .work { grid-template-columns: 1fr; } .work:nth-child(even) .work-media { order: 0; } }
.empty-state { text-align: center; max-width: 560px; margin: 0 auto; }
.empty-state > svg { width: 64px; height: 64px; fill: var(--brand); margin-bottom: 12px; }
.empty-state p { color: var(--ink-2); }

/* Contactos */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.contact-grid .side-card { position: static; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.contact-list li > svg { margin-top: .3em; fill: var(--brand); }
.contact-list small { flex-basis: 100%; padding-left: calc(1.1em + 12px); margin-top: -10px; font-size: .78rem; opacity: .75; }
.contact-list.big { gap: 24px; margin-bottom: 28px; }
.contact-list.big li > svg { width: 22px; height: 22px; fill: var(--brand-600); }
.contact-list.big small { padding: 0; margin: 0; flex-basis: auto; display: block; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; }
.map iframe { width: 100%; height: 100%; border: 0; }

/* Rodapé */
.site-footer { background: var(--ink); color: #DCE6EC; padding: 64px 0 0; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer h2 { font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-logo { width: 150px; height: auto; margin-bottom: 16px; }
.site-footer .muted { color: #9FB3C1; }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); }
.social a:hover { background: var(--brand-600); }
.legal-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: .85rem; color: #9FB3C1; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
