:root {
  --brand-dark: #3f91ac;
  --brand-light: #53c7e8;
  --ink: #1f2a2e;
  --muted: #5d6b70;
  --bg: #f7f9fa;
  --card: #ffffff;
  --border: #e3e8ea;
  --danger: #c0392b;
  --success: #1f8a4c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: var(--brand-dark); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.site-header .logo img { height: 40px; display: block; }
.site-header nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
}
.site-header nav a:hover { color: var(--brand-dark); }

/* Hero */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: 2rem 1.25rem;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,40,48,0.55), rgba(20,40,48,0.65));
}
.hero-content { position: relative; z-index: 1; width: 100%; max-width: 900px; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); margin-bottom: 0.5rem; }
.hero p.lead { font-size: 1.05rem; opacity: 0.95; margin-top: 0; margin-bottom: 1.75rem; }

/* Search bar */
.search-bar {
  background: #fff;
  border-radius: 14px;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  color: var(--ink);
  text-align: left;
}
.search-bar label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
}
.search-bar input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  font-size: 0.95rem;
  margin-top: 0.3rem;
}
.search-bar button {
  align-self: end;
  background: var(--brand-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.search-bar button:hover { background: var(--brand-light); }
.search-error {
  grid-column: 1 / -1;
  color: var(--danger);
  font-size: 0.8rem;
  min-height: 1em;
}

/* Listings grid */
.section { padding: 2.5rem 0; }
.section h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.listing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.listing-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,0.08); }
.listing-card .photo {
  aspect-ratio: 4/3;
  background: #dfe6e8 center/cover no-repeat;
}
.listing-card .info { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.listing-card h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.listing-card .location { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.5rem; }
.listing-card .meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.75rem; }
.listing-card .price { margin-top: auto; font-weight: 700; color: var(--brand-dark); font-size: 1.05rem; }
.listing-card .price span { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.listing-card .price span.from, .booking-box .price-row span.from {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}
.empty-state { color: var(--muted); padding: 2rem 0; text-align: center; }

/* Footer */
.site-footer {
  background: #fff;
  color: var(--ink);
  padding: 2.5rem 1.25rem 0;
  margin-top: 2rem;
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}
.site-footer a { color: var(--brand-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  padding-bottom: 2rem;
}
.footer-brand { max-width: 420px; }
.footer-brand .logo { display: inline-block; margin-bottom: 0.75rem; }
.footer-brand .logo img { height: 36px; display: block; }
.footer-tagline { color: var(--muted); line-height: 1.5; margin: 0 0 0.6rem; }
.footer-contact { margin: 0; }
.footer-col h4 {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.footer-badge-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.footer-badge-img {
  padding: 0.35rem 0.6rem;
}
.footer-badge-img img { display: block; height: 64px; width: auto; }
.footer-payments { display: flex; gap: 0.5rem; margin-left: auto; flex-wrap: wrap; }
.payment-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1rem 0 1.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.footer-bottom p { margin: 0; }

@media (max-width: 640px) {
  .footer-payments { margin-left: 0; }
}

/* Listing detail page */
.listing-detail { padding: 2rem 1.25rem 3rem; }
.gallery {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  border-radius: 14px;
  overflow: hidden;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.gallery .thumbs { display: grid; grid-template-rows: 1fr 1fr; gap: 0.6rem; }
.gallery-see-all {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.gallery-see-all:hover { background: var(--bg); }

/* Modal com todas as fotos */
.photo-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 16, 0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-modal[hidden] { display: none; }
.photo-modal-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 90vw;
  max-height: 86vh;
}
.photo-modal-main img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.photo-modal-counter { color: #fff; font-size: 0.9rem; opacity: 0.85; }
.photo-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
}
.photo-modal-close:hover { background: rgba(255,255,255,0.22); }
.photo-modal-nav {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0 1rem;
}
.photo-modal-nav:hover { background: rgba(255,255,255,0.22); }

@media (max-width: 640px) {
  .photo-modal-nav { width: 38px; height: 38px; font-size: 1.3rem; margin: 0 0.4rem; }
  .gallery-see-all { font-size: 0.78rem; padding: 0.4rem 0.7rem; right: 0.6rem; bottom: 0.6rem; }
}
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; }
.amenities-list { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.amenities-list li { font-size: 0.9rem; color: var(--muted); }
.amenities-list li::before { content: "✓ "; color: var(--success); font-weight: 700; }

.booking-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  position: static;
}
.booking-box .price-row { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }
.booking-box .price-row span { font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.booking-box label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.8rem; }
.booking-box input, .booking-box textarea {
  width: 100%; padding: 0.55rem 0.6rem; border: 1px solid var(--border); border-radius: 8px;
  margin-top: 0.3rem; font-size: 0.95rem; font-family: inherit;
}
.booking-box button {
  width: 100%; background: var(--brand-dark); color: #fff; border: none; border-radius: 8px;
  padding: 0.75rem; font-size: 1rem; font-weight: 600; cursor: pointer;
}
.booking-box button:hover { background: var(--brand-light); }
.phone-input-row { display: flex; gap: 0.5rem; margin-top: 0.3rem; align-items: flex-start; }
.phone-input-row input[type="tel"] { flex: 1; margin-top: 0; }

.phone-code-combo { position: relative; flex: 0 0 auto; }
.phone-code-toggle {
  display: flex; align-items: center; gap: 0.35rem; width: auto;
  padding: 0.55rem 0.6rem; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 0.95rem; color: var(--ink); white-space: nowrap;
}
.phone-code-toggle .phone-code-flag { font-size: 1.1rem; line-height: 1; }
.phone-code-toggle .phone-code-text { font-size: 0.95rem; font-weight: 500; }
.phone-code-toggle .phone-code-caret { font-size: 0.7rem; color: var(--muted); margin-left: 0.1rem; }
.phone-code-toggle:hover { border-color: #bbb; }
.phone-code-panel {
  position: absolute; z-index: 1000; top: calc(100% + 6px); left: 0;
  width: 260px; max-width: 80vw; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.18); padding: 0.5rem;
}
.phone-code-search {
  width: 100%; margin-top: 0 !important; padding: 0.5rem 0.6rem; border-radius: 7px;
  border: 1px solid var(--border); font-size: 0.95rem; box-sizing: border-box;
}
.phone-code-list { list-style: none; margin: 0.4rem 0 0; padding: 0; max-height: 220px; overflow-y: auto; }
.phone-code-option {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.5rem;
  border-radius: 6px; cursor: pointer; font-size: 0.9rem;
}
.phone-code-option:hover { background: var(--bg); }
.phone-code-option-country { flex: 1; }
.phone-code-option-code { color: var(--muted); font-size: 0.85rem; }
.phone-code-empty { padding: 0.6rem; color: var(--muted); font-size: 0.85rem; text-align: center; }
.field-invalid { border-color: var(--danger) !important; }
.date-error, .form-error { color: var(--danger); font-size: 0.8rem; min-height: 1.1em; display: block; margin-top: 0.3rem; }
.form-success { color: var(--success); font-size: 0.9rem; margin-top: 0.75rem; }

input.date-ddmmyyyy { cursor: pointer; background: #fff; }

/* Mini-calendário (estilo Airbnb) */
.mini-calendar {
  z-index: 1000;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  border: 1px solid var(--border);
  padding: 0.85rem;
  width: 280px;
  font-size: 0.85rem;
}
.mini-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.mini-calendar-label { font-weight: 600; color: var(--ink); }
.mini-calendar-nav {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
}
.mini-calendar-nav:hover { background: var(--bg); }
.mini-calendar-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
  min-height: 1.1em;
}
.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
}
.mini-calendar-dow {
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  padding: 0.2rem 0;
}
.mini-calendar-day {
  background: none;
  border: none;
  border-radius: 50%;
  width: 100%;
  height: 34px;
  margin: 0 auto;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ink);
  position: relative;
}
.mini-calendar-day:hover:not(.disabled) { background: var(--bg); }
.mini-calendar-day.disabled { color: #ccc; cursor: not-allowed; }
.mini-calendar-day.booked { color: #ccc; text-decoration: line-through; background: #f5f0f0; border-radius: 0; }
.mini-calendar-day.empty { visibility: hidden; cursor: default; }
.mini-calendar-day.today { font-weight: 700; text-decoration: underline; }
.mini-calendar-day.in-range { background: rgba(63, 145, 172, 0.16); border-radius: 0; }
.mini-calendar-day.range-start,
.mini-calendar-day.range-end {
  background: var(--brand-dark);
  color: #fff;
  border-radius: 50%;
}

@media (max-width: 760px) {
  .detail-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .thumbs { display: none; }
}

/* ===== Página do alojamento: meta com ícones, descrição, galeria mobile, barra de reserva ===== */
.listing-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
  list-style: none; padding: 0; margin: 0.4rem 0 1.25rem;
  color: var(--muted); font-size: 0.95rem;
}
.listing-meta li { display: inline-flex; align-items: center; gap: 0.4rem; }
.listing-meta svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--brand-dark); }
.listing-description { color: var(--ink); line-height: 1.65; }

.gallery-carousel { display: none; }
.mobile-book-bar { display: none; }

@media (max-width: 760px) {
  /* Mais respiro nas margens laterais */
  .container { padding: 0 1.5rem; }
  .listing-detail { padding: 1.25rem 1.5rem 5.5rem; }
  .listing-detail h1 { font-size: 1.7rem; line-height: 1.2; margin: 0.25rem 0; }

  /* Cabeçalho compacto: logo mais pequeno e menu numa só linha */
  .site-header { padding: 0.75rem 1.5rem; gap: 0.75rem; }
  .site-header .logo img { height: 28px; }
  .site-header nav { display: flex; gap: 0.9rem; flex-shrink: 0; white-space: nowrap; }
  .site-header nav a { margin-left: 0; font-size: 0.88rem; }

  /* Galeria: carrossel com swipe (a grelha de desktop fica escondida) */
  .gallery { display: none; }
  .gallery-carousel { display: block; position: relative; margin-bottom: 1.25rem; }
  .gallery-track {
    display: flex; overflow-x: auto; gap: 0.5rem;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    border-radius: 14px; scrollbar-width: none;
  }
  .gallery-track::-webkit-scrollbar { display: none; }
  .gallery-track img {
    flex: 0 0 100%; width: 100%; height: 260px; object-fit: cover;
    scroll-snap-align: center; border-radius: 14px; display: block;
  }
  .gallery-counter {
    position: absolute; right: 0.75rem; bottom: 0.75rem;
    background: rgba(20, 28, 31, 0.72); color: #fff;
    font-size: 0.8rem; font-weight: 600; padding: 0.25rem 0.6rem; border-radius: 999px;
    pointer-events: none;
  }
  .gallery-carousel .gallery-see-all { right: auto; left: 0.75rem; bottom: 0.75rem; }

  /* Barra de reserva fixa no fundo do ecrã */
  .mobile-book-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    background: #fff; border-top: 1px solid var(--border);
    padding: 0.7rem 1.5rem calc(0.7rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
  }
  body:has(.mobile-book-bar) .site-footer { padding-bottom: 5rem; }
  .mobile-book-bar.is-hidden { transform: translateY(110%); }
  .mobile-book-bar .from { display: block; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
  .mobile-book-bar strong { font-size: 1.2rem; }
  .mobile-book-bar small { color: var(--muted); font-size: 0.85rem; }
  .mobile-book-bar button {
    background: var(--brand-dark); color: #fff; border: none; border-radius: 10px;
    padding: 0.75rem 1.6rem; font-size: 1rem; font-weight: 600; cursor: pointer;
  }
}

/* ===== Ajustes de layout no computador ===== */
/* Cabeçalho alinhado com a coluna de conteúdo (max 1100px) */
.site-header {
  padding-left: max(1.25rem, calc((100% - 1100px) / 2 + 1.25rem));
  padding-right: max(1.25rem, calc((100% - 1100px) / 2 + 1.25rem));
}

/* Botão "Ver todas as fotos" por baixo da galeria, sem tapar nenhuma foto */
.gallery-footer { display: flex; justify-content: flex-end; margin: -0.75rem 0 1.25rem; }
.gallery-footer .gallery-see-all {
  position: static; right: auto; bottom: auto;
}

/* Título compacto e alinhado pelo topo com a caixa de reserva */
.listing-detail h1 { margin: 0 0 0.25rem; line-height: 1.2; }
.detail-grid > div:first-child > p:first-of-type { margin: 0; }
.listing-meta { margin: 0.75rem 0 1.25rem; font-size: 1rem; gap: 0.5rem 1.5rem; }
.listing-meta li { gap: 0.5rem; color: var(--ink); }
.listing-meta svg { width: 22px; height: 22px; }

@media (max-width: 760px) {
  .gallery-footer { display: none; }
  .site-header { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* ===== Rodapé: alinhamento, ícone de email, selos uniformes ===== */
.footer-grid { padding: 0 0 2rem; }
.footer-contact { display: flex; align-items: center; gap: 0.5rem; }
.footer-mail-icon { display: inline-flex; color: var(--brand-dark); }

.footer-trust { gap: 1rem 1.25rem; }
.footer-badge-img {
  width: 150px; height: 84px; padding: 0.5rem 0.75rem;
  justify-content: center; align-items: center;
}
.footer-badge-img img { height: auto; width: auto; max-width: 100%; max-height: 100%; object-fit: contain; }

.payment-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  height: 36px; padding: 0 0.8rem; font-size: 0.8rem; font-weight: 700;
  background: #fff; color: var(--ink);
}
.payment-visa { color: #1a1f71; font-style: italic; font-size: 0.95rem; letter-spacing: 0.04em; }
.payment-paypal { color: #003087; gap: 0; }
.payment-paypal span { color: #009cde; }

/* RNAL na página do alojamento */
.listing-rnal {
  display: inline-block; margin: 0.5rem 0 0; padding: 0.2rem 0.65rem;
  font-size: 0.82rem; font-weight: 600; color: var(--brand-dark);
  background: #eaf5f9; border-radius: 999px;
}

@media (max-width: 640px) {
  .footer-trust { padding: 1.25rem 0; gap: 1rem; }
  .footer-bottom { padding: 1rem 0 1.5rem; }
  .footer-trust, .footer-bottom, .footer-grid { padding-left: 0; padding-right: 0; }
  .footer-badge-img { width: calc((100% - 2rem) / 3); height: 72px; padding: 0.4rem; }
  .footer-payments { margin-top: 0.25rem; }
}

/* ===== Rodapé completo (colunas, links, linha legal) ===== */
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 0.8fr; gap: 2rem 2.5rem;
  justify-content: stretch;
}
.footer-brand { max-width: none; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-links a { color: var(--ink); }
.footer-links a:hover, .footer-legal a:hover { color: var(--brand-dark); }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.footer-legal a { color: var(--muted); font-weight: 600; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ===== Páginas legais (política, condições, FAQ...) ===== */
.legal-page { max-width: 820px; margin: 0 auto; padding: 2.5rem 1.25rem 3rem; line-height: 1.7; }
.legal-page h1 { font-size: 2rem; margin: 0 0 0.25rem; line-height: 1.2; }
.legal-updated { color: var(--muted); font-size: 0.85rem; margin: 0 0 1.5rem; }
.legal-page h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; color: var(--brand-dark); }
.legal-page p, .legal-page li { color: var(--ink); }
.legal-page ul { padding-left: 1.25rem; }
.legal-page li { margin-bottom: 0.4rem; }
.legal-links-note { margin-top: 2rem; color: var(--muted); font-size: 0.9rem; }

.policy-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.policy-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem; }
.policy-card h2 { margin: 0 0 0.5rem; color: var(--ink); font-size: 1.4rem; }
.policy-kicker { margin: 0; color: var(--muted); font-size: 0.85rem; }
.policy-card ul { margin: 0.5rem 0 0; }

.faq-item { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem 1.1rem; margin-bottom: 0.7rem; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin: 0.6rem 0 0; color: var(--muted); }

/* Resumo da política de cancelamento na página do alojamento */
.listing-policy { margin-top: 1.5rem; padding: 1.1rem 1.25rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.listing-policy h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.listing-policy p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.listing-policy ul { margin: 0.5rem 0 0.6rem; padding-left: 1.2rem; font-size: 0.92rem; }
.listing-policy li { margin-bottom: 0.25rem; }

@media (max-width: 640px) {
  .policy-cards { grid-template-columns: 1fr; }
  .legal-page { padding: 1.5rem 1.5rem 2.5rem; }
  .legal-page h1 { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
}

/* ===== Orçamento (noites + limpeza = total) na caixa de reserva ===== */
.quote-box { background: #f1f8fb; border: 1px solid #d5e9f1; border-radius: 10px; padding: 0.8rem 0.9rem; margin: 0 0 1rem; }
.quote-box[hidden] { display: none; }
.quote-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; padding: 0.2rem 0; color: var(--ink); }
.quote-row small { color: var(--muted); }
.quote-total { border-top: 1px solid #d5e9f1; margin-top: 0.35rem; padding-top: 0.5rem; font-weight: 700; font-size: 1.05rem; }
.quote-note { display: block; margin-top: 0.4rem; color: var(--muted); font-size: 0.78rem; }

/* ===== Página do alojamento: info, comodidades, descrição, datas lado a lado ===== */
.info-chips, .amenity-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 0.9rem; }
.info-chips li, .amenity-chips li {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.9rem; padding: 0.4rem 0.8rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); color: var(--ink);
}
.info-chips li { background: #f1f8fb; border-color: #d5e9f1; }
.amenity-chips { margin-bottom: 1.25rem; }

.listing-description { line-height: 1.7; }
.listing-description p { margin: 0 0 0.9rem; }
.listing-description .desc-heading { font-size: 1.05rem; margin: 1.2rem 0 0.4rem; }
.listing-description.collapsed { max-height: 12.5em; overflow: hidden; position: relative; }
.listing-description.collapsed::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4em;
  background: linear-gradient(to bottom, rgba(247,249,250,0), var(--bg));
}
.desc-toggle {
  background: none; border: none; padding: 0.2rem 0; margin: 0.25rem 0 0.5rem;
  color: var(--brand-dark); font-weight: 700; font-size: 0.95rem; cursor: pointer; text-decoration: underline;
}

.date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.date-row label { margin-bottom: 0.4rem; }
.date-row .date-error { min-height: 0; }
.booking-reassure { margin: 0.6rem 0 0; text-align: center; font-size: 0.82rem; color: var(--muted); }

/* ===== Cabeçalho largo no computador (logo e menu junto às margens) ===== */
@media (min-width: 761px) {
  .site-header {
    padding: 1rem clamp(2rem, 4vw, 4.5rem);
  }
  .site-header .logo img { height: 46px; }
  .site-header nav { display: flex; align-items: center; gap: 2.25rem; }
  .site-header nav a { margin-left: 0; font-size: 1.02rem; font-weight: 500; }
}

/* Caixa de pesquisa: sem espaço vazio por baixo e campos distribuídos no computador */
.search-error:empty { display: none; }
@media (min-width: 761px) {
  .search-bar {
    grid-template-columns: 1fr 1fr 0.7fr auto;
    align-items: end;
  }
}

/* Avaliações reais */
.listing-reviews { margin: 1.75rem 0 0; }
.listing-reviews h3 { margin: 0 0 0.9rem; font-size: 1.15rem; }
.review-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.review-card { margin: 0; padding: 1.1rem 1.2rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.review-stars { color: #e8a317; letter-spacing: 2px; font-size: 0.95rem; margin-bottom: 0.5rem; }
.review-card blockquote { margin: 0 0 0.8rem; line-height: 1.55; color: var(--ink); }
.review-card figcaption { display: flex; flex-direction: column; font-size: 0.9rem; }
.review-card figcaption span { color: var(--muted); }
.review-source { margin: 0.8rem 0 0; font-size: 0.85rem; color: var(--muted); }
.review-source a { color: var(--brand-dark); }

/* Nota e nº de avaliações */
.rating-line { display: flex; align-items: center; gap: 0.3rem; font-size: 0.9rem; color: var(--ink); margin: 0 0 0.5rem; }
.rating-line .star { color: #e8a317; }
.rating-line .count { color: var(--muted); }
.rating-link { text-decoration: none; margin: 0.35rem 0 0; }
.rating-link:hover .count { text-decoration: underline; }
html { scroll-behavior: smooth; }
.review-stars .off { color: #d9d9d9; }

/* ===== Página Smartlocks ===== */
.sl-hero { position: relative; min-height: 560px; display: flex; align-items: center; overflow: hidden; background: radial-gradient(1200px 500px at 70% 20%, #2a3942 0%, #121a1f 60%, #0b1013 100%); color: #fff; }
.sl-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.sl-hero-video.is-ready { opacity: 1; }
.sl-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,12,15,0.82) 0%, rgba(8,12,15,0.55) 55%, rgba(8,12,15,0.3) 100%); }
.sl-hero-content { position: relative; z-index: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 4rem clamp(1.25rem, 4vw, 2rem); }
.sl-kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; opacity: 0.8; margin: 0 0 0.9rem; }
.sl-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; margin: 0 0 1.1rem; max-width: 18ch; }
.sl-lead { font-size: 1.1rem; line-height: 1.6; max-width: 54ch; opacity: 0.92; margin: 0 0 1.8rem; }
.sl-hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.sl-btn { display: inline-block; padding: 0.8rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; font-family: inherit; }
.sl-btn-primary { background: var(--brand-dark); color: #fff; }
.sl-btn-primary:hover { background: var(--brand-light); }
.sl-btn-primary:disabled { opacity: 0.6; cursor: default; }
.sl-btn-ghost { border-color: rgba(255,255,255,0.7); color: #fff; }
.sl-btn-ghost:hover { background: rgba(255,255,255,0.12); }
.sl-btn-small { padding: 0.5rem 1rem; font-size: 0.88rem; background: #fff; color: var(--ink); border-color: var(--ink); }
.sl-btn-small:hover { background: var(--ink); color: #fff; }

.sl-section { padding: 3.5rem 0; }
.sl-section h2 { font-size: 1.7rem; margin: 0 0 1.5rem; }
.sl-section-sub { color: var(--muted); margin: -1rem 0 1.5rem; }
.sl-note { color: var(--muted); font-size: 0.88rem; margin: 1.25rem 0 0; }

.sl-benefit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.sl-benefit { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1.4rem; }
.sl-icon { width: 48px; height: 48px; border-radius: 12px; background: #e8f3f7; color: var(--brand-dark); display: flex; align-items: center; justify-content: center; margin-bottom: 0.9rem; }
.sl-benefit h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.sl-benefit p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 0.95rem; }

.sl-products { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sl-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.sl-product { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.sl-product-photo { aspect-ratio: 1 / 1; background: #f4f6f7; display: flex; align-items: center; justify-content: center; }
.sl-product-photo img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.sl-product-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.sl-product-body h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.sl-product-tagline { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.92rem; }
.sl-product-body ul { margin: 0 0 1rem; padding-left: 1.1rem; font-size: 0.9rem; line-height: 1.6; }
.sl-product-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.sl-price-badge { font-size: 0.82rem; font-weight: 600; color: var(--brand-dark); }

.sl-step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.sl-step-list li { display: flex; gap: 1rem; align-items: flex-start; }
.sl-step-n { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: var(--brand-dark); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.sl-step-list h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.sl-step-list p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 0.95rem; }

.sl-quote { background: #fff; border-top: 1px solid var(--border); }
.sl-quote-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2.5rem; align-items: start; }
.sl-quote-intro p { color: var(--muted); line-height: 1.6; }
.sl-form { display: grid; gap: 1rem; }
.sl-form label { display: grid; gap: 0.35rem; font-size: 0.88rem; color: var(--muted); }
.sl-form input[type="text"], .sl-form input[type="email"], .sl-form input[type="tel"], .sl-form input[type="number"], .sl-form select, .sl-form textarea { width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
.sl-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sl-form .sl-consent { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.85rem; }
.sl-consent input { margin-top: 0.2rem; }
.sl-form-error { color: var(--danger); font-size: 0.9rem; margin: 0; }
.sl-submit { justify-self: start; border: none; }
.sl-success { background: #eaf6ee; border: 1px solid #bfe0c9; border-radius: 12px; padding: 1.5rem; }
.sl-success h3 { margin: 0 0 0.3rem; }
.sl-success p { margin: 0; }

@media (max-width: 760px) {
  .sl-hero { min-height: 480px; }
  .sl-hero-shade { background: rgba(8,12,15,0.62); }
  .sl-section { padding: 2.5rem 0; }
  .sl-quote-wrap { grid-template-columns: 1fr; gap: 1.5rem; }
  .sl-field-row { grid-template-columns: 1fr; }
  .sl-hero-content { padding: 3rem 1.5rem; }
}

/* Resultado da pesquisa na página inicial */
.search-status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; background: #fff6e5; border: 1px solid #f1d9a6; color: #6b4a0b; border-radius: 12px; padding: 0.9rem 1.1rem; margin: 0 0 1.25rem; line-height: 1.5; }
.search-status[hidden] { display: none; }
.search-status-clear { margin-left: auto; background: #fff; border: 1px solid currentColor; color: inherit; border-radius: 999px; padding: 0.4rem 0.9rem; font: inherit; font-size: 0.88rem; cursor: pointer; }
.search-status-clear:hover { background: #fff0cf; }

/* Selos e métodos de pagamento sem caixas à volta (aspeto mais limpo) */
.footer-badge, .footer-badge-img, .payment-badge {
  border: none;
  background: transparent;
  box-shadow: none;
}
.footer-badge-img { padding-left: 0; padding-right: 0; justify-content: flex-start; width: auto; }
.footer-badge-img img { height: 64px; width: auto; max-width: none; }
.footer-trust { gap: 1rem 2.25rem; }
.footer-payments { gap: 1.25rem; align-items: center; }
.payment-badge { padding: 0; }
@media (max-width: 640px) {
  .footer-badge-img { width: auto; height: auto; padding: 0; }
  .footer-badge-img img { height: 52px; max-width: 100%; }
  .footer-trust { gap: 1rem 1.5rem; }
}

/* ===== Idioma (PT | EN) ===== */
html.i18n-pending body { visibility: hidden; }
html.lang-en [data-lang="pt"],
html.lang-pt [data-lang="en"] { display: none !important; }
.lang-switch { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.9rem; }
.lang-switch button {
  background: none; border: none; padding: 0.2rem 0.1rem; margin: 0;
  font: inherit; color: var(--muted); cursor: pointer; letter-spacing: 0.02em;
}
.lang-switch button:hover { color: var(--brand-dark); }
.lang-switch button.active { color: var(--ink); font-weight: 700; cursor: default; }
.lang-switch .lang-sep { color: var(--muted); opacity: 0.45; }
@media (max-width: 760px) {
  /* Cabeçalho com o seletor de língua: tudo numa só linha no telemóvel */
  .site-header { padding-left: 1rem; padding-right: 1rem; gap: 0.5rem; }
  .site-header .logo img { height: 24px; }
  .site-header nav { gap: 0.6rem; align-items: center; }
  .site-header nav a { font-size: 0.82rem; }
  .lang-switch { font-size: 0.82rem; gap: 0.15rem; }
}

/* ===== Cabeçalho fixo (todas as páginas) ===== */
:root {
  --header-h: 56px;       /* cabeçalho compacto (branco) */
  --header-h-hero: 64px;  /* cabeçalho transparente sobre o vídeo */
}
@media (min-width: 761px) {
  :root { --header-h: 68px; --header-h-hero: 88px; }
}
html { scroll-padding-top: var(--header-h); }
body { padding-top: var(--header-h); }
body.home { padding-top: 0; }

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 950; /* abaixo do calendário (1000) e da galeria de fotos (2000) */
  height: var(--header-h);
  padding-top: 0;
  padding-bottom: 0;
  background: #fff;
  border-bottom: 1px solid transparent;
  box-shadow: 0 4px 18px rgba(20, 40, 48, 0.08);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
}
.site-header .logo img { transition: height 0.3s ease, filter 0.3s ease; }
.site-header nav a, .site-header .lang-switch button, .site-header .lang-switch .lang-sep { transition: color 0.3s ease; }
@media (min-width: 761px) {
  .site-header .logo img { height: 38px; }
}

/* Sobre o vídeo da página inicial: transparente, logótipo e links a branco */
.site-header.on-hero {
  height: var(--header-h-hero);
  background: transparent;
  box-shadow: none;
}
.site-header.on-hero .logo img { filter: brightness(0) invert(1); }
@media (min-width: 761px) {
  .site-header.on-hero .logo img { height: 46px; }
}
.site-header.on-hero nav a { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
.site-header.on-hero nav a:hover { color: #fff; opacity: 0.8; }
.site-header.on-hero .lang-switch button { color: rgba(255, 255, 255, 0.78); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
.site-header.on-hero .lang-switch button.active { color: #fff; }
.site-header.on-hero .lang-switch button:hover { color: #fff; }
.site-header.on-hero .lang-switch .lang-sep { color: #fff; opacity: 0.6; }
.site-header a:focus-visible, .site-header button:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 3px; border-radius: 4px; }
.site-header.on-hero a:focus-visible, .site-header.on-hero button:focus-visible { outline-color: #fff; }

/* ===== Topo da página inicial com vídeo ===== */
.hero {
  min-height: 560px;
  min-height: max(560px, 100vh);
  min-height: max(560px, 100svh);
  overflow: hidden;
  flex-direction: column;
  padding: calc(var(--header-h-hero) + 1.5rem) 1.25rem 5rem;
  background-color: #1b2a30;
  background-image: url("images/hero-poster-mobile.jpg");
  background-size: cover;
  background-position: center;
}
@media (min-width: 768px) {
  .hero { background-image: url("images/hero-poster-desktop.jpg"); }
}
.hero::before { content: none; }
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero.video-ready .hero-video { opacity: 1; }
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 22, 28, 0.55) 0%, rgba(10, 22, 28, 0.15) 22%, rgba(10, 22, 28, 0.25) 55%, rgba(10, 22, 28, 0.6) 100%),
    radial-gradient(ellipse at center, rgba(10, 22, 28, 0.35) 0%, rgba(10, 22, 28, 0) 70%);
}
.hero-content { max-width: 960px; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 auto 1rem;
  max-width: 16ch;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}
.hero p.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  max-width: 36ch;
  margin: 0 auto 2.25rem;
  opacity: 0.95;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

/* Caixa de pesquisa: cartão de vidro */
.hero .search-bar {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 1.1rem;
  box-shadow: 0 24px 60px rgba(8, 20, 26, 0.28);
  max-width: 860px;
  margin: 0 auto;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero .search-bar {
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
  }
}
.hero .search-bar label { color: #44545a; font-weight: 600; }
.hero .search-bar input { background: #fff; border-color: rgba(31, 42, 46, 0.14); border-radius: 10px; padding: 0.65rem 0.7rem; }
.hero .search-bar input:focus { outline: 2px solid var(--brand-light); outline-offset: 0; border-color: var(--brand-dark); }
.hero .search-bar button { border-radius: 10px; padding: 0.75rem 1.4rem; }
.hero .search-bar button:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

/* Indicador "descer" */
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  color: #fff;
  opacity: 0.85;
  border-radius: 50%;
}
.hero-scroll:hover { opacity: 1; }
.hero-scroll:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Botão pausar / retomar o vídeo */
.hero-video-toggle {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(10, 22, 28, 0.35);
  color: #fff;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.hero-video-toggle[hidden] { display: none; }
.hero-video-toggle:hover { opacity: 1; background: rgba(10, 22, 28, 0.55); }
.hero-video-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; opacity: 1; }
.hero-video-toggle .icon-play { display: none; }
.hero-video-toggle.is-paused .icon-play { display: block; }
.hero-video-toggle.is-paused .icon-pause { display: none; }
@media (min-width: 761px) {
  .hero-video-toggle { right: clamp(2rem, 4vw, 4.5rem); bottom: 1.5rem; }
}

/* Entrada suave e seta a mexer: só se o visitante não pediu menos movimento */
@media (prefers-reduced-motion: no-preference) {
  .hero-anim { opacity: 0; animation: hero-rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }
  .hero h1.hero-anim { animation-delay: 0.1s; }
  .hero .lead.hero-anim { animation-delay: 0.3s; }
  .hero .search-bar.hero-anim { animation-delay: 0.5s; }
  .hero-scroll svg { animation: hero-bob 2.4s ease-in-out infinite; }
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes hero-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .site-header, .site-header .logo img, .site-header nav a, .hero-video { transition: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 760px) {
  .hero { padding: calc(var(--header-h-hero) + 1rem) 1.25rem 4.5rem; }
  .hero p.lead { margin-bottom: 1.75rem; }
  .hero .search-bar { border-radius: 18px; padding: 1rem; }
}

/* =====================================================================
   Visual moderno: tipografia, espaço, cartões, botões, rodapé, páginas
   legais e animações ao fazer scroll. Só aspeto; o topo com vídeo da
   página inicial não é alterado aqui.
   ===================================================================== */
:root {
  --ease-soft: cubic-bezier(0.2, 0.7, 0.2, 1);
  --radius-card: 18px;
  --radius-btn: 12px;
  --shadow-soft: 0 1px 2px rgba(20, 40, 48, 0.04), 0 8px 24px rgba(20, 40, 48, 0.07);
  --shadow-lift: 0 2px 6px rgba(20, 40, 48, 0.06), 0 22px 48px rgba(20, 40, 48, 0.14);
  --section-space: 64px;
}
@media (min-width: 761px) {
  :root { --section-space: 96px; }
}

html { -webkit-text-size-adjust: 100%; }
body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; /* nada pode provocar scroll horizontal */
}
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
/* O cabeçalho e o topo com vídeo mantêm exatamente o aspeto anterior */
.site-header, .hero { line-height: normal; }
.hero p { text-wrap: wrap; }

/* Largura do conteúdo */
.container { max-width: 1200px; }

/* Foco visível e consistente para quem usa o teclado */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 3px;
}

/* ----- Secções e títulos ----- */
.section { padding: var(--section-space) 0; }
.section > h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(1.75rem, 3vw, 2.75rem);
  text-wrap: balance;
}
.section > h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 0.9rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-light));
}

/* ----- Cartões dos alojamentos ----- */
.listings-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.listing-card {
  position: relative;
  border: 1px solid rgba(20, 40, 48, 0.06);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.5s var(--ease-soft), box-shadow 0.5s var(--ease-soft);
  isolation: isolate;
}
.listing-card .photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
/* A foto é repetida numa camada própria para poder fazer zoom sem sair do cartão */
.listing-card .photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  transform: scale(1);
  transition: transform 0.7s var(--ease-soft);
  will-change: transform;
}
.listing-card .info { padding: 1.25rem 1.35rem 1.4rem; }
.listing-card h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.listing-card .location { font-size: 0.9rem; }
.listing-card .meta { font-size: 0.88rem; margin-bottom: 1rem; }
.listing-card .price { font-size: 1.25rem; }
.listing-card:hover,
.listing-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}
.listing-card:hover .photo::before,
.listing-card:focus-visible .photo::before { transform: scale(1.05); }
.listing-card:focus-visible {
  outline: 3px solid var(--brand-dark);
  outline-offset: 4px;
  border-radius: var(--radius-card);
}

/* Só um alojamento: cartão em destaque (foto grande ao lado da informação),
   à largura toda do conteúdo, alinhado com o título. Com vários alojamentos volta à grelha normal. */
@media (min-width: 761px) {
  .listings-grid:has(> .listing-card:only-child) {
    grid-template-columns: minmax(0, 1fr);
  }
  .listing-card:only-child {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
  }
  .listing-card:only-child .photo { aspect-ratio: 4 / 3; height: 100%; }
  .listing-card:only-child .info {
    padding: clamp(1.75rem, 3vw, 2.75rem);
    justify-content: center;
  }
  .listing-card:only-child h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 0.4rem; }
  .listing-card:only-child .location { font-size: 1rem; margin-bottom: 0.9rem; }
  .listing-card:only-child .meta { font-size: 0.95rem; margin-bottom: 1.75rem; }
  .listing-card:only-child .price { margin-top: 0; font-size: 1.6rem; }
  .listing-card:only-child:hover,
  .listing-card:only-child:focus-visible { transform: translateY(-4px); }
}
/* Telemóvel com um só alojamento: cartão a toda a largura, foto grande */
@media (max-width: 760px) {
  .listing-card:only-child .info { padding: 1.35rem 1.4rem 1.5rem; }
}

/* ----- Botões ----- */
.booking-box button[type="submit"],
.mobile-book-bar button,
.sl-btn-primary {
  background: var(--brand-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(63, 145, 172, 0.28);
  transition: background-color 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft), transform 0.3s var(--ease-soft);
}
.booking-box button[type="submit"]:hover,
.mobile-book-bar button:hover,
.sl-btn-primary:hover {
  background: var(--brand-light);
  box-shadow: 0 8px 22px rgba(63, 145, 172, 0.32);
  transform: translateY(-1px);
}
.booking-box button[type="submit"]:active,
.mobile-book-bar button:active { transform: translateY(0); }
.booking-box button[type="submit"] { padding: 0.85rem 1rem; }
.booking-box button[type="submit"]:disabled { opacity: 0.65; cursor: default; transform: none; }

/* Botões secundários (contorno) */
.gallery-see-all,
.search-status-clear,
.sl-btn-small {
  border-radius: 999px;
  transition: background-color 0.3s var(--ease-soft), color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft);
}
.gallery-see-all { border-color: var(--border); box-shadow: var(--shadow-soft); padding: 0.55rem 1.1rem; }
.gallery-see-all:hover { background: #fff; border-color: var(--brand-dark); color: var(--brand-dark); }
.desc-toggle { transition: color 0.3s var(--ease-soft); }
.desc-toggle:hover { color: var(--brand-light); }

/* Botão do indicativo do telefone: igual aos outros campos (não azul) */
.booking-box .phone-code-toggle {
  width: auto; background: #fff; color: var(--ink);
  border: 1px solid var(--border); padding: 0.55rem 0.6rem;
  font-size: 0.95rem; font-weight: 400; box-shadow: none;
}
.booking-box .phone-code-toggle:hover { background: #fff; border-color: #bbb; }

/* Campos de formulário: cantos e foco iguais em todo o site */
.booking-box input, .booking-box textarea, .phone-code-toggle {
  border-radius: 10px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.booking-box input:focus, .booking-box textarea:focus {
  outline: none;
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(83, 199, 232, 0.28);
}

/* ----- Página do alojamento ----- */
.listing-detail { padding-top: clamp(1.25rem, 3vw, 2.5rem); padding-bottom: var(--section-space); }
.gallery { border-radius: var(--radius-card); gap: 0.5rem; }
.gallery img { transition: transform 0.7s var(--ease-soft), filter 0.4s ease; }
@media (hover: hover) {
  .gallery > img:hover, .gallery .thumbs img:hover { filter: brightness(0.94); }
}
.gallery-track, .gallery-track img { border-radius: var(--radius-card); }
.listing-detail h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.02em; }
.detail-grid { gap: clamp(2rem, 4vw, 3.5rem); }
.booking-box {
  border-radius: var(--radius-card);
  border-color: rgba(20, 40, 48, 0.06);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
}
.listing-policy, .review-card, .policy-card {
  border-radius: 16px;
  border-color: rgba(20, 40, 48, 0.07);
  box-shadow: var(--shadow-soft);
}
.listing-reviews { margin-top: 2.5rem; }
.listing-reviews h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-bottom: 1.1rem; }
.review-list { gap: 1.25rem; }
.review-card { padding: 1.35rem 1.4rem; }
.info-chips li, .amenity-chips li { transition: border-color 0.25s ease; }

/* ----- Rodapé ----- */
.site-footer {
  margin-top: 0;
  padding: clamp(3.5rem, 7vw, 5.5rem) 1.25rem 0;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fa 100%);
  border-top: 1px solid var(--border);
  line-height: 1.6;
}
.footer-grid {
  gap: 2.5rem clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand .logo img { height: 40px; }
.footer-tagline { max-width: 34ch; margin-bottom: 1rem; }
.footer-col h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 1.1rem;
  color: var(--ink);
}
.footer-links { gap: 0.75rem; }
.footer-links a, .footer-legal a, .footer-contact a, .footer-social {
  transition: color 0.25s ease;
}
.site-footer a:hover { text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover, .footer-social:hover { color: var(--brand-light); }
.footer-trust {
  padding: 2rem 0;
  gap: 1.25rem 2.5rem;
}
.footer-bottom { padding: 1.5rem 0 2rem; font-size: 0.8rem; }
.footer-legal { gap: 0.4rem 1.5rem; }
.footer-legal a { font-weight: 500; }
@media (max-width: 640px) {
  .footer-grid { gap: 2rem 1.25rem; }
  .footer-trust { padding: 1.5rem 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* ----- Páginas legais e FAQ ----- */
.legal-page {
  max-width: 760px;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem var(--section-space);
  line-height: 1.75;
  font-size: 1.02rem;
}
.legal-page h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  text-wrap: balance;
}
.legal-updated { margin-bottom: 2.25rem; }
.legal-page h2 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); margin: 2.5rem 0 0.6rem; }
.legal-page p, .legal-page ul, .legal-page ol { max-width: 68ch; }
.legal-page p { margin: 0 0 1rem; }
.legal-page li { margin-bottom: 0.5rem; }
.legal-page .policy-cards { gap: 1.25rem; margin: 2rem 0; }
.legal-page .policy-card { padding: 1.5rem; }
.legal-page .policy-card h2 { margin-top: 0; }

.faq-item {
  border-radius: 14px;
  border-color: rgba(20, 40, 48, 0.07);
  box-shadow: var(--shadow-soft);
  padding: 0;
  margin-bottom: 0.85rem;
  transition: box-shadow 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
}
.faq-item:hover { box-shadow: var(--shadow-lift); }
.faq-item[open] { border-color: rgba(63, 145, 172, 0.35); }
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  line-height: 1.45;
  border-radius: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }
/* Ícone "+" que roda para "×" quando a pergunta está aberta */
.faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    linear-gradient(var(--brand-dark), var(--brand-dark)) center / 12px 2px no-repeat,
    linear-gradient(var(--brand-dark), var(--brand-dark)) center / 2px 12px no-repeat,
    #eaf5f9;
  transition: transform 0.4s var(--ease-soft), background-color 0.3s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--brand-dark); }
.faq-item p { margin: 0; padding: 0 1.35rem 1.2rem; line-height: 1.7; }

/* ----- Animações (só se o visitante não pediu menos movimento) ----- */
@media (prefers-reduced-motion: no-preference) {
  /* Elementos escondidos só quando o reveal.js está ativo (html.reveal-on) */
  .reveal-on .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 0.7s var(--ease-soft) var(--reveal-delay, 0ms),
      transform 0.7s var(--ease-soft) var(--reveal-delay, 0ms);
  }
  .reveal-on .reveal.is-visible { opacity: 1; transform: none; }

  /* FAQ: a resposta aparece com fade e uma pequena descida */
  .faq-item[open] > p { animation: faq-open 0.45s var(--ease-soft); }
  /* Browsers recentes: também a altura abre e fecha suavemente */
  @supports (interpolate-size: allow-keywords) {
    .faq-item { interpolate-size: allow-keywords; }
    .faq-item::details-content {
      height: 0;
      overflow: clip;
      transition: height 0.45s var(--ease-soft), content-visibility 0.45s allow-discrete;
    }
    .faq-item[open]::details-content { height: auto; }
  }
}
@keyframes faq-open {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .listing-card, .listing-card .photo::before, .gallery img,
  .booking-box button[type="submit"], .mobile-book-bar button,
  .faq-item, .faq-item summary::after { transition: none; }
  .listing-card:hover, .listing-card:focus-visible,
  .booking-box button[type="submit"]:hover, .mobile-book-bar button:hover { transform: none; }
  .listing-card:hover .photo::before, .listing-card:focus-visible .photo::before { transform: none; }
}

/* =====================================================================
   Página do alojamento — galeria em mosaico, carrossel no telemóvel,
   fotos em ecrã inteiro e caixa de reserva fixa. Só aspeto.
   ===================================================================== */

/* ----- Galeria no computador: 1 foto grande + 4 pequenas ----- */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  height: clamp(340px, 42vw, 540px);
  margin-bottom: 1.25rem;
  border-radius: var(--radius-card);
  overflow: hidden;
}
.gallery-n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.gallery-n2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.gallery-n3 { grid-template-columns: 2fr 1fr; }
.gallery-n4 .gallery-cell:nth-child(2) { grid-row: 1 / -1; }
.gallery-cell {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #e6edf0;
  cursor: zoom-in;
  isolation: isolate;
}
.gallery-cell-main { grid-row: 1 / -1; }
.gallery .gallery-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  filter: none;
  transition: transform 1.4s var(--ease-soft);
}
/* Véu muito leve ao passar o rato */
.gallery-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 38, 0);
  transition: background-color 0.5s ease;
  pointer-events: none;
}
@media (hover: hover) {
  .gallery-cell:hover img { transform: scale(1.06); }
  .gallery-cell:hover::after { background: rgba(16, 32, 38, 0.08); }
}
.gallery-cell:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: -3px; }
.gallery-cell:focus-visible::after { box-shadow: inset 0 0 0 5px #fff; }

.gallery-footer { margin: 0 0 clamp(1.5rem, 3vw, 2.25rem); }
.gallery-see-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ----- Galeria no telemóvel: carrossel que desliza com o dedo ----- */
@media (max-width: 760px) {
  .gallery, .gallery-footer { display: none; }
  .gallery-carousel { margin-bottom: 1.5rem; border-radius: var(--radius-card); overflow: hidden; background: #e6edf0; }
  .gallery-track {
    gap: 0;
    border-radius: 0;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    touch-action: pan-x pan-y;
  }
  .gallery-track img {
    flex: 0 0 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    max-height: 62vh;
    border-radius: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    cursor: zoom-in;
    -webkit-user-select: none;
    user-select: none;
  }
  /* Sombra suave em baixo para o contador se ler sobre qualquer foto */
  .gallery-carousel::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 64px;
    background: linear-gradient(to bottom, rgba(10, 20, 24, 0), rgba(10, 20, 24, 0.28));
    pointer-events: none;
  }
  .gallery-counter {
    z-index: 1;
    right: 0.85rem;
    bottom: 0.85rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    background: rgba(16, 24, 28, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}

/* ----- Fotos em ecrã inteiro ----- */
.photo-modal {
  background: #0b1012;
  padding: 0 1rem;
}
.photo-modal-main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(1400px, 100%);
  max-height: none;
  gap: 1rem;
}
.photo-modal-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  touch-action: pinch-zoom;
}
.photo-modal-main img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  max-height: calc(100dvh - 8rem);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  -webkit-user-select: none;
  user-select: none;
  transform: translateX(var(--drag-x, 0px));
  transition: opacity 0.32s var(--ease-soft), transform 0.32s var(--ease-soft);
}
.photo-modal-stage.is-dragging img { transition: none; }
.photo-modal-stage.is-leaving img {
  opacity: 0;
  transform: translateX(calc(var(--dir, 1) * -48px));
  transition-duration: 0.18s;
}
.photo-modal-stage.is-entering img {
  opacity: 0;
  transform: translateX(calc(var(--dir, 1) * 48px));
  transition: none;
}
.photo-modal-counter {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}
.photo-modal-close,
.photo-modal-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color 0.25s ease, transform 0.25s var(--ease-soft);
  z-index: 2;
}
.photo-modal-nav { width: 52px; height: 52px; font-size: 1.9rem; padding-bottom: 0.15em; }
.photo-modal-close:hover, .photo-modal-nav:hover { background: rgba(255, 255, 255, 0.24); }
.photo-modal-nav:hover { transform: scale(1.06); }
.photo-modal-close:focus-visible, .photo-modal-nav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.photo-modal-nav[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .photo-modal:not([hidden]) { animation: photo-modal-in 0.25s ease; }
  .photo-modal.is-closing { opacity: 0; transition: opacity 0.2s ease; }
}
@keyframes photo-modal-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 760px) {
  .photo-modal { padding: 0; }
  .photo-modal-main { max-width: 100%; }
  .photo-modal-main img { border-radius: 0; max-height: calc(100vh - 9rem); max-height: calc(100dvh - 9rem); box-shadow: none; }
  /* Setas por cima da foto, de cada lado */
  .photo-modal-nav {
    position: absolute;
    top: 50%;
    margin: -21px 0 0;
    width: 42px; height: 42px; font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.38);
  }
  .photo-modal-prev { left: 0.5rem; }
  .photo-modal-next { right: 0.5rem; }
  .photo-modal-nav:hover { transform: none; }
  .photo-modal-close { top: max(0.9rem, env(safe-area-inset-top)); right: 0.9rem; }
}

/* ----- Títulos e espaços (iguais ao resto do site) ----- */
.listing-detail h1 { text-wrap: balance; margin-bottom: 0.35rem; }
.listing-reviews > h3,
.listing-policy h3 { letter-spacing: -0.01em; }
.listing-reviews > h3::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 0.7rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-light));
}
.listing-reviews { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.listing-policy { margin-top: clamp(2rem, 4vw, 2.75rem); padding: 1.35rem 1.5rem; }
.listing-description .desc-heading { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
.listing-description .desc-heading:first-child { margin-top: 0.5rem; }
.listing-meta { padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.info-chips { margin-top: 1.25rem; }
.amenity-chips { margin-bottom: 1.75rem; }
@media (hover: hover) {
  .info-chips li:hover, .amenity-chips li:hover { border-color: rgba(63, 145, 172, 0.45); }
}

/* ----- Caixa de reserva fixa no computador, logo abaixo do cabeçalho ----- */
.booking-box .price-row { font-size: 1.5rem; letter-spacing: -0.01em; margin-bottom: 1.1rem; }
@media (min-width: 761px) {
  .booking-box {
    position: sticky;
    top: var(--sticky-top, calc(var(--header-h) + 1.25rem));
  }
  /* Um pouco mais compacta, para caber no ecrã do portátil */
  .booking-box label { margin-bottom: 0.7rem; }
  .booking-box .date-row label { margin-bottom: 0.35rem; }
  .booking-box textarea { height: 4.2em; min-height: 2.6em; resize: vertical; }
  .booking-box .quote-box { margin-bottom: 0.85rem; }
}

/* ----- Barra "Reservar" no telemóvel ----- */
@media (max-width: 760px) {
  .mobile-book-bar {
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top-color: rgba(20, 40, 48, 0.08);
    box-shadow: 0 -8px 24px rgba(20, 40, 48, 0.08);
    transition: transform 0.35s var(--ease-soft);
  }
}

/* ----- Menos movimento: sem zoom nem transições ----- */
@media (prefers-reduced-motion: reduce) {
  .gallery .gallery-cell img,
  .gallery-cell::after,
  .photo-modal-main img,
  .photo-modal-close,
  .photo-modal-nav,
  .mobile-book-bar { transition: none; }
  .gallery-cell:hover img,
  .photo-modal-nav:hover { transform: none; }
  .gallery-track { scroll-behavior: auto; }
  .photo-modal-main img { transform: none; }
}

/* =====================================================================
   Página inicial: "Porquê reservar direto" e "Localização"
   ===================================================================== */
.why-direct, .location { padding-top: 0; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.why-card {
  background: #fff;
  border: 1px solid rgba(20, 40, 48, 0.06);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  transition: transform 0.5s var(--ease-soft), box-shadow 0.5s var(--ease-soft);
}
@media (hover: hover) {
  .why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
}
.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1.1rem;
  border-radius: 14px;
  color: var(--brand-dark);
  background: linear-gradient(135deg, #e3f4fa, #f1f9fc);
}
.why-card h3 { margin: 0 0 0.45rem; font-size: 1.2rem; }
.why-card p { margin: 0; color: var(--muted); line-height: 1.6; }

.location-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.location-text h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
.location-text h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 0.9rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-light));
}
.location-lead { margin: 0 0 1.5rem; font-size: 1.08rem; color: var(--ink); max-width: 46ch; }
.location-list { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 0.8rem; }
.location-list li { display: flex; align-items: center; gap: 0.75rem; color: var(--ink); }
.location-list svg {
  flex: 0 0 auto;
  box-sizing: content-box;
  padding: 8px;
  border-radius: 10px;
  color: var(--brand-dark);
  background: #eaf5f9;
}
.location-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-btn);
  background: var(--brand-dark);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(63, 145, 172, 0.28);
  transition: background-color 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft), transform 0.3s var(--ease-soft);
}
.location-map-btn:hover {
  background: var(--brand-light);
  box-shadow: 0 8px 22px rgba(63, 145, 172, 0.32);
  transform: translateY(-1px);
}
.location-photo {
  margin: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  aspect-ratio: 16 / 9;
  background: #e6edf0;
}
.location-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-soft);
}
@media (hover: hover) {
  .location-photo:hover img { transform: scale(1.04); }
}

@media (max-width: 760px) {
  .why-grid { grid-template-columns: 1fr; }
  .location-grid { grid-template-columns: 1fr; }
  .location-photo { aspect-ratio: 4 / 3; }
}
@media (min-width: 761px) and (max-width: 960px) {
  .why-grid { grid-template-columns: 1fr; max-width: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  .why-card, .location-map-btn, .location-photo img { transition: none; }
  .why-card:hover, .location-map-btn:hover, .location-photo:hover img { transform: none; }
}

/* ----- Rodapé alinhado com o conteúdo das secções acima -----
   O rodapé usa a mesma margem lateral que .container (1,25rem; 1,5rem em ecrãs até 760px),
   para o logótipo e os textos começarem na mesma linha que o conteúdo da página. */
.site-footer { padding-left: 0; padding-right: 0; }
.site-footer > .container { padding-left: 1.25rem; padding-right: 1.25rem; }
@media (max-width: 760px) {
  .site-footer > .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
/* A imagem do logótipo tem uma margem transparente à esquerda (15 px em 120 px de altura);
   este ajuste põe o "G" exatamente na mesma linha que o texto. */
.footer-brand .logo img { margin-left: -5px; }

/* =====================================================================
   Menu do cabeçalho (menu.js): links à vista no computador; no telemóvel
   (760 px ou menos) logótipo, PT | EN e botão ☰ que abre um painel branco.
   ===================================================================== */
.site-header nav .nav-links { display: flex; align-items: center; gap: inherit; }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 -10px 0 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle .menu-icon-close { display: none; }
.site-header.menu-open .menu-toggle .menu-icon-bars { display: none; }
.site-header.menu-open .menu-toggle .menu-icon-close { display: inline; }
.site-header.on-hero .menu-toggle { color: #fff; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.35)); }

@media (max-width: 760px) {
  .site-header nav { gap: 0.9rem; }
  .menu-toggle { display: inline-flex; }

  .site-header nav .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 0.75rem;
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 14px 28px rgba(20, 40, 48, 0.12);
    max-height: calc(100vh - 100%);
    overflow-y: auto;
  }
  .site-header.menu-open nav .nav-links { display: flex; }
  .site-header nav .nav-links a,
  .site-header.on-hero nav .nav-links a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 1.5rem;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--ink);
    text-shadow: none;
    opacity: 1;
  }
  .site-header nav .nav-links a + a { border-top: 1px solid var(--border); }
  .site-header nav .nav-links a:hover { color: var(--brand-dark); background: #f4f9fb; }
  .site-header nav .nav-links a[aria-current="page"] { color: var(--brand-dark); font-weight: 600; }
  .site-header nav .nav-links a:focus-visible { outline-offset: -3px; outline-color: var(--brand-dark); }

  /* Com o menu aberto, o cabeçalho fica branco (mesmo por cima do vídeo) */
  .site-header.menu-open,
  .site-header.on-hero.menu-open {
    background: #fff;
    box-shadow: 0 4px 18px rgba(20, 40, 48, 0.08);
  }
  .site-header.on-hero.menu-open .logo img { filter: none; }
  .site-header.on-hero.menu-open .menu-toggle { color: var(--ink); filter: none; }
  .site-header.on-hero.menu-open .lang-switch button { color: var(--muted); text-shadow: none; }
  .site-header.on-hero.menu-open .lang-switch button.active { color: var(--ink); }
  .site-header.on-hero.menu-open .lang-switch .lang-sep { color: var(--muted); opacity: 0.45; }
  .site-header.on-hero.menu-open a:focus-visible,
  .site-header.on-hero.menu-open button:focus-visible { outline-color: var(--brand-dark); }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .site-header.menu-open nav .nav-links { animation: menu-drop 0.2s ease-out; }
}
@keyframes menu-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header nav .nav-links { animation: none; }
}

/* =====================================================================
   Página "Proprietários" (proprietarios.html) e faixa na página inicial
   ===================================================================== */
.owners-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-btn);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s var(--ease-soft), color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft), transform 0.3s var(--ease-soft);
}
.owners-btn-primary {
  background: var(--brand-dark);
  color: #fff;
  border: 1px solid var(--brand-dark);
  box-shadow: 0 4px 14px rgba(63, 145, 172, 0.28);
}
.owners-btn-primary:hover { background: var(--brand-light); border-color: var(--brand-light); color: #fff; transform: translateY(-1px); }
.owners-btn-primary:disabled { opacity: 0.65; cursor: default; transform: none; }
.owners-btn-secondary {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid rgba(63, 145, 172, 0.45);
}
.owners-btn-secondary:hover { border-color: var(--brand-dark); background: #f1f9fc; }

.owners-hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1rem, 3vw, 2rem); background: #fff; }
.owners-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.owners-hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.owners-lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); margin: 0 0 2rem; max-width: 40ch; }
.owners-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.owners-hero-photo {
  margin: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  aspect-ratio: 4 / 3;
  background: #e6edf0;
}
.owners-hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.owners-how { padding-bottom: 0; }
.owners-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; color: var(--muted); }
.owners-checklist li { position: relative; padding-left: 1.6rem; line-height: 1.5; }
.owners-checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.38em;
  width: 0.45rem;
  height: 0.8rem;
  border: solid var(--brand-dark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.owners-commission { padding-bottom: 0; }
.owners-panel {
  background: linear-gradient(135deg, #eaf6fa, #f6fbfd);
  border: 1px solid rgba(63, 145, 172, 0.18);
  border-radius: var(--radius-card);
  padding: clamp(1.75rem, 4vw, 3rem);
}
.owners-panel h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 0.75rem; letter-spacing: -0.02em; }
.owners-panel p { margin: 0; font-size: 1.08rem; max-width: 62ch; }

.owners-locks-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.owners-locks-lead { font-size: 1.12rem; margin: 0 0 1rem; max-width: 44ch; }
.owners-price { font-weight: 700; color: var(--brand-dark); margin: 0 0 1.5rem; }
.owners-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.owners-features li { display: flex; align-items: center; gap: 0.75rem; }
.owners-features svg {
  flex: 0 0 auto;
  box-sizing: content-box;
  padding: 8px;
  border-radius: 10px;
  color: var(--brand-dark);
  background: #eaf5f9;
}

.owners-contact-lead { margin: -1rem 0 1.75rem; font-size: 1.08rem; color: var(--muted); }
.owners-form {
  background: #fff;
  border: 1px solid rgba(20, 40, 48, 0.06);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.25rem, 3.5vw, 2.25rem);
  max-width: 820px;
}
.of-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1.25rem; }
.of-field { margin: 0 0 1.1rem; min-width: 0; }
.of-field > label, .of-choices legend { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.4rem; }
.of-choices { border: none; padding: 0; margin-left: 0; margin-right: 0; }
.of-choices legend { padding: 0; }
.owners-form input[type="text"],
.owners-form input[type="email"],
.owners-form input[type="tel"],
.owners-form select,
.owners-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(31, 42, 46, 0.18);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
}
.owners-form textarea { resize: vertical; min-height: 120px; }
.owners-form input:focus, .owners-form select:focus, .owners-form textarea:focus {
  outline: 2px solid var(--brand-light);
  outline-offset: 0;
  border-color: var(--brand-dark);
}
.owners-form .phone-input-row { margin-top: 0; }
.owners-form .phone-code-toggle { min-height: 48px; border-radius: 10px; }
.of-options { display: grid; gap: 0.25rem; }
.of-options.of-inline { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.of-options label, .of-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.55rem 0;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.4;
}
.of-options input, .of-consent input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--brand-dark); }
.of-field > .of-consent { font-weight: 400; margin-bottom: 0; }
.of-consent input { margin-top: 1px; }
.field-error { display: block; color: var(--danger); font-size: 0.88rem; margin-top: 0.3rem; }
.field-error:empty { display: none; }
.owners-submit { width: 100%; margin-top: 0.5rem; font-size: 1.05rem; }
@media (min-width: 761px) { .owners-submit { width: auto; min-width: 220px; } }
.owners-status:empty { display: none; }
.owners-status { margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 10px; font-weight: 500; }
.owners-status.is-success { background: #e9f6ee; color: var(--success); }
.owners-status.is-error { background: #fdecea; color: var(--danger); }
.owners-status:focus { outline: none; }
.owners-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Faixa "Tem uma casa no Algarve?" na página inicial */
.owner-band { padding-top: 0; }
.owner-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #eaf6fa, #f6fbfd);
  border: 1px solid rgba(63, 145, 172, 0.18);
  border-radius: var(--radius-card);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.owner-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 0.5rem; letter-spacing: -0.02em; }
.owner-band p { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 52ch; }

@media (max-width: 760px) {
  .owners-hero-grid, .owners-locks-grid, .of-row { grid-template-columns: 1fr; }
  .owners-actions .owners-btn { flex: 1 1 100%; }
  .owner-band .owners-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .owners-btn { transition: none; }
  .owners-btn-primary:hover { transform: none; }
}
