:root {
  --bg: #060810;
  --bg-2: #0a0e1a;
  --panel: rgba(13, 19, 36, 0.72);
  --panel-solid: #0d1324;
  --border: rgba(80, 140, 220, 0.22);
  --text: #e8eefc;
  --muted: #9fb0d0;
  --blue: #1f6feb;
  --blue-soft: #4d9bff;
  --red: #e63027;
  --green: #2ad06a;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

/* Fondo general translucido de placa de circuito */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    url("assets/placa-de-circuito.png") center / cover no-repeat fixed;
  opacity: 0.6;
  z-index: -2;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1100px 650px at 50% -8%, rgba(31, 111, 235, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(6, 8, 16, 0.45), rgba(6, 8, 16, 0.78));
  z-index: -1;
}

.boot {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  letter-spacing: 0.5px;
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

/* ---------- Header / Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(28px, 6vw, 70px) 0 clamp(24px, 4vw, 48px);
}

.hero-logo {
  width: min(560px, 86vw);
  height: auto;
  filter: drop-shadow(0 0 18px rgba(31, 111, 235, 0.35))
          drop-shadow(0 6px 22px rgba(0, 0, 0, 0.6));
  /* Suaviza levemente los bordes */
  border-radius: 6px;
}

.hero-tagline {
  margin: 18px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.4vw, 1.1rem);
  line-height: 1.5;
}

.hero-tagline strong { color: var(--blue-soft); }

/* Barra de contacto / redes */
.contact-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); border-color: var(--blue-soft); }
.btn svg { width: 19px; height: 19px; }

.btn-wa { background: rgba(37, 211, 102, 0.14); border-color: rgba(37, 211, 102, 0.4); }
.btn-wa:hover { background: rgba(37, 211, 102, 0.22); }
.btn-ig { background: rgba(214, 41, 118, 0.13); border-color: rgba(214, 41, 118, 0.4); }
.btn-fb { background: rgba(24, 119, 242, 0.14); border-color: rgba(24, 119, 242, 0.4); }
.btn-map { background: rgba(234, 67, 53, 0.13); border-color: rgba(234, 67, 53, 0.4); }

/* ---------- Secciones ---------- */
section { padding: clamp(34px, 6vw, 64px) 0; }

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: 0.5px;
}
.section-title .accent { color: var(--red); }
.section-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 34px;
  max-width: 560px;
}

/* ---------- Servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.service-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.2s ease;
}
.service-card:hover { transform: translateY(-4px); border-color: var(--blue-soft); }

.service-icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(31,111,235,0.25), rgba(230,48,39,0.18));
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.service-icon svg { width: 27px; height: 27px; stroke: var(--blue-soft); }

.service-card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.service-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

/* ---------- Buscador ---------- */
.search-wrap { max-width: 720px; margin: 0 auto; }

.search-box {
  display: flex;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.search-box input {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 14px 16px;
  font-size: 1.05rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  outline: none;
}
.search-box input:focus { border-color: var(--blue-soft); }
.search-box input::placeholder { color: var(--muted); letter-spacing: 0.5px; text-transform: none; }

.search-btn {
  background: linear-gradient(135deg, var(--blue), #0b4fc0);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 0 24px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: filter 0.15s ease;
}
.search-btn:hover { filter: brightness(1.12); }
.search-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.search-hint { text-align: center; color: var(--muted); font-size: 0.86rem; margin-top: 12px; }

/* Tabs de resultados */
.result-tabs { display: flex; gap: 10px; justify-content: center; margin: 28px 0 18px; flex-wrap: wrap; }
.tab {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.tab .count {
  display: inline-block;
  min-width: 20px;
  margin-left: 7px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  font-size: 0.78rem;
}

.results { display: grid; gap: 14px; }

.result-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 12px;
  padding: 18px 20px;
  backdrop-filter: blur(8px);
}
.result-card.mec { border-left-color: var(--red); }

.result-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: baseline;
  margin-bottom: 10px;
}
.result-date { font-weight: 700; font-size: 1.05rem; }
.kpill {
  font-size: 0.82rem;
  color: var(--muted);
}
.kpill b { color: var(--text); font-weight: 700; }

.work-list { margin: 8px 0 0; padding-left: 18px; }
.work-list li { margin: 3px 0; color: var(--text); }

.obs { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.obs span { color: var(--blue-soft); font-weight: 600; }

.empty, .error {
  text-align: center;
  color: var(--muted);
  padding: 30px 16px;
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.error { color: #ffb4b0; border-color: rgba(230,48,39,0.4); }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(4, 6, 12, 0.6);
  padding: 28px 0 36px;
  margin-top: 20px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer .copy { color: var(--muted); font-size: 0.86rem; }
.footer .design {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}
.footer .design:hover { color: var(--text); }
.footer .design img { height: 34px; width: auto; }

@media (max-width: 540px) {
  .search-box { flex-direction: column; }
  .search-btn { padding: 13px; }
}
