/* =============================================
   TUTORIAL INTERACTIVO CON AVATAR — GRUPOCASAS
   ============================================= */

/* Contenedor Overlay */
.gc-tut-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(5, 15, 35, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.gc-tut-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Tarjeta del Tutorial */
.gc-tut-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  background: #ffffff;
  border-radius: 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 1.6rem 1.5rem 1.1rem;
  transform: scale(0.92) translateY(15px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  overflow-x: hidden;
  color: #1e293b;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.gc-tut-overlay.is-open .gc-tut-card {
  transform: scale(1) translateY(0);
}

/* Botón Cerrar (X) */
.gc-tut-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f8fafc;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.gc-tut-close:hover {
  background: #f1f5f9;
  color: #0f172a;
  transform: scale(1.08);
}

/* Steps Wrapper */
.gc-tut-step {
  display: none;
  animation: gcTutFadeIn 0.3s ease forwards;
}

.gc-tut-step.is-active {
  display: block;
}

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

/* Encabezado con Avatar y Título */
.gc-tut-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.gc-tut-header--intro {
  margin-bottom: 14px;
}

.gc-tut-avatar-col {
  flex: 0 0 95px;
  max-width: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gc-tut-avatar-col--intro {
  flex: 0 0 135px;
  max-width: 135px;
}

.gc-tut-avatar-img {
  width: 100%;
  max-width: 95px;
  max-height: 130px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.12));
  display: block;
}

.gc-tut-avatar-col--intro .gc-tut-avatar-img {
  max-width: 135px;
  max-height: 220px;
}

.gc-tut-title-wrap {
  flex: 1;
  min-width: 0;
  padding-right: 28px;
}

.gc-tut-intro-text {
  flex: 1;
  min-width: 0;
  padding-right: 24px;
}

/* Títulos y Textos */
.gc-tut-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin: 0;
}

.gc-tut-intro-text .gc-tut-title {
  margin-bottom: 0.5rem;
}

.gc-tut-highlight {
  color: #1D428A;
}

.gc-tut-desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.45;
  margin: 0 0 0.6rem 0;
}

.gc-tut-desc strong {
  color: #0f172a;
  font-weight: 700;
}

/* Lista de Servicios / Herramientas (Pasos 2 y 3) */
.gc-tut-features-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0 0 12px 0;
}

.gc-tut-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 8px 12px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.gc-tut-feature-item:hover {
  transform: translateX(3px);
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.gc-tut-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gc-tut-feature-icon--tasador {
  background: rgba(59, 130, 246, 0.15);
  color: #2563EB;
}

.gc-tut-feature-icon--simulador {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.gc-tut-feature-icon--calificador {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
}

.gc-tut-feature-icon--agente {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.gc-tut-feature-icon--subir {
  background: rgba(2, 132, 199, 0.15);
  color: #0284C7;
}

.gc-tut-feature-icon--catalogo {
  background: rgba(249, 115, 22, 0.15);
  color: #EA580C;
}

.gc-tut-feature-text {
  flex: 1;
  min-width: 0;
}

.gc-tut-feature-text h4 {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1px 0;
}

.gc-tut-feature-text p {
  font-size: 0.76rem;
  color: #64748b;
  margin: 0;
  line-height: 1.25;
}

/* Callout 'Todo en un solo lugar' */
.gc-tut-callout {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(126, 177, 214, 0.12) 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 12px;
  text-align: center;
}

.gc-tut-callout-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1D428A;
  margin-bottom: 2px;
}

.gc-tut-callout-desc {
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.3;
  margin: 0;
}

/* Botones de Acción */
.gc-tut-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.gc-tut-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #1D428A 0%, #2563EB 100%);
  color: #ffffff !important;
  border: none;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.gc-tut-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.gc-tut-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #475569 !important;
  border: 1px solid #cbd5e1;
  padding: 0.65rem 1.05rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.gc-tut-btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a !important;
}

/* Footer con Dots, Checkbox y Omitir */
.gc-tut-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gc-tut-checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #64748b;
  cursor: pointer;
  user-select: none;
}

.gc-tut-checkbox-wrap input[type='checkbox'] {
  width: 15px;
  height: 15px;
  accent-color: #1D428A;
  cursor: pointer;
}

.gc-tut-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gc-tut-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gc-tut-dot.is-active {
  width: 20px;
  border-radius: 10px;
  background: #1D428A;
}

.gc-tut-skip {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
  transition: color 0.2s ease;
}

.gc-tut-skip:hover {
  color: #475569;
}

/* Responsivo Móvil */
@media (max-width: 600px) {
  .gc-tut-card {
    padding: 1.25rem 1.1rem 0.85rem;
    border-radius: 22px;
    max-width: 95%;
  }

  .gc-tut-header {
    gap: 10px;
    margin-bottom: 10px;
  }

  .gc-tut-avatar-col {
    flex: 0 0 75px;
    max-width: 75px;
  }

  .gc-tut-avatar-img {
    max-width: 75px;
    max-height: 105px;
  }

  .gc-tut-avatar-col--intro {
    flex: 0 0 100px;
    max-width: 100px;
  }

  .gc-tut-avatar-col--intro .gc-tut-avatar-img {
    max-width: 100px;
    max-height: 160px;
  }

  .gc-tut-title {
    font-size: 1.1rem;
  }

  .gc-tut-desc {
    font-size: 0.84rem;
  }

  .gc-tut-features-list {
    gap: 6px;
    margin-bottom: 10px;
  }

  .gc-tut-feature-item {
    padding: 7px 10px;
    gap: 10px;
    border-radius: 12px;
  }

  .gc-tut-feature-icon {
    width: 32px;
    height: 32px;
  }

  .gc-tut-feature-icon svg {
    width: 18px;
    height: 18px;
  }

  .gc-tut-feature-text h4 {
    font-size: 0.82rem;
  }

  .gc-tut-feature-text p {
    font-size: 0.72rem;
  }

  .gc-tut-callout {
    padding: 6px 10px;
    margin-bottom: 8px;
  }

  .gc-tut-callout-title {
    font-size: 0.8rem;
  }

  .gc-tut-callout-desc {
    font-size: 0.72rem;
  }

  .gc-tut-actions {
    justify-content: flex-end;
    width: 100%;
    margin-top: 6px;
  }

  .gc-tut-btn-primary {
    padding: 0.55rem 1.15rem;
    font-size: 0.84rem;
  }

  .gc-tut-btn-secondary {
    padding: 0.55rem 0.9rem;
    font-size: 0.8rem;
  }

  .gc-tut-footer {
    justify-content: space-between;
    padding-top: 0.65rem;
    margin-top: 0.65rem;
  }
}
