/* =========================================
   COMPONENTS — Botones, Topbar, Nav, Cards,
   Features, CTA, Footer (reutilizables)
   Depende de tokens.css y base.css
   ========================================= */

/* ============ BOTONES ============ */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform .12s var(--ease-fast),
              filter .12s var(--ease-fast),
              box-shadow .12s var(--ease-fast),
              background .12s var(--ease-fast);
}
.btn:hover {
  transform: translateY(-1px);
}

.btn--sm    { padding: 10px 12px; font-size: var(--fs-sm); border-radius: var(--radius-sm); }
.btn--lg    { padding: 14px 18px; font-size: var(--fs-lg); }
.btn--block { width: 100%; text-align: center; }

/* Variantes */
.btn.primary {
  background: var(--accent);
  color: #111;
  box-shadow: var(--shadow-lg);
}
.btn.primary:hover { filter: brightness(1.05); }

.btn.dark {
  background: #111;
  color: var(--text-inv);
}
.btn.dark:hover { background: #151515; }

.btn.ghost {
  background: transparent;
  color: var(--text-inv);
  border: 2px solid var(--text-inv);
}
.btn.ghost:hover { background: rgba(255,255,255,.08); }

/* Botón especial del menú */
.btn-sub {
  background: var(--accent);
  color: #111;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.btn-sub:hover { filter: brightness(1.05); }

/* ============ TOPBAR ============ */
.topbar {
  height: 38px;
  background: #fff;
  color: #333;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  font-size: 12px;
  letter-spacing: .2px;
}
.topbar .cta-min {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.topbar .cta-min:hover { background: #fff7cc; }

/* ============ HEADER / NAV ============ */
header {
  position: sticky;
  top: 38px;
  z-index: 40;
  background: var(--brand);
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  padding: 6px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-inv);
  text-decoration: none;
  font-weight: 800;
}
.brand .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.menu {
  display: flex;
  gap: 20px;
  align-items: center;
  color: var(--text-inv);
  flex-wrap: nowrap;
}
.menu a {
  opacity: .95;
  text-decoration: none;
  white-space: nowrap;
}
.menu a:hover { opacity: 1; text-decoration: underline; }

/* ============ HERO (aspecto base) ============ */
.hero {
  background: linear-gradient(180deg, var(--hero-grad-start) 0%, var(--hero-grad-end) 100%);
  color: var(--text-inv);
  border-bottom: 1px solid #1b1b1b;
}
.hero h1 {
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.hero .cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Visual del hero */
.hero-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(1200px 300px at 50% 100%, rgba(255,255,255,.06), rgba(0,0,0,0));
}
.hero-visual img.scene {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 16px 36px rgba(0,0,0,.55));
}

/* ============ FEATURES ============ */
.features {
  background: #fff;
}
.features .feat {
  display: flex;
  gap: var(--gap-md);
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  box-shadow: none;
}
.features .icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: #111; color: var(--text-inv);
  font-size: 18px; flex: 0 0 42px;
  box-shadow: var(--shadow-md);
}
.features h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-family: var(--font-heading);
}
.features p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ============ CARDS (INFO) ============ */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.card h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-family: var(--font-heading);
}
.card p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.card .mini {
  font-size: 12px;
  color: #777;
}
.card .btn.btn--sm { margin-top: 10px; }

/* Variante oscura */
.card.black {
  background: var(--surface-dark);
  color: var(--text-inv);
  border-color: #151515;
}
.card.black h4 { color: var(--text-inv); }
.card.black p  { color: #e6e6e6; }

/* ============ CTA INFERIOR ============ */
.cta-bottom {
  background: var(--brand);
  color: var(--text-inv);
  text-align: center;
  border-top: 4px solid var(--accent);
}
.cta-bottom h3 {
  font-family: var(--font-heading);
}

/* ============ FOOTER ============ */
footer {
  background: #fff;
  color: #555;
  border-top: 1px solid var(--border);
}
footer a {
  color: #333;
  text-decoration: none;
  font-weight: 700;
}
footer a:hover { text-decoration: underline; }

/* ============ RESPONSIVE (Nav y CTA en móvil) ============ */
@media (max-width: 720px) {
  .topbar .cta-min { display: none; }

  .nav-inner {
    gap: 10px;
    flex-wrap: wrap;    /* el menú puede bajar a segunda fila */
    padding: 8px 0;
  }
  .brand { font-size: 14px; }
  .menu {
    width: 100%;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
  }
  .menu a { font-size: 14px; }

  /* El botón de suscripción ocupa toda la fila */
  .menu .btn-sub {
    order: 2;
    width: 100%;
    text-align: center;
    padding: 12px 14px;
  }
}

@media (max-width: 380px) {
  .menu a[href="#beneficios"],
  .menu a[href="#soporte"] {
    display: none; /* oculta links secundarios en pantallas muy chicas */
  }
}

/* =========================================================
   SOPORTE (aislado para no interferir con otras secciones)
   ========================================================= */

/* Contenedor ancho útil dentro del hero de soporte */
.hero .inner.support-wrap { width: 100%; max-width: 1160px; margin: 0 auto; }

/* Grid de soporte: 2 columnas flexibles en desktop, 1 en móvil */
.support-grid {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 28px;
  align-items: start;
}
@media (max-width: 980px) {
  .support-grid { grid-template-columns: 1fr; }
}

/* Evitar herencias del home sobre el texto del hero */
.support-left { max-width: none !important; }

/* Tarjeta del formulario (look app) */
.support-card {
  background: #0b0b0b;
  border: 1px solid #1f1f1f;
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

/* Formulario en grilla 2x, con filas full-width cuando haga falta */
.support-form {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}
.support-form .full { grid-column: 1 / -1; }

/* Contenedores de campos deben permitir que los inputs ocupen todo el ancho */
.support-form > div {
  display: flex;
  flex-direction: column;
  min-width: 0; /* clave para que los inputs no queden “mini” */
}

/* Labels e inputs (look app) */
.support-label { font-weight: 700; font-size: .95rem; color: #f1f1f1; margin-bottom: 6px; display: block; }

.support-card input,
.support-card select,
.support-card textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #2e2e2e;
  background: #0a0a0a;
  color: #f5f5f5;
  transition: border-color .15s, box-shadow .15s, background .15s;
  border-radius: 12px;
  font-size: 16px;
}

.support-input,
.support-select { height: 52px; padding: 0 14px; }

.support-textarea {
  min-height: 150px;
  padding: 12px 14px;
  line-height: 1.4;
  resize: vertical;
}

.support-input::placeholder,
.support-textarea::placeholder { color: #8a8a8a; }

.support-input:focus,
.support-select:focus,
.support-textarea:focus {
  outline: 0;
  border-color: #ffd54f;
  box-shadow: 0 0 0 4px rgba(255,213,79,.14);
  background: #0d0d0d;
}

/* Acciones */
.support-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.support-actions .btn { height: 48px; }

/* Mensajes dentro del card */
.card .alert {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #2b2b2b;
  background: #0f0f0f;
}
.card .alert.success { border-color:#1e3; background:#0b1f0b; color:#c8facc; }
.card .alert.error   { border-color:#c33; background:#1f0b0b; color:#ffd6d6; }

/* Ajustes responsive finos */
@media (max-width: 900px) {
  .support-form { grid-template-columns: 1fr; }
  .support-actions .btn { width: 100%; }
}

/* ====== ANULA reglas de home.css en soporte ====== */

/* Forzamos el contenedor de soporte a comportarse como queremos */
.hero.support-page .inner {
  display: block !important;   /* evita grid heredado de home.css */
  max-width: 1160px;
  margin: 0 auto;
}

/* Nuestro grid propio */
.hero.support-page .support-grid {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 28px;
}
@media (max-width: 980px) {
  .hero.support-page .support-grid {
    grid-template-columns: 1fr !important;
  }
}
