/* ==========================================================================
   Thawany Motta Imóveis — Base Styles (shared across all pages)
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --color-brand-primary: #76503d;
  --color-brand-soft: #8f766a;
  --color-brand-dark: #3f2419;
  --color-brand-secondary: #e8dccd;
  --color-btn-bg: var(--color-brand-dark);
  --color-btn-text: #f0ebe5;
  --color-btn-bg-hover: #2b180f;
  --color-nav-hover: #1a1008;
  --color-surface-base: #f4efe8;
  --color-surface-card: #fffdfa;
  --color-surface-soft: #efe7dc;
  --color-text-primary: #2f241f;
  --color-text-secondary: #75665d;
  --color-border-default: rgba(47, 36, 31, 0.12);
  --shadow-sm: 0 10px 28px rgba(47, 36, 31, 0.06);
  --shadow-md: 0 20px 50px rgba(47, 36, 31, 0.12);
  --control-height: 48px;
  --control-pad-y: 0.8rem;
  --control-pad-x: 1.05rem;
  --control-bg: var(--color-surface-card);
  --control-border: rgba(47, 36, 31, 0.16);
  --control-border-hover: rgba(47, 36, 31, 0.32);
  --control-ring: rgba(118, 80, 61, 0.16);
  --control-caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%232f241f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --font-emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --font-heading: 'Wix Madefor Display', var(--font-emoji), sans-serif;
  --font-body: 'Inter', var(--font-emoji), sans-serif;
  --font-signature: 'Allura', cursive;

  /* ---------- Type Scale — 4px steps on the 8pt grid ----------
     Every step is a multiple of 4 (8-point grid). Small text collapses to
     12px, body is 16px, then it climbs 20 → 24 → 32 → 40 for headings. */
  --fs-2xs: 0.75rem;  /* 12 */
  --fs-xs: 0.75rem;   /* 12 */
  --fs-sm: 1rem;      /* 16 */
  --fs-md: 1rem;      /* 16 */
  --fs-base: 1rem;    /* 16 */
  --fs-lg: 1.25rem;   /* 20 */
  --fs-xl: 1.25rem;   /* 20 */
  --fs-2xl: 1.5rem;   /* 24 */
  --fs-3xl: 2rem;     /* 32 */
  --fs-4xl: 2.5rem;   /* 40 */
  --fs-5xl: 3rem;     /* 48 */
  --fs-6xl: 4rem;     /* 64 */

  /* Fluid display steps (clamped between the 8pt-grid anchor sizes) */
  --fs-display: clamp(2rem, 3.4vw, 2.5rem);     /* 32 → 40 */
  --fs-display-lg: clamp(2.5rem, 5vw, 3.5rem);  /* 40 → 56 */
  --fs-title: clamp(2rem, 2.8vw, 2.5rem);       /* 32 → 40 */
  --fs-title-sm: clamp(1.5rem, 2.2vw, 2rem);    /* 24 → 32 */

  /* Line heights (conventional / accessible) */
  --lh-tight: 1.05;   /* display */
  --lh-heading: 1.15; /* headings */
  --lh-snug: 1.3;     /* subheadings */
  --lh-normal: 1.5;   /* UI / inputs */
  --lh-relaxed: 1.6;  /* body */
  --lh-loose: 1.7;    /* long-form body */

  /* Font weights — 400 body, 500 UI/labels/section titles, 600 for emphasis.
     700 is intentionally not used; --fw-bold aliases to 600. */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 600;

  /* Tracking */
  --tracking-tight: -0.03em;
  --tracking-normal: 0;
  --tracking-wide: 0.08em;

  /* ---------- Spacing Scale — base 8px ---------- */
  --space-1: 0.5rem;  /* 8 */
  --space-2: 1rem;    /* 16 */
  --space-3: 1.5rem;  /* 24 */
  --space-4: 2rem;    /* 32 */
  --space-5: 2.5rem;  /* 40 */
  --space-6: 3rem;    /* 48 */
  --space-7: 3.5rem;  /* 56 */
  --space-8: 4rem;    /* 64 */
  --space-10: 5rem;   /* 80 */
  --space-12: 6rem;   /* 96 */
  --section-y: clamp(3.5rem, 7vw, 6rem);
}

/* ---------- Global Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Lenis recommended CSS (smooth scroll) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }
body {
  margin: 0;
  background: var(--color-surface-base);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-heading);
  margin: 0;
  font-weight: var(--fw-medium);
}

/* ---------- Heading Hierarchy (8pt-grid scale) ---------- */
h1 { font-size: var(--fs-display);      font-weight: var(--fw-semibold); }
h2 { font-size: var(--fs-title-sm); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-base); }
h6 { font-size: var(--fs-2xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; }
p, input, select, textarea, button, a { font-family: var(--font-body); }

/* ---------- Layout Utilities ---------- */
.container-xxl { max-width: 1280px; }
.section-padding { padding: var(--section-y) 0; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: max-content;
  padding: var(--space-1) var(--space-2);
  border: 1px solid #3f2419;
  border-radius: 18px;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: #3f2419;
  background: transparent;
}

/* Eyebrow em fundos escuros (hero / page-hero) */
.hero .eyebrow,
.page-hero .eyebrow {
  border-color: rgba(240, 235, 229, 0.85);
  color: #f0ebe5;
}

/* ---------- Section Titles ---------- */
.section-title {
  font-size: var(--fs-display);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-2);
}
.section-copy {
  max-width: 42rem;
  color: var(--color-text-secondary);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
}
body.admin-bar .site-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}
/* Offset for sticky sub-elements (sidebar cards) so they clear the header */
:root {
  --tm-header-height: 84px;
  --tm-sticky-gap: 24px;
  --tm-sticky-top: calc(var(--tm-header-height) + var(--tm-sticky-gap));
}
body.admin-bar {
  --tm-sticky-top: calc(32px + var(--tm-header-height) + var(--tm-sticky-gap));
}
@media screen and (max-width: 991.98px) {
  :root {
    --tm-header-height: 100px;
  }
}
@media screen and (max-width: 782px) {
  body.admin-bar {
    --tm-sticky-top: calc(46px + var(--tm-header-height) + var(--tm-sticky-gap));
  }
}
.site-header:not(.site-header--home) {
  background: rgba(247,243,238,.60);
  backdrop-filter: blur(40px);
  border-bottom: 1px solid rgba(47,36,31,.08);
}
.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 84px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  color: var(--color-text-primary);
}
.site-logo {
  height: 44px;
  width: auto;
  display: block;
}
.logo-white { filter: brightness(0) invert(1); }
.logo-brand { filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(420%) hue-rotate(335deg) brightness(89%) contrast(91%); }
.logo-dark  {filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(420%) hue-rotate(335deg) brightness(89%) contrast(91%);}
.desktop-nav {
  display: flex;
  gap: 1.8rem;
  color: var(--color-text-primary);
  font-size: var(--fs-base);
}
.desktop-nav a:hover { color: var(--color-nav-hover); }
.desktop-nav a.active {
  position: relative;
}
.desktop-nav a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--color-brand-primary);
}

/* ---------- Buttons ---------- */
.btn-brand,
.btn-outline-brand,
.btn-dark-brand,
.btn-hero-outline {
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  transition: .25s ease;
  border-radius: 14px;
}
.btn-brand svg,
.btn-outline-brand svg,
.btn-dark-brand svg,
.btn-hero-outline svg { width: 18px; height: 18px; }
.btn-brand {
  background: #fff;
  color: var(--color-text-primary);
  border: 1px solid #fff;
}
.btn-brand:hover { background: #F0EBE5; color: var(--color-text-primary); }
.btn-outline-brand {
  background: transparent;
  color: var(--color-brand-primary);
  border: 1px solid var(--color-brand-primary);
}
.btn-outline-brand:hover {
  background: var(--color-brand-primary);
  color: #fff;
  border-color: var(--color-brand-primary);
}
.btn-dark-brand {
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  border: 1px solid var(--color-btn-bg);
}
.btn-dark-brand:hover { background: var(--color-btn-bg-hover); color: var(--color-btn-text); border-color: var(--color-btn-bg-hover); }

/* Visible keyboard focus for every interactive element. */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
.tm-cs-trigger:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid var(--color-btn-bg);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Form Controls ---------- */
/* Browser-normalized baseline for text inputs, selects and textareas. */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="image"]),
select,
textarea {
  min-height: var(--control-height);
  padding: var(--control-pad-y) var(--control-pad-x);
  border: 1px solid var(--control-border);
  border-radius: 0;
  background-color: var(--control-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="image"]):hover,
select:hover,
textarea:hover {
  border-color: var(--control-border-hover);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="image"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px var(--control-ring);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="image"]):disabled,
select:disabled,
textarea:disabled {
  background-color: var(--color-surface-soft);
  color: var(--color-text-secondary);
  cursor: not-allowed;
  opacity: 0.75;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="image"])::placeholder,
textarea::placeholder {
  color: var(--color-text-secondary);
  opacity: 1;
}

/* Native select normalization: remove OS chrome, add themed caret. */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.6rem;
  background-image: var(--control-caret);
  background-repeat: no-repeat;
  background-position: right var(--control-pad-x) center;
  background-size: 12px 8px;
  cursor: pointer;
  margin-top: 8px;
}
select::-ms-expand { display: none; }
select[multiple] {
  padding-right: var(--control-pad-x);
  background-image: none;
  cursor: default;
}

/* ---- Dropdown options (cross-browser) ----
   Firefox ignores rgba() and border-radius/box-shadow on native <option>, so we
   use solid colors here to keep Chrome, Edge and Firefox as close as possible.
   Chromium 135+ / Edge 135+ additionally support appearance: base-select, which
   lets us fully theme the picker below. */
select option,
select optgroup {
  background-color: var(--color-surface-card);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
}
select option:checked,
select option:checked:hover {
  background-color: var(--color-brand-soft);
  color: #fff;
}
select optgroup {
  color: var(--color-text-secondary);
  font-weight: var(--fw-semibold);
}


textarea {
  min-height: 120px;
  resize: vertical;
}

/* ---------- Menu Toggle (Hamburger) ---------- */
.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-primary);
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}
.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: currentColor;
  transition: .25s ease;
  position: absolute;
}
.menu-toggle span { position: absolute; }
.menu-toggle::before { transform: translateY(-6px); }
.menu-toggle::after { transform: translateY(6px); }
.menu-toggle[aria-expanded="true"] span { opacity: 0; }
.menu-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"]::after { transform: rotate(-45deg); }

/* ---------- Mobile Menu ---------- */
.mobile-menu {
  display: none;
  position: absolute;
  top: calc(100% + .75rem);
  right: 1rem;
  left: 1rem;
  background: rgba(247,243,238,.98);
  border: 1px solid rgba(47,36,31,.08);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}
.mobile-menu a {
  display: block;
  padding: .9rem 0;
  border-bottom: 1px solid rgba(47,36,31,.08);
}
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu.is-open { display: block; }

/* ---------- Property Card (base) ---------- */
.property-card {
  background: var(--color-surface-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: 100%;
  border-radius: 12px;
  transition: transform .28s ease, box-shadow .28s ease;
}
.property-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.property-media {
  position: relative;
  overflow: hidden;
}
.property-media img { width: 100%; height: 100%; object-fit: cover; }
.property-badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  padding: var(--space-1) var(--space-2);
  background: rgb(90 56 39 / 78%);
  color: #fff;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: .06em;
  text-transform: uppercase;
  z-index: 2;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}
.badge-reservado { background: rgba(58,88,97,.94); }
.property-title {
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  margin-bottom: var(--space-1);
}
.property-price { font-size: var(--fs-xl); font-weight: var(--fw-semibold); }

/* ---------- CTA Box ---------- */
.cta-box {
  background: var(--color-surface-card);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: 14px;
}
.cta-image { overflow: hidden; }
.cta-image img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; border-radius: 12px; }

/* ---------- Footer ---------- */
.site-footer {
  /*margin-top: 3rem;*/
  background: #eadfce;
  color: var(--color-text-primary);
  overflow-x: clip;
}
.footer-top { padding: var(--space-6) 0 var(--space-4); }
.site-footer .site-logo { height: 80px; }
.footer-bottom {
  background: #eadfce;
  color: rgba(47,36,31,.72);
  text-align: center;
  padding: var(--space-1) 0;
  font-size: 0.875rem;
}
.footer-title { font-weight: var(--fw-semibold); font-size: 1rem; margin-bottom: var(--space-1); }
.footer-text { max-width: 28ch; }
.footer-list { list-style: none; margin: 0; padding: 0; min-width: 0; }
.footer-list li {
  min-width: 0;
  max-width: 100%;
}
.footer-list li + li { margin-top: .5rem; }
.footer-list a,
.footer-list li {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.footer-list a {
  display: inline-flex;
  align-items: flex-start;
  gap: .5rem;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}
.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--color-brand-primary);
}
.footer-list svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: .15rem;
}
.site-footer .row > [class*="col-"] {
  min-width: 0;
}

/* ---------- WhatsApp FAB ---------- */
  .sticky-whatsapp {
  position: fixed;
  right: 1rem;
  bottom: 5.5rem;
  z-index: 50;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: #1fa855;
  color: #fff;
  border-radius: 14px;

}

/* ---------- Back to Top ---------- */
  .back-to-top {
  position: fixed;
  right: 1.3rem;
  bottom: 1rem;
  z-index: 50;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--color-brand-primary);
  color: #fff;
  border: none;
  border-radius: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(118,80,61,.25);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: #7d5b4a;
}

/* ---------- Mobile Sticky CTA ---------- */
.mobile-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom));
  background: rgba(247,243,238,.96);
  border-top: 1px solid rgba(47,36,31,.08);
  backdrop-filter: blur(10px);
}

/* ---------- Border-Radius Override ---------- */
.site-footer,
.property-media img,
.mobile-menu {
  border-radius: 0 !important;
}
.wp-block-button__link,
.button,
button[type="submit"],
input[type="submit"] {
  border-radius: 14px;
}

/* ---------- Shared Responsive ---------- */
@media (max-width: 991.98px) {
  .desktop-nav,
  .header-cta { display: none !important; }
  .menu-toggle { display: inline-flex; }
  .mobile-cta { display: block; }
  .sticky-whatsapp { display: none; }
  .back-to-top { bottom: 5.4rem; }
  body { padding-bottom: 92px; }
}
@media (max-width: 991.98px) {
  .mobile-cta .btn {
    border-radius: 14px;
  }
}

@media (max-width: 767.98px) {
  .site-logo { height: 36px; }
}

@media (max-width: 575.98px) {
  .back-to-top { bottom: 5.4rem; }
}
