/* Nutri Delfi · Reserva de turno (reserva.php) y páginas internas. Paleta y tipografías del inicio. */

.nd-interna { background: #fff; }

/* Encabezado de página interna */
.nd-page-hero {
  position: relative; overflow: hidden; text-align: left;
  padding: calc(76px + clamp(40px, 6vw, 76px)) 24px clamp(52px, 6vw, 80px);
  background:
    linear-gradient(90deg, rgba(248, 244, 240, .96) 0%, rgba(248, 244, 240, .88) 45%, rgba(248, 244, 240, .55) 100%),
    url('../images/opt/hero-1536.webp') center 40% / cover no-repeat;
}
.nd-page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 56px;
  background: #fff; border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.nd-page-hero-in { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; }
.nd-page-hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500;
  font-size: clamp(2.6rem, 5.4vw, 4rem); line-height: 1.02; color: #3f3330; margin: 0 0 12px;
}
.nd-page-hero h1 em, .nd-success h2 em { font-style: italic; color: #518951; }
.nd-page-hero p { font-family: 'Poppins', sans-serif; font-weight: 300; font-size: 1.05rem; line-height: 1.7; color: #5e4a44; margin: 0; max-width: 520px; }

/* Estructura */
.nd-booking {
  max-width: 1100px; margin: 0 auto; padding: 0 24px 110px;
  font-family: 'Poppins', sans-serif; color: #3f3330; text-align: left;
}
.nd-bk-who {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: #f8f4f0; border-radius: 20px; padding: 14px 20px; margin-bottom: 24px;
}
.nd-bk-who img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.nd-bk-who strong { display: block; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.35rem; font-weight: 600; line-height: 1.1; }
.nd-bk-who span { font-size: .85rem; color: #6f5a52; }
.nd-bk-who .nd-link-flecha { margin-left: auto; font-size: .9rem; }

/* Pasos */
.nd-steps { list-style: none; padding: 0; margin: 0 0 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.nd-steps li {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px;
  background: #f8f4f0; color: #8a716a; font-size: .88rem; font-weight: 500;
}
.nd-steps li span {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #fff; font-size: .8rem; font-weight: 600;
}
.nd-steps li[aria-current="step"] { background: #518951; color: #fff; }
.nd-steps li[aria-current="step"] span { color: #518951; }
.nd-steps li.done { background: #eef5ec; color: #518951; }
.nd-steps li.done span { background: #70ad70; color: #fff; }

/* Paneles */
.nd-panel {
  background: #fff; border: 1px solid #f0e8e1; border-radius: 24px;
  padding: clamp(22px, 4vw, 36px); box-shadow: 0 12px 34px rgba(90, 70, 60, .07);
}
.nd-panel[hidden] { display: none; }
.nd-panel h2 {
  font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.3rem); color: #3f3330; margin: 0 0 20px;
}

/* Avisos y carga */
.nd-loading { display: flex; align-items: center; gap: 12px; padding: 24px 0; color: #6f5a52; }
.nd-spinner {
  width: 22px; height: 22px; border-radius: 50%; border: 3px solid #e3ede0; border-top-color: #518951;
  animation: nd-giro .8s linear infinite;
}
@keyframes nd-giro { to { transform: rotate(360deg); } }
.nd-notice { border-radius: 14px; padding: 14px 18px; margin: 0 0 18px; font-size: .95rem; line-height: 1.55; }
.nd-notice a { color: inherit; font-weight: 600; }
.nd-notice-info { background: #f8f4f0; color: #5e4a44; }
.nd-notice-ok { background: #eef5ec; color: #2f5a2f; }
.nd-notice-warn { background: #fdf3e6; color: #6b4a1c; }
.nd-notice-error { background: #fbecea; color: #7a2e26; }

/* Agenda: calendario + horarios */
.nd-agenda { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: clamp(24px, 4vw, 44px); align-items: start; }
.nd-cal { background: #f8f4f0; border-radius: 20px; padding: 18px; }
.nd-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.nd-cal-head strong { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.4rem; font-weight: 600; text-transform: capitalize; }
.nd-cal-nav {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: #518951;
  font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.nd-cal-nav:disabled { opacity: .35; cursor: default; }
.nd-cal-week, .nd-cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.nd-cal-week span { font-size: .72rem; font-weight: 600; letter-spacing: .06em; color: #8a716a; padding: 4px 0; }
.nd-day {
  aspect-ratio: 1; border: 0; border-radius: 12px; background: transparent;
  font-family: 'Poppins', sans-serif; font-size: .9rem; color: #c3b6ad; cursor: default;
}
.nd-day.has { background: #fff; color: #3f3330; font-weight: 500; cursor: pointer; box-shadow: inset 0 0 0 1.5px #cfe3cb; }
.nd-day.has:hover { box-shadow: inset 0 0 0 2px #70ad70; }
.nd-day.today { text-decoration: underline; text-underline-offset: 3px; }
.nd-day.sel { background: #518951; color: #fff; box-shadow: none; }
.nd-cal-legend { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: .8rem; color: #6f5a52; }
.nd-cal-legend span { width: 14px; height: 14px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1.5px #cfe3cb; }

.nd-slots h3 {
  font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: 1.6rem;
  margin: 4px 0 2px; text-transform: none;
}
.nd-slots h3::first-letter { text-transform: uppercase; }
.nd-slots > p { font-size: .88rem; color: #6f5a52; margin: 0 0 16px; }
.nd-slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.nd-slot {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1.5px solid #cfe3cb; background: #fff; border-radius: 14px; padding: 12px 8px;
  font-family: 'Poppins', sans-serif; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
}
.nd-slot strong { font-size: 1.05rem; font-weight: 600; color: #3f3330; }
.nd-slot small { font-size: .72rem; color: #6f5a52; }
.nd-slot:hover:not(:disabled) { border-color: #518951; background: #eef5ec; }
.nd-slot:disabled { opacity: .55; cursor: wait; }
.nd-slot.is-loading { background: #518951; border-color: #518951; }
.nd-slot.is-loading strong, .nd-slot.is-loading small { color: #fff; }

/* Paso 2: resumen + temporizador + formulario */
.nd-resumen {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 16px;
  background: #f8f4f0; border-radius: 18px; padding: 16px 20px;
}
.nd-resumen dt { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #8a716a; }
.nd-resumen dd { margin: 4px 0 0; font-weight: 500; }
.nd-resumen dd span { font-weight: 300; font-size: .85rem; color: #6f5a52; }
.nd-resumen dd::first-letter { text-transform: uppercase; }
.nd-timer { font-size: .9rem; color: #5e4a44; background: #eef5ec; border-radius: 12px; padding: 10px 14px; margin: 0 0 22px; }
.nd-timer strong { color: #2f5a2f; font-variant-numeric: tabular-nums; }
.nd-timer.is-low { background: #fdf3e6; }
.nd-timer.is-low strong { color: #a5641a; }

.nd-form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
.nd-field label { display: block; font-size: .88rem; font-weight: 500; color: #3f3330; margin: 0 0 6px; }
.nd-field label span[aria-hidden] { color: #c0513f; }
.nd-opt { font-weight: 300; color: #8a716a; }
.nd-field input, .nd-field select {
  width: 100%; box-sizing: border-box; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid #e3d8ce; border-radius: 12px; background: #fff;
  font-family: 'Poppins', sans-serif; font-size: 1rem; color: #3f3330;
}
.nd-field input:focus, .nd-field select:focus { outline: none; border-color: #70ad70; box-shadow: 0 0 0 4px rgba(112, 173, 112, .18); }
.nd-field input[aria-invalid="true"] { border-color: #c0513f; }
.nd-help { font-size: .78rem; color: #8a716a; margin: 5px 0 0; }
.nd-field-error { font-size: .8rem; color: #b0412f; margin: 5px 0 10px; min-height: 1em; }
.nd-form-note { grid-column: 1 / -1; font-size: .8rem; color: #8a716a; margin: 4px 0 0; }
.nd-form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 10px; }
.nd-form-actions.nd-center { justify-content: center; }
.nd-form > .nd-notice { grid-column: 1 / -1; }
.nd-booking .nd-btn { cursor: pointer; border: 0; }
.nd-booking .nd-btn-borde { border: 2px solid #70ad70; }
.nd-booking .nd-btn:disabled { opacity: .7; cursor: wait; }

/* Paso 3: confirmación */
.nd-success { text-align: center; }
.nd-success:focus { outline: none; }
.nd-success-icon {
  width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: #eef5ec; color: #518951;
}
.nd-success .nd-resumen { text-align: left; max-width: 640px; margin: 0 auto 16px; }
.nd-success p { color: #5e4a44; }

@media (max-width: 860px) {
  .nd-agenda { grid-template-columns: 1fr; }
  .nd-cal { max-width: 420px; }
}
@media (max-width: 640px) {
  .nd-page-hero { text-align: center; }
  .nd-page-hero p { margin: 0 auto; }
  .nd-page-hero .nd-eyebrow::before { display: none; }
  .nd-bk-who .nd-link-flecha { margin-left: 0; }
  .nd-form { grid-template-columns: 1fr; }
  .nd-resumen { grid-template-columns: 1fr; }
  .nd-form-actions { flex-direction: column-reverse; }
  .nd-form-actions .nd-btn { width: 100%; max-width: none; }
  .nd-steps li { font-size: .78rem; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) { .nd-spinner { animation-duration: 2s; } }

.nd-booking .nd-btn-verde, .nd-booking .nd-btn-verde:hover { color: #fff; }
.nd-booking .nd-btn-borde { background: #fff; color: #518951; }

/* ================================================================
   Mis turnos (consultar.php)
   ================================================================ */
.nd-mis-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.nd-dni label { display: block; font-weight: 500; font-size: .95rem; margin-bottom: 10px; }
.nd-dni-row { display: flex; flex-wrap: wrap; gap: 10px; }
.nd-dni-row input {
  flex: 1 1 220px; min-height: 54px; padding: 10px 18px; box-sizing: border-box;
  font-family: 'Poppins', sans-serif; font-size: 1.15rem; font-weight: 500; letter-spacing: .05em; color: #3f3330;
  border: 1.5px solid #e3d8ce; border-radius: 14px; background: #fff;
}
.nd-dni-row input:focus { outline: none; border-color: #70ad70; box-shadow: 0 0 0 4px rgba(112, 173, 112, .18); }
.nd-dni-row input[aria-invalid="true"] { border-color: #c0513f; }
.nd-dni .nd-help { margin-top: 10px; }
.nd-results { margin-top: 24px; }
.nd-results:focus { outline: none; }
.nd-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.nd-results-head h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 1.9rem; margin: 0; }
.nd-results-head h2 em { font-style: italic; color: #518951; }
.nd-results-head span { color: #8a716a; font-size: .88rem; }
.nd-turnos { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.nd-turno {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  padding: 16px 18px; background: #fff; border: 1px solid #f0e8e1; border-left: 4px solid #70ad70; border-radius: 18px;
  box-shadow: 0 6px 18px rgba(90, 70, 60, .05);
}
.nd-turno-date { width: 68px; padding: 8px 0; text-align: center; border-radius: 14px; background: #f8f4f0; line-height: 1.05; }
.nd-turno-date strong { display: block; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.9rem; font-weight: 600; color: #3f3330; font-variant-numeric: lining-nums; }
.nd-turno-date span { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: #518951; }
.nd-turno-info h3 { font-family: 'Poppins', sans-serif; font-size: 1.02rem; font-weight: 500; margin: 0 0 2px; }
.nd-turno-info h3::first-letter { text-transform: uppercase; }
.nd-turno-info p { margin: 0; font-size: .9rem; color: #6f5a52; font-weight: 300; }
.nd-results > .nd-btn { margin-top: 4px; }

.nd-aside { display: grid; gap: 16px; }
.nd-aside .nd-panel { padding: 24px; }
.nd-aside h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 1.6rem; margin: 0 0 6px; }
.nd-aside h2 em { font-style: italic; color: #518951; }
.nd-aside p { font-size: .92rem; font-weight: 300; color: #5e4a44; margin: 0 0 16px; }
.nd-aside .nd-btn { width: 100%; }
.nd-panel-soft { background: #f8f4f0; border-color: transparent; box-shadow: none; }
.nd-privacy { display: flex; gap: 10px; font-size: .8rem; line-height: 1.5; color: #8a716a; margin: 0; padding: 0 6px; }
.nd-privacy i { color: #518951; margin-top: 3px; }

/* Botones de cancelar */
.nd-booking .nd-btn-rojo-borde, .nd-dialog .nd-btn-rojo-borde { background: #fff; color: #b0412f; border: 2px solid #e7b8af; cursor: pointer; padding: 10px 20px; min-height: 44px; }
.nd-booking .nd-btn-rojo-borde:hover { background: #fbecea; border-color: #c0513f; color: #8f3324; }
.nd-dialog .nd-btn-rojo { background: #b0412f; color: #fff; border: 0; cursor: pointer; }
.nd-dialog .nd-btn-rojo:hover { background: #8f3324; color: #fff; }
.nd-dialog .nd-btn-borde { background: #fff; color: #518951; border: 2px solid #70ad70; cursor: pointer; }

/* Diálogo de confirmación */
.nd-dialog {
  border: 0; border-radius: 24px; padding: 30px; width: min(92vw, 460px); box-sizing: border-box;
  font-family: 'Poppins', sans-serif; color: #3f3330; box-shadow: 0 30px 70px rgba(60, 40, 30, .25);
}
.nd-dialog::backdrop { background: rgba(63, 51, 48, .45); }
.nd-dialog h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 1.9rem; margin: 0 0 14px; }
.nd-dialog p { font-size: .93rem; font-weight: 300; color: #5e4a44; }
.nd-dialog .nd-dlg-turno { background: #f8f4f0; border-radius: 14px; padding: 14px 16px; color: #3f3330; font-weight: 400; }
.nd-dialog .nd-dlg-turno strong { font-weight: 500; display: inline-block; }
.nd-dialog .nd-dlg-turno strong::first-letter { text-transform: uppercase; }
.nd-dialog .nd-form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 20px; }

@media (max-width: 860px) { .nd-mis-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .nd-turno { grid-template-columns: auto 1fr; }
  .nd-turno .nd-btn { grid-column: 1 / -1; width: 100%; max-width: none; }
  .nd-dni-row .nd-btn { width: 100%; max-width: none; }
  .nd-dialog .nd-form-actions { flex-direction: column-reverse; }
  .nd-dialog .nd-btn { width: 100%; max-width: none; }
}
