/* =========================================================
   Palace Praia Hotel — Catálogo de acomodações
   Identidade: dourado do arco (sol) + azul da onda (mar)
   Tipografia: Marcellus (títulos, eco do logotipo) + Poppins (textos, materiais do hotel)
   ========================================================= */

:root {
  /* Marca — extraídas do logo oficial */
  --sun-300: #FBCD4C;
  --sun-400: #F2B535;
  --sun-500: #E89201;
  --sun-600: #DF8204;
  --sun-ink: #9A5B00;           /* dourado escuro p/ textos pequenos sobre claro (AA) */
  --wave-900: #00314A;
  --wave-800: #004669;
  --wave-700: #005B88;
  --wave-500: #2C90B4;
  --wave-300: #63D2EC;

  /* Neutros (areia) */
  --sand-0: #FFFFFF;
  --sand-50: #FCFAF6;
  --sand-100: #F6F1E7;
  --sand-200: #ECE3D3;
  --line: #E4DACA;
  --ink-900: #0B2633;
  --ink-700: #2F4754;
  --ink-500: #566B76;

  --grad-sun: linear-gradient(135deg, #FBCD4C 0%, #F2B535 38%, #E79819 72%, #DF8204 100%);

  --font-display: 'Marcellus', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --shadow-1: 0 1px 2px rgba(0, 49, 74, .06), 0 6px 18px rgba(0, 49, 74, .07);

  --gutter: 20px;
  --maxw: 1200px;
  --tabs-h: 52px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--tabs-h); }
body {
  margin: 0;
  background: var(--sand-50);
  color: var(--ink-700);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
html.is-locked, html.is-locked body { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--wave-700); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; color: var(--ink-900); margin: 0; letter-spacing: .005em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--wave-300); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--wave-900); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- Ícones ---------- */
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Anel dourado com "ponto" — mesmo recurso dos materiais do hotel */
.ring {
  --ring-bg: var(--sand-0);
  --ring-size: 52px;
  position: relative;
  width: var(--ring-size); height: var(--ring-size);
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #D27B02;
}
.ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 1.5px;
  background: var(--grad-sun);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.ring::after {
  content: ""; position: absolute; right: 3.5px; bottom: 3.5px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sun-600);
  box-shadow: 0 0 0 3px var(--ring-bg);
}
.ring .ic { width: 46%; height: 46%; stroke-width: 1.5; }
.ring--sm { --ring-size: 42px; }

/* ---------- Tipografia utilitária ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--wave-700);
}
.eyebrow--light { color: var(--sun-300); }

/* ---------- Botões de ícone ---------- */
.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--sand-0); color: var(--ink-900);
}
.icon-btn:hover { border-color: var(--sun-500); }
.icon-btn--dark { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .28); color: #fff; }
.icon-btn--dark:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); }

/* ---------- Topo ---------- */
.topbar { background: var(--sand-0); }
.topbar__inner { display: flex; align-items: center; justify-content: center; padding-block: 14px 12px; }
.brand { height: 46px; width: auto; }

/* ---------- Banner ---------- */
.banner {
  position: relative; isolation: isolate;
  min-height: 300px;
  display: flex; align-items: flex-end;
  color: #fff; background: var(--wave-900);
  overflow: hidden;
}
.banner__media { position: absolute; inset: 0; z-index: -2; }
.banner__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0, 38, 58, .1) 0%, rgba(0, 38, 58, .55) 45%, rgba(0, 32, 50, .9) 100%);
}
.banner__content { padding-block: 72px 30px; display: flex; flex-direction: column; gap: 10px; }
.banner h1, .banner p, .banner .eyebrow { text-shadow: 0 1px 18px rgba(0, 25, 40, .35); }
.banner h1 { color: #fff; font-size: clamp(2.3rem, 1.5rem + 3.6vw, 3.9rem); line-height: 1.05; text-wrap: balance; }
.banner p { font-size: 1rem; line-height: 1.6; color: rgba(255, 255, 255, .9); max-width: 46ch; text-wrap: pretty; }

/* ---------- Abas (atalhos para cada acomodação) ---------- */
.tabs {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.tabs__inner { padding-inline: 0; }
.tabs__list {
  position: relative;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  padding-inline: 10px;
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
}
.tabs__list::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: none;
  height: var(--tabs-h); display: inline-flex; align-items: center;
  padding: 0 12px;
  font-size: .8rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-500);
  white-space: nowrap;
}
.tab::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--grad-sun); transform: scaleX(0); transition: transform .25s var(--ease);
}
.tab:hover { color: var(--ink-900); }
.tab.is-on { color: var(--ink-900); font-weight: 600; }
.tab.is-on::after { transform: scaleX(1); }

/* ---------- Acomodação ---------- */
.room { padding-block: 40px 44px; }
.room + .room { border-top: 1px solid var(--line); }
.room__grid {
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "media" "summary" "amenities";
  gap: 18px;
}
.room__head { grid-area: head; display: flex; flex-direction: column; gap: 4px; }
.room__head h2 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.2rem); line-height: 1.05; }
.room__media { grid-area: media; }
.room__summary { grid-area: summary; display: flex; flex-direction: column; gap: 18px; padding-top: 6px; }
.room__summary .lead { font-size: 1.02rem; color: var(--ink-700); text-wrap: pretty; }
.room__amenities { grid-area: amenities; padding-top: 14px; }

/* Galeria */
.gallery { position: relative; background: var(--wave-900); border-radius: var(--r); overflow: hidden; }
.gallery__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  aspect-ratio: 4 / 3; overscroll-behavior-x: contain;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; scroll-snap-align: center; position: relative; padding: 0; border: 0; background: var(--sand-200); cursor: zoom-in; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__count {
  position: absolute; right: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: 999px;
  background: rgba(0, 49, 74, .72); color: #fff; font-size: .8rem; font-weight: 500;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 0;
}
.gallery__count .ic { width: 16px; height: 16px; }
.gallery__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  background: rgba(255, 255, 255, .92); border: 0; box-shadow: var(--shadow-1);
}
.gallery__arrow--prev { left: 10px; }
.gallery__arrow--next { right: 10px; }
.thumbs { display: none; }

/* Área, hóspedes, vista e diferenciais */
.facts {
  display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 1px; background: var(--sand-100);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.fact { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 16px 6px 14px; background: var(--sand-0); }
.fact__value { font-weight: 600; color: var(--ink-900); font-size: .95rem; line-height: 1.25; }
.fact__label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-500); margin-top: -4px; }

.block h3 { font-size: 1.6rem; line-height: 1.1; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.block__note { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sun-ink); }

/* Camas */
.beds { display: grid; gap: 10px; }
.bed {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px; background: var(--sand-0); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.bed__icons { display: flex; align-items: flex-end; gap: 2px; width: 104px; flex: none; color: var(--wave-700); }
.bed__icons .ic { width: 28px; height: 28px; stroke-width: 1.5; }
.bed__icons .ic--single { width: 20px; height: 20px; }
.bed__label { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-500); }
.bed__text { display: block; font-weight: 500; color: var(--ink-900); line-height: 1.35; }

/* Comodidades (lista resumida) */
.full-groups {
  display: grid; gap: 18px;
  padding: 18px 18px 20px; background: var(--sand-0); border: 1px solid var(--line); border-radius: var(--r);
}
.full-group h4 { font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 8px; }
.full-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.full-group li { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; line-height: 1.4; color: var(--ink-900); }
.full-group li .ic { width: 16px; height: 16px; color: var(--sun-600); stroke-width: 2; }

/* ---------- Comparar ---------- */
.compare { padding-block: 48px 8px; border-top: 1px solid var(--line); }
.compare-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.compare-head h2 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.2rem); line-height: 1.05; }
.compare-head p { color: var(--ink-500); }
.cmp-wrap { background: var(--sand-0); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cmp-scroll { position: relative; overflow-x: auto; scrollbar-width: thin; overscroll-behavior-x: contain; }
.cmp { width: 100%; min-width: 600px; border-collapse: collapse; font-size: .84rem; }
.cmp td { position: relative; }
.cmp-hint { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-500); margin-top: 6px; }
.cmp-hint .ic { width: 18px; height: 18px; color: var(--sun-600); }
.cmp th, .cmp td { padding: 12px 8px; text-align: center; border-bottom: 1px solid var(--sand-100); }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp tbody tr:nth-child(even) { background: var(--sand-50); }
.cmp thead th { vertical-align: bottom; padding-top: 16px; }
.cmp__corner, .cmp tbody th {
  position: sticky; left: 0; z-index: 1;
  background: inherit; text-align: left; width: 100px;
  box-shadow: 1px 0 0 var(--sand-100);
}
.cmp tbody th { font-weight: 500; color: var(--ink-500); background: var(--sand-0); }
.cmp tbody tr:nth-child(even) th { background: var(--sand-50); }
.cmp__corner { background: var(--sand-0); }
.cmp__rowlabel { display: flex; align-items: center; gap: 8px; }
.cmp__rowlabel .ic { width: 18px; height: 18px; color: var(--sun-600); }
.cmp__room { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink-900); font-weight: 600; line-height: 1.2; }
.cmp__room small { display: block; font-weight: 500; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wave-700); }
.cmp__thumb { width: 60px; height: 72px; border-radius: 999px 999px 10px 10px; overflow: hidden; background: var(--sand-200); }
.cmp__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cmp td { color: var(--ink-900); font-weight: 500; line-height: 1.3; }
.cmp .yes { color: var(--wave-700); }
.cmp .yes .ic { width: 22px; height: 22px; stroke-width: 2.2; }
.cmp .no { color: #A9B4B9; }
.cmp-notes { padding-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--ink-500); }

/* ---------- Rodapé ---------- */
.footer { background: var(--wave-900); color: rgba(255, 255, 255, .8); padding: 44px 0 calc(36px + env(safe-area-inset-bottom)); margin-top: 56px; }
.footer__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.footer__logo { height: 58px; width: auto; }
.footer__place { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-size: .95rem; }
.footer__place .ic { width: 18px; height: 18px; color: var(--sun-300); }
.footer__small { font-size: .75rem; color: rgba(255, 255, 255, .55); max-width: 52ch; line-height: 1.5; }

/* ---------- Lightbox (foto em tela cheia) ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox { position: fixed; inset: 0; z-index: 110; background: #04141C; color: #fff; animation: fade .2s ease both; }
.lightbox[hidden] { display: none; }
/* A foto ocupa a tela toda; título e setas ficam por cima */
.lightbox__track {
  position: absolute; inset: 0; z-index: 1;
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain;
}
.lightbox__track::-webkit-scrollbar { display: none; }
.lightbox__slide {
  flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always;
  background: no-repeat center / contain; background-origin: content-box; background-clip: content-box;   /* versão leve enquanto a grande carrega */
}
.lightbox__slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lightbox__slide img:not([src]) { visibility: hidden; }
.lightbox__head, .lightbox__foot { position: absolute; left: 0; right: 0; z-index: 2; display: flex; align-items: center; pointer-events: none; }
.lightbox__head > *, .lightbox__foot > * { pointer-events: auto; }
.lightbox__head {
  top: 0; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 32px calc(16px + env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(4, 20, 28, .82) 0%, rgba(4, 20, 28, 0) 100%);
}
.lightbox__title { display: block; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.lightbox__count { display: block; font-size: .8rem; color: rgba(255, 255, 255, .75); }
.lightbox__foot {
  bottom: 0; justify-content: center; gap: 28px;
  padding: 32px 16px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(4, 20, 28, .82) 0%, rgba(4, 20, 28, 0) 100%);
}
.lightbox .icon-btn { width: 48px; height: 48px; background: rgba(4, 20, 28, .55); }
.lightbox .icon-btn[aria-disabled="true"] { opacity: .3; }

/* Celular deitado: setas nas laterais, foto na altura toda */
@media (orientation: landscape) and (max-height: 560px) {
  .lightbox__slide { padding: 0 76px; }
  .lightbox__foot {
    top: 0; padding: 0 calc(14px + env(safe-area-inset-right)) 0 calc(14px + env(safe-area-inset-left));
    justify-content: space-between; background: none;
  }
}

/* =========================================================
   Celulares estreitos (até 379 px)
   ========================================================= */
@media (max-width: 379px) {
  :root { --gutter: 16px; }
  .fact { padding: 14px 4px 12px; gap: 6px; }
  .fact .ring { --ring-size: 36px; }
  .fact__value { font-size: .86rem; }
  .fact__label { font-size: .62rem; letter-spacing: .1em; }
  .bed { gap: 12px; padding: 12px; }
  .bed__icons { width: 72px; }
  .bed__icons .ic { width: 22px; height: 22px; }
  .bed__icons .ic--single { width: 16px; height: 16px; }
  .bed__text { font-size: .94rem; }
  .full-groups { padding: 16px 14px 18px; }
}

/* =========================================================
   Tablet
   ========================================================= */
@media (min-width: 640px) {
  :root { --gutter: 28px; }
  .banner { min-height: 340px; }
  .gallery__track { aspect-ratio: 16 / 10; }
  .gallery__arrow { width: 44px; height: 44px; }
  .gallery__arrow--prev { left: 14px; }
  .gallery__arrow--next { right: 14px; }
  .full-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 22px 24px; }
  .full-group ul { display: grid; gap: 6px; }
}

/* Celular deitado: a foto da galeria cabe inteira na tela, abaixo das abas */
@media (orientation: landscape) and (max-height: 560px) and (max-width: 1023px) {
  .gallery__track { aspect-ratio: 16 / 10; }
  .room__media { width: 100%; max-width: calc((100vh - var(--tabs-h) - 32px) * 1.6); margin-inline: auto; }
}

/* =========================================================
   Computador
   ========================================================= */
@media (min-width: 1024px) {
  :root { --gutter: 40px; --tabs-h: 60px; }

  .topbar__inner { padding-block: 18px 14px; }
  .brand { height: 54px; }

  .banner { min-height: 380px; }
  .banner__media img { object-position: 50% 55%; }
  .banner::before {
    background:
      linear-gradient(90deg, rgba(0, 38, 58, .82) 0%, rgba(0, 38, 58, .45) 42%, rgba(0, 38, 58, 0) 70%),
      linear-gradient(180deg, rgba(0, 38, 58, 0) 55%, rgba(0, 38, 58, .55) 100%);
  }
  .banner__content { padding-block: 96px 52px; }
  .banner p { font-size: 1.1rem; }

  .tabs__inner { padding-inline: var(--gutter); }
  .tabs__list { justify-content: center; padding-inline: 0; mask-image: none; -webkit-mask-image: none; }
  .tab { font-size: .82rem; }

  /* Fotos à esquerda; nome, resumo e camas à direita; comodidades embaixo */
  .room { padding-block: 64px 68px; }
  .room__grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "media head" "media summary" "amenities amenities";
    gap: 14px 44px;
  }
  .room__media { align-self: start; }
  .room__summary { padding-top: 2px; }
  .room__amenities { padding-top: 26px; }
  .gallery { border-radius: var(--r-lg); }
  .thumbs { position: relative; display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
  .thumbs::-webkit-scrollbar { display: none; }
  .thumb { flex: 0 0 84px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--sand-200); opacity: .62; transition: opacity .2s, border-color .2s; }
  .thumb img { width: 100%; height: 100%; object-fit: cover; }
  .thumb:hover { opacity: 1; }
  .thumb.is-on { opacity: 1; border-color: var(--sun-500); }

  .compare { padding-top: 72px; }
  .compare-head { margin-bottom: 28px; }
  .cmp { font-size: .95rem; }
  .cmp-hint { display: none; }
  .cmp th, .cmp td { padding: 16px 12px; }
  .cmp__thumb { width: 72px; height: 88px; }

  .footer__inner { flex-direction: row; justify-content: space-between; text-align: left; flex-wrap: wrap; }
  .footer__small { flex-basis: 100%; max-width: none; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); }

  /* Tela cheia no computador: margem para título e setas laterais */
  .lightbox__slide { padding: 80px 104px; }
  .lightbox__foot { top: 0; padding: 0 32px; justify-content: space-between; background: none; }
  .lightbox .icon-btn { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
