/* =========================================
   DENTICARE — Main Stylesheet
   ========================================= */

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

:root {
  /* Paleta pastel — confianza y calma dental */
  --teal: #6BADA6;          /* mint pastel principal */
  --teal-light: #8FCAC4;    /* mint claro */
  --teal-dark: #4E908A;     /* mint oscuro para hover */
  --teal-50: #EFF8F7;       /* fondo muy suave */
  --teal-100: #CCEAE7;      /* tint ligero */
  --slate-50: #F5FAFA;      /* fondo página */
  --slate-100: #E9F2F1;     /* bordes suaves */
  --slate-200: #D2E6E4;     /* separadores */
  --slate-300: #B4D0CE;     /* placeholders */
  --slate-500: #6B8F8D;     /* texto secundario */
  --slate-700: #3D6360;     /* texto cuerpo */
  --slate-900: #1C3A38;     /* títulos */
  --white: #FFFFFF;
  --font: 'Inter', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --shadow-lg: 0 8px 32px rgba(107,173,166,.15);
  --header-h: 48px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--slate-50);
  color: var(--slate-700);
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }

/* =========================================
   HEADER / NAV
   ========================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: auto;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: var(--header-h);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav__logo-text {
  font-weight: 800;
  font-size: 1rem;
  color: var(--slate-900);
  letter-spacing: .04em;
}
.nav__logo-text span { color: var(--teal); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--slate-700);
  text-decoration: none;
  transition: background .18s, color .18s;
}
.nav__link:hover { background: var(--slate-100); color: var(--teal); }
.nav__link--active { background: var(--teal-50); color: var(--teal); }

.nav__btn {
  background: var(--teal);
  color: var(--white) !important;
  border-radius: 8px;
  padding: 8px 18px;
  transition: background .18s, transform .15s !important;
}
.nav__btn:hover { background: var(--teal-dark) !important; transform: translateY(-1px); }
.nav__btn--active { background: var(--teal-dark) !important; }

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform .15s, box-shadow .15s, background .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(107,173,166,.35);
}
.btn--primary:hover { background: var(--teal-dark); box-shadow: 0 6px 20px rgba(107,173,166,.45); }
.btn--outline {
  background: var(--white);
  color: var(--teal);
  border: 2px solid var(--teal);
}
.btn--outline:hover { background: var(--teal-50); }
.btn--white {
  background: var(--white);
  color: var(--teal-dark);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.btn--white:hover { background: var(--teal-50); }
.btn--full { width: 100%; justify-content: center; }

/* =========================================
   HERO
   ========================================= */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding-top: 80px;
  padding-bottom: 80px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-100);
  color: var(--teal-dark);
  font-size: .8125rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero__title--accent { color: var(--teal); }

.hero__subtitle {
  font-size: 1.0625rem;
  color: var(--slate-500);
  margin-bottom: 32px;
  max-width: 420px;
}

.hero__ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__visual { display: flex; justify-content: center; align-items: center; }

.hero__card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  text-align: center;
  width: 300px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero__card-icon { margin-bottom: 16px; }
.hero__card-label { font-size: 1.125rem; font-weight: 800; color: var(--slate-900); margin-bottom: 4px; }
.hero__card-sub { font-size: .875rem; color: var(--slate-500); margin-bottom: 20px; }
.hero__card-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-50);
  color: var(--teal-dark);
  font-size: .8125rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
}

.pulse {
  width: 8px; height: 8px;
  background: #22C55E;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}
.pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(34,197,94,.3);
  animation: ping 1.4s ease-in-out infinite;
}
@keyframes ping { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: 0; } }

/* =========================================
   SERVICES
   ========================================= */
.section__header { text-align: center; margin-bottom: 48px; }
.section__title { font-size: 1.875rem; font-weight: 800; color: var(--slate-900); margin-bottom: 10px; }
.section__subtitle { font-size: 1rem; color: var(--slate-500); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--slate-200);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.service-card__img {
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 24px;
}
.service-card__img--1 { background: linear-gradient(135deg, #C8EAE7, #A8D9D4); }
.service-card__img--2 { background: linear-gradient(135deg, #FDF3DC, #FAE5B0); }
.service-card__img--3 { background: linear-gradient(135deg, #E8E0F8, #CFC0F0); }
.service-card__img--4 { background: linear-gradient(135deg, #FAE0E0, #F4BEBE); }
.service-card__img--5 { background: linear-gradient(135deg, #DAEAF8, #B8D4F0); }
.service-card__img--6 { background: linear-gradient(135deg, #FCE8D0, #F8D0A8); }

.service-card__icon {
  width: 44px; height: 44px;
  background: var(--teal);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}
.service-card__icon--yellow { background: #C49A3C; }
.service-card__icon--purple { background: #8B6DC0; }
.service-card__icon--red    { background: #C06870; }
.service-card__icon--blue   { background: #5888C8; }
.service-card__icon--orange { background: #C07848; }

.service-card__body { padding: 20px 24px 24px; }
.service-card__title { font-size: 1rem; font-weight: 700; color: var(--slate-900); margin-bottom: 8px; }
.service-card__desc { font-size: .875rem; color: var(--slate-500); margin-bottom: 16px; line-height: 1.5; }
.service-card__link { color: var(--teal); font-size: .875rem; font-weight: 600; text-decoration: none; transition: gap .15s; }
.service-card__link:hover { text-decoration: underline; }

/* =========================================
   CTA BANNER
   ========================================= */
.cta-banner { background: transparent; }
.cta-banner__card {
  background: linear-gradient(135deg, #6BADA6 0%, #8FCAC4 50%, #A8D8D4 100%);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner__deco {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
}
.cta-banner__deco--left { left: -80px; bottom: -80px; }
.cta-banner__deco--right { right: -60px; top: -60px; }
.cta-banner__content { position: relative; z-index: 1; }
.cta-banner__title { font-size: 1.75rem; font-weight: 800; color: var(--slate-900); margin-bottom: 12px; }
.cta-banner__subtitle { font-size: 1rem; color: var(--slate-700); margin-bottom: 28px; max-width: 520px; margin-left: auto; margin-right: auto; }

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  padding: 28px 0;
  text-align: center;
}
.footer__copy { font-size: .875rem; color: var(--slate-500); margin-bottom: 4px; }
.footer__emergency { font-size: .875rem; color: var(--slate-500); }
.footer__emergency strong { color: var(--slate-700); }
.footer__credit {
  font-size: .75rem;
  color: var(--slate-300);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--slate-100);
}
.footer__credit strong { color: var(--teal); letter-spacing: .04em; }


/* =========================================
   CHAT PAGE
   ========================================= */
body.chat-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.chat-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  flex-shrink: 0;
}

.chat-subheader__info { display: flex; align-items: center; gap: 12px; }

.chat-subheader__avatar {
  width: 40px; height: 40px;
  background: var(--teal-100);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  position: relative;
}

.chat-subheader__online {
  position: absolute;
  width: 10px; height: 10px;
  background: #22C55E;
  border: 2px solid var(--white);
  border-radius: 50%;
  bottom: -2px; right: -2px;
}

.chat-subheader__name { font-weight: 700; font-size: .9375rem; color: var(--slate-900); }
.chat-subheader__status { font-size: .8125rem; color: var(--slate-500); }

.chat-subheader__new {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--slate-500);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background .15s, color .15s;
  font-family: var(--font);
}
.chat-subheader__new:hover { background: var(--slate-100); color: var(--slate-700); }

.chat-main {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.chat-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 16px;
}
.chat-welcome__title { font-size: 1.5rem; font-weight: 800; color: var(--slate-900); }
.chat-welcome__text { font-size: .9375rem; color: var(--slate-500); max-width: 420px; }

.chat-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 500px;
  width: 100%;
  margin-top: 8px;
}

.chat-quick__btn {
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 500;
  color: var(--slate-700);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, transform .15s;
}
.chat-quick__btn:hover { border-color: var(--teal); background: var(--teal-50); color: var(--teal); transform: translateY(-2px); }

.chat-messages {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  flex: 1;
}
.chat-messages.visible { display: flex; }

.msg { display: flex; gap: 10px; max-width: 680px; animation: msgIn .22s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.msg--bot { align-self: flex-start; }
.msg--user { align-self: flex-end; flex-direction: row-reverse; }

.msg__avatar {
  width: 36px; height: 36px;
  background: var(--teal-100);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 700;
}

.msg__bubble {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: .9rem;
  line-height: 1.55;
}
.msg--bot .msg__bubble { background: var(--white); border: 1px solid var(--slate-200); color: var(--slate-700); border-bottom-left-radius: 4px; }
.msg--user .msg__bubble { background: var(--teal); color: var(--white); border-bottom-right-radius: 4px; }

.msg__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  background: var(--teal);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.msg__link:hover { background: var(--teal-dark); }

.typing { display: flex; align-items: center; gap: 4px; padding: 14px 18px; }
.typing span { width: 7px; height: 7px; background: var(--slate-300); border-radius: 50%; animation: bounce .9s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-6px); } }

.chat-footer {
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  padding: 16px 0 20px;
  flex-shrink: 0;
}

.chat-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--slate-100);
  border: 1.5px solid var(--slate-200);
  border-radius: 12px;
  padding: 6px 6px 6px 16px;
  transition: border-color .18s;
}
.chat-input-wrap:focus-within { border-color: var(--teal); background: var(--white); }

.chat-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: .9375rem;
  color: var(--slate-900);
  outline: none;
  padding: 8px 0;
}
.chat-input::placeholder { color: var(--slate-300); }

.chat-send {
  width: 40px; height: 40px;
  background: var(--teal);
  border: none;
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .15s;
  flex-shrink: 0;
}
.chat-send:hover { background: var(--teal-dark); transform: scale(1.05); }

.chat-footer__disclaimer { text-align: center; font-size: .75rem; color: var(--slate-300); margin-top: 10px; }

/* =========================================
   BOOKING PAGE
   ========================================= */
.booking-main { padding: 48px 0 80px; }

.booking-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 48px;
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--slate-200);
}

.booking-title { font-size: 2rem; font-weight: 800; color: var(--slate-900); margin-bottom: 8px; }
.booking-subtitle { font-size: .9375rem; color: var(--slate-500); margin-bottom: 36px; }

.booking-form { display: flex; flex-direction: column; gap: 24px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--slate-700);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  font-family: var(--font);
  font-size: .9375rem;
  color: var(--slate-900);
  background: var(--slate-50);
  outline: none;
  transition: border-color .18s, background .18s;
}
.form-input:focus { border-color: var(--teal); background: var(--white); }
.form-input::placeholder { color: var(--slate-300); }
.form-select { cursor: pointer; }
.form-textarea { resize: vertical; min-height: 80px; }

.service-selector { display: flex; flex-wrap: wrap; gap: 10px; }

.service-btn {
  padding: 9px 18px;
  border: 1.5px solid var(--slate-200);
  border-radius: 100px;
  background: var(--white);
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 500;
  color: var(--slate-700);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.service-btn:hover { border-color: var(--teal); color: var(--teal); }
.service-btn.active { background: var(--teal); border-color: var(--teal); color: var(--white); }

/* Confirmation */
.hidden { display: none !important; }

.confirm-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 64px 48px;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  border: 1px solid var(--slate-200);
}

.confirm-icon {
  width: 72px; height: 72px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(13,148,136,.3);
}

.confirm-title { font-size: 1.75rem; font-weight: 800; color: var(--slate-900); margin-bottom: 10px; }
.confirm-subtitle { font-size: .9375rem; color: var(--slate-500); margin-bottom: 28px; }

.confirm-details {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 20px 24px;
  text-align: left;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirm-row { display: flex; gap: 12px; font-size: .875rem; }
.confirm-row span:first-child { color: var(--slate-500); min-width: 90px; }
.confirm-row strong { color: var(--slate-900); font-weight: 600; }

.confirm-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .hero__visual { order: -1; }
  .hero__ctas { justify-content: center; }
  .hero__subtitle { margin-left: auto; margin-right: auto; }

  .services__grid { grid-template-columns: 1fr; }

  .cta-banner__card { padding: 40px 24px; }

  .chat-quick { grid-template-columns: 1fr; }

  .booking-card { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .confirm-card { padding: 40px 24px; }
  .confirm-actions { flex-direction: column; }

  .nav__links .nav__link:not(.nav__btn) { display: none; }
}

@media (max-width: 480px) {
  .services__grid { grid-template-columns: 1fr; }
  .hero__card { width: 100%; max-width: 280px; }
}

/* =========================================
   LOGO BAR (above nav)
   ========================================= */
.logo-bar {
  background: var(--white);
  border-bottom: 2px solid var(--slate-100);
  padding: 14px 0;
  /* NOT sticky — sits above the sticky header */
}

.logo-bar__link {
  display: inline-block;
  text-decoration: none;
}

.logo-bar__img {
  height: 168px;
  width: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 768px) {
  .logo-bar__img { height: 100px; }
}

/* =========================================
   HERO PHOTO
   ========================================= */
.hero__photo-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  overflow: visible;
  animation: float 3.5s ease-in-out infinite;
}

.hero__photo {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(13,148,136,.22), 0 8px 24px rgba(0,0,0,.12);
  display: block;
}

.hero__photo-chip {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  color: var(--teal-dark);
  font-size: .8125rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 100px;
  box-shadow: 0 4px 16px rgba(107,173,166,.2);
}

.hero__photo-badge {
  position: absolute;
  top: -16px;
  right: -16px;
  background: var(--white);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.hero__photo-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* =========================================
   SERVICE CARD PHOTO VARIANT
   ========================================= */
.service-card__img--photo {
  height: 190px;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.service-card__img--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.service-card:hover .service-card__img--photo img {
  transform: scale(1.06);
}

.service-card__badge {
  position: absolute;
  bottom: 10px;
  left: 12px;
  background: var(--teal);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: .03em;
  box-shadow: 0 2px 8px rgba(13,148,136,.3);
}

.service-card__badge--yellow  { background: #D97706; box-shadow: 0 2px 8px rgba(217,119,6,.3); }
.service-card__badge--purple  { background: #7C3AED; box-shadow: 0 2px 8px rgba(124,58,237,.3); }
.service-card__badge--red     { background: #DC2626; box-shadow: 0 2px 8px rgba(220,38,38,.3); }
.service-card__badge--blue    { background: #2563EB; box-shadow: 0 2px 8px rgba(37,99,235,.3); }
.service-card__badge--orange  { background: #EA580C; box-shadow: 0 2px 8px rgba(234,88,12,.3); }

/* --- Responsive adjustments for photos --- */
@media (max-width: 768px) {
  .hero__photo { height: 300px; }
  .hero__photo-badge { top: -12px; right: -8px; }
  .service-card__img--photo { height: 160px; }
}

@media (max-width: 480px) {
  .hero__photo-wrap { max-width: 100%; }
  .hero__photo { height: 260px; }
}

