/* ── NewsPress Components ───────────────────────────── */

/* ══════════════════════════════════════════════════════
   SITE HEADER
   ══════════════════════════════════════════════════════ */
.np-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--hdr-h);
  background: var(--np-hdr-bg);
  border-bottom: 1px solid var(--np-hdr-border);
}

.np-header__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--sp-5);
}

/* ── Logo ──────────────────────────────────────────── */
.np-header__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.np-header__logo-img {
  height: 32px;
  width: auto;
}
.np-header__logo-text {
  font-family: var(--f-serif);
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--np-hdr-text);
  letter-spacing: -.01em;
  line-height: 1;
}
.np-header__logo-text span {
  color: var(--np-accent);
}

/* ── Nav principal ─────────────────────────────────── */
.np-nav {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}
.np-nav__menu {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 2px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.np-nav__item {}
.np-nav__link {
  display: block;
  padding: 6px 11px;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.np-nav__link:hover,
.np-nav__link.current-menu-item {
  background: var(--np-hdr-hover);
  color: #fff;
}

/* ── Acciones header ───────────────────────────────── */
.np-header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

/* ── Buscador header ───────────────────────────────── */
.np-header__search {
  position: relative;
}
.np-header__search-input {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-md);
  color: #fff;
  font-size: var(--t-sm);
  padding: 5px 32px 5px 10px;
  width: 180px;
  transition: background var(--t-fast), border-color var(--t-fast), width var(--t-med);
  outline: none;
}
.np-header__search-input::placeholder { color: rgba(255,255,255,.4); }
.np-header__search-input:focus {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.3);
  width: 220px;
}
.np-header__search-btn {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  font-size: 14px;
}

/* ── Dark mode toggle ──────────────────────────────── */
.np-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-md);
  cursor: pointer;
  color: rgba(255,255,255,.75);
  font-size: 15px;
  transition: background var(--t-fast);
  line-height: 1;
  flex-shrink: 0;
}
.np-mode-toggle:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.np-mode-toggle .icon-sun  { display: none; }
.np-mode-toggle .icon-moon { display: block; }
[data-theme="dark"] .np-mode-toggle .icon-sun  { display: block; }
[data-theme="dark"] .np-mode-toggle .icon-moon { display: none; }

/* ── Hamburger (mobile) ────────────────────────────── */
.np-header__hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 32px;
}
.np-header__hamburger span {
  display: block;
  height: 2px;
  background: rgba(255,255,255,.75);
  border-radius: 1px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

/* ── Menú móvil ────────────────────────────────────── */
.np-mobile-nav {
  display: none;
  position: fixed;
  top: var(--hdr-h); left: 0; right: 0;
  background: var(--np-hdr-bg);
  border-bottom: 1px solid var(--np-hdr-border);
  padding: var(--sp-3) 0;
  z-index: 999;
}
.np-mobile-nav.is-open { display: block; }
.np-mobile-nav .np-nav__menu {
  flex-direction: column;
  align-items: stretch;
  overflow: visible;
  padding: 0 var(--sp-4);
}
.np-mobile-nav .np-nav__link {
  padding: 10px var(--sp-3);
  font-size: var(--t-sm);
}

/* ══════════════════════════════════════════════════════
   TOPBAR TICKER (opcional — barra de última hora)
   ══════════════════════════════════════════════════════ */
.np-ticker {
  background: var(--np-accent);
  height: 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: fixed;
  top: var(--hdr-h); left: 0; right: 0;
  z-index: 998;
}
.np-ticker__label {
  flex-shrink: 0;
  background: rgba(0,0,0,.2);
  color: #fff;
  font-size: var(--t-xs);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0 var(--sp-4);
  height: 100%;
  display: flex;
  align-items: center;
}
.np-ticker__track {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
}
.np-ticker__inner {
  display: inline-flex;
  gap: var(--sp-8);
  animation: npTicker 40s linear infinite;
}
.np-ticker__inner:hover { animation-play-state: paused; }
.np-ticker a {
  font-size: var(--t-xs);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.np-ticker a:hover { text-decoration: underline; }
@keyframes npTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ══════════════════════════════════════════════════════
   SITE FOOTER
   ══════════════════════════════════════════════════════ */
.np-footer {
  background: var(--np-hdr-bg);
  border-top: 1px solid var(--np-hdr-border);
  margin-top: var(--sp-8);
}

.np-footer__main {
  padding: var(--sp-7) 0 var(--sp-6);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-6);
}

.np-footer__brand {}
.np-footer__brand-logo {
  font-family: var(--f-serif);
  font-size: var(--t-xl);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: var(--sp-3);
}
.np-footer__brand-desc {
  font-size: var(--t-sm);
  color: rgba(255,255,255,.5);
  line-height: 1.6;
  max-width: 280px;
}

.np-footer__col-title {
  font-size: var(--t-xs);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: var(--sp-4);
}

.np-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.np-footer__links a {
  font-size: var(--t-sm);
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color var(--t-fast);
}
.np-footer__links a:hover { color: #fff; }

/* ── Social icons ──────────────────────────────────── */
.np-footer__social {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.np-footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.6);
  font-size: 14px;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.np-footer__social-link:hover {
  background: var(--np-accent);
  color: #fff;
}

/* ── Footer bottom bar ─────────────────────────────── */
.np-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: var(--sp-4) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.np-footer__copy {
  font-size: var(--t-xs);
  color: rgba(255,255,255,.35);
}
.np-footer__legal {
  display: flex;
  gap: var(--sp-4);
}
.np-footer__legal a {
  font-size: var(--t-xs);
  color: rgba(255,255,255,.35);
  text-decoration: none;
  transition: color var(--t-fast);
}
.np-footer__legal a:hover { color: rgba(255,255,255,.7); }

/* ══════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════ */
.np-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.np-sidebar-widget {
  background: var(--np-surface);
  border: 1px solid var(--np-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.np-sidebar-widget__header {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--np-border);
  background: var(--np-surface-alt);
}
.np-sidebar-widget__title {
  font-size: var(--t-xs);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--np-text-sec);
  margin: 0;
}
.np-sidebar-widget__body {
  padding: var(--sp-4);
}

/* Widget: notas más leídas */
.np-sidebar-leidas {}
.np-sidebar-leidas__item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--np-border);
}
.np-sidebar-leidas__item:last-child { border-bottom: none; }
.np-sidebar-leidas__num {
  font-size: var(--t-xl);
  font-weight: 800;
  font-family: var(--f-serif);
  color: var(--np-border-str);
  line-height: 1;
  min-width: 24px;
}
.np-sidebar-leidas__text {}
.np-sidebar-leidas__title {
  font-size: var(--t-sm);
  font-family: var(--f-serif);
  font-weight: 700;
  color: var(--np-text);
  text-decoration: none;
  line-height: 1.3;
  display: block;
}
.np-sidebar-leidas__title:hover { color: var(--np-accent); }
.np-sidebar-leidas__meta {
  font-size: var(--t-xs);
  color: var(--np-text-muted);
  margin-top: var(--sp-1);
}

/* Widget: publicidad sidebar */
.np-sidebar-ad {
  text-align: center;
}
.np-sidebar-ad img {
  margin: 0 auto;
  max-width: 100%;
}

/* ══════════════════════════════════════════════════════
   READING PROGRESS BAR
   ══════════════════════════════════════════════════════ */
.np-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--np-accent);
  z-index: 2000;
  transition: width .1s linear;
}

/* ══════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════ */
.np-pagination {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-6) 0;
}
.np-pagination a,
.np-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--np-border);
  color: var(--np-text-sec);
  transition: all var(--t-fast);
}
.np-pagination a:hover {
  border-color: var(--np-accent);
  color: var(--np-accent);
}
.np-pagination .current,
.np-pagination span.current {
  background: var(--np-accent);
  border-color: var(--np-accent);
  color: #fff;
}

/* ══════════════════════════════════════════════════════
   SEARCH FORM
   ══════════════════════════════════════════════════════ */
.np-search-form {
  display: flex;
  gap: var(--sp-2);
}
.np-search-form input[type="search"] {
  flex: 1;
  padding: 9px var(--sp-4);
  border: 1px solid var(--np-border-str);
  border-radius: var(--r-md);
  font-size: var(--t-base);
  background: var(--np-surface);
  color: var(--np-text);
  outline: none;
  transition: border-color var(--t-fast);
}
.np-search-form input[type="search"]:focus {
  border-color: var(--np-accent);
}
.np-search-form button {
  padding: 9px var(--sp-4);
  background: var(--np-accent);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast);
}
.np-search-form button:hover { background: var(--np-accent-dk); }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .np-footer__main {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-5);
  }
}

@media (max-width: 768px) {
  .np-nav { display: none; }
  .np-header__search { display: none; }
  .np-header__hamburger { display: flex; }

  .np-footer__main {
    grid-template-columns: 1fr;
    padding: var(--sp-6) 0 var(--sp-5);
  }
  .np-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
  }
}

/* ══════════════════════════════════════════════════════
   GRIDS DE CARDS — reutilizables en portada, secciones,
   páginas de autor, etc.
   ══════════════════════════════════════════════════════ */
.np-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  margin-bottom: var(--sp-7);
}
.np-grid-3 .np-card__img {
  aspect-ratio: 3/2;
  border-radius: var(--r-md);
  margin-bottom: var(--sp-3);
}
.np-grid-3 .np-card__title {
  font-size: var(--t-md);
}

.np-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-7);
}
.np-grid-4 .np-card__img {
  aspect-ratio: 3/2;
  border-radius: var(--r-md);
  margin-bottom: var(--sp-3);
}
.np-grid-4 .np-card__title {
  font-size: clamp(13px, 1.2vw, 16px);
}

@media (max-width: 1100px) {
  .np-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .np-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .np-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .np-grid-3,
  .np-grid-4 { grid-template-columns: 1fr; }
}
