/**
 * ======================================================
 * ARCHIVO: soluciones-home.css
 * UBICACIÓN: frontend/public/styles/
 * VERSIÓN: 1.2 — CTA marcas HU-04
 * ÚLTIMA ACTUALIZACIÓN: 2026-04-20 19:00
 *
 * 🎯 PROPÓSITO:
 * Sobrescribe el estilo “catálogo oscuro / papelería” del home hacia una
 * línea visual de plataforma (claridad, azul primario de main.css).
 * Debe cargarse después de catalog-home.css y bonos-landing.css.
 *
 * ======================================================
 * 📋 HISTORIAL DE CAMBIOS:
 * ---
 * [1.2] - 2026-04-20 19:00
 * ✅ Texto CTA bajo título marcas (.catalog-marcas-cta) HU-04
 * [1.1] - 2026-04-20 16:30
 * ✅ Estilos buscador global (.global-search-wrap / panel resultados)
 * [1.0] - 2026-03-29 23:15
 * ✅ Header claro, intro, secciones bonos/asociados, footer alineado a marca
 * ======================================================
 */

/* --- Tokens (alineados a main.css :root) --- */
body.soluciones-home {
  --sl-primary: var(--color-primario, #1f4fd8);
  --sl-primary-dark: #163fc1;
  --sl-surface: #ffffff;
  --sl-muted: #64748b;
  --sl-border: #e2e8f0;
  --sl-bg: #f1f5f9;
  --sl-bg-soft: linear-gradient(180deg, #f8fafc 0%, #eef2ff 42%, #f1f5f9 100%);
  /* Tarjetas bonos / sliders siguen usando variables del catálogo */
  --catalog-accent: var(--sl-primary);
  --catalog-accent-hover: #2d5ae0;
}

body.soluciones-home {
  background-color: #f1f5f9;
  background-image: none;
  color: var(--texto-principal, #1e1e1e);
}

/* ---------- Barra de presentación ---------- */
.soluciones-intro {
  background: linear-gradient(135deg, rgba(31, 79, 216, 0.08) 0%, rgba(31, 79, 216, 0.02) 100%);
  border-bottom: 1px solid var(--sl-border);
  padding: 14px 20px;
  text-align: center;
}

.soluciones-intro-inner {
  max-width: 900px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #334155;
}

.soluciones-intro-inner strong {
  color: var(--sl-primary);
  font-weight: 600;
}

/* ---------- Header claro ---------- */
body.soluciones-home .catalog-header.bonos-header {
  background: var(--sl-surface);
  box-shadow: 0 1px 0 var(--sl-border), 0 4px 24px rgba(15, 23, 42, 0.06);
}

body.soluciones-home .bonos-header .header-inner {
  max-width: 1280px;
}

body.soluciones-home .catalog-header .nav-main a::before {
  display: none;
}

body.soluciones-home .catalog-header .nav-main a {
  color: #475569 !important;
  font-weight: 500;
  border-radius: 8px;
}

body.soluciones-home .catalog-header .nav-main a:hover {
  color: var(--sl-primary) !important;
  background: rgba(31, 79, 216, 0.08);
}

body.soluciones-home .bonos-header .bonos-search-wrap input {
  background: #f8fafc;
  border: 1px solid var(--sl-border);
  color: #0f172a;
}

body.soluciones-home .bonos-header .bonos-search-wrap input::placeholder {
  color: #94a3b8;
}

body.soluciones-home .bonos-header .bonos-search-wrap input:focus {
  background: #fff;
  border-color: var(--sl-primary);
  box-shadow: 0 0 0 3px rgba(31, 79, 216, 0.15);
}

body.soluciones-home .bonos-header .bonos-search-wrap::before {
  opacity: 0.45;
}

/* ---------- HU-02: buscador global (home) ---------- */
body.soluciones-home .bonos-header .global-search-wrap {
  position: relative;
  max-width: 520px;
  width: 100%;
}

body.soluciones-home .bonos-header .global-search-wrap input {
  width: 100%;
  padding: 13px 22px 13px 50px;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 500;
  border: 1px solid var(--sl-border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.15s;
}

body.soluciones-home .bonos-header .global-search-wrap input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

body.soluciones-home .bonos-header .global-search-wrap input:focus {
  outline: none;
  border-color: var(--sl-primary);
  box-shadow: 0 0 0 4px rgba(31, 79, 216, 0.18), 0 8px 24px rgba(31, 79, 216, 0.12);
  transform: translateY(-1px);
  background: #fff;
}

body.soluciones-home .bonos-header .global-search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
  filter: saturate(1.2);
}

body.soluciones-home .global-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 3000;
  background: #fff;
  border: 1px solid var(--sl-border);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(31, 79, 216, 0.06);
  max-height: min(70vh, 360px);
  overflow-y: auto;
  padding: 10px 0;
}

body.soluciones-home .global-search-results[hidden] {
  display: none !important;
}

body.soluciones-home .global-search-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sl-primary);
  padding: 8px 16px 4px;
  margin-top: 4px;
}

body.soluciones-home .global-search-list {
  list-style: none;
  margin: 0;
  padding: 0 8px 8px;
}

body.soluciones-home .global-search-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  margin: 2px 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  color: #0f172a;
}

body.soluciones-home .global-search-item:hover,
body.soluciones-home .global-search-item:focus-visible {
  background: linear-gradient(90deg, rgba(31, 79, 216, 0.08), rgba(31, 79, 216, 0.02));
  outline: none;
}

body.soluciones-home .global-search-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sl-muted);
  margin-bottom: 4px;
}

body.soluciones-home .global-search-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}

body.soluciones-home .global-search-item-hint {
  font-size: 0.8rem;
  color: var(--sl-muted);
  margin-top: 2px;
}

body.soluciones-home .global-search-empty {
  padding: 16px 18px;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.45;
}

body.soluciones-home .bonos-header .bonos-btn-login {
  background: #fff;
  color: var(--sl-primary) !important;
  border: 2px solid var(--sl-primary);
}

body.soluciones-home .bonos-header .bonos-btn-login:hover {
  background: rgba(31, 79, 216, 0.06);
}

body.soluciones-home .bonos-header .bonos-btn-register {
  background: linear-gradient(135deg, var(--sl-primary) 0%, var(--sl-primary-dark) 100%);
  box-shadow: 0 4px 14px rgba(31, 79, 216, 0.35);
}

body.soluciones-home .catalog-header #user-box .user-toggle {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid var(--sl-border);
}

body.soluciones-home .catalog-header .menu-toggle {
  color: #0f172a;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 6px 10px;
}

/* ---------- Bonos destacados ---------- */
body.soluciones-home .bonos-landing-main {
  background: transparent;
  padding-top: 28px;
  padding-bottom: 40px;
}

body.soluciones-home .bonos-landing-badge h2 {
  background: linear-gradient(135deg, var(--sl-primary) 0%, var(--sl-primary-dark) 100%);
  color: #fff;
  border-radius: 999px;
  padding: 10px 28px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(31, 79, 216, 0.25);
}

body.soluciones-home .bonos-landing-actions {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

body.soluciones-home .bonos-landing-btn--ghost {
  background: #fff !important;
  color: var(--sl-primary) !important;
  border: 2px solid var(--sl-primary);
  box-shadow: none;
}

body.soluciones-home .bonos-landing-btn--ghost:hover {
  background: rgba(31, 79, 216, 0.06) !important;
}

body.soluciones-home .bonos-landing-main .slider-track-container {
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
  border: 1px solid var(--sl-border);
}

body.soluciones-home .catalog-categoria-bono,
body.soluciones-home .bonos-cat-grid .catalog-categoria-bono {
  background: #fff;
  border: 1px solid var(--sl-border);
  color: #334155;
  font-weight: 600;
}

body.soluciones-home .catalog-categoria-bono:hover {
  border-color: var(--sl-primary);
  color: #fff;
  background: var(--sl-primary);
}

/* Grid catálogo */
body.soluciones-home .bonos-grid-section.catalog-productos-section {
  background: var(--sl-bg-soft);
  border-radius: 0;
  border-top: 1px solid var(--sl-border);
}

body.soluciones-home .soluciones-catalog-heading {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 auto 8px;
  max-width: 1200px;
  padding: 0 16px;
  color: #0f172a;
}

body.soluciones-home .soluciones-catalog-heading::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--sl-primary), var(--color-secundario, #f2b705));
  margin: 12px auto 20px;
  border-radius: 2px;
}

body.soluciones-home .bono-card-grid {
  border-bottom-color: var(--sl-primary);
}

/* ---------- Asociados / marcas ---------- */
body.soluciones-home .catalog-marcas-header {
  background: var(--sl-surface) !important;
  padding-bottom: 8px;
}

body.soluciones-home .catalog-marcas-title {
  color: #0f172a !important;
  font-size: 1.35rem;
  font-weight: 700;
}

body.soluciones-home .catalog-marcas-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--sl-primary), var(--color-secundario, #f2b705));
  margin: 12px auto 0;
  border-radius: 2px;
}

body.soluciones-home .catalog-marcas-strip {
  background: linear-gradient(155deg, #1e3a8a 0%, var(--sl-primary) 38%, #163fc1 100%);
  padding: 40px 56px;
  min-height: 280px;
}

body.soluciones-home .catalog-marcas-nav {
  background: rgba(255, 255, 255, 0.95);
  color: var(--sl-primary);
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

body.soluciones-home .catalog-marcas-nav:hover {
  background: #fff;
  color: var(--sl-primary-dark);
}

/* ---------- Sobre nosotros / servicios ---------- */
body.soluciones-home #nosotros.about-section {
  background: var(--sl-surface);
  padding: 56px 24px;
}

body.soluciones-home #nosotros .about-content h2 {
  text-align: left;
}

body.soluciones-home #nosotros .about-content p {
  text-align: left;
}

body.soluciones-home #servicios.soluciones-servicios {
  background: var(--sl-bg);
  padding: 56px 24px;
  border-top: 1px solid var(--sl-border);
}

body.soluciones-home #servicios.soluciones-servicios h2 {
  margin-bottom: 12px;
}

body.soluciones-home .soluciones-servicios-lead {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 28px;
  color: var(--sl-muted);
  font-size: 1rem;
  line-height: 1.6;
}

body.soluciones-home .soluciones-servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

body.soluciones-home .soluciones-servicio-card {
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-radius: 14px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

body.soluciones-home .soluciones-servicio-card:hover {
  transform: translateY(-4px);
  border-color: rgba(31, 79, 216, 0.35);
  box-shadow: 0 12px 28px rgba(31, 79, 216, 0.12);
}

body.soluciones-home .soluciones-servicio-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  color: var(--sl-primary);
}

body.soluciones-home .soluciones-servicio-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--sl-muted);
  line-height: 1.5;
}

/* ---------- Footer ---------- */
body.soluciones-home .site-footer.catalog-footer {
  background: #0f172a;
  color: #cbd5e1;
  border-top: 3px solid var(--sl-primary);
}

body.soluciones-home .catalog-footer-inner {
  max-width: 1100px;
}

body.soluciones-home .catalog-footer-social a {
  opacity: 0.9;
  transition: transform 0.2s, opacity 0.2s;
}

body.soluciones-home .catalog-footer-social a:hover {
  opacity: 1;
  transform: scale(1.08);
}

/* ---------- WhatsApp flotante (conservar animación existente) ---------- */
body.soluciones-home .whatsapp-float-catalog {
  filter: drop-shadow(0 4px 12px rgba(37, 211, 102, 0.45));
}

/* ---------- Main: menos padding genérico de section ---------- */
body.soluciones-home main > section {
  scroll-margin-top: 88px;
}

@media (max-width: 768px) {
  body.soluciones-home .bonos-header .nav-main.open {
    display: flex;
    flex-direction: column;
    background: var(--sl-surface);
    border-top: 1px solid var(--sl-border);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    padding: 12px 0;
  }

  body.soluciones-home .bonos-header .nav-main.open a {
    color: #334155 !important;
    padding: 12px 20px;
    border-radius: 0;
  }

  body.soluciones-home .bonos-header .menu-toggle {
    color: #0f172a;
  }

  body.soluciones-home .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  body.soluciones-home .catalog-marcas-strip {
    padding: 32px 48px;
    min-height: 220px;
  }
}

/* ---------- HU-04: enlace al directorio bajo título marcas ---------- */
body.soluciones-home .catalog-marcas-cta {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: #64748b;
}

body.soluciones-home .catalog-marcas-cta a {
  color: var(--sl-primary);
  font-weight: 600;
  text-decoration: none;
}

body.soluciones-home .catalog-marcas-cta a:hover {
  text-decoration: underline;
}
