/* ==========================================================
   Componentes reutilizáveis
   ========================================================== */

/* ---------- Marca ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-pill);
}

/* Logotipo: "D" com o pé, em dourado como no bordado do uniforme */
.brand__mark {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  color: var(--color-gold);
  transition: transform var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.brand:hover .brand__mark {
  color: var(--color-gold-deep);
  transform: rotate(-6deg);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--color-ink);
}

.brand__role {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  margin-top: 3px;
}

.brand__name {
  color: var(--color-brand-700);
}

.brand--light .brand__mark,
.brand--light .brand__role {
  color: var(--color-gold-light);
}

.brand--light .brand__name {
  color: #fff;
}

/* ---------- Botões ---------- */

.btn {
  --btn-bg: var(--color-brand-700);
  --btn-fg: #fff;
  --btn-border: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn--primary {
  box-shadow: 0 10px 24px -12px rgba(58, 13, 25, 0.6);
}

.btn--primary:hover {
  --btn-bg: var(--color-brand-900);
  box-shadow: 0 16px 30px -14px rgba(58, 13, 25, 0.7);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--color-ink);
  --btn-border: var(--color-line-strong);
}

.btn--ghost:hover {
  --btn-bg: var(--color-surface);
  --btn-border: var(--color-brand-300);
}

.btn--ghost:hover .btn__icon {
  transform: translateY(2px);
}

.btn--light {
  --btn-bg: #fff;
  --btn-fg: var(--color-brand-900);
}

.btn--light:hover {
  --btn-bg: var(--color-cream);
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.45);
}

.btn--gold {
  --btn-bg: var(--color-gold-light);
  --btn-fg: var(--color-brand-900);
}

.btn--gold:hover {
  --btn-bg: #fff;
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.5);
}

.btn--gold:hover .btn__arrow {
  transform: translateX(4px);
}

.btn--sm {
  min-height: 42px;
  padding: 10px 18px;
  font-size: 0.82rem;
}

.btn--lg {
  min-height: 56px;
  padding: 16px 30px;
  font-size: 0.95rem;
}

.btn--block {
  width: 100%;
}

/* ---------- Badge / eyebrow ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-brand-700);
}

.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-brand-500);
  box-shadow: 0 0 0 4px var(--color-brand-100);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-brand-500);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.eyebrow--light {
  color: var(--color-brand-300);
}

/* ---------- Título de seção ---------- */

.section-title {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.section-title__heading {
  font-size: var(--fs-h2);
}

.section-title--light .section-title__heading {
  color: #fff;
}

.section-title--light .section-title__heading em {
  color: var(--color-gold-light);
}

.section-title--light .eyebrow {
  color: var(--color-brand-300);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--color-brand-700);
  transition: box-shadow var(--dur) var(--ease-out);
}

/* Linha dourada sutil na base do header */
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgba(242, 207, 207, 0.35);
}

.site-header.is-scrolled {
  box-shadow: 0 14px 30px -18px rgba(58, 13, 25, 0.55);
}

/* Elementos do header sobre o fundo azul */
.site-header .brand__name {
  color: #fff;
}

.site-header .brand__mark,
.site-header .brand__role {
  color: var(--color-gold-light);
}

.site-header .brand:hover .brand__mark {
  color: var(--color-gold);
}

.site-header :focus-visible {
  outline-color: #fff;
}

.site-header .mobile-menu :focus-visible {
  outline-color: var(--color-focus);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: 100%;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-nav {
  display: none;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav__list a {
  position: relative;
  display: inline-block;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  transition: color var(--dur-fast) ease;
}

/* Telas médias: menu mais compacto para caber todos os itens */
@media (max-width: 1279px) {
  .site-nav__list {
    gap: 0;
  }

  .site-nav__list a {
    padding-inline: 10px;
  }
}

.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 1px;
  background: var(--color-gold-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}

.site-nav__list a:hover,
.site-nav__list a.is-active {
  color: #fff;
}

.site-nav__list a:hover::after,
.site-nav__list a.is-active::after {
  transform: scaleX(1);
}

.site-header__cta {
  display: none;
  --btn-bg: var(--color-gold-light);
  --btn-fg: var(--color-brand-900);
  box-shadow: none;
}

.site-header__cta:hover {
  --btn-bg: #fff;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.45);
}

/* Botão hambúrguer */

.menu-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background var(--dur) var(--ease-out);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.menu-toggle__line {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.5px;
  margin-left: -9px;
  border-radius: 2px;
  background: #fff;
  transition: transform var(--dur) var(--ease-out);
}

.menu-toggle__line:first-child {
  transform: translateY(-4px);
}

.menu-toggle__line:last-child {
  transform: translateY(4px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:first-child {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:last-child {
  transform: rotate(-45deg);
}

/* Menu mobile */

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-6) var(--gutter) calc(var(--space-6) + env(safe-area-inset-bottom));
  background: var(--color-bg);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition:
    opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out),
    visibility 0s linear var(--dur);
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out),
    visibility 0s;
}

.mobile-menu__nav li {
  border-bottom: 1px solid var(--color-line);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 400ms var(--ease-out),
    transform 400ms var(--ease-out);
  transition-delay: calc(var(--i) * 50ms + 80ms);
}

.mobile-menu.is-open .mobile-menu__nav li {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu__nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 500;
  color: var(--color-ink);
  line-height: 1.1;
}

.mobile-menu__nav a::after {
  content: "→";
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-brand-500);
}

.mobile-menu__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.mobile-menu__social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  font-size: var(--fs-sm);
  color: var(--color-muted);
}

.mobile-menu__social .icon {
  width: 18px;
  height: 18px;
}

/* ---------- Botão flutuante WhatsApp ---------- */

.whatsapp-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 22px 0 18px;
  border-radius: var(--radius-pill);
  background: var(--color-whatsapp);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 14px 30px -10px rgba(37, 211, 102, 0.55), 0 4px 10px rgba(0, 0, 0, 0.08);
  transition:
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 20px 40px -12px rgba(37, 211, 102, 0.6), 0 4px 10px rgba(0, 0, 0, 0.1);
}

.whatsapp-float__icon {
  position: relative;
  width: 26px;
  height: 26px;
  stroke-width: 1.9;
}

.whatsapp-float__label {
  position: relative;
}

.whatsapp-float__pulse {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--color-whatsapp);
  animation: wa-pulse 2.6s var(--ease-out) infinite;
  z-index: -1;
}

body.menu-open .whatsapp-float {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Responsivo dos componentes ---------- */

@media (min-width: 640px) {
  .site-header__cta {
    display: inline-flex;
  }
}

@media (min-width: 1024px) {
  :root {
    --header-h: 84px;
  }

  .site-nav {
    display: block;
  }

  .menu-toggle,
  .mobile-menu {
    display: none;
  }

  .whatsapp-float {
    right: 28px;
    bottom: 28px;
    width: 62px;
    height: 62px;
    padding: 0;
    justify-content: center;
  }

  .whatsapp-float__label {
    position: absolute;
    right: calc(100% + 12px);
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    background: var(--color-ink);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(6px);
    pointer-events: none;
    transition:
      opacity var(--dur) var(--ease-out),
      transform var(--dur) var(--ease-out);
  }

  .whatsapp-float:hover .whatsapp-float__label,
  .whatsapp-float:focus-visible .whatsapp-float__label {
    opacity: 1;
    transform: translateX(0);
  }

  .whatsapp-float__icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 359px) {
  .brand__name {
    font-size: 1.25rem;
  }

  .brand__mark {
    width: 40px;
    height: 40px;
  }
}

/* ---------- Logomarca (imagem) ---------- */

.brand__logo {
  display: block;
  width: auto;
  height: 54px;
  transition: opacity var(--dur-fast) ease;
}

.brand:hover .brand__logo {
  opacity: 0.85;
}

.site-footer .brand__logo {
  height: clamp(56px, 4vw + 30px, 72px);
}

@media (max-width: 479px) {
  .site-header .brand__logo {
    height: 44px;
  }
}

/* ---------- Menu "Especialidades": especialidades + tratamentos ---------- */

.nav-drop {
  position: relative;
}

.nav-drop__trigger {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
}

.nav-drop__chev {
  width: 15px !important;
  height: 15px !important;
  transition: transform var(--dur) var(--ease-out);
}

.nav-drop.is-open .nav-drop__chev {
  transform: rotate(180deg);
}

/* Ponte invisível para o mouse não "cair" entre o link e o painel */
.nav-drop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 18px;
}

.nav-drop__panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  z-index: 110;
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: var(--space-6);
  width: min(640px, 90vw);
  padding: var(--space-6);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition:
    opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out),
    visibility 0s linear var(--dur);
}

.nav-drop.is-open .nav-drop__panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition:
    opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out),
    visibility 0s;
}

.nav-drop__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.nav-drop__col + .nav-drop__col {
  padding-left: var(--space-6);
  border-left: 1px solid var(--color-line);
}

.nav-drop__col ul {
  display: grid;
  gap: 2px;
}

.nav-drop__grid {
  grid-template-columns: 1fr 1fr;
  column-gap: var(--space-3);
}

.site-nav__list .nav-drop__panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}

.site-nav__list .nav-drop__panel a::after {
  display: none;
}

.site-nav__list .nav-drop__panel a:hover {
  background: var(--color-brand-50);
  color: var(--color-brand-700);
}

.site-nav__list .nav-drop__panel a svg {
  width: 18px;
  height: 18px;
  color: var(--color-brand-500);
}

.site-nav__list .nav-drop__panel .nav-drop__title {
  padding: 0 10px 4px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
}

.site-nav__list .nav-drop__panel .nav-drop__title:hover {
  background: none;
  color: var(--color-brand-700);
}

.site-nav__list .nav-drop__panel .nav-drop__all {
  margin-top: var(--space-2);
  justify-content: center;
  border: 1px solid var(--color-brand-300);
  border-radius: var(--radius-pill);
  font-weight: 600;
  color: var(--color-brand-700);
}

.site-nav__list .nav-drop__panel .nav-drop__all svg {
  width: 16px;
  height: 16px;
  color: currentColor;
}

/* ---------- Celular: lista que abre dentro do menu ---------- */

.mobile-drop details {
  width: 100%;
}

.mobile-drop summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 500;
  color: var(--color-ink);
  line-height: 1.1;
  list-style: none;
  cursor: pointer;
}

.mobile-drop summary::-webkit-details-marker {
  display: none;
}

.mobile-drop summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.4rem;
  color: var(--color-brand-500);
  transition: transform var(--dur) var(--ease-out);
}

.mobile-drop details[open] summary::after {
  transform: rotate(45deg);
}

.mobile-drop__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 12px;
  padding: 0 4px 18px;
}

.mobile-menu__nav .mobile-drop__body a {
  padding: 9px 0;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
}

.mobile-menu__nav .mobile-drop__body a::after {
  display: none;
}

.mobile-drop__title {
  grid-column: 1 / -1;
  margin-top: var(--space-3);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
}

.mobile-menu__nav .mobile-drop__body .mobile-drop__all {
  grid-column: 1 / -1;
  justify-content: center;
  margin-top: var(--space-3);
  padding: 12px;
  border: 1px solid var(--color-brand-300);
  border-radius: var(--radius-pill);
  font-weight: 600;
  color: var(--color-brand-700);
}

/* ---------- Botão flutuante: só o ícone, na cor vinho do site ---------- */
.whatsapp-float {
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 0;
  background: var(--color-brand-700);
  box-shadow: 0 14px 30px -10px rgba(123, 34, 56, 0.55), 0 4px 10px rgba(0, 0, 0, 0.08);
}

.whatsapp-float:hover {
  background: var(--color-brand-900);
  box-shadow: 0 20px 40px -12px rgba(123, 34, 56, 0.6), 0 4px 10px rgba(0, 0, 0, 0.1);
}

.whatsapp-float__pulse {
  background: var(--color-gold);
}

.whatsapp-float__icon {
  color: #fff;
}

/* Texto "Agendar" escondido no celular (no desktop vira só a dica ao passar o mouse) */
@media (max-width: 1023px) {
  .whatsapp-float__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (min-width: 1024px) {
  .whatsapp-float__label {
    background: var(--color-brand-950);
  }
}

/* ---------- Texto de fechamento abaixo do conteúdo de cada seção ---------- */
.section-outro {
  max-width: 640px;
  margin: clamp(2rem, 1.5rem + 2vw, 3rem) auto 0;
  font-size: var(--fs-md);
  line-height: 1.7;
  text-align: center;
  color: var(--color-muted);
}

.section-outro--light {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  color: rgba(255, 255, 255, 0.8);
}

/* Painel do "Nosso espaço": duas colunas iguais e mais estreito */
.nav-drop__panel--compact {
  grid-template-columns: 1fr 1.2fr;
  width: min(520px, 90vw);
}

/* Títulos de coluna que não são links */
.site-nav__list .nav-drop__panel span.nav-drop__title {
  display: block;
  padding: 0 10px 4px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
}

/* Texto de fechamento: uma linha no desktop, quebra equilibrada no celular */
.section-outro {
  text-wrap: balance;
}

@media (min-width: 900px) {
  .section-outro {
    max-width: none;
  }
}
