/* =========================
   Variables globales
   ========================= */
:root {
  --edge-gap: 34px; /* margen superior e inferior igualado */
  --logo-h: 34px; /* alto del logo inferior */
  --gap-dock-logo: 12px; /* separación entre dock y logo inferior */
  --text-alpha: 0.89; /* opacidad del texto */
  --presentacion-w-mobile: 95vw;
  --presentacion-w-desktop: 70vw;
  --v-gap-mobile: 22px; /* separación vertical en móvil */
  --v-gap-desktop: 32px; /* separación vertical en desktop */
  --logo-llm-h: 42px; /* Lloret más grande que el logo original */
  --logo-growtur-h: 26px; /* Growtur más pequeño que antes */
}

/* =========================
   Base
   ========================= */
html {
  overflow-x: hidden;
}

body {
  background: radial-gradient(
      900px 700px at 50% 15%,
      rgba(108, 75, 255, 0.22),
      transparent 60%
    ),
    radial-gradient(
      700px 500px at 12% 85%,
      rgba(255, 152, 255, 0.12),
      transparent 60%
    ),
    linear-gradient(180deg, #f6f7fb 0%, #edf0f7 48%, #e9edf6 100%);
  font-family: "Inter", sans-serif !important;
  color: #1e293b;
  overflow-x: hidden; /* Previene desbordes horizontales */
}

.glass {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.65),
    rgba(255, 255, 255, 0.45)
  );
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

/* =========================
   Variantes “glass”
   ========================= */
.glass-elevated {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.72),
    rgba(255, 255, 255, 0.55)
  );
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.glass-dock {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.65),
    rgba(255, 255, 255, 0.52)
  );
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* =========================
   Logo-ring
   ========================= */
.logo-ring {
  position: relative;
  border-radius: 9999px;
  padding: 14px;
  background: radial-gradient(
      120% 120% at 30% 20%,
      rgba(108, 75, 255, 0.25),
      transparent 40%
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.75),
      rgba(255, 255, 255, 0.55)
    );
  box-shadow: 0 14px 48px rgba(15, 23, 42, 0.16);
}
.logo-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.logo-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

/* =========================
   Botones / Pills
   ========================= */
.btn-primary {
  background: linear-gradient(180deg, #6c4bff, #5538e6);
  color: #fff;
  box-shadow: 0 8px 18px rgba(108, 75, 255, 0.35);
}
.btn-primary:active {
  transform: translateY(1px);
}

.brand-pill {
  background: linear-gradient(180deg, #ff55c8, #ff2aa4);
  color: #fff;
  font-weight: 700;
  border-radius: 9999px;
  padding: 6px 12px;
  font-size: 12px;
  box-shadow: 0 8px 18px rgba(255, 42, 164, 0.35);
}

.bubble {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  border-radius: 16px;
}

.btn-quick {
  background: #ffffff12;
  border: 1px solid #00000014;
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px #00000014, inset 0 1px 0 #ffffff12;
}
.btn-quick:hover {
  transform: scale(1.02);
}

.btn-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  min-width: 44px;
  height: 40px;
  border-radius: 31.141px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04),
    inset 6.435px 6.435px 1.073px -7.508px rgba(255, 255, 255, 0.5),
    inset 4.29px 4.29px 2.145px -4.29px #b3b3b3,
    inset -4.29px -4.29px 2.145px -4.29px #b3b3b3, inset 0 0 0 0.916px #999,
    inset 0 0 47.191px 0 rgba(242, 242, 242, 0.5);
  backdrop-filter: blur(12.870361328125px);
  -webkit-backdrop-filter: blur(12.870361328125px);
  color: #6c4bff;
  font-weight: 600;
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-send:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08),
    inset 6.435px 6.435px 1.073px -7.508px rgba(255, 255, 255, 0.6);
  transform: scale(1.02);
}
.btn-send:active {
  transform: scale(0.97);
}
.btn-send svg {
  display: block;
  fill: currentColor;
  width: 18px;
  height: 18px;
}

/* Estado de carga del botón Enviar */
.btn-send.is-loading {
  opacity: 0.8;
  cursor: default;
  pointer-events: none; /* evita clicks extra */
}

/* Spinner minimalista a la derecha del texto */
.btn-send.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border-radius: 999px;
  border: 2px solid rgba(108, 75, 255, 0.18);
  border-top-color: #6c4bff; /* color de marca */
  animation: btn-send-spin 0.7s linear infinite;
}

/* Animación de giro del spinner */
@keyframes btn-send-spin {
  to {
    transform: rotate(360deg);
  }
}

.qa-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
}
.qa-icon,
.dock-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.qa-icon svg,
.dock-icon svg {
  display: block;
  stroke: #757575;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qa-text {
  color: #6c4bff;
  font-weight: 600;
}

.dock-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
}

.btn-mic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08),
    inset 2px 2px 3px rgba(255, 255, 255, 0.4),
    inset -2px -2px 3px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-mic:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1),
    inset 2px 2px 3px rgba(255, 255, 255, 0.5);
}
.btn-mic svg {
  width: 18px;
  height: 18px;
  stroke: #757575;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================
   Underlay (overlay de foto)
   ========================= */
.ui-underlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  display: grid;
  place-items: start center;
}
/*
.ui-underlay::before {
  content: "";
  width: 100vw !important; 

  aspect-ratio: 9 / 16;
  background: url("./resources/Overlay.png") center / cover no-repeat;
  opacity: 1;
  filter: blur(6px) brightness(1.12) saturate(1.12);
  border-radius: 28px;
  -webkit-mask-image: radial-gradient(
    120% 90% at 50% 18%,
    #000 65%,
    transparent 100%
  );
  mask-image: radial-gradient(120% 90% at 50% 18%, #000 65%, transparent 100%);
}
*/
.ui-underlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.ui-underlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("./resources/fondo_castillo.jpeg") center / cover no-repeat;

  /* evita “softening” en algunos dispositivos */
  image-rendering: auto;
  transform: translateZ(0);
}
/* 📱 MÓVIL: desplazamos el encuadre hacia la izquierda */
@media (max-width: 768px) {
  .ui-underlay::before {
    background-position: 65% center;
  }
}

/* =========================
   Logo “by Growtur”
   ========================= */
.logo-growturclear {
  position: relative;
  margin-top: 50px;
}

/* =========================
   Barra inferior
   ========================= */
.bar-tools {
  position: relative;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding-inline: clamp(1rem, 3vw, 1.25rem);
  z-index: 40;
  margin-bottom: var(--gap-dock-logo);
}

/* Barra inferior: ancho fluido */
.bar-tools {
  width: 95vw;
  margin-left: auto;
  margin-right: auto;
}

.bar-tools .glass-dock {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  max-width: none !important; /* anula max-w-sm del HTML */
  margin-left: auto;
  margin-right: auto;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}

@media (min-width: 1024px) {
  .bar-tools {
    width: 70vw;
  }
}

.bar-tools .glass-dock .dock-item {
  justify-content: flex-start;
  padding-left: 0;
  padding-right: 0;
}

/* =========================
   Chat / Tipografía / Inputs
   ========================= */
#chatContainer {
  max-height: 48vh;
  max-width: 90vh;
}
@media (min-width: 640px) {
  #chatContainer {
    max-height: 56vh;
  }
}
@media (min-width: 1024px) {
  #chatContainer {
    max-height: 60vh;
  }
}

h1 {
  font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem);
}
p {
  font-size: clamp(0.9rem, 1vw + 0.6rem, 1rem);
}

.chat-input-box {
  padding: 1.75rem 1.25rem;
}
@media (min-width: 640px) {
  .chat-input-box {
    padding: 2rem 1.5rem;
  }
}

.chat-input-box #userInput {
  height: auto !important; /* deja que el JS lo controle */
  min-height: 40px; /* más bajo de inicio */
  max-height: 120px; /* opcional: que no crezca infinito */
  padding-block: 8px; /* menos “aire” vertical */
  font-size: 15px;
  line-height: 1.4;
}

@media (min-width: 640px) {
  .chat-input-box #userInput {
    min-height: 44px; /* un pelín más en desktop */
    max-height: 140px; /* opcional */
    font-size: 16px;
  }
}

/* =========================
   Layout principal
   ========================= */
main {
  position: relative;
  min-height: 100vh;
  padding-top: var(--edge-gap);
  padding-bottom: calc(var(--edge-gap) + var(--logo-h) + var(--gap-dock-logo));
  padding-left: 0;
  padding-right: 0;
}

/* Párrafo introductorio: logo-ring + h1 + p (no toca otros <p>) */

@media (min-width: 1280px) {
  .logo-ring + h1 + p {
    max-width: 56rem; /* ~896px en pantallas muy grandes */
  }
}

/* Adaptar altura del textarea automáticamente */
#userInput {
  width: 100%;
  white-space: pre-wrap; /* respeta saltos y líneas largas */
  word-wrap: break-word; /* fuerza salto al llegar al 95% */
  overflow-wrap: break-word; /* seguridad extra */
  max-width: 95%; /* límite visual respecto al contenedor */
  resize: none;
}

/* Evitar scroll horizontal dentro del contenedor del chat */
#chatContainer {
  overflow-x: hidden;
}

/* Comportamiento de texto dentro de las burbujas */
.bubble-msg {
  white-space: pre-wrap; /* respeta \n y ajusta líneas */
  overflow-wrap: anywhere; /* rompe palabras muy largas (www..., tokens, etc.) */
  word-break: break-word; /* fallback para navegadores */
  line-height: 1.45;
}

/* === Chat: que haga scroll vertical sí o sí === */
#chatContainer {
  max-height: none !important; /* que crezca según contenido */
  overflow-y: visible !important; /* sin scroll interno */
  overscroll-behavior: auto !important; /* devolvemos el comportamiento normal */
}

/* Scrollbar discreto y moderno */
#chatContainer::-webkit-scrollbar {
  width: 6px;
}
#chatContainer::-webkit-scrollbar-track {
  background: transparent;
}
#chatContainer::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 3px;
}
#chatContainer:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.38);
}
/* Firefox */
#chatContainer {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

/* === Burbujas: no permitir que el flex las encoja y no recortarlas === */
.bubble-msg {
  flex: 0 0 auto; /* evita que se encojan en flex */
  overflow: visible !important; /* vence al overflow-hidden de Tailwind */
}

/* === Override global del color de texto contra utilidades Tailwind === */
:where(body) {
  color: rgba(0, 0, 0, var(--text-alpha)) !important;
}

/* Fuerza el color en elementos que suelen llevar utilidades Tailwind de color */
:where(body)
  :is(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    span,
    a,
    li,
    small,
    strong,
    em,
    blockquote,
    label,
    button,
    input,
    textarea
  ) {
  color: rgba(0, 0, 0, 0.8) !important;
}

/* Excepciones necesarias para mantener la UI correcta */
.bubble-msg.self-end {
  /* burbuja del usuario (fondo morado) */
  color: #fff !important;
}
.bubble-msg.self-start {
  /* burbuja del bot (fondo blanco) */
  color: rgba(0, 0, 0, var(--text-alpha)) !important;
}

/* Forzar ancho y justificado en el texto de presentación */
p.texto-presentacion {
  width: var(--presentacion-w-mobile);
  max-width: none;
  text-align: justify;
  text-justify: inter-word;
  hyphens: none; /* sin guiones automáticos */
  overflow-wrap: normal; /* no forzar cortes raros */
  word-break: normal; /* respeta palabras completas */
  line-height: 1.6;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400; /* mantenemos tu ajuste, sin !important */
}

@media (min-width: 1024px) {
  p.texto-presentacion {
    width: var(--presentacion-w-desktop);
  }
}
.qa-text {
  color: rgba(0, 0, 0, var(--text-alpha)) !important; /* negro no intenso */
  font-weight: 400 !important; /* adelgazar (antes 600) */
}

/* === Tipografía global unificada (misma que el textarea) === */
:where(body),
:where(body)
  :is(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    span,
    a,
    li,
    small,
    strong,
    em,
    blockquote,
    label,
    button,
    input,
    textarea
  ) {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 15px; /* mismo tamaño base que el textarea */
  line-height: 1.6;
}

/* === Quick actions: texto con ancho proporcional al de .texto-presentacion === */
.qa-btn .qa-text {
  display: block;
  width: calc(var(--presentacion-w-mobile) * 0.9); /* ≈ 85.5vw en móvil */
  max-width: 100%; /* por si el grid limita */
}

@media (min-width: 1024px) {
  .qa-btn {
    width: 70%;
    margin-left: auto;
    margin-right: auto;
  }
}

.iniciadores-rapidos {
  gap: 4% !important;
  width: 65%;
}

/* Chat: ancho fluido según viewport, anulando max-w-* de Tailwind */
#chatContainer,
.chat-input-box {
  width: 95vw;
  max-width: none !important; /* anula max-w-sm del HTML */
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  #chatContainer,
  .chat-input-box {
    width: 70vw;
  }
}

/* ====== Mobile/Tablet (≤1023px): centrar y anchos pedidos ====== */
@media (max-width: 1023.98px) {
  /* Elimina padding lateral del body y main */
  body,
  main {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Texto de presentación: 98vw y centrado */
  p.texto-presentacion {
    box-sizing: border-box;
    width: 94%;
    max-width: 98vw;
    margin-left: auto;
    margin-right: auto;
  }

  /* Quick actions (opcional para mantener alineación visual) */
  .iniciadores-rapidos {
    box-sizing: border-box;
    width: 90%;
    max-width: 98vw;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: repeat(2, 1fr);
    column-gap: clamp(6px, 2vw, 14px);
  }
  .iniciadores-rapidos .btn-quick {
    width: 94%;
    min-width: 0;
    margin-left: 3%;
  }
  .qa-btn .qa-text {
    display: block;
    width: 94%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Chat: contenedor y caja de entrada a 98vw y centrados */
  #chatContainer,
  .chat-input-box {
    box-sizing: border-box;
    width: 94% !important;
    max-width: 100vw !important; /* ← 98% del viewport sin desbordar paddings */
    margin-left: auto;
    margin-right: auto;
  }

  .bar-tools {
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    margin-left: auto;
    margin-right: auto;
  }
  .bar-tools .glass-dock {
    max-width: none !important; /* pisa max-w-sm del HTML */
    width: 100%;
    text-size-adjust: 75%;
  }
}

/* Ajuste fino para mobile: menos tamaño e interlineado */
@media (max-width: 640px) {
  p.texto-presentacion {
    font-size: 14px;
    line-height: 1.4;
  }
  p.texto-presentacion .texto-presentacion-strong {
    font-size: 13.5px;
    line-height: 1.4;
  }
}

/* ===== Desktop (≥1024px): acercar iniciadores sin afectar móvil ===== */
@media (min-width: 1024px) {
  .iniciadores-rapidos {
    /* usa px en lugar de % para un control fino */
    column-gap: 10px !important;
    row-gap: 10px !important;

    /* opcional: compactar y centrar el bloque en desktop */
    width: min(640px, 70vw) !important;
    margin-left: auto;
    margin-right: auto;
  }
}

/* === PATCH DESKTOP: chat más alto y chat = input en ancho (más ancho) === */
@media (min-width: 1024px) {
  /* Más altura para que quepan más burbujas sin cortarse */
  /*
  #chatContainer {
    max-height: 72vh !important; /* antes ~60vh */
  /* overflow-y: auto !important; /* mantenemos scroll interno del chat */
  /*}*/

  /* Chat e input con el MISMO ancho, más grande en desktop */
  #chatContainer,
  .chat-input-box {
    width: 85vw !important; /* antes 70vw en tu CSS */
    max-width: none !important; /* neutraliza max-w-sm del HTML */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box; /* evita desbordes por padding/border */
  }
}

.iniciadores-rapidos {
  grid-template-columns: 1fr !important;
  justify-items: center;
}

/* Botón más pequeño y centrado */
.iniciadores-rapidos .btn-quick {
  width: 100%;
  max-width: 260px; /* tamaño máximo del botón */
  margin: 0 auto;
  padding-block: 9px;
  padding-inline: 14px;
  border-radius: 16px;
}

/* Móvil (≤640px): un pelín más compacto */
@media (max-width: 640px) {
  .iniciadores-rapidos .btn-quick {
    max-width: 220px;
    padding-block: 8px;
    padding-inline: 12px;
    font-size: 13px;
  }
  .btn-quick {
    /*hacemos mas ancho para que quepa en la misma línea en móvil*/
    max-width: 95% !important;
  }
}

/* Desktop (≥1024px): algo más ancho pero sin ocupar todo */
@media (min-width: 1024px) {
  .iniciadores-rapidos .btn-quick {
    max-width: 280px;
    padding-block: 10px;
    padding-inline: 16px;
    font-size: 14px;
  }
  .btn-quick {
    width: 100% !important;
  }
}

.waving-hand-style {
  margin-left: 0.5rem !important;
}

.iniciador-texto {
  margin-left: 0.5rem;
}

.waving-hand-style,
.iniciador-texto {
  margin-left: 0 !important; /* eliminar márgenes que rompen el centrado */
}

.qa-btn {
  display: flex;
  align-items: center;
  justify-content: center; /* centrado total */
  gap: 0.5rem; /* separación entre icono y texto */
}
/* Quick action: texto sin ocupar todo el ancho del botón */
.qa-btn .qa-text {
  width: auto !important; /* que se ajuste al contenido */
  display: inline-block; /* no llenar toda la fila */
  text-align: left; /* o center si lo prefieres */
}

.qa-text {
  margin-left: 0.7rem !important;
}

.waving-hand-style {
  margin-right: 2rem !important;
}

/* Cuando empieza la conversación, expandimos el chat */
.chat-expanded {
  max-height: 72vh !important;
}

/* === RITMO VERTICAL UNIFORME === */

/* Texto presentación → botón iniciador */
.texto-presentacion {
  margin-bottom: var(--v-gap-mobile) !important;
}

/* Botón iniciador → chatContainer */
.iniciadores-rapidos {
  margin-bottom: var(--v-gap-mobile) !important;
}

/* chatContainer → input area */
#chatContainer {
  margin-bottom: var(--v-gap-mobile) !important;
  margin-top: var(--v-gap-mobile) !important;
}

/* Estado expandido (después del primer mensaje) */
#chatContainer.chat-expanded {
  margin-top: var(--v-gap-mobile) !important;
  margin-bottom: var(--v-gap-mobile) !important;
}

/* Desktop */
@media (min-width: 1024px) {
  .texto-presentacion {
    margin-bottom: var(--v-gap-desktop) !important;
  }
  .iniciadores-rapidos {
    margin-bottom: var(--v-gap-desktop) !important;
  }
  #chatContainer,
  #chatContainer.chat-expanded {
    margin-top: var(--v-gap-desktop) !important;
    margin-bottom: var(--v-gap-desktop) !important;
  }
  .btn-quick {
    max-width: 55% !important;
  }
}

/* === Hover & Active para dock-item (estilo igual a .btn-quick) === */
.dock-item {
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

/* Hover: ligera elevación + brillo */
.dock-item:hover {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Active: pequeño hundimiento */
.dock-item:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.45);
}

.logo-growturclear {
  position: relative;

  /* ✅ Calculamos el bottom para conservar EXACTAMENTE
     la misma distancia entre bottom-bar y el PRIMER logo
     que había con un solo logo */
  bottom: calc(
    var(--edge-gap) + var(--logo-h) -
      (var(--logo-llm-h) + var(--gap-dock-logo) + var(--logo-growtur-h))
  );

  display: flex;
  flex-direction: column; /* apilar uno sobre otro */
  justify-content: center;
  align-items: center;
  gap: var(
    --gap-dock-logo
  ); /* mismo gap: bottom-bar ↔ Lloret y Lloret ↔ Growtur */
  opacity: 0.9;
  z-index: 50;
}

.logo-growturclear {
  gap: 2.5rem; /* o el valor que quieras */
}

/* NUEVO: tamaños distintos para cada logo */
.logo-llm {
  width: 14rem;
  height: auto;
  margin-top: 5px !important;
}

.logo-growtur {
  width: 7rem !important;
  height: auto;
  margin-left: 1.7rem;
}

.logo-growturclear {
  margin-top: 1rem;
}

/* Mantener comportamiento en móvil */
@media (max-width: 1023.98px) {
  /* Ajuste: dock más compacto y alineado a la izquierda */
  .bar-tools .glass-dock {
    display: flex; /* anula el grid del HTML */
    justify-content: space-evenly;
    align-items: center;
    gap: 0;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    max-width: none !important;
  }

  /* Botones más pequeños */
  .bar-tools .glass-dock .dock-item {
    padding: 6px 0; /* más compactos */
    border-radius: 10px;
    gap: 6px;
    justify-content: flex-start; /* icono + texto alineados a la izquierda */
    min-width: 0;
  }

  /* Iconos más pequeños para ahorrar espacio */
  .bar-tools .glass-dock .dock-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
  }

  /* Texto del botón más compacto */
  .bar-tools .glass-dock .dock-item > span:last-child {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0;
  }
}

/* =========================
   1 solo iniciador rápido (centrado)
   ========================= */

@media (min-width: 1024px) {
  .iniciadores-rapidos {
    display: grid;
    grid-template-columns: 1fr !important; /* Solo 1 columna */
    justify-items: center; /* Centrado perfecto */
    column-gap: 0;
  }

  /* Botón único más ancho en desktop */
  .iniciadores-rapidos .btn-quick {
    width: 100%;
    max-width: 420px !important; /* ← 🔥 Ajusta aquí el ancho deseado (320→420→480...) */
    padding-block: 14px; /* opcional: más alto */
    padding-inline: 20px; /* opcional: más ancho interior */
    justify-self: center;
  }
}

/* ==========================================================
   OVERRIDE FINAL – Iniciadores rápidos
   Móvil: 1 por fila
   Desktop: 3 en una sola fila
   ========================================================== */

.iniciadores-rapidos {
  display: grid !important;
  grid-template-columns: 1fr !important; /* móvil */
  gap: 12px !important;
}

/* Desktop */
@media (min-width: 1024px) {
  .iniciadores-rapidos {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;

    /* ancho responsive */
    width: min(912px, 92vw) !important;

    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Asegura que cada botón ocupe su columna */
.iniciadores-rapidos .btn-quick {
  width: 100% !important;
  max-width: none !important;
}

/* === Ritmo vertical uniforme: Hola → párrafo === */

/* Quitamos el margen superior del párrafo */
.texto-presentacion {
  margin-top: 0 !important;
}

/* Aplicamos el mismo gap que el resto al título */
h1 + .texto-presentacion {
  margin-top: var(--v-gap-mobile) !important;
}

/* Desktop */
@media (min-width: 1024px) {
  h1 + .texto-presentacion {
    margin-top: var(--v-gap-desktop) !important;
  }
}

/* === Alinear iniciadores desde el mismo margen izquierdo === */

.iniciadores-rapidos .btn-quick {
  justify-content: flex-start !important; /* alineación izquierda */
}

.iniciadores-rapidos .qa-btn {
  justify-content: flex-start !important; /* icono + texto a la izquierda */
}

/* El texto empieza siempre desde el mismo punto */
.iniciadores-rapidos .qa-text {
  margin-left: 0.75rem !important; /* separación fija y consistente */
  text-align: left !important;
}

/*GIF*/

/* PATCH: avatar en vídeo como gif */

.logo-ring video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
*/
/* PATCH: avatar video */
.logo-ring video {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: 90% 80% !important;
}
