/* assets/css/automation.css
   Estilo claro (tema técnico) para página Automatización Industrial
   Basado en tu design system (cards, chips, topbar, sombras, radios).
*/

/* RESET */
*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --bg-page: #f5f6fb;
  --bg-card: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;

  --primary: #2563eb;
  --primary-soft: #e0f2fe;
  --primary-dark: #1d4ed8;

  --accent: #22c55e;
  --accent-soft: #dcfce7;

  --warning-soft: #fef3c7;
  --warning-text: #92400e;

  --border-soft: #e5e7eb;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --transition-fast: 0.15s ease-out;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
}

/* LINKS */
a { color: inherit; }
a:hover { opacity: .95; }

/* UTILIDADES */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.muted { color: var(--text-muted); }
.sep { height: 1px; background: var(--border-soft); margin: 10px 0; }

/* TOPBAR (oscura como tu estilo) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #0f172a;
  color: #e5e7eb;
  padding: 10px 0;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.03em;
  color: #f9fafb;
}
.logo span { color: #38bdf8; }

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box { min-width: 260px; position: relative; }
.search-box input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  outline: none;
}
.search-box input:focus { box-shadow: 0 0 0 2px rgba(56,189,248,.25); }

.top-link {
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 12px;
  cursor: pointer;
}

.top-cta {
  border-radius: 999px;
  border: 1px solid #38bdf8;
  background: transparent;
  color: #e0f2fe;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
}
.top-cta:hover { background: rgba(56,189,248,.08); }

/* PAGE WRAP */
.auto-page {
  padding: 22px 0 34px;
}

/* HERO */
.auto-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;

  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  align-items: stretch;
}

.auto-hero-left {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.03);
  padding: 18px;
}

.auto-hero-left h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.auto-hero-subtitle {
  margin: 0 0 12px;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 14px;
}

.auto-hero-highlights {
  margin: 0 0 14px;
  padding-left: 18px;
  color: #111827;
}
.auto-hero-highlights li { margin: 6px 0; font-size: 13px; }

.auto-hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.auto-hero-right {
  background: linear-gradient(145deg, #eef2ff, #ffffff);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.03);
  padding: 18px;
}

.auto-hero-box h2 {
  margin: 0 0 8px;
  font-size: 15px;
}
.auto-hero-box p {
  margin: 0 0 12px;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 13px;
}

.auto-hero-taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #f9fafb;
  padding: 6px 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tag-primary {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

/* BOTONES (mismo look que tu sistema) */
.btn-primary {
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast), transform .08s ease, box-shadow var(--transition-fast);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.btn-secondary {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  font-size: 13px;
  padding: 9px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast), transform .08s ease, box-shadow var(--transition-fast);
}
.btn-secondary:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

.btn-full { width: 100%; justify-content: center; display: inline-flex; }

/* SECCIONES */
.auto-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px;
}

.auto-section-alt {
  background: linear-gradient(180deg, rgba(224,242,254,.35), rgba(245,246,251,0));
  border-top: 1px solid rgba(15, 23, 42, 0.03);
  border-bottom: 1px solid rgba(15, 23, 42, 0.03);
}

.auto-section-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.auto-section-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.auto-section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

/* GRID CARDS */
.auto-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.auto-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.03);
  padding: 14px;
}

.auto-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.auto-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* SOLUCIONES (cards tipo “producto”) */
.auto-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.auto-product {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.03);
  padding: 14px;
  transition: transform .08s ease, box-shadow var(--transition-fast);
}
.auto-product:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.10);
}

.auto-product h3 { margin: 0 0 4px; font-size: 14px; }
.product-subtitle { margin: 0 0 8px; color: var(--text-muted); font-size: 12px; }

.product-list { margin: 0 0 8px; padding-left: 18px; }
.product-list li { margin: 6px 0; font-size: 12.5px; color: #111827; }

.btn-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
}
.btn-link:hover { text-decoration: underline; }

/* NOTA */
.auto-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* STEPS */
.auto-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.auto-step {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.03);
  padding: 14px;
}

.step-number {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid rgba(37,99,235,.18);
  margin-bottom: 8px;
}

.auto-step h3 { margin: 0 0 6px; font-size: 13.5px; }
.auto-step p { margin: 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.5; }

/* FORM */
.auto-form {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.03);
  padding: 14px;
  margin-top: 12px;
}

.auto-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.auto-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #111827;
}

.auto-form input,
.auto-form select,
.auto-form textarea {
  margin-top: 6px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
}

.auto-form textarea {
  border-radius: var(--radius-md);
  min-height: 110px;
  resize: vertical;
}

.auto-form input:focus,
.auto-form select:focus,
.auto-form textarea:focus {
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 2px rgba(37,99,235,.14);
}

/* BADGES (si quieres usarlos) */
.badge {
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge-green { background: var(--accent-soft); color: #166534; }
.badge-amber { background: var(--warning-soft); color: var(--warning-text); }

/* FOOTER SECTIONS (si las usas) */
.auto-footer {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 12px;
}

/* RESPONSIVE */
@media (max-width: 1040px) {
  .auto-hero { grid-template-columns: 1fr; }
  .auto-grid-3 { grid-template-columns: 1fr; }
  .auto-products { grid-template-columns: 1fr; }
  .auto-steps { grid-template-columns: 1fr; }
  .auto-form-row { grid-template-columns: 1fr; }
  .search-box { min-width: 180px; }
}

@media (max-width: 560px) {
  .topbar-inner { padding: 0 14px; }
  .container { padding: 0 14px; }
  .auto-section { padding: 14px 14px; }
}
