/* ── NOTICIAS.CSS — Auditamerica S.A.S ───────────────────────────────── */
/* Las variables CSS vienen de site.css, que siempre se carga antes.     */
/* No redefinir :root aquí para evitar inconsistencias.                  */

/* ── PÁGINA PRINCIPAL DE NOTICIAS ───────────────────────────────────── */

.noticias-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a7a 100%);
  padding: 64px 0 56px;
  color: var(--white);
}

.noticias-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.noticias-hero-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.noticias-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  margin: 0;
}

.noticias-hero h1 em {
  color: #e87c7c;
  font-style: normal;
}

.noticias-hero-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  line-height: 1.6;
  margin-top: 4px;
}

/* ── BARRA DE CONTROLES ─────────────────────────────────────────────── */

.noticias-controls {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 88px;
  z-index: 40;
}

.noticias-controls-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.noticias-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.noticias-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--ink-500);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}

#noticiasSearch {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--cream);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#noticiasSearch:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15, 44, 89, 0.08);
  background: var(--white);
}

#noticiasSearch::placeholder {
  color: var(--ink-500);
}

.noticias-order-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.noticias-order-wrap label {
  font-size: 13px;
  color: var(--ink-700);
  font-weight: 500;
  white-space: nowrap;
}

#noticiasOrder {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--cream);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

#noticiasOrder:focus {
  border-color: var(--navy);
}

/* ── FILTROS DE CATEGORÍA ───────────────────────────────────────────── */

.noticias-filters {
  padding: 20px 0 0;
}

.noticias-filters-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
  margin-right: 4px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-chip:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: rgba(15, 44, 89, 0.04);
}

.filter-chip input[type="checkbox"] {
  display: none;
}

.filter-chip.active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.filter-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

/* ── CONTENIDO PRINCIPAL ────────────────────────────────────────────── */

.noticias-main {
  padding: 40px 0 80px;
}

.noticias-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.noticias-count {
  font-size: 14px;
  color: var(--ink-700);
}

.noticias-count strong {
  color: var(--ink);
  font-weight: 700;
}

/* ── GRID DE TARJETAS ───────────────────────────────────────────────── */

.noticias-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── TARJETA INDIVIDUAL ─────────────────────────────────────────────── */

.noticia-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.3s ease,
              border-color 0.2s ease;
  box-shadow: 0 2px 12px rgba(15, 44, 89, 0.06);
}

.noticia-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(15, 44, 89, 0.22);
}

.noticia-card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a7a 100%);
  position: relative;
}

.noticia-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.noticia-card:hover .noticia-card-img img {
  transform: scale(1.04);
}

.noticia-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.noticia-card-img-placeholder svg {
  width: 48px;
  height: 48px;
  stroke: rgba(255,255,255,0.3);
  fill: none;
  stroke-width: 1.5;
}

.noticia-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.noticia-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.noticia-categoria-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(204, 30, 30, 0.08);
  color: var(--red);
  border: 1px solid rgba(204, 30, 30, 0.15);
}

.noticia-fecha {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 500;
}

.noticia-card-titulo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
  flex: 1;
}

.noticia-card-resumen {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-700);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.noticia-card-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  transition: gap 0.2s ease;
}

.noticia-card:hover .noticia-card-cta {
  gap: 8px;
}

/* ── SIN RESULTADOS ─────────────────────────────────────────────────── */

.noticias-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
}

.noticias-empty svg {
  width: 56px;
  height: 56px;
  stroke: var(--ink-500);
  fill: none;
  stroke-width: 1.5;
  margin: 0 auto 20px;
  display: block;
}

.noticias-empty h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.noticias-empty p {
  font-size: 15px;
  color: var(--ink-700);
}

/* ── PÁGINA DE NOTICIA INDIVIDUAL ───────────────────────────────────── */

.post-breadcrumb {
  padding: 20px 0 0;
  font-size: 13px;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-breadcrumb a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.post-breadcrumb a:hover {
  color: var(--red);
}

.post-breadcrumb svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 40px 0 80px;
  align-items: start;
}

.post-article header {
  margin-bottom: 32px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.post-titulo {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 16px;
}

.post-resumen {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-700);
  border-left: 3px solid var(--red);
  padding-left: 18px;
  margin: 0;
}

.post-cover {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin: 32px 0;
  background: linear-gradient(135deg, var(--navy), #1a3a7a);
}

.post-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.post-cover-placeholder {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-cover-placeholder svg {
  width: 64px;
  height: 64px;
  stroke: rgba(255,255,255,0.25);
  fill: none;
  stroke-width: 1.5;
}

.post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}

.post-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin: 36px 0 14px;
}

.post-content h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 28px 0 10px;
}

.post-content p {
  margin-bottom: 18px;
  color: var(--ink);
}

.post-content ul,
.post-content ol {
  padding-left: 22px;
  margin-bottom: 18px;
}

.post-content li {
  margin-bottom: 8px;
  color: var(--ink);
}

.post-content strong {
  color: var(--navy);
  font-weight: 700;
}

.post-content blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  background: rgba(15, 44, 89, 0.04);
  border-left: 4px solid var(--navy);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--ink-700);
}

.post-content a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.post-content a:hover {
  color: var(--red);
}

/* ── SIDEBAR DEL POST ───────────────────────────────────────────────── */

.post-sidebar {
  position: sticky;
  top: 108px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

.sidebar-card h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 14px;
}

.sidebar-card p {
  font-size: 14px;
  color: var(--ink-700);
  line-height: 1.6;
  margin-bottom: 14px;
}

.sidebar-card .button {
  width: 100%;
  justify-content: center;
  font-size: 14px;
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-tag {
  padding: 5px 12px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-tag:hover {
  border-color: var(--navy);
  color: var(--navy);
}

/* ── POSTS RELACIONADOS ─────────────────────────────────────────────── */

.related-posts {
  margin: 48px 0 32px;
  padding-top: 32px;
  border-top: 1.5px solid var(--border);
}

.related-posts h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 20px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15,44,89,0.1);
  border-color: rgba(15,44,89,0.22);
}

.related-card-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--red);
}

.related-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}

.related-card-cta {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  margin-top: auto;
}

@media (max-width: 880px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ── VOLVER BOTÓN ───────────────────────────────────────────────────── */

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  padding: 8px 0;
  transition: gap 0.2s, color 0.2s;
}

.btn-back:hover {
  gap: 10px;
  color: var(--red);
}

.btn-back svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: transform 0.2s;
}

.btn-back:hover svg {
  transform: translateX(-3px);
}

/* ── AUTOR ──────────────────────────────────────────────────────────── */

.post-author-line {
  font-size: 13px;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-author-line strong {
  color: var(--ink-700);
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr;
  }
  .post-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 880px) {
  .noticias-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .noticias-controls-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .noticias-search-wrap {
    max-width: 100%;
  }

  .noticias-order-wrap {
    margin-left: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .noticias-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .noticias-hero {
    padding: 48px 0 40px;
  }

  .post-sidebar {
    grid-template-columns: 1fr;
  }

  .post-layout {
    padding: 28px 0 60px;
    gap: 32px;
  }
}
