* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
}

:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --header: #0f172a;
  --text: #1e293b;
  --muted: #475569;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
}

header {
  background: var(--header);
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-container a {
  display: flex;
  align-items: center;
  min-height: 45px;
  color: #fff;
  text-decoration: none;
}

.logo-container img {
  max-height: 55px;
  max-width: 260px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.header-logo {
  max-height: 55px;
  max-width: 260px;
}

.logo-fallback {
  font-size: 1.25rem;
  font-weight: 700;
}


nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-btn {
  color: #f8fafc;
  text-decoration: none;
  padding: 0.6rem 1.25rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  font-weight: 600;
  transition: background-color .2s, opacity .2s;
  border: none;
  line-height: 1;
}

.nav-btn:hover,
.nav-btn.active {
  background: #334155;
}

.nav-btn.has-image {
  padding: 0;
  background: transparent;
  min-height: 40px;
}

.nav-btn-image {
  display: block;
  width: auto;
  height: 40px;
  max-width: 180px;
  object-fit: contain;
}

.nav-btn.has-image:hover {
  opacity: .82;
}

main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

.hero-section {
  margin-bottom: 2rem;
}

.grid-cajones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.cajon {
  background: var(--surface);
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cajon h1,
.cajon h2 {
  color: #0f172a;
  margin-bottom: .75rem;
}

.cajon h1 { font-size: 2rem; }
.cajon h2 { font-size: 1.35rem; }

.cajon-body {
  flex-grow: 1;
  color: var(--muted);
  font-size: .95rem;
}

.texto-grande {
  color: var(--muted);
  max-width: 800px;
  font-size: 1.05rem;
}

.etiqueta {
  display: inline-block;
  width: fit-content;
  padding: .25rem .5rem;
  background: #e2e8f0;
  color: #0f172a;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: .8rem;
}

.lista-actualizaciones,
.lista-detalles {
  list-style: none;
  margin-top: 1rem;
}

.lista-actualizaciones li,
.lista-detalles li {
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}

.badge-version {
  display: inline-block;
  padding: .15rem .4rem;
  font-weight: 800;
  font-size: .7rem;
  margin-right: .5rem;
  background: #e2e8f0;
  color: #0f172a;
}

.badge-version.nuevo { background: #dcfce7; color: #166534; }
.badge-version.mejora { background: #dbeafe; color: #1e40af; }
.badge-version.correccion { background: #fef3c7; color: #92400e; }

.version-destacada {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--surface-soft);
  padding: 1rem;
  margin-bottom: 1rem;
}

.version-destacada strong { font-size: 1.8rem; color: #0f172a; }
.version-label { font-size: .7rem; font-weight: 800; color: var(--muted); }
.estado-version {
  margin-left: auto;
  padding: .2rem .45rem;
  background: #dcfce7;
  color: #166534;
  font-size: .7rem;
  font-weight: 800;
}

.detalles-archivo {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  background: var(--surface-soft);
  padding: 1rem;
  margin: 1rem 0;
  border-left: 4px solid var(--primary);
  font-size: .9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.5rem;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border: none;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: background-color .2s;
  width: fit-content;
}

.btn:hover { background: var(--primary-hover); }
.btn-secundario { background: #475569; }
.btn-secundario:hover { background: #334155; }

.download-panel { margin-top: 1.25rem; }
.cajon-descarga-final { border-left: 5px solid var(--success); }
.btn-descarga-grande {
  font-size: 1.1rem;
  padding: 1rem 2rem;
  background: var(--success);
}
.btn-descarga-grande:hover { background: #15803d; }

.nota-descarga {
  color: #64748b;
  font-size: .8rem;
  margin-top: .9rem;
}

code {
  background: #e2e8f0;
  padding: .1rem .3rem;
  font-family: Consolas, monospace;
}

footer {
  background: var(--header);
  color: #94a3b8;
  padding: 2.5rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.footer-logo-slot {
  width: 140px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.footer-logo-slot img {
  width: 100%;
  height: 100%;
  max-width: 140px;
  max-height: 50px;
  object-fit: contain;
  opacity: .9;
}

.footer-logo-slot span {
  font-size: .72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
}

@media (max-width: 760px) {
  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  main {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }

  .cajon { padding: 1.35rem; }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-logos {
    justify-content: center;
  }

  .footer-logo-slot {
    width: 120px;
  }
}
