/* ============================================================
   ÓPTIMO PLUS — Noticias de IA
   ============================================================ */

.nw-page { padding: 130px 0 100px; min-height: 70vh; }

/* Encabezado */
.nw-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 40px; }
.nw-head h1 { font-size: clamp(36px, 4.6vw, 68px); max-width: 860px; line-height: 1.0; text-wrap: balance; margin-bottom: 18px; }
.nw-head p { color: var(--gray-1); font-size: 17px; max-width: 620px; line-height: 1.6; }

.nw-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; padding-bottom: 20px; border-bottom: 1px solid var(--line-strong); }
.nw-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.nw-chips button {
  padding: 8px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--gray-1);
  transition: background .2s, color .2s, border-color .2s;
}
.nw-chips button:hover { border-color: var(--orange); color: var(--orange); }
.nw-chips button.on { background: var(--ink); border-color: var(--ink); color: white; }
.nw-search {
  width: 260px; max-width: 100%; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; color: var(--ink);
}
.nw-search:focus { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Metadatos */
.nw-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--gray-2); margin-bottom: 10px; }
.nw-cat { font-weight: 700; color: var(--orange-deep); background: var(--orange-tint); padding: 3px 10px; border-radius: 999px; }
.nw-draft { font-weight: 700; color: #92400E; background: #FEF3C7; padding: 3px 10px; border-radius: 999px; }

/* Portadas */
.nw-cover { aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: var(--bg-soft); }
.nw-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease-out); }
.nw-cover-empty {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,107,53,0.35), transparent 55%),
    linear-gradient(135deg, #1E1D1B, #141413);
}
.nw-cover-empty span { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 26px; letter-spacing: -0.02em; color: rgba(255,255,255,0.9); }

/* Destacada */
.nw-lead { display: grid; grid-template-columns: 1.25fr 1fr; gap: 44px; align-items: center; margin-bottom: 12px; }
.nw-cover.big { aspect-ratio: 16 / 10; border-radius: 24px; }
.nw-lead:hover .nw-cover img, .nw-card-link:hover .nw-cover img { transform: scale(1.03); }
.nw-lead h2 { font-size: clamp(28px, 3.2vw, 46px); line-height: 1.05; margin-bottom: 14px; text-wrap: balance; transition: color .2s; }
.nw-lead:hover h2 { color: var(--orange); }
.nw-lead p { color: var(--gray-1); font-size: 16.5px; line-height: 1.6; margin-bottom: 18px; }
.nw-read { font-weight: 700; color: var(--orange); font-size: 14.5px; }

/* Rejilla */
.nw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 28px; margin-top: 56px; }
.nw-card { display: flex; flex-direction: column; }
.nw-card-link { display: flex; flex-direction: column; gap: 16px; }
.nw-card h3 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 21px; line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 8px; transition: color .2s; }
.nw-card-link:hover h3 { color: var(--orange); }
.nw-card p { font-size: 14.5px; color: var(--gray-1); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.nw-admin-row { display: flex; gap: 8px; margin-top: 12px; }
.nw-admin-row.lead { margin-bottom: 8px; }
.nw-admin-row button { font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); }
.nw-admin-row button:hover { border-color: var(--ink); }
.nw-admin-row button.danger { color: #B91C1C; }
.nw-admin-row button.danger:hover { border-color: #B91C1C; }

.nw-state { padding: 80px 0; text-align: center; color: var(--gray-1); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.nw-state h2 { font-size: clamp(28px, 3vw, 40px); color: var(--ink); }

/* Artículo */
.nw-back { display: inline-block; font-size: 14px; font-weight: 600; color: var(--gray-1); margin-bottom: 28px; }
.nw-back:hover { color: var(--orange); }
.nw-a-title { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.02; margin: 6px 0 20px; text-wrap: balance; }
.nw-a-lede { font-size: clamp(17px, 1.5vw, 21px); color: var(--gray-1); line-height: 1.55; margin-bottom: 24px; }
.nw-a-cover { margin: 40px auto 48px; max-width: 1140px; }
.nw-a-cover img { width: 100%; max-height: 620px; object-fit: cover; border-radius: 28px; display: block; }
.nw-body { font-size: 18px; line-height: 1.8; color: var(--ink-2); margin-top: 24px; }
.nw-body p { margin-bottom: 1.3em; }
.nw-body h2 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 28px; letter-spacing: -0.02em; line-height: 1.2; margin: 1.6em 0 0.6em; color: var(--ink); }
.nw-body ul { margin: 0 0 1.3em 1.2em; }
.nw-body li { margin-bottom: 0.4em; }
.nw-body a, .nw-source a { color: var(--orange-deep); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.nw-source { font-size: 14.5px; color: var(--gray-2); margin-top: 8px; }
.nw-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 36px 0; padding: 18px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); font-size: 13.5px; }
.nw-share > span { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray-2); margin-right: 6px; }
.nw-share a, .nw-share button { font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); }
.nw-share a:hover, .nw-share button:hover { border-color: var(--orange); color: var(--orange); }
.nw-cta { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 28px; border-radius: 22px; background: var(--ink); color: white; }
.nw-cta strong { display: block; font-size: 17px; margin-bottom: 4px; }
.nw-cta span { font-size: 14px; color: rgba(255,255,255,0.65); }
.nw-more { margin-top: 100px; }
.nw-more > h3 { font-size: clamp(28px, 3vw, 40px); }
.nw-more .nw-grid { margin-top: 28px; }

/* Bloque en el inicio */
.nw-teaser-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.nw-teaser-head h2 { font-size: clamp(32px, 3.8vw, 56px); }
#noticias .nw-grid { margin-top: 44px; }

/* Editor */
.nw-editor { max-width: 640px !important; max-height: 92vh; overflow-y: auto; }
.nw-editor form { display: flex; flex-direction: column; }
.nw-editor h4 { margin-bottom: 16px; }
.nw-editor .booking-label { margin-top: 12px; }
.nw-ed-eyebrow { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--orange); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }
.nw-ed-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nw-ed-body { font-family: inherit; resize: vertical; min-height: 200px; line-height: 1.6; }
.nw-editor textarea { font-family: inherit; resize: vertical; }
.nw-ed-cover { display: flex; gap: 12px; align-items: center; }
.nw-ed-cover img { width: 120px; height: 76px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.nw-ed-cover-ctl { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.nw-file { position: relative; overflow: hidden; align-self: flex-start; }
.nw-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.nw-ed-hint { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--gray-3); margin-top: 6px; word-break: break-all; }
.nw-ed-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--gray-1); margin: 18px 0 14px; cursor: pointer; }
.nw-ed-check input { margin-top: 3px; accent-color: var(--orange); }
.nw-error { margin-bottom: 10px; padding: 10px 14px; border-radius: 10px; background: rgba(239,68,68,.08); color: #b91c1c; font-size: 13px; }

@media (max-width: 960px) {
  .nw-lead { grid-template-columns: 1fr; gap: 22px; }
  .nw-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nw-page { padding-top: 100px; }
  .nw-head { flex-direction: column; align-items: flex-start; }
  .nw-grid { grid-template-columns: 1fr; }
  .nw-search { width: 100%; }
  .nw-body { font-size: 16.5px; }
  .nw-cta { flex-direction: column; align-items: flex-start; }
  .nw-ed-row { grid-template-columns: 1fr; }
  .nw-ed-cover { flex-direction: column; align-items: stretch; }
  .nw-ed-cover img { width: 100%; height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .nw-cover img { transition: none; }
}
.nw-cover-empty span { padding: 0 20px; text-align: center; line-height: 1.15; }
.nw-grid .nw-cover-empty span { font-size: 22px; }
.foot ul .foot-text { color: var(--gray-1); font-size: 14px; }
