:root {
  --bg: #f5f7fb;
  --bg-alt: #ebf1f8;
  --surface: #ffffff;
  --surface-soft: #f0f4fa;
  --text: #1f2a37;
  --muted: #5d6b7a;
  --line: #d7e0ec;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --chip: #dbeafe;
  --chip-text: #1e3a8a;
  --radius: 18px;
  --shadow: 0 20px 35px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -5%, #eff6ff 0, #eff6ff 20%, transparent 40%),
    radial-gradient(circle at 95% 8%, #e0f2fe 0, #e0f2fe 18%, transparent 36%),
    var(--bg);
  line-height: 1.5;
}

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

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background-color: rgba(245, 247, 251, 0.8);
  border-bottom: 1px solid rgba(215, 224, 236, 0.7);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 30px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 18px;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
}

.hero {
  padding: 60px 0 28px;
}

.hero-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.6fr 1fr;
  align-items: stretch;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-strong);
  margin: 0 0 10px;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.15;
}

h1 {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-bottom: 12px;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 14px;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--primary-strong);
}

.btn-light {
  background: var(--surface-soft);
  color: var(--text);
}

.btn-light:hover,
.btn-light:focus-visible {
  background: #e3ebf6;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.hero-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.section {
  padding: 28px 0 42px;
}

.section-alt {
  background: linear-gradient(180deg, transparent 0, #f0f5fc 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
}

.section-head a {
  color: var(--primary-strong);
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.update-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.update-card:hover,
.update-card:focus-within {
  transform: translateY(-4px);
  border-color: #c9d8ea;
  box-shadow: 0 24px 38px rgba(16, 24, 40, 0.12);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  background: #edf2f8;
  filter: saturate(0.72) contrast(1.02);
  transform: scale(1);
  transition: transform 0.3s ease, filter 0.25s ease;
}

.update-card:hover .card-image,
.update-card:focus-within .card-image {
  transform: scale(1.03);
  filter: saturate(0.86) contrast(1.03);
}

.update-card-body {
  padding: 14px;
}

.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.tag {
  display: inline-flex;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 8px;
  background: var(--chip);
  color: var(--chip-text);
}

.tag--modulo {
  background: #1d4ed8;
  color: #ffffff;
}

.tag--funcionalidad {
  background: #dbeafe;
  color: #1e3a8a;
}

.tag--mejora {
  background: #dcfce7;
  color: #166534;
}

.tag--historia {
  background: #ede9fe;
  color: #5b21b6;
}

.tag--novedad {
  background: #e2e8f0;
  color: #334155;
}

.date {
  color: var(--muted);
  font-size: 0.84rem;
}

.update-card h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.title-link {
  text-decoration: none;
  color: inherit;
}

.title-link:hover,
.title-link:focus-visible {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.read-more {
  margin-top: 10px;
  display: inline-block;
  font-weight: 700;
  color: var(--primary-strong);
  text-decoration: none;
}

.filters {
  display: flex;
  gap: 8px;
}

.archive-tools {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.archive-tools input,
.archive-tools select {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.archive-tools input:focus,
.archive-tools select:focus {
  outline: 2px solid #bfdbfe;
  outline-offset: 1px;
}

.filter-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.filter-btn.is-active {
  border-color: #93c5fd;
  color: #1e3a8a;
  background: #eff6ff;
}

.archive-list {
  display: grid;
  gap: 10px;
}

.archive-item {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.archive-item:hover,
.archive-item:focus-within {
  transform: translateY(-2px);
  border-color: #c9d8ea;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.08);
}

.archive-item h3 {
  font-size: 1rem;
  margin: 0 0 6px;
}

.archive-item p {
  margin: 0;
  color: var(--muted);
}

.archive-link {
  text-decoration: none;
  color: var(--primary-strong);
  font-weight: 700;
  white-space: nowrap;
}

.pagination {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 7px 10px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.pagination-btn.is-active {
  border-color: #93c5fd;
  color: #1e3a8a;
  background: #eff6ff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.howto {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.howto ol {
  margin: 0;
  color: var(--muted);
  padding-left: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.detail-image {
  width: min(100%, 860px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  margin: 14px auto 20px;
  padding: 0;
  background: #e9eff7;
  border-radius: 14px;
  border: 1px solid #e6edf6;
  box-shadow:
    0 6px 14px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.detail h1 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.detail p {
  color: var(--muted);
}

.detail ul {
  color: var(--muted);
}

.empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: #fbfcff;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-tools {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .brand-logo {
    height: 26px;
  }

  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
  }

  .main-nav,
  .section-head {
    align-items: flex-start;
  }

  .main-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
  }

  .main-nav a {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .archive-tools {
    grid-template-columns: 1fr;
  }

  .archive-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
