/* clinicadentalotal.com — vitrina clara: marfil, mármol, oro viejo y botones esmeralda */

:root {
  --v-marfil: #f6f1e8;
  --v-crema: #fbf8f2;
  --v-arena: #ece3d3;
  --v-marmol: #e7e1d7;
  --v-cafe: #2b2118;
  --v-cafe-2: #4a3c30;
  --v-suave: #6d5e50;
  --v-linea: rgba(74, 60, 48, 0.14);
  --v-linea-2: rgba(74, 60, 48, 0.26);
  --v-blanco: #ffffff;

  --v-oro: #b8893b;
  --v-oro-claro: #d8b26a;
  --v-oro-fondo: #f3e6c9;
  --v-esmeralda: #13865a;
  --v-esmeralda-hi: #179a68;
  --v-esmeralda-lo: #0d6b47;
  --v-noche: #1d2430;

  --v-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --v-sans: "Plus Jakarta Sans", "Segoe UI", Roboto, Arial, sans-serif;

  --v-max: 1160px;
  --v-lado: clamp(1rem, 4vw, 2.4rem);
  --v-top: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--v-top) + 16px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 90% -10%, rgba(216, 178, 106, 0.22), transparent 70%),
    radial-gradient(900px 600px at -10% 40%, rgba(19, 134, 90, 0.06), transparent 70%),
    var(--v-marfil);
  color: var(--v-cafe);
  font-family: var(--v-sans);
  font-size: 1.05rem;
  line-height: 1.75;
}

body.cd-fijo { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--v-esmeralda); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

.cd-salto {
  position: absolute;
  top: -80px;
  left: 12px;
  z-index: 900;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--v-cafe);
  color: var(--v-crema);
  font-weight: 700;
  text-decoration: none;
}
.cd-salto:focus { top: 12px; }

.cd-marco { width: min(100% - 2 * var(--v-lado), var(--v-max)); margin-inline: auto; }

/* ---------- botones ---------- */

.cd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 14px;
  font-family: var(--v-sans);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.cd-btn:active { transform: scale(0.97); }

.cd-btn--esmeralda { background: var(--v-esmeralda); color: var(--v-blanco); box-shadow: 0 10px 22px -12px rgba(13, 107, 71, 0.9); }
.cd-btn--esmeralda::after { content: "→"; font-weight: 600; transition: transform 0.2s ease; }
.cd-btn--esmeralda:hover { background: var(--v-esmeralda-hi); box-shadow: 0 0 0 4px rgba(19, 134, 90, 0.16), 0 12px 24px -12px rgba(13, 107, 71, 1); }
.cd-btn--esmeralda:hover::after { transform: translateX(4px); }
.cd-btn--esmeralda:active { background: var(--v-esmeralda-lo); }

.cd-btn--linea { background: var(--v-crema); color: var(--v-cafe); border-color: var(--v-oro); }
.cd-btn--linea:hover { background: var(--v-oro-fondo); border-color: var(--v-oro); }

.cd-btn--xl { min-height: 56px; padding: 0.9rem 1.9rem; font-size: 1.01rem; }

/* ---------- cabecera ---------- */

.cd-top {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(12px);
  border-top: 3px solid var(--v-oro);
  border-bottom: 1px solid var(--v-linea);
}
.cd-top__in {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  height: calc(var(--v-top) - 3px);
  width: min(100% - 2 * var(--v-lado), var(--v-max));
  margin-inline: auto;
}

.cd-logo { display: inline-flex; flex-direction: column; flex-shrink: 0; color: var(--v-cafe); line-height: 1; text-decoration: none; }
.cd-logo__a { font-family: var(--v-serif); font-size: 1.85rem; font-weight: 700; letter-spacing: 0.01em; }
.cd-logo__b { margin-top: 0.15rem; color: var(--v-oro); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.34em; text-transform: uppercase; }

.cd-nav { margin-left: auto; }
.cd-nav ul { display: flex; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.cd-nav__a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 0.75rem;
  border-radius: 999px;
  color: var(--v-cafe-2);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.cd-nav__a:hover { background: var(--v-arena); color: var(--v-cafe); }
.cd-nav__a[aria-current="true"] { background: var(--v-cafe); color: var(--v-crema); }

.cd-top__cta { min-height: 44px; padding: 0.5rem 1.1rem; font-size: 0.9rem; white-space: nowrap; }
.cd-top__cta::after { display: none; }

.cd-abre {
  display: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0 0.95rem;
  border: 1.5px solid var(--v-linea-2);
  border-radius: 14px;
  background: var(--v-blanco);
  color: var(--v-cafe);
  font-family: var(--v-sans);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}
.cd-abre__i { position: relative; width: 16px; height: 16px; }
.cd-abre__i::before,
.cd-abre__i::after { content: ""; position: absolute; left: 0; width: 16px; height: 6px; border-radius: 2px; border: 2px solid currentColor; }
.cd-abre__i::before { top: 0; }
.cd-abre__i::after { bottom: 0; border-color: var(--v-oro); }

/* panel móvil desplegable */

.cd-hoja {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(43, 33, 24, 0.45);
  animation: cd-aparece 0.2s ease;
}
.cd-hoja[hidden] { display: none; }
@keyframes cd-aparece { from { opacity: 0; } to { opacity: 1; } }
.cd-hoja__in {
  display: flex;
  flex-direction: column;
  max-height: 100dvh;
  padding: 1rem var(--v-lado) 1.4rem;
  overflow-y: auto;
  background: var(--v-crema);
  border-bottom: 3px solid var(--v-oro);
  border-radius: 0 0 26px 26px;
  box-shadow: 0 30px 60px -30px rgba(43, 33, 24, 0.6);
  animation: cd-cae 0.26s ease;
}
@keyframes cd-cae { from { transform: translateY(-40px); } to { transform: none; } }
.cd-hoja__top { display: flex; align-items: center; justify-content: space-between; min-height: 52px; margin-bottom: 0.9rem; }
.cd-hoja__x {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--v-linea-2);
  border-radius: 14px;
  background: var(--v-blanco);
  color: var(--v-cafe);
  cursor: pointer;
}
.cd-hoja__l { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.cd-hoja__a {
  display: grid;
  place-items: center;
  min-height: 60px;
  padding: 0.4rem;
  border-radius: 16px;
  background: var(--v-blanco);
  border: 1px solid var(--v-linea);
  color: var(--v-cafe);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
}
.cd-hoja__a:hover { border-color: var(--v-oro); background: var(--v-oro-fondo); }
.cd-hoja__ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1.1rem; }

/* ---------- portada con arco ---------- */

.cd-portada { padding: clamp(2.2rem, 5vw, 4.2rem) 0 clamp(2.4rem, 5vw, 4rem); }
.cd-portada__rej { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1.8rem, 4vw, 3.6rem); align-items: center; }

.cd-h1 {
  margin: 0 0 1.1rem;
  color: var(--v-cafe);
  font-family: var(--v-serif);
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.7rem);
  font-weight: 700;
  line-height: 1.04;
  text-wrap: balance;
}
.cd-portada__txt p { color: var(--v-cafe-2); }
.cd-portada__btns { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }

.cd-portada__arco { position: relative; margin: 0; padding: 12px; border-radius: 260px 260px 28px 28px; background: linear-gradient(180deg, var(--v-oro-claro), var(--v-oro)); box-shadow: 0 40px 70px -40px rgba(43, 33, 24, 0.7); }
.cd-portada__arco img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 58% 50%; border-radius: 250px 250px 20px 20px; }

/* ---------- secciones ---------- */

.cd-lienzo { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2.2rem, 4vw, 3.4rem); max-width: 920px; padding-bottom: clamp(3rem, 6vw, 5rem); }
.cd-lienzo > * { min-width: 0; }

.cd-sec__cab { margin-bottom: 1.3rem; text-align: center; }
.cd-sec__num {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
  color: var(--v-oro);
  font-family: var(--v-serif);
  font-size: 1.25rem;
  font-weight: 700;
}
.cd-sec__num::before,
.cd-sec__num::after { content: ""; width: 34px; height: 1px; background: var(--v-oro); }
.cd-h2 {
  margin: 0;
  color: var(--v-cafe);
  font-family: var(--v-serif);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  font-weight: 700;
  line-height: 1.12;
  text-wrap: balance;
}

.cd-sec__body {
  padding: clamp(1.3rem, 3vw, 2.2rem);
  background: var(--v-blanco);
  border: 1px solid var(--v-linea);
  border-radius: 26px;
  box-shadow: 0 24px 48px -36px rgba(43, 33, 24, 0.5);
}
.cd-sec__body > :last-child,
.cd-ficha > :last-child { margin-bottom: 0; }

.cd-ficha { margin-top: 1.4rem; padding: 1.2rem 1.3rem; border-radius: 18px; background: linear-gradient(135deg, var(--v-crema), var(--v-marmol)); }
.cd-sec__body > .cd-ficha:first-child { margin-top: 0; }
.cd-h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.7rem;
  color: var(--v-cafe);
  font-family: var(--v-sans);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  font-weight: 800;
  line-height: 1.3;
}
.cd-h3::before { content: ""; flex-shrink: 0; width: 12px; height: 12px; border-radius: 50% 50% 2px 50%; background: var(--v-oro); }

.cd-boton { margin: 1.6rem 0 0.3rem; text-align: center; }

/* tablas */

.cd-tabla {
  margin: 1.1rem 0;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--v-linea-2);
  background: var(--v-blanco);
  -webkit-overflow-scrolling: touch;
}
.cd-tabla table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.cd-tabla--ancha table { min-width: 560px; }
.cd-tabla thead th {
  padding: 0.85rem 1rem;
  background: var(--v-noche);
  color: var(--v-oro-claro);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}
.cd-tabla tbody th,
.cd-tabla tbody td,
.cd-tabla tfoot th,
.cd-tabla tfoot td { padding: 0.72rem 1rem; text-align: left; vertical-align: top; }
.cd-tabla tbody tr + tr > * { border-top: 1px solid var(--v-linea); }
.cd-tabla tbody tr:nth-child(odd) { background: var(--v-crema); }
.cd-tabla tbody th { color: var(--v-cafe); font-weight: 700; }
.cd-tabla tbody tr:hover { background: var(--v-oro-fondo); }
.cd-tabla tfoot { background: var(--v-esmeralda); }
.cd-tabla tfoot th,
.cd-tabla tfoot td { color: var(--v-blanco); font-weight: 800; }

/* listas */

.cd-puntos { display: grid; gap: 0.55rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.cd-puntos li { position: relative; padding-left: 1.7rem; line-height: 1.6; }
.cd-puntos li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0.2rem;
  width: 0.62rem;
  height: 0.62rem;
  border: 2px solid var(--v-oro);
  border-radius: 2px;
  transform: rotate(45deg);
}

.cd-escalon { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.7rem; margin: 0 0 1.1rem; padding: 0; list-style: none; counter-reset: cd-e; }
.cd-escalon li {
  position: relative;
  padding: 2.4rem 1rem 1rem;
  border-radius: 16px;
  background: var(--v-crema);
  border: 1px solid var(--v-linea);
  counter-increment: cd-e;
  font-size: 0.97rem;
  line-height: 1.5;
}
.cd-escalon li::before {
  content: "0" counter(cd-e);
  position: absolute;
  top: 0.7rem;
  left: 1rem;
  color: var(--v-esmeralda);
  font-family: var(--v-serif);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

/* preguntas */

.cd-dud { display: grid; gap: 0.7rem; }
.cd-dud__it { border-radius: 18px; background: var(--v-crema); border: 1px solid var(--v-linea); transition: background-color 0.2s ease; }
.cd-dud__it[open] { background: var(--v-blanco); border-color: var(--v-oro); box-shadow: 0 14px 30px -24px rgba(43, 33, 24, 0.6); }
.cd-dud__s { display: flex; align-items: center; gap: 0.9rem; min-height: 60px; padding: 0.9rem 1.1rem; list-style: none; cursor: pointer; }
.cd-dud__s::-webkit-details-marker { display: none; }
.cd-dud__s::after {
  content: "";
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: 50%;
  background:
    linear-gradient(var(--v-cafe), var(--v-cafe)) center / 12px 2px no-repeat,
    linear-gradient(var(--v-cafe), var(--v-cafe)) center / 2px 12px no-repeat,
    var(--v-oro-fondo);
  transition: transform 0.25s ease;
}
.cd-dud__it[open] .cd-dud__s::after { transform: rotate(45deg); }
.cd-dud__n { flex-shrink: 0; color: var(--v-oro); font-family: var(--v-serif); font-size: 1.2rem; font-weight: 700; }
.cd-dud__q { margin: 0; color: var(--v-cafe); font-size: 1.02rem; font-weight: 700; line-height: 1.4; }
.cd-dud__r { padding: 0 1.1rem 1.1rem calc(1.1rem + 1.6rem + 0.9rem); }
.cd-dud__r p { margin: 0; }

/* ---------- pie ---------- */

.cd-pie { background: var(--v-noche); color: #e9e2d6; }
.cd-pie .cd-logo { color: var(--v-blanco); }
.cd-pie__rej { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 2rem; align-items: start; padding: 2.8rem 0 1.6rem; }
.cd-pie__edad { display: flex; align-items: center; gap: 0.7rem; margin: 1rem 0 0; color: #bfb5a6; font-size: 0.93rem; }
.cd-edad { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--v-oro); color: var(--v-noche); font-size: 0.82rem; font-weight: 800; }
.cd-pie__nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.1rem 1.4rem; margin: 0; padding: 0; list-style: none; }
.cd-pie__nav a { display: inline-block; padding: 0.4rem 0; color: #e9e2d6; font-weight: 600; text-decoration: none; }
.cd-pie__nav a:hover { color: var(--v-oro-claro); }
.cd-pie__btns { display: grid; gap: 0.7rem; }
.cd-pie .cd-btn--linea { background: transparent; color: var(--v-oro-claro); }
.cd-pie .cd-btn--linea:hover { background: var(--v-oro); color: var(--v-noche); }
.cd-pie__copy { margin: 0; padding: 1rem 0 1.6rem; border-top: 1px solid rgba(216, 178, 106, 0.22); color: #bfb5a6; font-size: 0.88rem; }

.cd-volver {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: var(--v-cafe);
  color: var(--v-oro-claro);
  box-shadow: 0 12px 24px -12px rgba(43, 33, 24, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.cd-volver.cd-volver--ver { opacity: 1; visibility: visible; }

/* ---------- adaptación ---------- */

@media (max-width: 1160px) {
  .cd-nav { display: none; }
  .cd-abre { display: inline-flex; }
  .cd-top__cta { margin-left: auto; }
}

@media (max-width: 900px) {
  .cd-portada__rej { grid-template-columns: minmax(0, 1fr); }
  .cd-portada__arco { order: -1; max-width: 520px; width: 100%; margin-inline: auto; }
  .cd-portada__arco img { aspect-ratio: 4 / 3; }
  .cd-pie__rej { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  :root { --v-top: 66px; }
  body { font-size: 1rem; }
  .cd-logo__b { display: none; }
  .cd-abre__txt { display: none; }
  .cd-top__cta { padding: 0.5rem 0.85rem; font-size: 0.84rem; }
  .cd-portada__btns .cd-btn,
  .cd-boton .cd-btn { width: 100%; }
  .cd-sec__body { padding: 1.1rem; border-radius: 20px; }
  .cd-ficha { padding: 1rem; }
  .cd-hoja__l { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cd-hoja__ctas { grid-template-columns: minmax(0, 1fr); }
  .cd-dud__r { padding-left: 1.1rem; }
}
