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

/* ---------- Design Tokens ---------- */
:root {
  --color-brand-primary: #76503d;
  --color-brand-dark: #102542;
  --color-brand-secondary: #e8dccd;
  --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);
  --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;
  --section-y: clamp(3.5rem, 7vw, 6rem);
}

/* ---------- Global Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-surface-base);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
}
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: -.03em;
  line-height: .95;
  margin: 0;
  font-weight: 600;
}
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: .45rem .9rem;
  border: 1px solid #3f2419;
  border-radius: 18px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  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: clamp(2rem, 3.4vw, 3.6rem);
  margin-bottom: 1rem;
}
.section-copy {
  max-width: 42rem;
  color: var(--color-text-secondary);
  font-size: 1rem;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header:not(.site-header--home) {
  background: rgba(247,243,238,.95);
  backdrop-filter: blur(10px);
  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(8%) sepia(10%) saturate(500%) hue-rotate(340deg) brightness(95%) contrast(90%); }
.desktop-nav {
  display: flex;
  gap: 1.8rem;
  color: var(--color-text-primary);
  font-size: .94rem;
}
.desktop-nav a:hover { color: var(--color-brand-dark); }
.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-dark);
}

/* ---------- Buttons ---------- */
.btn-brand,
.btn-outline-brand,
.btn-dark-brand {
  min-height: 48px;
  padding: .95rem 1.4rem;
  font-weight: 700;
  transition: .25s ease;
  border-radius: 0;
}
.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-brand-dark);
  color: #fff;
  border: 1px solid var(--color-brand-dark);
}
.btn-dark-brand:hover { background: #1a3a5c; color: #fff; border-color: #1a3a5c; }

/* ---------- Menu Toggle (Hamburger) ---------- */
.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-border-default);
  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: 0;
  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: 1rem;
  left: 1rem;
  padding: .45rem .8rem;
  background: rgba(118,80,61,.92);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  z-index: 2;
}
.badge-reservado { background: rgba(58,88,97,.94); }
.property-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: .35rem;
}
.property-price { font-size: 1.4rem; font-weight: 600; }

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

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 3rem;
  background: #eadfce;
  color: var(--color-text-primary);
  overflow-x: clip;
}
.footer-top { padding: 3rem 0 2rem; }
.footer-bottom {
  background: #6a5144;
  color: rgba(255,255,255,.86);
  text-align: center;
  padding: .9rem 0;
  font-size: .85rem;
}
.footer-title { font-weight: 600; margin-bottom: .8rem; }
.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%;
}
.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: 50%;
  box-shadow: 0 14px 28px rgba(31,168,85,.35);
}

/* ---------- 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: 50%;
  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 ---------- */
.cta-box,
.cta-image img,
.site-footer,
.property-card,
.property-media img,
.mobile-menu,
.sort-select {
  border-radius: 0 !important;
}

/* ---------- 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: 767.98px) {
  .site-logo { height: 36px; }
}

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