/* ==========================================================================
   VITA LUSITANA — Design System v2
   Estética: Apple. Tipografia grande, muito espaço branco, animações subtis,
   grelhas limpas e imagens em destaque.
   Ficheiro autónomo: substitui style.css nas páginas novas.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Cor */
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-deep: #0b0b0d;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);

  --brand: #0b6e6a;
  --brand-2: #12a097;
  --brand-soft: rgba(11, 110, 106, 0.08);
  --gold: #e2a412;
  --gold-bright: #ffc000;

  /* Tipografia */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;

  /* Escala fluida */
  --t-hero: clamp(2.6rem, 7.2vw, 5.75rem);
  --t-xl: clamp(2.2rem, 5.2vw, 4rem);
  --t-lg: clamp(1.85rem, 3.6vw, 2.85rem);
  --t-md: clamp(1.3rem, 2vw, 1.6rem);
  --t-body: clamp(1rem, 1.15vw, 1.125rem);

  /* Espaçamento */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 10vw, 9rem);
  --maxw: 1240px;

  /* Formas e sombras */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.04), 0 18px 48px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 40px 90px rgba(0, 0, 0, 0.16);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 68px;
}

/* --------------------------------------------------------------------------
   2. RESET + BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.028em;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   3. UTILITÁRIOS
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--alt {
  background: var(--bg-alt);
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.section-head {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-head h2 {
  font-size: var(--t-lg);
}

.section-head p {
  margin-top: 1.1rem;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--ink-2);
  letter-spacing: -0.015em;
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--ink-2);
  letter-spacing: -0.015em;
}

/* Botões --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
    color 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--ink);
  color: #fff;
}
.btn--primary:hover {
  background: #000;
  box-shadow: var(--shadow-md);
}

.btn--brand {
  background: var(--brand);
  color: #fff;
}
.btn--brand:hover {
  background: #095a57;
  box-shadow: 0 12px 30px rgba(11, 110, 106, 0.28);
}

.btn--gold {
  background: var(--gold-bright);
  color: #1d1d1f;
  font-weight: 600;
}
.btn--gold:hover {
  background: #ffb700;
}

.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: saturate(180%) blur(20px);
}
.btn--ghost:hover {
  border-color: var(--ink);
  background: #fff;
}

.btn--ghost-light {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}
.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: 1.02rem;
}

.btn--block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Alias de compatibilidade (páginas antigas) */
.btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--brand);
  color: #fff;
  padding: 0.9rem 2rem;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 0.98rem;
  border: 0;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.btn-main:hover {
  background: #095a57;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(11, 110, 106, 0.26);
}

/* Chips / etiquetas ---------------------------------------------------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  border-radius: var(--r-pill);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}

.chip i {
  color: var(--brand);
  font-size: 0.82rem;
}

.chip--on-dark {
  background: rgba(0, 0, 0, 0.34);
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.chip--on-dark i {
  color: var(--gold-bright);
}

/* Alias de compatibilidade */
.rental-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.rental-options > span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  border-radius: var(--r-pill);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
}
.rental-options i {
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   4. HEADER
   -------------------------------------------------------------------------- */
#main-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0);
  transition: background 0.45s var(--ease), box-shadow 0.45s var(--ease),
    backdrop-filter 0.45s var(--ease), border-color 0.45s var(--ease);
  border-bottom: 1px solid transparent;
}

#main-header.scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.05);
}

#main-header nav {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 46px;
  width: auto;
  transition: height 0.4s var(--ease), filter 0.4s var(--ease);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8)) drop-shadow(0 4px 18px rgba(0, 0, 0, 0.55));
}

#main-header.scrolled .logo img {
  height: 40px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.main-nav a {
  position: relative;
  padding: 0.5rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.94);
  border-radius: var(--r-pill);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

#main-header.scrolled .main-nav a {
  color: var(--ink-2);
  text-shadow: none;
}

.main-nav a:hover,
.main-nav a[aria-current="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

#main-header.scrolled .main-nav a:hover,
#main-header.scrolled .main-nav a[aria-current="true"] {
  color: var(--ink);
  background: var(--bg-alt);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

#main-header.scrolled .lang-switcher {
  background: var(--bg-alt);
  border-color: var(--line);
}

.lang-switcher button {
  padding: 0.28rem 0.55rem;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

#main-header.scrolled .lang-switcher button {
  color: var(--ink-2);
}

.lang-switcher button:hover {
  color: #fff;
}
#main-header.scrolled .lang-switcher button:hover {
  color: var(--ink);
}

.lang-switcher button.active {
  background: var(--gold-bright);
  color: var(--ink);
}

#main-header.scrolled .lang-switcher button.active {
  color: var(--ink);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  border-radius: var(--r-pill);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--gold-bright);
  color: var(--ink);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(255, 192, 0, 0.4);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--r-pill);
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 1.1rem;
}

#main-header.scrolled .nav-toggle {
  color: var(--ink);
  background: var(--bg-alt);
  border-color: var(--line);
}

/* --------------------------------------------------------------------------
   5. HERO
   -------------------------------------------------------------------------- */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--bg-deep);
  padding: calc(var(--header-h) + 3rem) var(--gutter) 4rem;
}

/* --------------------------------------------------------------------------
   5b. MONTAGENS DO HERO
   O JavaScript compõe montagens aleatórias (fotografias + disposição) e
   alterna-as com um fade suave. Sem JavaScript, fica visível a primeira.
   Disposições: full (1), duo (2), trio (3), quad (4) — com variante espelhada.
   -------------------------------------------------------------------------- */
.hero-montage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg-deep);
}

.montage-layer {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 6px;
  background: var(--bg-deep);
  opacity: 0;
  transition: opacity 1.5s var(--ease);
}

.montage-layer.is-active {
  opacity: 1;
  animation: montageZoom 9s var(--ease) both;
}

.montage-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.88) contrast(1.03) saturate(1.02);
}

/* Disposições ----------------------------------------------------------- */
.montage-layer[data-layout="full"] {
  grid-template-columns: 1fr;
}

.montage-layer[data-layout="duo"] {
  grid-template-columns: 1.7fr 1fr;
}

.montage-layer[data-layout="duo"][data-flip] {
  grid-template-columns: 1fr 1.7fr;
}

.montage-layer[data-layout="trio"] {
  grid-template-columns: 1.7fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.montage-layer[data-layout="trio"] img:first-child {
  grid-row: span 2;
}

.montage-layer[data-layout="trio"][data-flip] {
  grid-template-columns: 1fr 1.7fr;
}

.montage-layer[data-layout="trio"][data-flip] img:first-child {
  grid-column: 2;
  grid-row: span 2;
}

.montage-layer[data-layout="trio"][data-flip] img:nth-child(2) {
  grid-column: 1;
  grid-row: 1;
}

.montage-layer[data-layout="trio"][data-flip] img:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}

.montage-layer[data-layout="quad"] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

@keyframes montageZoom {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1.1);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.6) 0%,
      rgba(0, 0, 0, 0.34) 30%,
      rgba(0, 0, 0, 0.44) 68%,
      rgba(0, 0, 0, 0.8) 100%
    ),
    radial-gradient(78% 62% at 50% 46%, rgba(0, 0, 0, 0.44) 0%, rgba(0, 0, 0, 0) 72%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 950px;
  color: #fff;
}

.hero-content .eyebrow {
  color: var(--gold-bright);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9), 0 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-content h1 {
  font-size: var(--t-hero);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 10px 50px rgba(0, 0, 0, 0.55);
}

.hero-content p {
  margin: 1.5rem auto 0;
  max-width: 640px;
  font-size: clamp(1.05rem, 1.9vw, 1.5rem);
  color: #fff;
  letter-spacing: -0.017em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65), 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-content .btn-row {
  margin-top: 2.25rem;
  justify-content: center;
}

.hero-meta {
  position: relative;
  z-index: 2;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.hero-scroll {
  position: absolute;
  z-index: 2;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.hero-scroll i {
  animation: nudge 2s var(--ease) infinite;
}

@keyframes nudge {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: translateY(7px);
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   6. FAIXA DE VALORES
   -------------------------------------------------------------------------- */
.values {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.value {
  padding: clamp(1.6rem, 3.5vw, 2.6rem) clamp(1rem, 2vw, 1.75rem);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.value + .value {
  border-left: 1px solid var(--line);
}

.value i {
  font-size: 1.15rem;
  color: var(--brand);
  margin-top: 0.2rem;
}

.value h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.value p {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  color: var(--ink-3);
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   7. CASAS
   -------------------------------------------------------------------------- */
.casa {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.casa + .casa {
  border-top: 1px solid var(--line);
}

.casa-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: center;
}

.casa--flip .casa-media {
  order: 2;
}

.casa-media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3.1;
  background: var(--bg-alt);
}

.casa-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}

.casa-media:hover img {
  transform: scale(1.045);
}

.casa-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
  pointer-events: none;
}

.casa-media .casa-media-label {
  position: absolute;
  z-index: 2;
  left: 1.35rem;
  bottom: 1.25rem;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.casa-body h2 {
  font-size: var(--t-xl);
  margin-bottom: 1rem;
  text-wrap: balance;
}

.casa-body .lede {
  margin-bottom: 1.5rem;
}

.casa-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.5rem;
  margin: 1.75rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.spec {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.spec i {
  color: var(--brand);
  width: 1.1rem;
  text-align: center;
}

.casa-body .chips {
  margin-bottom: 1.75rem;
}

/* Mosaico de apoio por casa (abre a galeria da casa) */
.casa-strip {
  position: relative;
  margin-top: clamp(1.75rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.6rem, 1.2vw, 1rem);
  border-radius: var(--r-md);
}

.casa-strip img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.8s var(--ease-out);
}

.casa-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-md);
  background: rgba(10, 10, 12, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

.casa-strip-label {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 0.5rem;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

.casa-strip-label i {
  font-size: 1.1rem;
}

.casa-strip:hover::after,
.casa-strip:hover .casa-strip-label,
.casa-strip:focus-visible::after,
.casa-strip:focus-visible .casa-strip-label {
  opacity: 1;
}

.casa-strip:hover img {
  transform: scale(1.03);
}

/* --------------------------------------------------------------------------
   8. GALERIA
   -------------------------------------------------------------------------- */
.gallery-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.gallery-block + .gallery-block {
  margin-top: clamp(3rem, 7vw, 6rem);
  padding-top: clamp(3rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
}

.gallery-block-title {
  font-size: var(--t-md);
  margin-bottom: 1.25rem;
  text-align: center;
}

.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2.5rem;
}

.pill-tab {
  padding: 0.55rem 1.15rem;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--bg-alt);
  border: 1px solid transparent;
  transition: all 0.28s var(--ease);
}

.pill-tab:hover {
  color: var(--ink);
  background: #eaeaee;
}

.pill-tab.active {
  background: var(--ink);
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.6rem, 1.2vw, 1rem);
}

.gallery-grid .g-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--bg-alt);
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.5s var(--ease) both;
}

.gallery-grid .g-item--wide {
  grid-column: span 2;
  aspect-ratio: 8 / 3.05;
}

.gallery-grid .g-item--tall {
  grid-row: span 2;
  aspect-ratio: 4 / 6.25;
}

.gallery-grid .g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

.gallery-grid .g-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.gallery-grid .g-item figcaption {
  position: absolute;
  z-index: 2;
  left: 1rem;
  right: 1rem;
  bottom: 0.85rem;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.gallery-grid .g-item:hover img {
  transform: scale(1.06);
}

.gallery-grid .g-item:hover::after,
.gallery-grid .g-item:hover figcaption {
  opacity: 1;
}

.gallery-grid .g-item:hover figcaption {
  transform: translateY(0);
}

.gallery-grid .g-item[hidden],
.gallery-grid .g-item.g-over-limit {
  display: none !important;
}

.gallery-more {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.gallery-more[hidden] {
  display: none;
}

/* Lightbox ------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.lightbox.open {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s var(--ease);
}

.lb-stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3.5rem);
  min-height: 0;
}

.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  animation: zoomIn 0.45s var(--ease);
}

@keyframes zoomIn {
  from {
    transform: scale(0.94);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2rem);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.85rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.35));
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.1rem;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.lb-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lb-nav--prev {
  left: clamp(0.75rem, 2vw, 1.75rem);
}
.lb-nav--next {
  right: clamp(0.75rem, 2vw, 1.75rem);
}

.lb-close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.1rem;
  transition: background 0.3s var(--ease);
}

.lb-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lb-counter {
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.lb-caption {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   9. LOCALIZAÇÃO
   -------------------------------------------------------------------------- */
.section--deep {
  background: var(--bg-deep);
  color: #fff;
}

.section--deep h2,
.section--deep h3 {
  color: #fff;
}

.section--deep .section-head p,
.section--deep .lede {
  color: rgba(255, 255, 255, 0.66);
}

.section--deep .eyebrow {
  color: var(--gold-bright);
}

.loc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.loc-gallery {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: clamp(0.6rem, 1.2vw, 0.9rem);
  aspect-ratio: 1 / 0.95;
}

.loc-gallery figure {
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  background: #1a1a1d;
}

.loc-gallery figure:first-child {
  grid-row: span 2;
}

.loc-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

.loc-gallery figure:hover img {
  transform: scale(1.06);
}

.loc-gallery figcaption {
  position: absolute;
  left: 0.9rem;
  bottom: 0.75rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.loc-list {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.loc-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
}

.loc-list span:first-child {
  color: rgba(255, 255, 255, 0.72);
}

.loc-list span:last-child {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   10. CONTACTOS
   -------------------------------------------------------------------------- */
#contacts {
  padding-block: var(--section-y);
  background: var(--bg-alt);
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: stretch;
}

.contacts-card {
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.contacts-card h2 {
  font-size: var(--t-lg);
  margin-bottom: 0.6rem;
}

.contacts-sub {
  color: var(--ink-2);
  margin-bottom: 1.75rem;
  max-width: 42ch;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}

.contact-row:last-of-type {
  border-bottom: 0;
}

.contact-row i {
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 2.25rem;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.9rem;
}

.contact-row a {
  font-weight: 500;
  transition: color 0.25s var(--ease);
}

.contact-row a:hover {
  color: var(--brand);
}

.link-button {
  font: inherit;
  font-weight: 500;
  color: inherit;
  text-align: left;
  padding: 0;
  background: none;
  cursor: pointer;
  transition: color 0.25s var(--ease);
}

.link-button:hover {
  color: var(--brand);
}

.contact-cta {
  margin-top: auto;
  padding-top: 1.75rem;
}

.contacts-map {
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 420px;
  box-shadow: var(--shadow-sm);
  background: #e6e6ea;
}

.map-wrap,
.contacts-map iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
  filter: grayscale(0.06);
}

/* --------------------------------------------------------------------------
   11. FOOTER
   -------------------------------------------------------------------------- */
#main-footer {
  background: var(--bg-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: clamp(3rem, 7vw, 5rem) 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding-bottom: 2.5rem;
}

#main-footer .logo img {
  height: 74px;
  filter: none;
}

.footer-tagline {
  margin-top: 1.1rem;
  max-width: 34ch;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.15rem;
}

.footer-col ul li {
  margin-bottom: 0.65rem;
}

.footer-col ul li a {
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}

.footer-col ul li a:hover {
  color: var(--gold-bright);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.75;
}

.footer-bottom p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   12. MODAIS / COOKIES / WHATSAPP
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: min(880px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  box-shadow: var(--shadow-lg);
  transform: scale(0.96) translateY(10px);
  transition: transform 0.38s var(--ease-out);
  text-align: left;
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-2);
  background: var(--bg-alt);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  z-index: 2;
}

.modal-close:hover {
  background: #e6e6ea;
  color: var(--ink);
}

.modal-content h3 {
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  margin-bottom: 0.75rem;
  text-align: left;
  letter-spacing: -0.025em;
}

.modal-content h4 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
  letter-spacing: -0.015em;
}

.modal-content p,
.modal-content li {
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.65;
}

.suite-tabs-coo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
}

.policy-content-container {
  overflow-y: auto;
  padding-right: 0.75rem;
  flex: 1;
  min-height: 0;
  text-align: left;
  scrollbar-width: thin;
}

.policy-content-container p {
  margin-bottom: 0.85rem;
}

.policy-content-container ul {
  list-style: disc;
  margin: 0 0 1rem 1.15rem;
}

.policy-content-container li {
  margin-bottom: 0.4rem;
}

#policy-modal .tab-content {
  display: none;
}

#policy-modal .tab-content.active {
  display: block;
  animation: fadeIn 0.4s var(--ease);
}

/* Abas genéricas (modais + subpáginas) */
.tab-link {
  flex: 0 1 auto;
  padding: 0.55rem 1.15rem;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--bg-alt);
  transition: all 0.28s var(--ease);
}

.tab-link:hover {
  color: var(--ink);
  background: #eaeaee;
}

.tab-link.active {
  background: var(--ink);
  color: #fff;
}

/* Banner de cookies */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  width: min(920px, calc(100% - 2rem));
  z-index: 4000;
  display: none;
  border-radius: var(--r-lg);
  background: rgba(24, 24, 27, 0.9);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
  color: rgba(255, 255, 255, 0.82);
  padding: 1.1rem 1.35rem;
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.cookie-text {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.55;
}

.cookie-text a {
  color: var(--gold-bright);
  text-decoration: underline;
}

#accept-cookies-btn {
  flex-shrink: 0;
  padding: 0.65rem 1.5rem;
  border-radius: var(--r-pill);
  background: var(--gold-bright);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

#accept-cookies-btn:hover {
  background: #ffb700;
  transform: translateY(-1px);
}

/* Botão flutuante de mensagem ------------------------------------------- */
.contact-fab {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.75rem);
  bottom: clamp(1rem, 2.5vw, 1.75rem);
  z-index: 1500;
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 17px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 30px rgba(11, 110, 106, 0.42);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background-color 0.3s var(--ease);
}

.contact-fab:hover,
.contact-fab:focus-visible {
  transform: translateY(-2px);
  background: #095a57;
  box-shadow: 0 16px 40px rgba(11, 110, 106, 0.5);
}

.contact-fab > i {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.contact-fab-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: max-width 0.45s var(--ease), opacity 0.3s var(--ease),
    margin-left 0.45s var(--ease);
}

.contact-fab:hover .contact-fab-label,
.contact-fab:focus-visible .contact-fab-label {
  max-width: 220px;
  opacity: 1;
  margin-left: 0.6rem;
}

/* Formulário de mensagem ------------------------------------------------ */
.modal-content h3 + .modal-sub {
  margin-bottom: 1.5rem;
}

.modal-sub {
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 46ch;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.form-row .opt {
  font-weight: 400;
  color: var(--ink-3);
}

.form-row input,
.form-row textarea {
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--bg-alt);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 0.8rem 0.95rem;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.form-row textarea {
  resize: vertical;
  min-height: 108px;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.contact-form .btn {
  margin-top: 0.35rem;
}

.form-status {
  min-height: 1.3rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.form-status.is-ok {
  color: #0d7a45;
}

.form-status.is-error {
  color: #c0392b;
}

.form-alt {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--ink-3);
}

.form-alt a {
  color: var(--brand);
  text-decoration: underline;
}

.fa-spin {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   13. COMPONENTES DAS SUBPÁGINAS
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  min-height: 78svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-deep);
  padding: calc(var(--header-h) + 5rem) var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
}

.page-hero img.page-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.82) 0%,
      rgba(0, 0, 0, 0.34) 48%,
      rgba(0, 0, 0, 0.52) 100%
    ),
    radial-gradient(80% 60% at 38% 55%, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 74%);
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin-inline: auto;
  width: 100%;
  color: #fff;
}

.page-hero-inner h1 {
  font-size: var(--t-hero);
  color: #fff;
  letter-spacing: -0.04em;
  max-width: 18ch;
  text-wrap: balance;
}

.page-hero-inner p {
  margin-top: 1.1rem;
  max-width: 58ch;
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  color: rgba(255, 255, 255, 0.85);
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
  color: var(--gold-bright);
}

.page-hero-inner .chips {
  margin-top: 1.75rem;
}

/* Abas genéricas (usadas pelo modal de políticas) */
.tab-content {
  display: none;
  padding: clamp(0.5rem, 1.5vw, 1rem) 0;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s var(--ease);
}

/* Secção "casa inteira" nas subpáginas */
.casa-inteira-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.casa-inteira-img img {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

.casa-inteira-details h3 {
  font-size: var(--t-lg);
  margin-bottom: 1rem;
}

.casa-inteira-details p {
  color: var(--ink-2);
  margin-bottom: 1.75rem;
}

/* Cabeçalho de secção alinhado à esquerda */
.section-head--left {
  text-align: left;
  margin-inline: 0;
}

/* --------------------------------------------------------------------------
   14. ANIMAÇÕES / RESPONSIVO
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal-delay="1"] {
  transition-delay: 0.08s;
}
[data-reveal-delay="2"] {
  transition-delay: 0.16s;
}
[data-reveal-delay="3"] {
  transition-delay: 0.24s;
}

/* Compatibilidade com a animação antiga */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.active {
  opacity: 1;
  transform: none;
}

@media (max-width: 1080px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .value:nth-child(3) {
    border-left: 0;
  }
  .value:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .main-nav {
    display: none;
  }

  #main-header nav {
    gap: 0.6rem;
  }

  #main-header .logo img {
    height: 38px;
  }

  .header-actions {
    margin-left: auto;
    gap: 0.45rem;
  }

  .lang-switcher button {
    padding: 0.24rem 0.44rem;
    font-size: 0.68rem;
  }

  #main-header.nav-open .lang-switcher {
    background: var(--bg-alt);
    border-color: var(--line);
  }

  #main-header.nav-open .lang-switcher button {
    color: var(--ink-2);
  }

  #main-header.nav-open .lang-switcher button.active {
    color: var(--ink);
  }

  .header-cta {
    padding: 0.5rem 0.95rem;
    font-size: 0.84rem;
  }

  .nav-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  }

  #main-header.scrolled .nav-toggle {
    background: var(--bg-alt);
    color: var(--ink);
    box-shadow: none;
  }

  /* Menu móvel */
  .main-nav.mobile-open {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.25rem;
    padding: 6rem var(--gutter) 4rem;
    margin: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(28px);
    -webkit-backdrop-filter: saturate(180%) blur(28px);
    z-index: 998;
    animation: fadeIn 0.3s var(--ease);
  }

  #main-header .logo,
  #main-header .header-actions {
    position: relative;
    z-index: 1000;
  }

  .main-nav.mobile-open li {
    width: 100%;
  }

  .main-nav.mobile-open a,
  #main-header.scrolled .main-nav.mobile-open a {
    display: block;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-shadow: none;
    text-align: center;
    padding: 0.85rem 1rem;
    border-radius: var(--r-md);
  }

  .main-nav.mobile-open a:hover {
    background: var(--bg-alt);
    color: var(--ink);
  }

  .casa-inner,
  .loc-grid,
  .contacts-grid,
  .casa-inteira-grid {
    grid-template-columns: 1fr;
  }

  .casa--flip .casa-media {
    order: 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid .g-item--wide,
  .gallery-grid .g-item--tall {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16 / 10;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cookie-content {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .header-cta {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --section-y: 3.75rem;
    --gutter: 1.15rem;
  }

  .modal-content {
    max-height: 92vh;
    padding: 1.35rem;
  }

  .modal-sub {
    margin-bottom: 1.1rem;
  }

  .form-row textarea {
    min-height: 84px;
  }

  .form-alt {
    margin-top: 0.85rem;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }
  .value + .value {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .value:nth-child(3) {
    border-top: 1px solid var(--line);
  }
  .value:nth-child(-n + 2) {
    border-bottom: 0;
  }

  .casa-specs {
    grid-template-columns: 1fr;
  }

  .casa-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid .g-item,
  .gallery-grid .g-item--wide,
  .gallery-grid .g-item--tall {
    grid-column: span 1;
    grid-row: span 1;
    aspect-ratio: 4 / 3;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .loc-gallery {
    aspect-ratio: 1 / 1.1;
  }

  .lb-nav {
    width: 44px;
    height: 44px;
  }

  .contact-fab {
    height: 52px;
    padding: 0 15px;
  }

  #hero {
    min-height: 92svh;
  }

  .page-hero {
    min-height: 68svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  /* Montagem do hero: fica estática, sem zoom nem troca */
  .montage-layer.is-active {
    animation: none;
  }
}

@media print {
  #main-header,
  .whatsapp-button,
  .cookie-banner,
  .hero-scroll,
  .tour-overlay {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   17. TOUR VIRTUAL 360
   Visualizador de ecrã inteiro (Pannellum) aberto a partir de
   [data-tour-open]. O markup do modal é criado por tour360.js.
   -------------------------------------------------------------------------- */
.tour-overlay {
  padding: 0;
  background: rgba(6, 6, 8, 0.92);
}

.tour-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-deep);
  color: #fff;
  opacity: 0;
  transform: scale(1.015);
  transition: transform 0.45s var(--ease-out), opacity 0.3s var(--ease);
}

.modal-overlay.active .tour-shell {
  opacity: 1;
  transform: scale(1);
}

/* Barra superior ------------------------------------------------------- */
.tour-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter) 1.75rem;
  margin-bottom: -1.75rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.tour-top > * {
  pointer-events: auto;
}

.tour-heading {
  min-width: 0;
}

.tour-heading h3 {
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.tour-sub {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.62);
}

.tour-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  font-size: 1.2rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.tour-close:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(1.05);
}

/* Palco do panorama ---------------------------------------------------- */
.tour-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #0b0b0d;
}

.tour-viewer {
  position: absolute;
  inset: 0;
}

.tour-viewer .pnlm-container {
  background-color: #0b0b0d;
}

.tour-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  font-size: 1rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(-50%);
  transition: background 0.25s var(--ease);
}

.tour-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.tour-arrow--prev {
  left: clamp(0.6rem, 2vw, 1.5rem);
}

.tour-arrow--next {
  right: clamp(0.6rem, 2vw, 1.5rem);
}

.tour-hint {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: calc(100% - 2rem);
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  border-radius: var(--r-pill);
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.tour-hint.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tour-error {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 2rem;
  text-align: center;
  background: #0b0b0d;
}

.tour-error[hidden] {
  display: none;
}

.tour-error i {
  font-size: 1.9rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.tour-error p {
  margin: 0;
  color: #fff;
}

.tour-error-sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Barra inferior com as cenas ------------------------------------------ */
.tour-strip {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  padding: 0.75rem var(--gutter) 1rem;
  background: var(--bg-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tour-scenes-hint {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.42);
}

.tour-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

.tour-group-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--r-pill);
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.22s var(--ease), color 0.22s var(--ease),
    border-color 0.22s var(--ease);
}

.tour-group-tab i {
  font-size: 0.76rem;
}

.tour-group-tab:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.tour-group-tab.is-active {
  color: var(--bg-deep);
  background: #fff;
  border-color: #fff;
}

.tour-scenes {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.tour-scenes::-webkit-scrollbar {
  height: 5px;
}

.tour-scenes::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: var(--r-pill);
}

.tour-scene {
  flex: 0 0 auto;
  width: 132px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0;
  text-align: left;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  border: 0;
  scroll-snap-align: center;
  transition: color 0.22s var(--ease);
}

.tour-scene img {
  width: 132px;
  height: 66px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid transparent;
  opacity: 0.66;
  transition: opacity 0.25s var(--ease), border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.tour-scene:hover img {
  opacity: 0.95;
}

.tour-scene.is-active {
  color: #fff;
}

.tour-scene.is-active img {
  opacity: 1;
  border-color: var(--brand-2);
  transform: scale(1.02);
}

.tour-scene span {
  display: block;
  font-size: 0.72rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .tour-arrow {
    display: none;
  }

  .tour-scene,
  .tour-scene img {
    width: 108px;
  }

  .tour-scene img {
    height: 54px;
  }
}

@media (max-width: 640px) {
  .tour-top {
    padding: 0.75rem 1rem 1.5rem;
    margin-bottom: -1.5rem;
  }

  .tour-strip {
    padding: 0.6rem 1rem 0.8rem;
  }

  .tour-groups {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.3rem;
    padding-bottom: 0.3rem;
    scrollbar-width: none;
  }

  .tour-groups::-webkit-scrollbar {
    display: none;
  }

  .tour-group-tab {
    flex: 0 0 auto;
    padding: 0.35rem 0.7rem;
    font-size: 0.74rem;
  }

  .tour-scenes-hint {
    display: none;
  }

  .tour-hint {
    bottom: 0.7rem;
    padding: 0.42rem 0.8rem;
    font-size: 0.7rem;
  }
}
