/* Sección "Noticias y artículos" de iveter.com.
   Complementa a ../css/style.css (cabecera, menú y pie de la web). */

:root {
  --naranja: #FF8C2E;
  --naranja-osc: #E06A00;
  --naranja-claro: #fff4ea;
  --texto: #2b2b2b;
  --suave: #6b6b6b;
  --borde: #e6e6e6;
}

body { background: #f7f7f7 url(../img/shattered.png); color: var(--texto); }

.sec { max-width: 1140px; margin: 0 auto; padding: 190px 20px 80px; }
.sec-estrecha { max-width: 780px; }

/* Migas */
.migas { font-size: 14px; color: var(--suave); margin-bottom: 1.5em; }
.migas a { color: var(--suave); text-decoration: none; }
.migas a:hover { color: var(--naranja); text-decoration: underline; }
.migas span[aria-hidden] { margin: 0 .45em; }

/* Cabecera de la sección (portada, año, tema) */
.sec-cab { text-align: center; margin-bottom: 2.2em; }
.sec-cab h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.2; margin-bottom: .35em; }
.sec-cab p { color: var(--suave); max-width: 640px; margin: 0 auto; line-height: 1.6; }

/* Buscador */
.buscador { display: flex; max-width: 620px; margin: 0 auto 1.4em; background: #fff;
  border: 1px solid var(--borde); border-radius: 30px; overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.buscador input { flex: 1; min-width: 0; border: 0; padding: .85em 1.2em; font-size: 16px; outline: none; background: transparent; }
.buscador button { border: 0; margin: 0; border-radius: 0; background: var(--naranja); color: #fff; padding: 0 1.6em; font-size: 15px; cursor: pointer; }
.buscador button:hover { background: var(--naranja-osc); }
.buscador:focus-within { border-color: var(--naranja); }

.temas { display: flex; flex-wrap: wrap; justify-content: center; gap: .5em; margin-bottom: 2.6em; }
.chip { display: inline-block; padding: .3em .9em; border-radius: 20px; font-size: 14px; text-decoration: none;
  border: 1px solid var(--naranja); color: var(--naranja-osc); background: #fff; }
a.chip:hover, .chip.activo { background: var(--naranja); color: #fff; }
.chip.peq { font-size: 12.5px; padding: .15em .7em; border-color: var(--borde); color: var(--suave); }
a.chip.peq:hover { border-color: var(--naranja); background: #fff; color: var(--naranja-osc); }

.bloque-tit { font-size: 22px; margin: 0 0 1em; display: flex; align-items: baseline; gap: .6em; }
.bloque-tit small { font-size: 14px; color: var(--suave); font-weight: normal; }

/* Tarjetas */
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.tarjeta { background: #fff; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 8px 22px rgba(0,0,0,.08); border-top: 3px solid var(--naranja); transition: transform .2s, box-shadow .2s; }
.tarjeta:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.tarjeta-img { display: block; aspect-ratio: 16 / 9; background: var(--naranja-claro); overflow: hidden; }
.tarjeta-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tarjeta-cuerpo { padding: 1.1em 1.25em 1.3em; display: flex; flex-direction: column; flex: 1; }
.tarjeta h2, .tarjeta h3 { font-size: 18px; line-height: 1.35; margin: .35em 0 .5em; }
.tarjeta h2 a, .tarjeta h3 a { color: var(--texto); text-decoration: none; }
.tarjeta h2 a:hover, .tarjeta h3 a:hover { color: var(--naranja-osc); }
.tarjeta p.resumen { font-size: 14.5px; line-height: 1.6; color: #555; flex: 1; }
.tarjeta .leer { align-self: flex-start; margin-top: 1em; font-size: 14px; color: var(--naranja-osc); text-decoration: none; font-weight: bold; }
.tarjeta .leer:hover { text-decoration: underline; }

.meta { font-size: 13px; color: var(--suave); display: flex; flex-wrap: wrap; gap: .3em .6em; align-items: center; }
.meta a { color: var(--naranja-osc); text-decoration: none; }
.meta a:hover { text-decoration: underline; }

/* Listados (año, tema, resultados de búsqueda) */
.lista { list-style: none; padding: 0; margin: 0; background: #fff; border-radius: 8px; box-shadow: 0 8px 22px rgba(0,0,0,.06); }
.lista li { display: flex; gap: 1.2em; padding: 1.2em 1.4em; border-bottom: 1px solid var(--borde); }
.lista li:last-child { border-bottom: 0; }
.lista .min { flex: 0 0 132px; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; background: var(--naranja-claro); }
.lista .min img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lista h2, .lista h3 { font-size: 17px; line-height: 1.35; margin: .2em 0 .35em; }
.lista h2 a, .lista h3 a { color: var(--texto); text-decoration: none; }
.lista h2 a:hover, .lista h3 a:hover { color: var(--naranja-osc); }
.lista p { font-size: 14.5px; color: #555; line-height: 1.55; }
.mes { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); margin: 2em 0 .7em; }
.mes:first-of-type { margin-top: 0; }

#resultados[hidden], #ultimas[hidden] { display: none; }
.sin-resultados { background: #fff; border-radius: 8px; padding: 2em; text-align: center; color: var(--suave); }

/* Archivo */
.archivo { margin-top: 3.5em; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.caja { background: #fff; border-radius: 8px; padding: 1.4em 1.6em; box-shadow: 0 8px 22px rgba(0,0,0,.06); }
.caja h2 { font-size: 18px; margin-bottom: .8em; }
.caja ul { list-style: none; padding: 0; }
.caja li { padding: .35em 0; border-bottom: 1px dashed var(--borde); display: flex; justify-content: space-between; }
.caja li:last-child { border-bottom: 0; }
.caja a { color: var(--texto); text-decoration: none; }
.caja a:hover { color: var(--naranja-osc); }
.caja .n { color: var(--suave); font-size: 14px; }

.navegar { display: flex; flex-wrap: wrap; gap: .5em; justify-content: center; margin-top: 2.5em; }

/* Artículo */
.art { background: #fff; border-radius: 8px; padding: 2.4em clamp(1.2em, 5vw, 3.2em) 2.6em;
  box-shadow: 0 8px 22px rgba(0,0,0,.07); font-size: 17px; line-height: 1.75; }
.art h1 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.25; margin-bottom: .4em; }
.art .meta { margin-bottom: 1.6em; font-size: 14px; }
.art-portada { display: block; width: 100%; height: auto; border-radius: 6px; margin: 0 0 1.8em; }
.art h2 { font-size: 24px; line-height: 1.3; margin: 1.6em 0 .5em; }
.art h3 { font-size: 19px; line-height: 1.35; margin: 1.4em 0 .4em; }
.art p { margin: 0 0 1.05em; }
.art ul, .art ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.art li { margin-bottom: .35em; }
.art a { color: var(--naranja-osc); }
.art img { max-width: 100%; height: auto; }
.art figure { margin: 1.6em 0; text-align: center; }
.art figcaption { font-size: 14px; color: var(--suave); margin-top: .4em; }
.art blockquote { margin: 1.4em 0; padding: .4em 1.2em; border-left: 4px solid var(--borde); color: #555; font-style: italic; }
.art-aviso { background: var(--naranja-claro); border-left: 4px solid var(--naranja); border-radius: 4px; padding: 1em 1.2em; margin: 1.5em 0; }
.art-aviso p:last-child { margin-bottom: 0; }
.art-video { position: relative; aspect-ratio: 16 / 9; margin: 1.6em 0; }
.art-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }
.art table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 1.2em 0; }
.art td, .art th { border-bottom: 1px solid var(--borde); padding: .6em .8em; text-align: left; vertical-align: top; }
.art tr:last-child td { border-bottom: 0; }
.art .etiquetas { margin-top: 2em; padding-top: 1.2em; border-top: 1px solid var(--borde); display: flex; flex-wrap: wrap; gap: .4em; }

.cta { margin: 2.2em 0; background: linear-gradient(135deg, #FF8C2E, #ff6a00); color: #fff; border-radius: 8px;
  padding: 1.8em 2em; display: flex; flex-wrap: wrap; gap: 1em 2em; align-items: center; justify-content: space-between; }
.cta strong { display: block; font-size: 20px; margin-bottom: .2em; }
.cta p { margin: 0; line-height: 1.5; }
.cta a { background: #fff; color: var(--naranja-osc); font-weight: bold; text-decoration: none; padding: .7em 1.4em; border-radius: 25px; white-space: nowrap; }
.cta a:hover { background: #2b2b2b; color: #fff; }

.relacionados h2 { font-size: 20px; margin: 0 0 1em; }
.relacionados .rejilla { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.relacionados .tarjeta h3 { font-size: 16px; }
.volver { text-align: center; margin-top: 2.2em; }
.volver a { color: var(--naranja-osc); font-weight: bold; text-decoration: none; }

@media (max-width: 640px) {
  .sec { padding-top: 185px; }
  .lista li { flex-direction: column; gap: .7em; }
  .lista .min { flex: none; width: 100%; }
  .art { font-size: 16px; }
  .cta { padding: 1.4em; }
}

/* Sin imagen: logo de Iveter sobre fondo suave */
.tarjeta-img:empty, .lista .min:empty { background: var(--naranja-claro) url(../img/iveter.png) center / 38% auto no-repeat; }
