/*
 * SM Estética — Sistema visual premium
 * Mobile-first • Clínica de estética alto padrão
 */

/* ===== TOKENS & RESET ===== */
:root {
  /* Cores — paleta premium */
  --primary: #B59A7D;
  --primary-dark: #967E64;
  --primary-light: #D4C4B0;
  --bg-light: #FBF9F7;
  --bg-white: #FFFFFF;
  --bg-warm: #F5F1ED;
  --text-main: #333230;
  --text-muted: #706C68;
  --text-soft: #8E8A86;
  --accent-light: #EFECE8;
  --accent-border: #E5E1DD;
  --champagne: #E8E2DA;
  --nude: #F0EBE6;
  --dark: #2C2A28;
  --success: #6B7B6B;
  --error: #A65D5D;

  /* Tipografia */
  --font-main: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-title: 'Playfair Display', Georgia, serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-hero: clamp(2rem, 5vw, 3.5rem);
  --leading-tight: 1.2;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* Espaçamento */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --section-padding: clamp(3rem, 8vw, 6rem);

  /* Bordas e sombras */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow: 0 10px 30px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.08);
  --transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-main);
  background-color: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* Imagens responsivas e performance (Passo 7) */
.img-cover { width: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
button { font-family: inherit; cursor: pointer; }

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 768px) {
  .container { padding-left: var(--space-6); padding-right: var(--space-6); }
}

/* ===== TIPOGRAFIA GLOBAL ===== */
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 500; line-height: var(--leading-tight); }
h1 { font-size: var(--text-hero); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: var(--text-xl); }
.pre-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  margin-bottom: var(--space-3);
  display: block;
}

/* ===== NAVEGAÇÃO ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-4) 0;
  background: rgba(251, 249, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--accent-light);
  transition: var(--transition);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-main);
}

.brand span {
  display: block;
  font-weight: 300;
  font-size: 0.65em;
  letter-spacing: 0.25em;
  margin-top: -2px;
  color: var(--primary);
}

.nav-menu {
  display: none;
  align-items: center;
  gap: var(--space-6);
}

.nav-menu a {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  font-weight: 500;
}

.nav-menu a:hover { color: var(--primary); }

@media (min-width: 992px) {
  .nav-menu { display: flex; }
  .mobile-toggle { display: none; }
}

.mobile-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-main);
  transition: var(--transition);
}

.mobile-toggle.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.mobile-toggle.is-open span:nth-child(2) { opacity: 0; }
.mobile-toggle.is-open span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 85vw);
  background: var(--bg-white);
  z-index: 999;
  padding: 5rem var(--space-6) var(--space-6);
  box-shadow: -10px 0 40px rgba(0,0,0,0.08);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}

.mobile-menu.is-open { transform: translateX(0); }

.mobile-menu a {
  display: block;
  padding: var(--space-3) 0;
  font-size: var(--text-base);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  border-bottom: 1px solid var(--accent-light);
}

.mobile-menu .btn-primary { margin-top: var(--space-6); text-align: center; border: none; }

/* ===== BOTÕES ===== */
.btn-primary, .btn-secondary, .btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  border: none;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg-white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1.5px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--nude);
  color: var(--primary-dark);
}

.btn-nav {
  background: var(--primary);
  color: var(--bg-white);
}

.btn-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.03em;
}

.btn-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* ===== HERO ===== */
.hero {
  padding: calc(80px + 4rem) 0 clamp(4rem, 10vw, 6rem);
  background: radial-gradient(ellipse 120% 80% at 70% 0%, var(--bg-warm) 0%, var(--bg-light) 60%);
  position: relative;
}

.hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  max-height: 50vh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.hero-bg-img .hero-img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  max-height: 50vh;
  object-fit: cover;
  object-position: center top;
}

.hero-content {
  max-width: 640px;
  position: relative;
  z-index: 2;
}

.tagline {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary);
  margin-bottom: var(--space-4);
  display: block;
}

.main-title {
  font-family: var(--font-title);
  font-size: var(--text-hero);
  line-height: 1.1;
  margin-bottom: var(--space-5);
  color: var(--text-main);
}

.main-title em { font-style: italic; font-weight: 400; }

.hero .description {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero-footer-note {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .hero { text-align: center; padding-top: calc(80px + 3rem); }
  .hero-content { margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .hero-actions .btn-primary, .hero-actions .btn-secondary { width: 100%; max-width: 280px; }
}

/* ===== SEÇÕES ===== */
.section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.section-header h2 { margin-bottom: var(--space-3); }

.section-header p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== BENEFÍCIOS ===== */
.benefits {
  padding: var(--section-padding) 0;
  background: var(--bg-white);
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  text-align: center;
}

@media (min-width: 768px) {
  .benefits-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
}

.benefit-item .icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: var(--space-4);
  line-height: 1;
}

.benefit-item h3 {
  font-family: var(--font-title);
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
  color: var(--text-main);
}

.benefit-item p { color: var(--text-muted); font-size: var(--text-sm); }

/* ===== SERVIÇOS (CARDS) ===== */
.services { padding: var(--section-padding) 0; }

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
}

.service-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
  border: 1px solid var(--accent-light);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--champagne);
}

.card-image {
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-warm);
  overflow: hidden;
}

.card-image--img {
  padding: 0;
  display: block;
}

.card-image--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card-body { padding: var(--space-6); }

.card-body h3 {
  font-family: var(--font-title);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  color: var(--text-main);
}

.card-body p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
}

.card-link {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.card-link:hover { color: var(--primary-dark); }

/* ===== SOBRE ===== */
.about {
  padding: var(--section-padding) 0;
  background: var(--bg-warm);
}

.about-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 992px) {
  .about-wrapper { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

.about-text .tagline { margin-bottom: var(--space-3); }

.about-text h2 { margin-bottom: var(--space-5); }

.about-text p {
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

.about-image img {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

/* ===== DEPOIMENTOS ===== */
.testimonials { padding: var(--section-padding) 0; background: var(--bg-white); }

.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}

.testimonials-visual {
  max-width: 560px;
  margin: 0 auto var(--space-8);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.testimonials-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: center;
}

.testimonial-card {
  background: var(--bg-light);
  padding: var(--space-8);
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-light);
}

.testimonial-card p {
  font-size: var(--text-base);
  font-style: italic;
  color: var(--text-main);
  line-height: var(--leading-relaxed);
}

.testimonial-card .author {
  display: block;
  margin-top: var(--space-4);
  font-style: normal;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--primary);
}

/* ===== FAQ ===== */
.faq { padding: var(--section-padding) 0; }

.faq-list { max-width: 720px; margin: 0 auto; }

.faq-item {
  border-bottom: 1px solid var(--accent-light);
  padding: var(--space-4) 0;
}

.faq-question {
  font-weight: 500;
  font-size: var(--text-base);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-main);
  transition: var(--transition);
}

.faq-question:hover { color: var(--primary); }

.faq-question .plus {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--primary);
  transition: transform var(--transition);
}

.faq-item.is-open .faq-question .plus { transform: rotate(45deg); }

.faq-answer {
  padding-top: var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  display: none;
}

.faq-item.is-open .faq-answer { display: block; }

/* ===== CTA FINAL ===== */
.cta-final {
  padding: var(--section-padding) 0;
  text-align: center;
  background: var(--dark);
  color: var(--bg-white);
}

.cta-final h2 {
  font-family: var(--font-title);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-4);
}

.cta-final p {
  margin-bottom: var(--space-8);
  opacity: 0.88;
  font-size: var(--text-lg);
}

.cta-final .btn-primary {
  background: var(--bg-white);
  color: var(--dark);
}

.cta-final .btn-primary:hover { background: var(--champagne); color: var(--dark); }

/* ===== RODAPÉ ===== */
.footer {
  padding: var(--space-16) 0 var(--space-8);
  background: var(--bg-white);
  border-top: 1px solid var(--accent-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
}

.footer h4 {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: var(--space-4);
}

.footer-nav a, .footer-contact p {
  display: block;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.footer-nav a:hover { color: var(--primary); }

.footer-bottom {
  text-align: center;
  padding-top: var(--space-6);
  border-top: 1px solid var(--accent-light);
  font-size: var(--text-xs);
  color: var(--text-soft);
}

/* ===== AGENDAR (fluxo interno) + WHATSAPP (complementar) ===== */
.agendar-float {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  min-width: 56px;
  height: 56px;
  padding: 0 var(--space-4);
  background: var(--accent, #8b7355);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  text-decoration: none;
  transition: var(--transition);
}
.agendar-float:hover { color: #fff; transform: scale(1.03); opacity: 0.95; }

.whatsapp-float {
  position: fixed;
  bottom: calc(var(--space-6) + 64px);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 998;
  transition: var(--transition);
}

.whatsapp-float:hover { transform: scale(1.05); }

.whatsapp-float img { width: 32px; height: 32px; }

@media (min-width: 768px) {
  .agendar-float { bottom: var(--space-8); right: var(--space-8); height: 60px; border-radius: 30px; }
  .whatsapp-float { width: 60px; height: 60px; bottom: calc(var(--space-8) + 72px); right: var(--space-8); }
  .whatsapp-float img { width: 36px; height: 36px; }
}

/* ===== FORMULÁRIOS ===== */
.form-group { margin-bottom: var(--space-5); }

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: var(--space-2);
}

.form-control {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-white);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(181, 154, 125, 0.15);
}

.form-control::placeholder { color: var(--text-soft); }

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23706C68' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }

/* ===== TABELAS ===== */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th, .table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--accent-light);
}

.table th {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table tbody tr:hover { background: var(--bg-light); }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--text-muted);
}

.badge--primary { background: var(--primary-light); color: var(--primary-dark); }
.badge--success { background: #e0ebe0; color: var(--success); }

/* ===== PÁGINA INTERNA (conteúdo) ===== */
.page-header {
  padding: calc(80px + 3rem) 0 var(--space-10);
  background: var(--bg-warm);
  text-align: center;
}

.page-header h1 { margin-bottom: var(--space-3); }

.page-header p { color: var(--text-muted); font-size: var(--text-lg); }

.page-content { padding: var(--section-padding) 0; }

/* ===== ADMIN ===== */
.admin-body { background: var(--bg-light); min-height: 100vh; }

.admin-sidebar {
  background: var(--dark);
  color: var(--bg-white);
  padding: var(--space-6);
  width: 260px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
}

.admin-sidebar .brand { color: var(--bg-white); }
.admin-sidebar .brand span { color: var(--champagne); }

.admin-nav a {
  display: block;
  padding: var(--space-3) 0;
  color: rgba(255,255,255,0.8);
  font-size: var(--text-sm);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-nav a:hover { color: var(--bg-white); }

.admin-main {
  margin-left: 260px;
  padding: var(--space-8);
  min-height: 100vh;
}

.admin-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--accent-light);
  margin-bottom: var(--space-6);
}

.admin-card h2 { font-size: var(--text-xl); margin-bottom: var(--space-4); }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

/* ===== UTILITÁRIOS ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.text-center { text-align: center; }
