:root {
  --neon: #39ff14;
  --neon-dim: #2ecc11;
  --magenta: #ff00ff;
  --bg: #000000;
  --bg-card: #111111;
  --bg-elevated: #1a1a1a;
  --text: #f5f5f5;
  --text-muted: #a8a8a8;
  --border: #2a2a2a;
  --shadow-neon: 0 0 20px rgba(57, 255, 20, 0.35);
  --shadow-magenta: 0 0 12px rgba(255, 0, 255, 0.25);
  --font: "Oswald", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --radius: 12px;
  --max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(57, 255, 20, 0.08), transparent 60%),
    repeating-linear-gradient(
      135deg,
      transparent,
      transparent 40px,
      rgba(34, 34, 34, 0.4) 40px,
      rgba(34, 34, 34, 0.4) 41px
    );
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--neon);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

a:hover {
  color: #fff;
  text-shadow: var(--shadow-magenta);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo-link img {
  width: min(220px, 55vw);
  filter: drop-shadow(var(--shadow-neon));
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-family: var(--font);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

/* Hero */
.hero {
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--font);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
  color: var(--neon);
  text-shadow:
    0 0 8px rgba(57, 255, 20, 0.8),
    2px 2px 0 #000,
    0 0 20px rgba(255, 0, 255, 0.4);
}

.hero .tagline {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto 2rem;
}

.hero-logo {
  width: min(320px, 70vw);
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 30px rgba(57, 255, 20, 0.4));
}

/* Sections */
section {
  padding: 3rem 0;
}

.section-title {
  font-family: var(--font);
  font-size: 1.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--neon);
  margin: 0 0 1.5rem;
  text-align: center;
  text-shadow: var(--shadow-magenta);
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--neon-dim);
  box-shadow: var(--shadow-neon);
}

.card h3 {
  font-family: var(--font);
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  color: var(--neon);
}

.card p {
  margin: 0;
  color: var(--text-muted);
}

.card .value {
  color: var(--text);
  font-size: 1.05rem;
  margin-top: 0.35rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--neon);
  color: #000;
  box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(57, 255, 20, 0.55);
}

.btn-outline {
  background: transparent;
  color: var(--neon);
  border: 2px solid var(--neon);
}

.btn-outline:hover {
  background: rgba(57, 255, 20, 0.1);
  box-shadow: var(--shadow-neon);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Social */
.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--neon);
  color: var(--neon);
  transition: background 0.2s, transform 0.15s;
}

.social-links a:hover {
  background: var(--neon);
  color: #000;
  transform: scale(1.08);
  text-shadow: none;
}

.social-links svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Search */
.search-section {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  border-block: 1px solid var(--border);
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

.search-form input {
  flex: 1 1 200px;
  padding: 0.9rem 1rem;
  font-size: 1.1rem;
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #000;
  border: 2px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.search-form input:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: var(--shadow-neon);
}

.search-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

#resultado-busqueda {
  margin-top: 1.5rem;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.alert-error {
  background: rgba(255, 0, 80, 0.12);
  border: 1px solid #ff3366;
  color: #ff99aa;
}

.alert-info {
  background: rgba(57, 255, 20, 0.08);
  border: 1px solid var(--neon-dim);
  color: var(--text-muted);
}

.alert-loading {
  color: var(--neon);
}

/* Table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 1rem;
}

table.historial {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.historial th,
table.historial td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.historial th {
  font-family: var(--font);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  background: var(--bg-elevated);
  color: var(--neon);
  white-space: nowrap;
}

table.historial tr:last-child td {
  border-bottom: none;
}

table.historial tbody tr:hover {
  background: rgba(57, 255, 20, 0.04);
}

.si {
  color: var(--neon);
  font-weight: 700;
}

.no {
  color: var(--text-muted);
}

.patente-badge {
  display: inline-block;
  font-family: var(--font);
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.85rem;
  background: #000;
  border: 2px solid var(--neon);
  border-radius: 6px;
  color: var(--neon);
  margin-bottom: 1rem;
}

/* Map link */
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-weight: 600;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  text-align: center;
}

.site-footer .brand-line {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.gestlub-credit {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.gestlub-credit img {
  width: 100px;
  opacity: 0.95;
}

.gestlub-credit a {
  font-size: 0.85rem;
  color: #0099dd;
}

.gestlub-credit a:hover {
  color: #003366;
  text-shadow: none;
}

.copyright {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: #666;
}

@media (max-width: 600px) {
  table.historial {
    font-size: 0.82rem;
  }

  table.historial th,
  table.historial td {
    padding: 0.65rem 0.5rem;
  }
}
