/*
Theme Name: Casa Xoubinha Editable Visual
Theme URI: https://casaxoubinha.com/
Author: Fuco Webforge
Description: Tema WordPress editable que carga o visual orixinal de Casa Xoubinha e aplica os campos do Customizer sen duplicar a páxina.
Version: 3.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: casa-xoubinha-visual
*/

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700&display=swap");

body.cx-react-visual {
  margin: 0;
}

body.admin-bar.cx-react-visual header.fixed {
  top: 32px;
}

.cx-noscript {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: end;
  overflow: hidden;
  padding: 4rem;
  color: #fff;
  background: #211d1a;
}

.cx-noscript img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.cx-noscript div {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  text-align: right;
}

.cx-noscript h1 {
  margin: 0 0 1rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 0.95;
}

.cx-noscript a {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

/* The rules below are the previous native fallback styles. They remain scoped
   to cx-native so the exact React visual is not overridden. */

body:not(.cx-native) .cx-header,
body:not(.cx-native) .cx-hero,
body:not(.cx-native) .cx-section,
body:not(.cx-native) .cx-cta,
body:not(.cx-native) .cx-footer {
  all: revert-layer;
}

:root {
  --cx-ink: #211d1a;
  --cx-muted: #6f6760;
  --cx-bg: #fbf8f3;
  --cx-paper: #fffaf2;
  --cx-panel: rgba(255, 255, 255, 0.78);
  --cx-line: rgba(44, 38, 32, 0.12);
  --cx-warm: #9b6a3a;
  --cx-warm-dark: #6d4324;
  --cx-shadow: 0 18px 70px rgba(38, 30, 22, 0.11);
  --cx-serif: "Playfair Display", Georgia, serif;
  --cx-sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.casa-xoubinha-visual {
  margin: 0;
  background: var(--cx-bg);
  color: var(--cx-ink);
  font-family: var(--cx-sans);
  line-height: 1.55;
}

body.admin-bar .cx-header {
  top: 32px;
}

a {
  color: inherit;
}

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

button,
input {
  font: inherit;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cx-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 50;
  display: grid;
  width: min(1120px, calc(100% - 32px));
  grid-template-columns: auto minmax(300px, 560px) auto;
  align-items: center;
  gap: 20px;
  transform: translateX(-50%);
  color: #fff;
}

.cx-brand {
  font-family: var(--cx-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.32);
}

.cx-booking-pill {
  display: grid;
  grid-template-columns: 1fr 0.8fr auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.13);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.cx-booking-pill button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-right: 1px solid rgba(33, 29, 26, 0.1);
  background: transparent;
  color: var(--cx-ink);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.cx-booking-pill .cx-search {
  border-right: 0;
  background: var(--cx-ink);
  color: #fff;
}

.cx-topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 17px;
}

.cx-topnav a {
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}

.cx-user,
.cx-menu-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.cx-user::before {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 999px;
  content: "";
}

.cx-menu-button {
  border: 1px solid rgba(255, 255, 255, 0.46);
  color: inherit;
  cursor: pointer;
}

.cx-menu-button span,
.cx-menu-button span::before,
.cx-menu-button span::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.cx-menu-button span::before {
  transform: translateY(-6px);
}

.cx-menu-button span::after {
  transform: translateY(4px);
}

.cx-hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: #2f2822;
}

.cx-hero__image,
.cx-hero__shade {
  position: absolute;
  inset: 0;
}

.cx-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cx-hero__shade {
  background:
    radial-gradient(circle at 78% 77%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0.18) 70%),
    linear-gradient(90deg, rgba(18, 14, 11, 0.7), transparent 38%),
    linear-gradient(0deg, rgba(18, 14, 11, 0.7), transparent 52%);
}

.cx-side-nav {
  position: absolute;
  left: max(22px, 4vw);
  bottom: 58px;
  z-index: 2;
  display: flex;
  width: 190px;
  flex-direction: column;
  gap: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.cx-side-nav img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: brightness(0) invert(1);
}

.cx-side-nav a {
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.cx-side-nav .cx-map-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
}

.cx-hero__badge {
  position: absolute;
  right: max(24px, 7vw);
  bottom: 72px;
  z-index: 2;
  max-width: 440px;
  color: #fff;
  text-align: right;
}

.cx-hero__badge h1 {
  margin: 0;
  font-family: var(--cx-serif);
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  font-weight: 500;
  line-height: 0.94;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.36);
}

.cx-hero__badge em {
  font-style: italic;
}

.cx-rating {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.cx-rating strong {
  font-family: var(--cx-serif);
  font-size: 2rem;
}

.cx-rating small,
.cx-hero__badge p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
}

.cx-section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0;
}

.cx-section h2,
.cx-cta h2 {
  margin: 0 0 34px;
  font-family: var(--cx-serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1.05;
}

.cx-intro {
  max-width: 780px;
  text-align: center;
}

.cx-kicker {
  margin: 0 0 14px;
  color: var(--cx-warm);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cx-intro p:last-child,
.cx-split p {
  margin: 0;
  color: var(--cx-muted);
  font-size: 1.1rem;
}

.cx-card-grid,
.cx-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cx-card,
.cx-review,
.cx-destinations article,
.cx-faq details {
  min-height: 164px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: var(--cx-panel);
  box-shadow: 0 12px 38px rgba(34, 28, 22, 0.08);
}

.cx-card span {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--cx-warm);
  box-shadow: 0 8px 24px rgba(34, 28, 22, 0.08);
}

.cx-card h3,
.cx-room h3,
.cx-destinations h3,
.cx-review h3 {
  margin: 0 0 8px;
  font-family: var(--cx-serif);
  font-size: 1.25rem;
  font-weight: 500;
}

.cx-card p,
.cx-room p,
.cx-destinations p,
.cx-review p {
  margin: 0;
  color: var(--cx-muted);
  font-size: 0.94rem;
}

.cx-gallery-section {
  width: min(1280px, calc(100% - 32px));
}

.cx-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.cx-room {
  position: relative;
  overflow: hidden;
  min-height: 290px;
  border-radius: 14px;
  background: #ddd;
  color: #fff;
  scroll-snap-align: start;
}

.cx-room img {
  width: 100%;
  height: 100%;
  min-height: 290px;
  object-fit: cover;
  transition: transform 360ms ease;
}

.cx-room:hover img {
  transform: scale(1.04);
}

.cx-room div {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 54px 18px 16px;
  background: linear-gradient(0deg, rgba(21, 17, 13, 0.78), transparent);
}

.cx-room p {
  color: rgba(255, 255, 255, 0.82);
}

.cx-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: start;
}

.cx-destinations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.cx-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 26px;
  padding: 0 26px;
  border: 1px solid var(--cx-ink);
  border-radius: 999px;
  background: var(--cx-ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.cx-button:hover {
  transform: translateY(-1px);
  background: var(--cx-warm-dark);
}

.cx-review strong {
  display: block;
  margin-bottom: 12px;
  color: var(--cx-warm);
  letter-spacing: 0.05em;
}

.cx-faq {
  max-width: 900px;
}

.cx-faq details {
  min-height: 0;
  margin-bottom: 14px;
  padding: 0;
}

.cx-faq summary {
  padding: 20px 24px;
  font-weight: 800;
  cursor: pointer;
}

.cx-faq details p {
  margin: 0;
  padding: 0 24px 22px;
  color: var(--cx-muted);
}

.cx-cta {
  position: relative;
  overflow: hidden;
  padding: 128px 24px;
  color: #fff;
  text-align: center;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.58)),
    var(--cx-cta-image);
  background-position: center;
  background-size: cover;
}

.cx-cta > div {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.cx-cta p {
  margin: -16px auto 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.cx-button--light {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.94);
  color: #111;
}

.cx-whatsapp {
  display: inline-flex;
  margin-left: 12px;
  color: #fff;
  font-weight: 800;
}

.cx-footer {
  display: grid;
  width: min(1120px, calc(100% - 32px));
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  margin: 0 auto;
  padding: 44px 0;
  border-top: 1px solid var(--cx-line);
  color: var(--cx-muted);
  font-size: 0.92rem;
}

.cx-footer strong {
  color: var(--cx-ink);
  font-family: var(--cx-serif);
  font-size: 1.35rem;
  font-weight: 600;
}

@media (max-width: 980px) {
  .cx-header {
    grid-template-columns: 1fr auto;
  }

  .cx-booking-pill {
    display: none;
  }

  .cx-side-nav {
    display: none;
  }

  .cx-card-grid,
  .cx-review-grid,
  .cx-split,
  .cx-footer {
    grid-template-columns: 1fr;
  }

  .cx-destinations {
    grid-template-columns: 1fr;
  }

  .cx-footer {
    gap: 10px;
  }
}

@media (max-width: 680px) {
  body.admin-bar .cx-header {
    top: 46px;
  }

  .cx-header {
    top: 14px;
    width: min(100% - 24px, 1120px);
  }

  .cx-topnav a:not(.cx-user) {
    display: none;
  }

  .cx-hero__badge {
    right: 20px;
    bottom: 48px;
    left: 20px;
    max-width: none;
  }

  .cx-rating {
    flex-wrap: wrap;
  }

  .cx-section {
    padding: 68px 0;
  }

  .cx-card-grid,
  .cx-review-grid {
    grid-template-columns: 1fr;
  }

  .cx-gallery {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 82vw);
  }

  .cx-cta {
    padding: 92px 18px;
  }

  .cx-whatsapp {
    display: flex;
    width: fit-content;
    margin: 14px auto 0;
  }
}
