/* ============================================
   ODONTOCLÍNICA PREMIUM - ESTILOS PRINCIPAIS
   ============================================ */

:root {
  --primary: #0077CC;
  --primary-dark: #005fa3;
  --secondary: #00C896;
  --secondary-dark: #00a87e;
  --danger: #e74c3c;
  --warning: #f39c12;
  --success: #27ae60;
  --light: #f4f8ff;
  --dark: #1a2340;
  --gray: #6c757d;
  --border: #dce8f5;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(0,119,204,0.1);
  --radius: 14px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
}

/* -------- NAVBAR -------- */
.navbar {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.navbar-brand .logo-icon {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.navbar-brand h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.navbar-brand small {
  display: block;
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 400;
}

.navbar-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.navbar-links a:hover { color: white; }

/* -------- HERO -------- */
.hero {
  background: linear-gradient(135deg, #0077CC 0%, #0099ee 50%, #00C896 100%);
  color: white;
  padding: 5rem 2rem 4rem;
  text-align: center;
}

.hero h2 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.badge-hero {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  backdrop-filter: blur(4px);
}

/* -------- CONTAINER -------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* -------- SECTION -------- */
.section {
  padding: 3.5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--gray);
  font-size: 1rem;
}

/* -------- CARD -------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  border: 1px solid var(--border);
}

/* -------- FORM -------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full { grid-column: 1 / -1; }

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
}

label span.required { color: var(--danger); }

input, select, textarea {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--dark);
  background: #fafcff;
  transition: var(--transition);
  font-family: inherit;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(0,119,204,0.1);
}

/* -------- BOTÕES -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(0,119,204,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,119,204,0.45);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #1e8449);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #c0392b);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #d68910);
  color: white;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  font-size: 1rem;
  padding: 1rem 2rem;
  box-shadow: 0 4px 14px rgba(37,211,102,0.4);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,211,102,0.5);
}

.btn-block { width: 100%; }

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* -------- STATUS DO HORÁRIO -------- */
.status-box {
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-top: 1rem;
  border: 2px solid;
  animation: fadeIn 0.3s ease;
}

.status-box.verde {
  background: #eafaf1;
  border-color: #27ae60;
  color: #1a6e3c;
}

.status-box.amarelo {
  background: #fef9e7;
  border-color: #f39c12;
  color: #7d6608;
}

.status-box.vermelho {
  background: #fdf2f2;
  border-color: #e74c3c;
  color: #922b21;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

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

.status-item .value {
  font-size: 1.6rem;
  font-weight: 800;
  display: block;
}

.status-item .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.95rem;
}

/* -------- PROGRESS BAR -------- */
.progress-bar-wrap {
  background: rgba(0,0,0,0.08);
  border-radius: 50px;
  height: 10px;
  margin: 0.6rem 0;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.5s ease;
}

.verde .progress-bar-fill  { background: #27ae60; }
.amarelo .progress-bar-fill { background: #f39c12; }
.vermelho .progress-bar-fill { background: #e74c3c; }

/* -------- HORÁRIOS GRID -------- */
.horarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.horario-btn {
  padding: 0.7rem;
  border-radius: 10px;
  border: 2px solid;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.horario-btn .hora { font-size: 1rem; display: block; }
.horario-btn .vagas { font-size: 0.72rem; opacity: 0.75; }

.horario-btn.verde {
  border-color: #27ae60;
  background: #eafaf1;
  color: #1a6e3c;
}

.horario-btn.verde:hover, .horario-btn.verde.ativo {
  background: #27ae60;
  color: white;
}

.horario-btn.amarelo {
  border-color: #f39c12;
  background: #fef9e7;
  color: #7d6608;
}

.horario-btn.amarelo:hover, .horario-btn.amarelo.ativo {
  background: #f39c12;
  color: white;
}

.horario-btn.vermelho {
  border-color: #e74c3c;
  background: #fdf2f2;
  color: #922b21;
  cursor: not-allowed;
  opacity: 0.6;
}

/* -------- LOADER -------- */
.loader {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(0,119,204,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.loader-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--primary);
  font-weight: 500;
  padding: 0.8rem 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* -------- TOAST -------- */
.toast-wrap {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: white;
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  max-width: 320px;
}

.toast.success { border-color: var(--success); }
.toast.danger  { border-color: var(--danger); }

@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* -------- MODAL -------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: white;
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center;
  animation: popIn 0.3s ease;
}

.modal .icon-big { font-size: 3.5rem; margin-bottom: 1rem; }
.modal h3 { font-size: 1.4rem; font-weight: 700; color: var(--success); margin-bottom: 0.5rem; }
.modal p  { color: var(--gray); margin-bottom: 1.5rem; }

@keyframes fadeIn  { from { opacity: 0; }    to { opacity: 1; } }
@keyframes popIn   { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* -------- WHATSAPP FLUTUANTE -------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  background: #25D366;
  color: white;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 4px 16px rgba(37,211,102,0.5);
  text-decoration: none;
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,0.6);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(37,211,102,0.5); }
  50%       { box-shadow: 0 4px 28px rgba(37,211,102,0.7); }
}

/* -------- SERVIÇOS -------- */
.servicos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.2rem;
}

.servico-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  border: 2px solid var(--border);
  transition: var(--transition);
}

.servico-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.servico-card .icon { font-size: 2rem; margin-bottom: 0.7rem; }
.servico-card h4 { font-size: 0.95rem; font-weight: 700; color: var(--dark); }
.servico-card p  { font-size: 0.8rem; color: var(--gray); margin-top: 0.3rem; }

/* -------- FOOTER -------- */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  margin-top: 3rem;
}

footer a { color: var(--secondary); text-decoration: none; }

/* -------- RESPONSIVO -------- */
@media (max-width: 768px) {
  .hero h2 { font-size: 1.7rem; }
  .form-grid { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: repeat(2, 1fr); }
  .navbar-links { display: none; }
  .hero { padding: 3rem 1.5rem 2.5rem; }
}
