/*
  Ficheiro: style.css
  Autor: Emanuel Borges
  Data: 2026-10-12
  Descrição: Folha de estilos global do site AzoresRent. Define variáveis de
  design (cores, tipografia, espaçamentos), o layout base (cabeçalho, menu,
  rodapé), os componentes partilhados (cartões de casas, galeria, botões,
  formulário de contacto) e as regras responsivas para telemóvel/tablet.
*/

/* ---------- Reset básico ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

@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;
    scroll-behavior: auto !important;
  }
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------- Variáveis de design ---------- */
:root {
  /* Paleta inspirada no Atlântico e na paisagem vulcânica dos Açores */
  --color-ocean-dark: #0b3d55;
  --color-ocean: #126e8e;
  --color-ocean-light: #4fb3cf;
  --color-green: #2f6f4f;
  --color-alert: #c0392b;
  --color-sand: #f6f2ea;
  --color-white: #ffffff;
  --color-text: #1f2a30;
  --color-text-muted: #5a6b72;
  --color-border: #e2e2e2;

  --font-heading: "Georgia", "Times New Roman", serif;
  --font-body: "Helvetica Neue", Arial, sans-serif;

  --max-width: 1180px;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(11, 61, 85, 0.12);
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-sand);
  line-height: 1.6;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  color: var(--color-ocean-dark);
  line-height: 1.2;
}

/* ---------- Cabeçalho / Navegação ---------- */
.site-header {
  position: sticky;
  top: 0;
  /* Tem de ficar acima dos controlos do Leaflet (zoom, Map/Satellite),
     que por defeito usam z-index:1000 e, sem isto, apareciam por cima
     do menu quando o mapa é arrastado para debaixo do cabeçalho. */
  z-index: 1200;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 0 0 rgba(11, 61, 85, 0);
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 6px 20px rgba(11, 61, 85, 0.1);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--color-ocean-dark);
}

.logo img {
  height: 56px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-weight: 500;
}

.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--color-ocean);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-ocean);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Botão de alternância de idioma (EN / PT) */
.lang-switch a {
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.85rem;
}

.lang-switch a.active {
  background: var(--color-ocean-dark);
  color: var(--color-white);
  border-color: var(--color-ocean-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.25s ease, color 0.2s ease;
}

.nav-toggle[aria-expanded="true"] {
  transform: rotate(90deg);
  color: var(--color-ocean);
}

/* ---------- Hero (ecrã inteiro, imagem de fundo) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh; /* respeita a barra de endereço em telemóveis */
  display: flex;
  align-items: flex-end;
  text-align: left;
  color: var(--color-white);
  background: linear-gradient(
      0deg,
      rgba(6, 28, 39, 0.85) 0%,
      rgba(6, 28, 39, 0.35) 45%,
      rgba(6, 28, 39, 0.15) 100%
    ),
    url("../imgs/shared/hero-azores.webp") center / cover no-repeat;
}

/* Conteúdo da hero fica sempre colado à esquerda do ecrã, independente
   da largura da janela (não usa o .container centrado). */
.hero-content {
  width: 100%;
  max-width: 640px;
  padding: 0 24px 72px;
  padding-left: clamp(24px, 6vw, 96px);
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-eyebrow {
  display: inline-block;
  color: var(--color-ocean-light);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  animation: fade-in-up 0.7s ease both;
}

.hero-content h1 {
  color: var(--color-white);
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin: 0 0 20px;
  animation: fade-in-up 0.7s ease both;
  animation-delay: 0.1s;
}

.hero-content h1 em {
  font-style: normal;
  color: var(--color-ocean-light);
}

.hero-content p {
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 0 28px;
  animation: fade-in-up 0.7s ease both;
  animation-delay: 0.2s;
}

.hero-content .btn {
  animation: fade-in-up 0.7s ease both;
  animation-delay: 0.32s;
}

@keyframes scroll-cue-bounce {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 8px);
  }
}

.hero-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: var(--color-white);
  opacity: 0.75;
  animation: scroll-cue-bounce 2s ease-in-out infinite;
}

.hero-scroll-cue svg {
  width: 26px;
  height: 26px;
  display: block;
}

.btn {
  position: relative;
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  background: var(--color-ocean);
  color: var(--color-white);
  font-weight: 600;
  overflow: hidden;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--color-ocean-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(11, 61, 85, 0.25);
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: scale(0);
  pointer-events: none;
  animation: btn-ripple-spread 0.6s ease-out;
}

@keyframes btn-ripple-spread {
  to {
    transform: scale(2.4);
    opacity: 0;
  }
}

.btn-light {
  background: var(--color-white);
  color: var(--color-ocean-dark);
}

.btn-light:hover {
  background: var(--color-sand);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-white);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-ocean-dark);
}

/* ---------- Secções genéricas ---------- */
.section {
  padding: 72px 0;
  /* Compensa a altura do cabeçalho fixo (sticky) ao saltar para uma
     secção através de um link âncora (ex: #partners), para o título
     não ficar escondido atrás do menu. */
  scroll-margin-top: 88px;
}

.section-title {
  text-align: center;
  margin-bottom: 12px;
}

.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 14px auto 0;
  background: var(--color-ocean);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto 48px;
}

/* ---------- Secção de parceiros ---------- */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.partner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 20px;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  color: var(--color-text-muted);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(11, 61, 85, 0.15);
}

.partner-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 110px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--color-bg, #f2f6f8);
  margin-bottom: 4px;
}

.partner-logo-frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.partner-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-ocean-dark);
}

.partner-description {
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

.partner-promo {
  margin-top: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--color-bg, #f2f6f8);
  color: var(--color-ocean-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ---------- Barra de pesquisa com filtros ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 0 0 40px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 160px;
}

.filter-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.filter-field select {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--color-white);
  color: var(--color-text);
}

.filter-bar .btn {
  flex: 0 0 auto;
}

.filter-empty {
  display: none;
  text-align: center;
  color: var(--color-text-muted);
  margin: -16px 0 32px;
}

.filter-empty.is-visible {
  display: block;
}

/* ---------- Mapa com a localização de todas as casas ---------- */
.houses-map {
  width: 100%;
  height: 520px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Dica "Use Ctrl + scroll" mostrada nos mapas (visão geral e de cada
   casa) quando a pessoa tenta fazer scroll sem a tecla Ctrl premida. */
.map-zoom-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 28, 39, 0.55);
  color: var(--color-white);
  font-weight: 600;
  text-align: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.map-zoom-hint.is-visible {
  opacity: 1;
}

.house-popup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 200px;
}

.house-popup img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
}

.house-popup-body h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.3;
}

.house-popup-body p {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.house-popup-price {
  font-weight: 700;
  color: var(--color-ocean-dark) !important;
}

.house-popup .btn {
  display: block;
  margin-top: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  text-align: center;
}

/* O CSS do Leaflet define ".leaflet-container a" com uma cor própria
   que tem mais especificidade do que ".btn", fazendo o texto do botão
   ficar camuflado (texto azul sobre fundo azul). Esta regra garante
   que o texto do botão continua branco dentro do popup. */
.leaflet-container .house-popup .btn,
.leaflet-container .house-popup .btn:link,
.leaflet-container .house-popup .btn:visited {
  color: var(--color-white);
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius);
}

/* Botões para alternar entre vista de mapa e vista de satélite. */
.map-basemap-toggle {
  display: flex;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.map-basemap-btn {
  border: none;
  background: var(--color-white);
  color: var(--color-ocean-dark);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.map-basemap-btn:hover {
  background: var(--color-ocean-light, #e4f1f7);
}

.map-basemap-btn.is-active {
  background: var(--color-ocean);
  color: var(--color-white);
}

/* ---------- Grelha de casas (cartões) ---------- */
.houses-grid {
  display: grid;
  /* auto-fill (em vez de auto-fit) impede que um único cartão visível
     (ex: depois de filtrar para só uma casa) se estique e preencha a
     linha toda — as colunas vazias ficam só em branco. */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.house-card.is-hidden {
  display: none;
}

.house-card {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.house-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(11, 61, 85, 0.18);
}

.house-card.is-clickable {
  cursor: pointer;
}

.house-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.house-card:hover img {
  transform: scale(1.06);
}

/* Selo com o número de registo local (AL), no canto superior direito
   da fotografia de cada casa na grelha. */
.house-license {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 61, 85, 0.75);
  color: var(--color-white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  backdrop-filter: blur(2px);
}

.house-card-body {
  padding: 20px;
}

.house-card-body h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.house-location {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* ---------- Página de detalhe de uma casa ---------- */
.house-hero {
  padding: 32px 0 0;
}

.house-title {
  margin-bottom: 4px;
}

.house-meta {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

/* Galeria de fotos: imagem principal + faixa horizontal de miniaturas
   (escala bem independentemente do número de fotos de cada casa). */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.gallery-main {
  position: relative;
}

.gallery-main img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: opacity 0.2s ease;
}

.is-zoomable {
  cursor: zoom-in;
}

.gallery-main img.is-fading {
  opacity: 0;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(11, 61, 85, 0.55);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 5;
}

.gallery-arrow svg {
  width: 22px;
  height: 22px;
}

.gallery-arrow:hover {
  background: rgba(11, 61, 85, 0.85);
  transform: translateY(-50%) scale(1.06);
}

.gallery-arrow-prev {
  left: 14px;
}

.gallery-arrow-next {
  right: 14px;
}

.gallery-thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.gallery-thumbs img {
  flex: 0 0 auto;
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-thumbs img:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.gallery-thumbs img.is-active {
  opacity: 1;
  outline: 2px solid var(--color-ocean);
  outline-offset: 2px;
}

/* ---------- Lightbox (foto em ecrã inteiro) ---------- */
body.lightbox-is-open {
  overflow: hidden;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 15, 20, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 24px;
}

.lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: min(90vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.06);
}

.lightbox-arrow-prev {
  left: 20px;
}

.lightbox-arrow-next {
  right: 20px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .lightbox-arrow {
    width: 42px;
    height: 42px;
  }

  .lightbox-arrow svg {
    width: 20px;
    height: 20px;
  }

  .lightbox-arrow-prev {
    left: 8px;
  }

  .lightbox-arrow-next {
    right: 8px;
  }
}

.house-details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
}

/* Destaques visuais (showcase) de algumas comodidades, com fotografia */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0 8px;
}

.showcase-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 160px;
  box-shadow: var(--shadow);
}

.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.showcase-card:hover img {
  transform: scale(1.06);
}

.showcase-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(0deg, rgba(6, 28, 39, 0.8), rgba(6, 28, 39, 0));
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Selo de avaliação (ex: Booking.com), mostrado junto ao preço */
.trust-badge {
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.trust-badge img {
  width: 100%;
  display: block;
}

.amenities-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.amenities-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.amenities-list li::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;
}

/* Linha de "pills" com ícone, usada nas Regras da Casa e nas
   Características Especiais, em vez de uma lista empilhada. */
.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-top: 16px;
}

.feature-row li {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Regras da casa: cada regra tem o seu próprio emblema (verde = permitido,
   vermelho = não permitido), em vez do ícone de visto das comodidades. */
.rule-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rule-icon svg {
  width: 17px;
  height: 17px;
}

.rule-icon.is-allowed {
  background: var(--color-green);
}

.rule-icon.is-not-allowed {
  background: var(--color-alert);
}

/* Características especiais: ícone simples a preto, sem fundo colorido. */
.feature-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.map-placeholder {
  width: 100%;
  height: 360px;
  border-radius: var(--radius);
  background: var(--color-ocean-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: 600;
  text-align: center;
  padding: 16px;
}

.map-embed {
  width: 100%;
  height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-leaflet {
  width: 100%;
  height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
}

.booking-box {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  align-self: start;
}

.booking-box .price {
  font-size: 1.6rem;
  color: var(--color-ocean-dark);
  font-weight: bold;
  margin-bottom: 16px;
}

/* Esconde visualmente um elemento sem o remover da árvore de
   acessibilidade por si só — usado aqui como campo-armadilha anti-spam
   do formulário de contacto (ver contact.html). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Página de contacto ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  max-width: 980px;
  margin: 0 auto;
  align-items: start;
}

.contact-info-card {
  background: linear-gradient(185deg, var(--color-ocean-dark) 0%, #082a3a 100%);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}

.contact-info-card h2 {
  color: var(--color-white);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.contact-info-card p {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin-bottom: 24px;
}

.contact-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.contact-info-list li:last-child {
  margin-bottom: 0;
}

.contact-info-list a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease;
}

.contact-info-list a:hover {
  color: var(--color-ocean-light);
}

.contact-info-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-ocean-light);
}

.contact-info-icon svg {
  width: 17px;
  height: 17px;
}

.contact-socials {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.contact-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--color-white);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-socials a:hover {
  background: var(--color-ocean-light);
  border-color: var(--color-ocean-light);
  color: var(--color-ocean-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(11, 61, 85, 0.25);
}

.contact-socials svg {
  width: 17px;
  height: 17px;
}

.contact-form {
  display: grid;
  gap: 18px;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-ocean-light);
  box-shadow: 0 0 0 3px rgba(79, 179, 207, 0.25);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form label {
  font-weight: 600;
  font-size: 0.9rem;
}

.contact-form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
}

.contact-form .btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.contact-form .btn:hover svg {
  transform: translateX(3px);
}

/* ---------- Rodapé ---------- */
.site-footer {
  position: relative;
  background: linear-gradient(185deg, var(--color-ocean-dark) 0%, #082a3a 100%);
  color: var(--color-white);
  padding: 68px 0 24px;
  margin-top: 64px;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-ocean-light),
    var(--color-green),
    var(--color-ocean-light)
  );
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-grid h4 {
  color: var(--color-white);
  margin-bottom: 16px;
  padding-bottom: 10px;
  font-size: 1rem;
  letter-spacing: 0.02em;
  position: relative;
}

.footer-grid h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-ocean-light);
}

.footer-grid > div:first-child h4 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  padding-bottom: 12px;
}

.footer-grid p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.footer-grid ul li {
  margin-bottom: 10px;
}

.footer-grid ul li:last-child {
  margin-bottom: 0;
}

.footer-grid a {
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-grid ul:not(.footer-contacts) a:hover {
  color: var(--color-ocean-light);
  padding-left: 4px;
}

.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--color-white);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-socials a:hover {
  background: var(--color-ocean-light);
  border-color: var(--color-ocean-light);
  color: var(--color-ocean-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

.footer-socials svg {
  width: 17px;
  height: 17px;
}

.footer-contacts li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.footer-contacts li:last-child {
  margin-bottom: 0;
}

.footer-contacts a {
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease;
}

.footer-contacts a:hover {
  color: var(--color-ocean-light);
}

.footer-contact-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--color-ocean-light);
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
}

/* ---------- Animação ao entrar no ecrã (scroll reveal) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Botão flutuante "voltar ao topo" ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-ocean-dark);
  color: var(--color-white);
  box-shadow: var(--shadow);
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease,
    visibility 0.25s ease;
  z-index: 90;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-ocean);
}

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .gallery,
  .house-details,
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar .btn {
    width: 100%;
    text-align: center;
  }

  .nav-links,
  .nav-actions .lang-switch {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .amenities-list {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding-bottom: 48px;
  }

  .hero-content p {
    max-width: 100%;
  }

  .section {
    padding: 48px 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .gallery-main img {
    height: 280px;
  }

  .gallery-thumbs img {
    width: 110px;
    height: 80px;
  }

  .hero-content .btn {
    width: 100%;
    text-align: center;
  }
}
