/* ========================================
   Dr. Pedro Barbosa - Pediatra em BH
   Stylesheet principal
   ======================================== */

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Cores - mantendo a paleta do site original */
  --color-primary: #2C4660;
  --color-primary-dark: #1F3349;
  --color-primary-light: #5C7A98;
  --color-bg-light: #DCE4EC;
  --color-bg-soft: #E8EDF3;
  --color-bg-cream: #F5F7FA;
  --color-white: #FFFFFF;
  --color-text: #2C4660;
  --color-text-soft: #5A6B7E;
  --color-text-muted: #8B98A8;
  --color-border: #D4DCE5;
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #1FAD52;
  --color-star: #F5B83D;

  /* Fontes */
  --font-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Espaçamento */
  --container-max: 1200px;
  --section-py: clamp(60px, 8vw, 100px);

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(44, 70, 96, 0.06);
  --shadow-md: 0 4px 20px rgba(44, 70, 96, 0.08);
  --shadow-lg: 0 12px 40px rgba(44, 70, 96, 0.12);

  /* Transições */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Tipografia */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

p { color: var(--color-text-soft); }

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Section */
.section {
  padding: var(--section-py) 0;
}

.section-compact {
  padding-top: calc(var(--section-py) * 0.6);
  padding-bottom: calc(var(--section-py) * 0.6);
}

.section-compact .section-header {
  margin-bottom: 28px;
}

.section-bg-light { background: var(--color-bg-light); }
.section-bg-soft  { background: var(--color-bg-soft); }
.section-bg-cream { background: var(--color-bg-cream); }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 18px;
  position: relative;
}

.section-eyebrow::before,
.section-eyebrow::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--color-primary);
  vertical-align: middle;
  margin: 0 14px;
  opacity: 0.5;
}

.section-title {
  margin-bottom: 16px;
}

.section-subtitle {
  max-width: 620px;
  margin: 0 auto;
  color: var(--color-text-soft);
  font-size: 1.05rem;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-bg-light);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-light);
}

.btn-primary:hover {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-white);
}
.btn-whatsapp:hover {
  background: var(--color-whatsapp-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(220, 228, 236, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  z-index: 100;
  border-bottom: 1px solid rgba(44, 70, 96, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-logo img {
  height: 56px;
  width: auto;
}

.header-logo-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-primary);
  letter-spacing: 0.01em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.header-nav a {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
  position: relative;
  padding: 4px 0;
}

.header-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.header-nav a:hover::after,
.header-nav a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-primary);
  transition: all 0.3s var(--ease);
}

.menu-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .header-nav {
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-bg-light);
    padding: 24px;
    transform: translateY(-130%);
    transition: transform 0.4s var(--ease);
    border-bottom: 1px solid rgba(44, 70, 96, 0.08);
  }
  .header-nav.open { transform: translateY(0); }
  .header-nav a {
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid rgba(44, 70, 96, 0.08);
    text-align: center;
  }
  .header-nav a::after { display: none; }
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--color-bg-light);
  padding: 80px 0 30px;
  border-top: 1px solid rgba(44, 70, 96, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
}

.footer-brand img {
  height: 48px;
  width: auto;
  margin-bottom: 20px;
}

.footer-brand p {
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a,
.footer-col li {
  font-size: 0.92rem;
  color: var(--color-text-soft);
  transition: color 0.2s var(--ease);
}

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

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: var(--color-text-soft);
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  stroke: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(44, 70, 96, 0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

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

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ========================================
   WHATSAPP FLOAT
   ======================================== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  z-index: 90;
  transition: all 0.3s var(--ease);
  animation: waPulse 2.4s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  background: var(--color-whatsapp-dark);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: white;
}

@keyframes waPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  50% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35), 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* ========================================
   PAGE HERO (interna)
   ======================================== */
.page-hero {
  background: var(--color-bg-light);
  padding: 80px 0 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../assets/pattern-pb-large.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.25;
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  z-index: 2;
}

.page-hero .breadcrumb {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}

.page-hero .breadcrumb a:hover { color: var(--color-primary); }

.page-hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  margin-bottom: 16px;
}

.page-hero p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--color-primary);
  font-weight: 500;
}

/* ========================================
   CARDS / GRID
   ======================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Pattern background helper */
.bg-pattern {
  position: relative;
  overflow: hidden;
}
.bg-pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../assets/pattern-pb-large.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.bg-pattern > * { position: relative; z-index: 1; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }


/* Footer credit (small attribution under copyright) */
.footer-credit {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.06em;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-credit strong {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.08em;
}
