/* ══════════════════════════════════════════════════════════════════════════
   Diario IndusTech — índice y páginas de nota.
   Lo consumen los HTML GENERADOS por build-notas.py. No edites esos HTML.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Índice ─────────────────────────────────────────────────────────────── */
.diario-main  { max-width: 1120px; margin: 0 auto; padding: 7rem 1.4rem 4rem; }
.diario-head  { max-width: 780px; margin-bottom: 3rem; }
.diario-label { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
                color: var(--red); font-weight: 800; margin-bottom: .8rem; }
.diario-head h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); font-weight: 900; line-height: 1.08;
                  letter-spacing: -.03em; color: var(--white); margin-bottom: 1rem; }
.diario-head h1 span { color: var(--red); }
.diario-head p { color: var(--gray); font-size: 1.05rem; line-height: 1.7; }

.diario-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.6rem; }
.diario-card  { background: var(--dark2); border: 1px solid rgba(255,255,255,.07);
                border-radius: 16px; overflow: hidden; transition: border-color .2s, transform .2s; }
.diario-card:hover { border-color: rgba(192,21,42,.5); transform: translateY(-3px); }
.diario-card a { text-decoration: none; display: block; height: 100%; }
.diario-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.diario-card-txt { padding: 1.3rem 1.4rem 1.5rem; }
.diario-cat  { display: inline-block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
               font-weight: 800; color: var(--red); margin-bottom: .6rem; }
.diario-card h2 { font-size: 1.18rem; font-weight: 800; line-height: 1.3; color: var(--white);
                  margin-bottom: .55rem; }
.diario-card p  { color: var(--gray); font-size: .93rem; line-height: 1.6; margin-bottom: .8rem; }
.diario-card time { color: var(--tenue, #64748b); font-size: .8rem; }
.diario-card.destacada { grid-column: 1 / -1; }
.diario-card.destacada h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
.diario-vacio { color: var(--gray); }
@media (min-width: 900px) {
  .diario-card.destacada a { display: grid; grid-template-columns: 1.25fr 1fr; align-items: stretch; }
  .diario-card.destacada img { height: 100%; aspect-ratio: auto; }
  .diario-card.destacada .diario-card-txt { padding: 2.2rem; align-self: center; }
}

/* ── Página de nota ─────────────────────────────────────────────────────── */
.nota-main { max-width: 820px; margin: 0 auto; padding: 7rem 1.4rem 4rem; }
.nota-miga { font-size: .82rem; color: var(--tenue, #64748b); margin-bottom: 1.6rem; }
.nota-miga a { color: var(--gray); text-decoration: none; }
.nota-miga a:hover { color: var(--red); }
.nota-miga .actual { color: var(--gray); }

.nota-cat { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800;
            color: var(--red); margin-bottom: .8rem; }
.nota-head h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 900; line-height: 1.12;
                letter-spacing: -.025em; color: var(--white); margin-bottom: 1rem; }
.nota-sumario { font-size: 1.1rem; line-height: 1.65; color: var(--light); margin-bottom: 1.2rem; }
.nota-meta { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
             color: var(--tenue, #64748b); font-size: .88rem;
             border-top: 1px solid rgba(255,255,255,.08); padding-top: 1rem; }
.nota-meta a { color: var(--gray); }

.nota-portada { width: 100%; height: auto; border-radius: 14px; margin: 2rem 0 .5rem; display: block; }

.nota-cuerpo { margin-top: 2.2rem; }
.nota-cuerpo p  { color: var(--light); font-size: 1.05rem; line-height: 1.82; margin-bottom: 1.2rem; }
.nota-cuerpo h2 { font-size: clamp(1.35rem, 3.2vw, 1.85rem); font-weight: 800; color: var(--white);
                  line-height: 1.25; margin: 2.6rem 0 .9rem; }
.nota-cuerpo h3 { font-size: clamp(1.08rem, 2.4vw, 1.3rem); font-weight: 800; color: var(--light);
                  margin: 1.9rem 0 .6rem; }
.nota-cuerpo ul { margin: 0 0 1.3rem 1.2rem; }
.nota-cuerpo li { color: var(--light); font-size: 1.02rem; line-height: 1.75; margin-bottom: .5rem; }
.nota-cuerpo strong { color: var(--white); font-weight: 700; }
.nota-cuerpo code { background: rgba(255,255,255,.07); padding: .12rem .4rem; border-radius: 5px;
                    font-size: .92em; color: var(--gold); }
.nota-cuerpo a { color: #7fb2ff; }
.nota-cita { border-left: 3px solid var(--red); background: rgba(192,21,42,.07);
             padding: 1rem 1.2rem; border-radius: 0 10px 10px 0; margin: 1.6rem 0;
             color: var(--light); font-size: 1.02rem; line-height: 1.7; }

/* ── Afiliados ──────────────────────────────────────────────────────────── */
.af-seccion { margin-top: 3.2rem; }
.af-seccion > h2 { font-size: clamp(1.35rem, 3.2vw, 1.85rem); font-weight: 800; color: var(--white);
                   margin-bottom: 1rem; }
.nota-aviso-afiliados { background: rgba(212,175,55,.08); border: 1px solid rgba(212,175,55,.25);
                        border-radius: 10px; padding: .95rem 1.1rem; color: var(--gray);
                        font-size: .89rem; line-height: 1.65; margin-bottom: 1.6rem; }
.nota-aviso-afiliados strong { color: var(--gold); }
.af-grid  { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.af-card  { background: var(--dark2); border: 1px solid rgba(255,255,255,.08); border-radius: 14px;
            padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; }
.af-tienda { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800;
             color: var(--gold); margin-bottom: .5rem; }
.af-nombre { font-size: 1.02rem; font-weight: 800; color: var(--white); line-height: 1.35;
             margin-bottom: .5rem; }
.af-por    { color: var(--gray); font-size: .9rem; line-height: 1.6; margin-bottom: .9rem; flex: 1; }
.af-precio { color: var(--light); font-weight: 800; margin-bottom: .8rem; }
.af-btn    { display: inline-block; text-align: center; background: var(--red); color: #fff;
             text-decoration: none; font-weight: 700; font-size: .92rem; padding: .65rem 1rem;
             border-radius: 9px; }
.af-btn:hover { background: var(--red2); }

/* ── FAQ, CTA y relacionadas ────────────────────────────────────────────── */
.nota-faq { margin-top: 3.2rem; }
.nota-faq > h2 { font-size: clamp(1.35rem, 3.2vw, 1.85rem); font-weight: 800; color: var(--white);
                 margin-bottom: 1.2rem; }
.nota-faq-item { border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.2rem; margin-top: 1.2rem; }
.nota-faq-item:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.nota-faq-item h3 { font-size: 1.05rem; font-weight: 800; color: var(--light); margin-bottom: .45rem; }
.nota-faq-item p  { color: var(--gray); font-size: .98rem; line-height: 1.75; }

.nota-cta { margin-top: 3.4rem; background: linear-gradient(135deg, rgba(192,21,42,.12), rgba(26,86,219,.08));
            border: 1px solid rgba(192,21,42,.25); border-radius: 16px; padding: 2rem 1.6rem; }
.nota-cta h2 { font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: 800; color: var(--white);
               margin-bottom: .7rem; }
.nota-cta p  { color: var(--gray); line-height: 1.7; margin-bottom: 1.3rem; }
.nota-cta-btns { display: flex; gap: .8rem; flex-wrap: wrap; }
.nota-btn-rojo  { background: var(--red); color: #fff; text-decoration: none; font-weight: 700;
                  padding: .8rem 1.4rem; border-radius: 10px; }
.nota-btn-rojo:hover { background: var(--red2); }
.nota-btn-linea { border: 1px solid rgba(255,255,255,.25); color: var(--light); text-decoration: none;
                  font-weight: 600; padding: .8rem 1.4rem; border-radius: 10px; }
.nota-btn-linea:hover { border-color: var(--red); color: #fff; }

.nota-relacionadas { margin-top: 3.4rem; }
.nota-relacionadas > h2 { font-size: 1.3rem; font-weight: 800; color: var(--white); margin-bottom: 1rem; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .9rem; }
.rel-card { background: var(--dark2); border: 1px solid rgba(255,255,255,.07); border-radius: 12px;
            padding: 1rem 1.1rem; text-decoration: none; display: block; }
.rel-card:hover { border-color: rgba(192,21,42,.5); }
.rel-cat  { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
            font-weight: 800; color: var(--red); margin-bottom: .4rem; }
.rel-tit  { color: var(--light); font-weight: 700; line-height: 1.35; font-size: .96rem; }

@media (max-width: 640px) {
  .nota-main, .diario-main { padding-top: 5.5rem; }
  .nota-cuerpo p, .nota-cuerpo li { font-size: 1rem; }
}

/* css/nav.css aplica "nav { position: fixed }" a CUALQUIER <nav>. La miga de pan
   es un <nav> semántico y heredaba la barra fija, montándose sobre el header.
   No quitar esta regla sin comprobar el header de las notas. */
nav.nota-miga {
  position: static; display: block; padding: 0; background: none;
  backdrop-filter: none; border: 0; box-shadow: none; z-index: auto;
  transition: none;
}

/* Video dentro de una nota. Siempre con poster y preload="none". */
.nota-video { margin: 2.6rem 0 0; }
.nota-video video { width: 100%; max-width: 380px; height: auto; display: block;
                    margin: 0 auto; border-radius: 14px; background: #000;
                    border: 1px solid rgba(255,255,255,.08); }
.nota-video figcaption { text-align: center; color: var(--tenue, #64748b);
                         font-size: .87rem; margin-top: .8rem; line-height: 1.5; }

/* ══ Sub-navegación del diario ═════════════════════════════════════════════
   Dos anclas y nada más: las notas mandan, la efeméride es el remate del pie. */
/* Igual que con la miga de pan: css/nav.css fija CUALQUIER <nav>. Sin este reset
   la sub-navegación se pega arriba y se monta sobre la barra. No quitarlo. */
nav.diario-sub { position: static; z-index: auto; background: none; backdrop-filter: none;
                 border: 0; box-shadow: none; transition: none; padding: 0;
                 justify-content: flex-start; align-items: center; }
.diario-sub  { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.7rem; }
.diario-chip { font-size: .82rem; font-weight: 700; color: var(--gray); text-decoration: none;
               border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
               padding: .45rem 1.05rem; background: rgba(255,255,255,.02);
               transition: color .2s, border-color .2s, background .2s; }
.diario-chip:hover  { color: var(--white); border-color: rgba(192,21,42,.55); }
.diario-chip.activo { color: var(--white); border-color: rgba(192,21,42,.55);
                      background: rgba(192,21,42,.12); }

/* La barra de navegación es fija: sin esto el ancla deja el título por debajo. */
#notas, #efemeride { scroll-margin-top: 92px; }

/* ══ Efeméride del mes — al pie del índice ════════════════════════════════
   Dorado en vez de rojo: se distingue de las notas sin salirse de la paleta. */
.efe        { margin-top: 4.5rem; border-top: 1px solid rgba(255,255,255,.08); padding-top: 3rem; }
.efe-top    { max-width: 720px; margin-bottom: 1.7rem; }
.efe-label  { display: inline-block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
              font-weight: 800; color: var(--gold); margin-bottom: .6rem; }
.efe-top h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 900; color: var(--white);
              letter-spacing: -.02em; line-height: 1.15; margin-bottom: .6rem; }
.efe-intro  { color: var(--gray); font-size: .97rem; line-height: 1.7; }

.efe-card   { display: grid; grid-template-columns: 1fr; gap: 1.2rem;
              background: linear-gradient(135deg, rgba(212,175,55,.075), rgba(26,86,219,.05));
              border: 1px solid rgba(212,175,55,.22); border-radius: 18px; padding: 1.5rem 1.35rem; }
.efe-cal    { display: flex; flex-direction: row; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.efe-dia    { font-size: 2.7rem; font-weight: 900; color: var(--gold); line-height: 1; }
.efe-mes    { font-size: .98rem; font-weight: 700; color: var(--light); }
.efe-hito   { font-size: .7rem; font-weight: 800; letter-spacing: .08em; color: var(--dark);
              background: var(--gold); border-radius: 999px; padding: .22rem .6rem; }
.efe-txt h3 { font-size: clamp(1.15rem, 2.8vw, 1.5rem); font-weight: 800; color: var(--white);
              line-height: 1.3; margin-bottom: .7rem; }
.efe-txt p  { color: var(--light); font-size: 1rem; line-height: 1.75; margin-bottom: .9rem; }
.efe-porque { color: var(--gray); font-size: .95rem; }
.efe-porque strong { color: var(--gold); }
.efe-fuente { display: inline-block; font-size: .85rem; font-weight: 700; color: #7fb2ff;
              text-decoration: none; border-bottom: 1px solid rgba(127,178,255,.35); }
.efe-fuente:hover { color: var(--white); border-color: var(--white); }

@media (min-width: 720px) {
  .efe-card { grid-template-columns: 132px 1fr; gap: 2rem; padding: 2rem 2.2rem; align-items: start; }
  .efe-cal  { flex-direction: column; align-items: flex-start; gap: .4rem;
              border-right: 1px solid rgba(212,175,55,.2); padding-right: 1.5rem; }
  .efe-dia  { font-size: 3.5rem; }
}

.efe-anteriores    { margin-top: 1.8rem; }
.efe-anteriores h3 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
                     font-weight: 800; color: var(--gray); margin-bottom: .8rem; }
.efe-anteriores ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.efe-anteriores li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .7rem;
                     background: var(--dark2); border: 1px solid rgba(255,255,255,.07);
                     border-radius: 12px; padding: .8rem 1rem; }
.efe-mini-fecha { font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
                  color: var(--gold); white-space: nowrap; }
.efe-mini-tit   { color: var(--light); font-size: .95rem; font-weight: 600; line-height: 1.45;
                  flex: 1; min-width: 0; }
.efe-mini-src   { font-size: .78rem; color: var(--gray); text-decoration: none; white-space: nowrap; }
.efe-mini-src:hover { color: #7fb2ff; }

.efe-volver { display: inline-block; margin-top: 1.7rem; font-size: .85rem; font-weight: 600;
              color: var(--gray); text-decoration: none; }
.efe-volver:hover { color: var(--red); }

/* En móvil la fuente cabía junto al título y el texto se partía a su alrededor. */
@media (max-width: 560px) {
  .efe-anteriores li { flex-direction: column; align-items: flex-start; gap: .35rem; }
  .efe-card { padding: 1.3rem 1.15rem; }
}

/* ── E-E-A-T: fuentes, actualización, tipo, cómo escribimos (sep-2026) ── */
.nota-act, .nota-tipo { color: var(--gray); }
.nota-tipo { border: 1px solid rgba(212,175,55,.35); color: var(--gold); font-size: .7rem;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .55rem; border-radius: 999px; }
.nota-fuentes { margin-top: 2.6rem; border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.4rem; }
.nota-fuentes h2 { font-size: 1.05rem; font-weight: 800; color: var(--light); margin-bottom: .6rem; }
.nota-fuentes ul { margin: 0 0 0 1.1rem; }
.nota-fuentes li { color: var(--gray); font-size: .9rem; line-height: 1.7; margin-bottom: .25rem; }
.nota-fuentes a { color: var(--gray); text-decoration: underline; text-decoration-color: rgba(192,21,42,.5); }
.nota-fuentes a:hover { color: var(--white); }
.nota-como { margin-top: 2.4rem; font-size: .86rem; color: var(--gray); line-height: 1.7;
  border-left: 3px solid rgba(212,175,55,.5); padding-left: .9rem; }
.nota-como a { color: var(--light); text-decoration: underline; text-decoration-color: rgba(192,21,42,.5); }

/* ── Video de YouTube: fachada, el iframe solo carga al hacer clic ── */
.nota-video-yt { margin: 2.6rem 0 0; }
.yt-fachada { position: relative; width: 100%; max-width: 720px; aspect-ratio: 16 / 9;
  margin: 0 auto; border-radius: 14px; overflow: hidden; cursor: pointer;
  background: var(--dark2); border: 1px solid rgba(255,255,255,.08); }
.yt-fachada img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff; }
.yt-play::before { content: ''; position: absolute; width: 68px; height: 48px; border-radius: 12px;
  background: rgba(192,21,42,.92); z-index: -1; }
.yt-fachada:hover .yt-play::before, .yt-fachada:focus .yt-play::before { background: var(--red2); }
.nota-video-yt iframe { width: 100%; max-width: 720px; aspect-ratio: 16 / 9; height: auto;
  display: block; margin: 0 auto; border: 0; border-radius: 14px; }
.nota-video-yt figcaption { text-align: center; color: var(--tenue, #64748b); font-size: .85rem; margin-top: .6rem; }
.nota-video-yt figcaption a { color: var(--gray); }

/* Pie de la portada: identifica una ilustración frente a una foto de trabajo real */
.nota-portada-fig { margin: 0; }
.nota-portada-credito { font-size: .78rem; color: var(--tenue, #64748b); margin-top: .5rem;
  text-align: right; font-style: italic; }
