/* ==========================================================================
   Estilos de la Landing Page Principal (/)
   ========================================================================== */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Superior */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-logo {
  width: 64px;
  height: 64px;
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.28);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Botón Sacar un turno */
.btn-book {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.btn-book:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.btn-book:active {
  transform: translateY(0);
}

.btn-book svg {
  width: 17px;
  height: 17px;
}

/* Contenido Principal */
.landing-main {
  flex: 1;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Sección de Descripción */
.landing-hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Carrusel de Fotos */
.carousel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  height: 440px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  user-select: none;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 2rem 1.75rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
  color: #ffffff;
}

.slide-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.slide-caption {
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 600px;
  line-height: 1.45;
}

/* Botones de navegación del carrusel */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-nav-btn:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.06);
  color: var(--primary);
}

.carousel-nav-btn.prev {
  left: 1rem;
}

.carousel-nav-btn.next {
  right: 1rem;
}

.carousel-nav-btn svg {
  width: 22px;
  height: 22px;
}

/* Puntos indicadores del carrusel */
.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.carousel-dot.active {
  background: #ffffff;
  width: 24px;
  border-radius: 6px;
}

/* Footer */
.landing-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-copy {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-calendar-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  transition: all 0.2s ease;
}

.footer-calendar-link:hover {
  background-color: #e0e7ff;
  color: var(--primary-hover);
  transform: translateX(2px);
}

.footer-calendar-link svg {
  width: 16px;
  height: 16px;
}

/* Toast de feedback */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e293b;
  color: #ffffff;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 200;
}

.toast-notice.show {
  opacity: 1;
  transform: translateY(0);
}

/* Botón verde de WhatsApp */
.btn-whatsapp {
  background-color: #25D366;
  color: #ffffff !important;
  border: none;
  border-radius: var(--radius-md, 8px);
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
  line-height: 1;
}

.btn-whatsapp:hover {
  background-color: #1eb956;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
}

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

/* Bloque Central de Ubicación y Contacto en Footer */
.footer-location-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card, #f8fafc);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-color, #e2e8f0);
}

.footer-map-frame-wrap {
  width: 150px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background: #e2e8f0;
}

.footer-map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.footer-location-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-main, #0f172a);
}

.footer-address-row,
.footer-phone-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-loc-icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  min-height: 16px;
  max-height: 16px;
  color: var(--primary, #4f46e5);
  flex-shrink: 0;
}

.footer-phone-row a {
  color: var(--primary, #4f46e5);
  text-decoration: none;
  font-weight: 600;
}

.footer-phone-row a:hover {
  text-decoration: underline;
}

/* ==============================================================================
   Modal de Reserva Pública de Turnos
   ============================================================================== */
.booking-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.booking-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.booking-modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg, 16px);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.3);
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
}

.booking-modal-backdrop.open .booking-modal-card {
  transform: translateY(0) scale(1);
}

.booking-modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.booking-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.booking-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
}

.booking-modal-close:hover {
  color: #ef4444;
  background: #fee2e2;
}

/* Indicador de pasos */
.booking-steps-bar {
  display: flex;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background: #ffffff;
}

.booking-step-tab {
  flex: 1;
  padding: 0.65rem 0.4rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.booking-step-tab.active {
  color: var(--primary, #4f46e5);
  border-bottom-color: var(--primary, #4f46e5);
  background: #f5f3ff;
}

.booking-step-tab.completed {
  color: #10b981;
}

.booking-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

/* Tarjetas de Servicios */
.service-option-card {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.service-option-card:hover {
  border-color: var(--primary, #4f46e5);
  background: #fbfbfe;
  transform: translateY(-1px);
}

.service-option-card.selected {
  border-color: var(--primary, #4f46e5);
  background: #f5f3ff;
  box-shadow: 0 0 0 2px var(--primary, #4f46e5);
}

.service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main, #0f172a);
}

.service-card-duration {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary, #4f46e5);
  background: var(--primary-light, #eef2ff);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full, 9999px);
}

.service-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
}

.service-card-agenda {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.agenda-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Selector de Fecha y Horarios */
.date-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  padding: 0.6rem 0.85rem;
  margin-bottom: 1.25rem;
}

.date-nav-btn {
  background: #ffffff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main, #0f172a);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.date-nav-btn:hover:not(:disabled) {
  border-color: var(--primary, #4f46e5);
  color: var(--primary, #4f46e5);
}

.date-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.date-display-wrap {
  text-align: center;
}

.date-display-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main, #0f172a);
}

.date-display-input-wrap {
  margin-top: 0.2rem;
}

.date-picker-inline {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  font-family: inherit;
  color: var(--text-main, #0f172a);
}

/* Grilla de Horarios Libres */
.slots-container-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main, #0f172a);
  margin-bottom: 0.65rem;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 2px;
}

.slot-chip {
  background: #ffffff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  padding: 0.55rem 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main, #0f172a);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.slot-chip:hover {
  border-color: var(--primary, #4f46e5);
  color: var(--primary, #4f46e5);
  background: #f5f3ff;
}

.slot-chip.selected {
  background: var(--primary, #4f46e5) !important;
  color: #ffffff !important;
  border-color: var(--primary, #4f46e5) !important;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
}

.slots-empty-notice {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
  padding: 0.85rem;
  text-align: center;
  font-size: 0.82rem;
}

/* Formulario Cliente */
.booking-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

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

.booking-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main, #0f172a);
  margin-bottom: 0.3rem;
}

.booking-form-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text-main, #0f172a);
}

.booking-form-input:focus {
  outline: none;
  border-color: var(--primary, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Captcha Box */
.captcha-box-wrapper {
  margin-top: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: #f8fafc;
}

/* Botones de Navegación del Modal */
.booking-modal-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

/* Pantalla de Éxito */
.booking-success-wrap {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.booking-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #10b981;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.booking-summary-box {
  background: #f8fafc;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 1rem;
  text-align: left;
  margin: 1.25rem auto;
  max-width: 420px;
  font-size: 0.85rem;
  line-height: 1.7;
}

/* Responsividad */
@media (max-width: 768px) {
  .landing-header {
    padding: 0.5rem 0.85rem;
    min-height: 56px;
    gap: 0.5rem;
  }
  .brand-group {
    gap: 0.45rem;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
  }
  .brand-logo {
    width: 44px;
    height: 44px;
    max-width: 44px;
    max-height: 44px;
  }
  .brand-name {
    font-size: 0.95rem;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-actions {
    gap: 0.4rem;
    flex-shrink: 0;
  }
  .btn-whatsapp {
    padding: 0.45rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
  }
  .btn-whatsapp-text {
    display: none;
  }
  .btn-book {
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    gap: 0.35rem;
    white-space: nowrap;
    border-radius: var(--radius-md, 8px);
  }
  .btn-book svg {
    width: 15px;
    height: 15px;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .hero-description {
    font-size: 1rem;
  }
  .carousel-viewport {
    height: 320px;
  }
  .slide-overlay {
    padding: 1.5rem 1rem 1.25rem;
  }
  .slide-title {
    font-size: 1.15rem;
  }
  .landing-footer {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    padding: 1.25rem 1rem;
  }
  .footer-location-block {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    text-align: left;
  }
  .footer-map-frame-wrap {
    width: 100%;
    height: 130px;
  }
}

@media (max-width: 380px) {
  .brand-name {
    max-width: 100px;
    font-size: 0.85rem;
  }
  .btn-book {
    padding: 0.45rem 0.55rem;
    font-size: 0.78rem;
  }
}
