/* Blog / Seguridad — estilos que extienden shared.css (blanco y negro, Montserrat) */

.topnav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topnav a {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
  transition: opacity 0.2s ease-in-out;
}

.topnav a:hover {
  opacity: 0.55;
}

.topnav a.is-active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --- Portada del listado --- */

.blog-hero {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 2rem 1rem;
}

.blog-hero__title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.blog-hero__subtitle {
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
  max-width: 640px;
  margin: 0;
}

/* --- Listado de posts --- */

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
}

.post-card {
  display: block;
  border: 2px solid #000;
  padding: 1.75rem;
  text-decoration: none;
  color: #000;
  transition: all 0.3s ease-in-out;
}

.post-card:hover {
  background-color: #000;
  color: #fff;
}

.post-card__kicker {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.5rem;
}

.post-card:hover .post-card__kicker {
  color: #bbb;
}

.post-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
  line-height: 1.2;
}

.post-card__desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #444;
  margin: 0 0 0.9rem;
}

.post-card:hover .post-card__desc {
  color: #ddd;
}

.post-card__meta {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #777;
}

.post-card:hover .post-card__meta {
  color: #aaa;
}

/* --- Selector de idioma --- */

.lang-switch {
  display: flex;
  gap: 0;
  margin: 0 0 1.75rem;
}

.lang-switch a,
.lang-switch button {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.lang-switch a:hover,
.lang-switch button:hover {
  background: #000;
  color: #fff;
}

.lang {
  display: none;
}

.lang.is-shown {
  display: block;
}

/* --- Artículo --- */

.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

.post__kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 0.75rem;
}

.post__title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.post__meta {
  font-size: 0.8rem;
  color: #777;
  letter-spacing: 0.03em;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #000;
  margin: 0 0 1.75rem;
}

.post__body {
  font-size: 1rem;
  line-height: 1.75;
  color: #1a1a1a;
}

.post__body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #000;
}

.post__body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
}

.post__body p {
  margin: 0 0 1.1rem;
}

.post__body a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post__body ul,
.post__body ol {
  margin: 0 0 1.2rem;
  padding-left: 1.3rem;
}

.post__body li {
  margin-bottom: 0.4rem;
}

.post__body strong {
  font-weight: 700;
}

.post__body code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.86em;
  background: #f2f2f2;
  border: 1px solid #e2e2e2;
  padding: 0.1em 0.35em;
}

.post__body pre {
  background: #000;
  color: #f5f5f5;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  margin: 0 0 1.4rem;
  font-size: 0.82rem;
  line-height: 1.6;
}

.post__body pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.post__body blockquote {
  margin: 0 0 1.4rem;
  padding: 0.4rem 0 0.4rem 1.2rem;
  border-left: 4px solid #000;
  color: #444;
  font-style: italic;
}

.post__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
}

.post__body th,
.post__body td {
  border: 1px solid #d8d8d8;
  padding: 0.5rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.post__body th {
  background: #f2f2f2;
  font-weight: 700;
}

.sev {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.sev--crit { color: #b30000; }
.sev--high { color: #c85a00; }
.sev--med  { color: #9a7b00; }

/* --- Aviso de divulgación --- */

.post__note {
  margin: 2.5rem 0 0;
  padding: 1.1rem 1.25rem;
  border: 2px solid #000;
  background: #fafafa;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #444;
}

.post__note strong {
  color: #000;
}

.post__back {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
}

.post__back:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 700px) {
  .topnav {
    gap: 1rem;
  }

  .topnav a {
    font-size: 0.72rem;
  }

  .blog-hero__title,
  .post__title {
    font-size: 1.9rem;
  }

  .post {
    padding: 2.5rem 1.5rem 4rem;
  }
}
