/* Oposiciones Actualidad — tema magazine oscuro (inspiración Echo) */
:root {
  --bg: #121216;
  --bg-elevated: #1a1a21;
  --bg-card: #16161d;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent-purple: #7c3aed;
  --accent-teal: #14b8a6;
  --accent-orange: #f97316;
  --border: rgba(255, 255, 255, 0.06);
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --container: min(1200px, 100% - 2rem);
  --radius: 2px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  background: var(--accent-purple);
  color: #fff;
  z-index: 9999;
  border-radius: 4px;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Top bar */
.topbar {
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 0;
}

.logo__img {
  display: block;
  height: clamp(2.85rem, 4.2vw, 3.65rem);
  width: auto;
  max-width: min(380px, 72vw);
  object-fit: contain;
  object-position: left center;
  /* Contraste suave sobre el topbar oscuro sin “caja” de fondo en el PNG */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Main nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 18, 22, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.nav-main ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.nav-main a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-main a:hover,
.nav-main a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.nav-main__extras {
  display: flex;
  gap: 1rem;
  font-size: 13px;
  color: var(--text-muted);
}

/* Badges */
.badge {
  display: inline-block;
  position: relative;
  padding: 0.35rem 1rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
}

.badge--skew {
  transform: skewX(-12deg);
}

.badge--skew span {
  display: inline-block;
  transform: skewX(12deg);
}

.badge--purple {
  background: var(--accent-purple);
}

.badge--teal {
  background: var(--accent-teal);
}

.badge--orange {
  background: var(--accent-orange);
}

/* Hero */
.hero {
  padding: 1.75rem 0 1.5rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

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

.hero-featured {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
}

.hero-featured__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.hero-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-featured__body {
  padding: 1.5rem 1.75rem 2rem;
}

.hero-featured__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0.75rem 0 1rem;
}

.hero-featured h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card-side {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.2s;
}

.card-side:hover {
  border-color: rgba(124, 58, 237, 0.35);
}

.card-side__link {
  display: block;
  color: inherit;
}

.card-side__link:hover {
  text-decoration: none;
}

.card-side__img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card-side__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-side__body {
  padding: 1rem 1.25rem 1.35rem;
  text-align: left;
}

.card-side h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.6rem 0 0;
  line-height: 1.3;
}

/* Section titles */
.section-head {
  text-align: center;
  margin: 1.75rem 0 1.5rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
}

.section-head h2::before,
.section-head h2::after {
  content: "";
  height: 1px;
  width: min(180px, 15vw);
  background: linear-gradient(90deg, transparent, var(--border), var(--text-muted));
}

.section-head h2::after {
  background: linear-gradient(270deg, transparent, var(--border), var(--text-muted));
}

/* Featured grid 3 cols */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  padding-bottom: 1.25rem;
}

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

.card-featured {
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
  overflow: hidden;
}

.card-featured__link {
  display: block;
  color: inherit;
  padding-bottom: 1.75rem;
}

.card-featured__link:hover {
  text-decoration: none;
}

.card-featured__img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card-featured__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-featured__badge-wrap {
  display: flex;
  justify-content: center;
  margin-top: -14px;
  position: relative;
  z-index: 1;
}

.card-featured h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 1rem 1.25rem 0.5rem;
  line-height: 1.25;
}

.card-featured p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 1.25rem 1rem;
}

.read-more {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.read-more::after {
  content: " →";
}

/* Most popular */
.popular {
  padding: 1.5rem 0 2.25rem;
}

.popular__layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

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

.popular__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.popular__title-row h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin: 0;
}

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.cat-tabs a {
  padding: 0.35rem 0.65rem;
  border-right: 1px solid var(--border);
}

.cat-tabs a:last-child {
  border-right: 0;
}

.cat-tabs a:hover,
.cat-tabs a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 -2px 0 var(--accent-orange);
}

.popular-feature {
  display: grid;
  grid-template-columns: minmax(0, 280px) 1fr;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
  .popular-feature {
    grid-template-columns: 1fr;
  }
}

.popular-feature__img {
  aspect-ratio: 1;
  overflow: hidden;
}

.popular-feature__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popular-feature h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 0.5rem 0;
  line-height: 1.2;
}

.popular-feature p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 1rem;
}

.popular-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .popular-subgrid {
    grid-template-columns: 1fr;
  }
}

.mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
}

.mini-card a {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.75rem;
  padding: 0.75rem;
  color: inherit;
  align-items: start;
}

.mini-card a:hover {
  text-decoration: none;
}

.mini-card__media {
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.mini-card img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}

.mini-card__text {
  min-width: 0;
}

.mini-card .badge {
  font-size: 9px;
  padding: 0.28rem 0.7rem;
  margin-bottom: 0.4rem;
}

.mini-card h3 {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-card__excerpt {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0.4rem 0 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar widgets */
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.widget h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.cat-banners {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cat-banner {
  position: relative;
  min-height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cat-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.cat-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cat-banner--orange::after {
  background: rgba(249, 115, 22, 0.72);
}

.cat-banner--purple::after {
  background: rgba(124, 58, 237, 0.72);
}

.cat-banner--teal::after {
  background: rgba(20, 184, 166, 0.72);
}

.cat-banner--brown::after {
  background: rgba(120, 53, 15, 0.75);
}

.cat-banner h3 {
  position: relative;
  z-index: 2;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  margin: 0;
  text-align: center;
  padding: 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  margin-top: 1rem;
  font-size: 13px;
  color: var(--text-muted);
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
  gap: 2rem 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .site-footer__top {
    grid-template-columns: 1fr;
  }
}

.site-footer__brand strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.site-footer__brand p {
  margin: 0 0 0.65rem;
  line-height: 1.5;
  max-width: 36ch;
}

.site-footer__meta {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.site-footer__copy {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 12px;
}

.site-footer__discrete-email {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
  opacity: 0.7;
}

.site-footer__discrete-email a {
  color: inherit;
  text-decoration: none;
}

.site-footer__discrete-email a:hover {
  text-decoration: underline;
  opacity: 1;
}

.site-footer h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

/* Article page */
.article-page {
  padding: 2rem 0 4rem;
}

.article-page article {
  max-width: 720px;
  margin-inline: auto;
}

.article-page .lead {
  font-size: 1.15rem;
  color: var(--text-muted);
}

.article-page #boletin h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
}

.article-page h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

.article-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.article-hero-img {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-body p {
  margin: 0 0 1.25rem;
}

.article-body .article-h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  line-height: 1.25;
  margin: 2.25rem 0 0.85rem;
  color: var(--text);
  font-weight: 600;
}

.article-body .article-h2:first-child {
  margin-top: 0;
}

.article-body .article-h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}

.article-body ul {
  margin: 0 0 1.35rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.article-body li {
  margin-bottom: 0.45rem;
}

.article-body li::marker {
  color: var(--accent-teal);
}

.article-body .article-quote {
  margin: 1.5rem 0 1.75rem;
  padding: 1.15rem 1.35rem;
  border-left: 4px solid var(--accent-purple);
  background: rgba(124, 58, 237, 0.09);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--text);
}

.article-body .article-quote p {
  margin: 0;
}

.article-body a {
  color: var(--accent-teal);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.article-body a:hover {
  color: #5eead4;
}

.article-faq {
  margin-top: 2.5rem;
  padding: 1.5rem 1.25rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.article-faq__title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
  color: var(--text);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.faq-item__q {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
  line-height: 1.35;
}

.faq-item__a {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  opacity: 0.5;
}
