/* ──────────────────────────────────────────────────────────
   Medical News — Listing & Detail styles (biodigital_health)
   ────────────────────────────────────────────────────────── */

/* ── Listing: hero + horizontal rails ── */
.news-hero-section h3,
.news-rail-section h4 {
  color: var(--casi-negro);
  font-weight: 700;
}
.news-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-auto-rows: minmax(110px, auto);
  gap: 1rem;
}
.news-hero-grid .hero-featured {
  grid-row: span 3;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
}
.news-hero-grid .hero-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
  color: inherit;
}
.news-hero-grid .hero-featured .card-img-top {
  height: 300px;
  object-fit: cover;
}
.news-hero-grid .hero-featured .card-title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--casi-negro);
}
.news-hero-grid .hero-side {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: stretch;
  border: none;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
}
.news-hero-grid .hero-side:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  color: inherit;
}
.news-hero-grid .hero-side-img {
  width: 120px;
  height: 100%;
  object-fit: cover;
}
.news-hero-grid .hero-side .card-body {
  padding: 0.85rem 1rem;
}
.news-hero-grid .hero-side .card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--casi-negro);
}

@media (max-width: 768px) {
  .news-hero-grid {
    grid-template-columns: 1fr;
  }
  .news-hero-grid .hero-featured {
    grid-row: auto;
  }
  .news-hero-grid .hero-side {
    grid-template-columns: 100px 1fr;
  }
}

.news-rail-wrap {
  position: relative;
}
.news-rail-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--casi-negro);
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s, transform 0.15s, color 0.15s;
}
.news-rail-nav:hover {
  background: var(--degradado-biodigital);
  color: var(--casi-negro);
  transform: translateY(-50%) scale(1.08);
}
.news-rail-nav i {
  font-size: 1.1rem;
  line-height: 1;
}
.news-rail-prev { left: -14px; }
.news-rail-next { right: -14px; }
@media (max-width: 576px) {
  .news-rail-nav { display: none; }
}

.news-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0.25rem 0.75rem;
  -webkit-overflow-scrolling: touch;
}
.news-rail::-webkit-scrollbar {
  height: 8px;
}
.news-rail::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 4px;
}
.news-rail::-webkit-scrollbar-thumb:hover {
  background: var(--verde-biodigital);
}
.news-rail-card {
  flex: 0 0 clamp(260px, 28vw, 310px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: none;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
}
.news-rail-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  color: inherit;
}
.news-rail-card .card-img-top {
  height: 160px;
  object-fit: cover;
}
.news-rail-card .card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--casi-negro);
}

/* ── Listing: search bar ── */
.news-search {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}
.news-search-group {
  display: flex;
  align-items: center;
  background: white;
  border: 1.5px solid #e8e8e8;
  border-radius: 999px;
  padding: 4px 4px 4px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.news-search-group:focus-within {
  border-color: var(--verde-biodigital);
  box-shadow: 0 0 0 4px rgba(50, 238, 204, 0.15);
}
.news-search-icon {
  color: var(--verde-biodigital);
  font-size: 1rem;
  margin-right: 10px;
  display: flex;
  align-items: center;
}
.news-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--casi-negro);
  padding: 8px 0;
  min-width: 0;
}
.news-search-input::placeholder {
  color: #9aa0a6;
}
.news-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%23888' d='M4 4l8 8M12 4l-8 8' stroke='%23888' stroke-width='2' stroke-linecap='round'/></svg>")
    no-repeat center;
  cursor: pointer;
}
.news-search-btn {
  background: var(--degradado-biodigital);
  color: var(--casi-negro);
  font-weight: 600;
  border: none;
  border-radius: 999px;
  font-size: 0.88rem;
  padding: 8px 22px;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.news-search-btn:hover {
  opacity: 0.85;
  color: var(--casi-negro);
}

/* ── Listing: filter bar ── */
.news-hero {
  background: var(--background-biodigital);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}
.news-filter-bar {
  background: white;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
}
.news-filter-bar select {
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}
.news-filter-bar select:focus {
  border-color: var(--verde-biodigital);
  box-shadow: 0 0 0 3px rgba(50, 238, 204, 0.15);
}
.btn-filter {
  background: var(--degradado-biodigital);
  color: var(--casi-negro);
  font-weight: 600;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  padding: 6px 18px;
}
.btn-filter:hover {
  opacity: 0.85;
  color: var(--casi-negro);
}
.btn-filter-clear {
  background: transparent;
  border: 1.5px solid #ddd;
  color: #888;
  border-radius: 8px;
  font-size: 0.85rem;
  padding: 6px 14px;
}
.btn-filter-clear:hover {
  border-color: #bbb;
  color: #555;
}

/* ── Listing: specialty / content-type pills ── */
.specialty-pill {
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  padding: 6px 16px;
  text-decoration: none;
  transition: all 0.2s;
}
.specialty-pill.active {
  background: var(--degradado-biodigital);
  color: var(--casi-negro);
  border-color: transparent;
}

/* ── Listing: news cards ── */
.news-card {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  color: inherit;
}
.news-card .card-img-top {
  height: 200px;
  object-fit: cover;
}
.news-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-card .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--casi-negro);
}
.news-meta {
  font-size: 0.78rem;
  color: #888;
}
.news-excerpt {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.6;
}
.news-read-more {
  color: var(--azul-hover);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}
.news-read-more:hover {
  color: var(--verde-biodigital);
}

/* ── Shared: badges ── */
.news-badge-specialty,
.article-badge-specialty {
  background: var(--degradado-biodigital);
  color: var(--casi-negro);
  font-weight: 600;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}
.article-badge-specialty {
  font-size: 0.75rem;
  padding: 5px 14px;
}
.news-badge-type,
.article-badge-type {
  background: var(--casi-negro);
  color: white;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
}
.article-badge-type {
  font-size: 0.75rem;
  padding: 5px 14px;
}
.news-badge-congress,
.article-badge-congress {
  background: #2d3436;
  color: white;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
}
.article-badge-congress {
  color: var(--verde-biodigital);
  font-size: 0.75rem;
  padding: 5px 14px;
  border: 1px solid var(--verde-biodigital);
}
.news-badge-regulator {
  background: #fdcb6e;
  color: #2d3436;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}
.news-badge-priority-breaking,
.article-badge-priority-breaking {
  background: #ff4757;
  color: white;
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.article-badge-priority-breaking {
  font-size: 0.7rem;
  padding: 4px 12px;
}
.article-badge-group {
  background: var(--background-biodigital);
  color: var(--casi-negro);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 16px;
}

/* ── Listing: empty state ── */
.news-empty-icon {
  width: 80px;
  height: 80px;
  background: var(--background-biodigital);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.news-empty-icon i {
  font-size: 2rem;
  background: var(--degradado-biodigital);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Detail: layout ── */
.article-container {
  max-width: 800px;
  margin: 0 auto;
}
.article-back {
  color: var(--azul-hover);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s;
}
.article-back:hover {
  color: var(--verde-biodigital);
}
.article-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 16px;
}
.article-hero-placeholder {
  width: 100%;
  height: 260px;
  border-radius: 16px;
  background: var(--background-biodigital);
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-hero-placeholder i {
  font-size: 4rem;
  background: var(--degradado-biodigital);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.article-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--casi-negro);
}

/* ── Detail: metadata & body ── */
.article-meta {
  font-size: 0.85rem;
  color: #888;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
.article-body {
  font-size: 1.02rem;
  line-height: 1.85;
  color: #333;
}
.article-body p {
  margin-bottom: 1.2rem;
}

/* ── Detail: source box ── */
.article-source-box {
  background: var(--background-biodigital);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--verde-biodigital);
}
.article-source-box a {
  color: var(--azul-hover);
  font-weight: 600;
  word-break: break-all;
}
.article-source-box a:hover {
  color: var(--verde-biodigital);
}

/* ── Detail: share button ── */
.article-share-btn {
  background: white;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #666;
}
.article-share-btn:hover {
  border-color: var(--verde-biodigital);
  color: var(--verde-biodigital);
}
