/*
Theme Name: Dr. Caio Petrola - Nefrologista
Theme URI: https://drcaiopetrola.imunizevacinas.com.br
Author: Antigravity AI
Description: Tema profissional para Dr. Caio Petrola, Nefrologista em Petrolina-PE
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Proprietary
Text Domain: drcaio
*/

/* =========================================
   DESIGN TOKENS & CSS VARIABLES
   ========================================= */
:root {
  --primary: #1a4f8a;
  --primary-dark: #0f3261;
  --primary-light: #2d6bb5;
  --accent: #3db5e8;
  --accent-light: #e8f6fd;
  --text-dark: #1a202c;
  --text-body: #4a5568;
  --text-light: #718096;
  --bg-white: #ffffff;
  --bg-light: #f7fafc;
  --bg-section: #eef4fb;
  --border: #e2e8f0;
  --success: #38a169;
  --whatsapp: #25d366;
  --whatsapp-dark: #128c7e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(26,79,138,0.12);
  --shadow-lg: 0 10px 40px rgba(26,79,138,0.18);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --max-width: 1200px;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.075rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.text-center { text-align: center; }

/* =========================================
   LAYOUT UTILITIES
   ========================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }
section.compact { padding: 3.5rem 0; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.col { flex: 1; min-width: 280px; }

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-body);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
}

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

.btn-whatsapp svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.75rem 1.75rem;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-lg { padding: 1.1rem 2.5rem; font-size: 1.1rem; }

/* =========================================
   HEADER / NAV
   ========================================= */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.logo-crm {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 500;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.main-nav a:hover { color: var(--primary); }
.main-nav a:hover::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 1rem; }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary-dark);
  border-radius: 2px;
  transition: all var(--transition);
}

/* =========================================
   HERO SECTION
   ========================================= */
#hero {
  background: linear-gradient(135deg, #0f3261 0%, #1a4f8a 50%, #2d6bb5 100%);
  padding: 5rem 0 4rem;
  overflow: hidden;
  position: relative;
}

#hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(61,181,232,0.15) 0%, transparent 70%);
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -50px;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(61,181,232,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { flex: 1.2; min-width: 300px; color: #fff; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-badge svg { width: 14px; height: 14px; opacity: 0.9; }

.hero-content h1 {
  color: #fff;
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
}

.hero-content h1 span { color: var(--accent); }

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  line-height: 1.8;
  max-width: 520px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.25rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

.trust-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-image {
  flex: 1;
  min-width: 280px;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-img-wrapper {
  position: relative;
  width: 340px;
  height: 420px;
}

.hero-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-img-badge {
  position: absolute;
  bottom: -16px;
  left: -16px;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.badge-icon svg { width: 22px; height: 22px; }

.badge-text { line-height: 1.3; }
.badge-text strong { display: block; color: var(--text-dark); font-size: 0.95rem; }
.badge-text span { font-size: 0.78rem; color: var(--text-light); }

/* =========================================
   STATS BAR
   ========================================= */
#stats-bar {
  background: var(--primary-dark);
  padding: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  divide: border;
}

.stat-item {
  text-align: center;
  padding: 2rem 1rem;
  color: #fff;
  border-right: 1px solid rgba(255,255,255,0.12);
  transition: background var(--transition);
}

.stat-item:last-child { border-right: none; }
.stat-item:hover { background: rgba(255,255,255,0.05); }

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =========================================
   SOBRE
   ========================================= */
#sobre { background: var(--bg-white); }

.sobre-img {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.sobre-img img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.sobre-img::before {
  content: '';
  position: absolute;
  top: -16px; left: -16px;
  width: 100%; height: 100%;
  border: 3px solid var(--primary-light);
  border-radius: var(--radius-md);
  z-index: -1;
}

.sobre-content { flex: 1.2; }

.credential-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.75rem 0;
}

.credential-item {
  background: var(--bg-section);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.85rem 1rem;
}

.credential-item strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.credential-item span { font-size: 0.88rem; color: var(--text-body); }

/* =========================================
   ESPECIALIDADES
   ========================================= */
#especialidades { background: var(--bg-section); }

.especialidades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.espec-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.espec-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--transition);
}

.espec-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.espec-card:hover::before { transform: scaleY(1); }

.espec-icon {
  width: 52px; height: 52px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--primary);
  transition: background var(--transition);
}

.espec-card:hover .espec-icon { background: var(--primary); color: #fff; }

.espec-icon svg { width: 26px; height: 26px; }

.espec-card h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.espec-card p { font-size: 0.9rem; color: var(--text-light); margin: 0; line-height: 1.6; }

/* =========================================
   DIFERENCIAIS
   ========================================= */
#diferenciais {
  background: linear-gradient(135deg, #0f3261 0%, #1a4f8a 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

#diferenciais::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 50%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

#diferenciais .section-title { color: #fff; }
#diferenciais .section-desc { color: rgba(255,255,255,0.75); }

.diferenciais-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.dif-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition);
  text-align: center;
}

.dif-card:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.3);
}

.dif-icon {
  width: 60px; height: 60px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: #fff;
}

.dif-icon svg { width: 28px; height: 28px; }

.dif-card h3 { color: #fff; margin-bottom: 0.5rem; font-size: 1rem; }
.dif-card p { color: rgba(255,255,255,0.72); font-size: 0.88rem; margin: 0; }

/* =========================================
   LOCALIZAÇÃO
   ========================================= */
#localizacao { background: var(--bg-white); }

.localizacao-row { align-items: stretch; }

.mapa-wrapper {
  flex: 1.4;
  min-width: 300px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 400px;
}

.mapa-wrapper iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: none;
  display: block;
}

.localizacao-info {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.info-block {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.info-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.info-icon svg { width: 18px; height: 18px; }

.info-text strong { display: block; color: var(--text-dark); font-size: 0.9rem; margin-bottom: 0.2rem; }
.info-text span { font-size: 0.88rem; color: var(--text-light); }
.info-text a { color: var(--primary); font-weight: 500; }
.info-text a:hover { color: var(--primary-dark); }

/* =========================================
   BLOG
   ========================================= */
#blog { background: var(--bg-section); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

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

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.post-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.post-thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-category {
  position: absolute;
  top: 1rem; left: 1rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
}

.post-body { padding: 1.5rem; }
.post-date { font-size: 0.78rem; color: var(--text-light); margin-bottom: 0.5rem; display: block; }
.post-body h3 { font-size: 1.05rem; margin-bottom: 0.5rem; line-height: 1.4; }
.post-body p { font-size: 0.88rem; color: var(--text-light); margin-bottom: 1rem; }
.post-link { font-size: 0.88rem; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 0.25rem; }
.post-link:hover { color: var(--primary-dark); gap: 0.5rem; }

/* =========================================
   CTA FINAL
   ========================================= */
#cta-final {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-white) 100%);
  text-align: center;
  padding: 6rem 0;
}

.cta-wrapper {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.cta-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #fff;
}

.cta-icon svg { width: 36px; height: 36px; }

.cta-wrapper h2 { margin-bottom: 0.75rem; }
.cta-wrapper p { color: var(--text-light); margin-bottom: 2rem; }
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* =========================================
   FOOTER
   ========================================= */
#site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 3.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo-name { color: #fff; font-size: 1.35rem; margin-bottom: 0.25rem; }
.footer-brand .logo-crm { color: rgba(255,255,255,0.55); }
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.88rem; margin-top: 1rem; line-height: 1.7; }

.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul a { color: rgba(255,255,255,0.65); font-size: 0.88rem; }
.footer-col ul a:hover { color: var(--accent); }

.social-links { display: flex; gap: 0.75rem; margin-top: 1rem; }

.social-btn {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  transition: all var(--transition);
}

.social-btn:hover { border-color: var(--accent); color: var(--accent); }
.social-btn svg { width: 15px; height: 15px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.8;
}

/* =========================================
   WHATSAPP FLOAT
   ========================================= */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 60px;
  height: 60px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  animation: pulse-wa 2.5s infinite;
  transition: transform var(--transition);
}

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

.whatsapp-float svg { width: 30px; height: 30px; color: #fff; }

@keyframes pulse-wa {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.5); }
  50% { box-shadow: 0 4px 35px rgba(37,211,102,0.8), 0 0 0 8px rgba(37,211,102,0.1); }
}

/* =========================================
   RESPONSIVO
   ========================================= */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .header-cta .btn { display: none; }
  .mobile-menu-open .main-nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-md);
  }
  .mobile-menu-open .main-nav ul {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .mobile-menu-open .main-nav a {
    display: block;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 640px) {
  section { padding: 3.5rem 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .credential-grid { grid-template-columns: 1fr; }
  .hero-img-wrapper { width: 260px; height: 320px; }
  .cta-wrapper { padding: 2.5rem 1.25rem; }
}
