/* Homepage medical news — Google News-inspired layout */
.dbk-home-news {
  --hn-teal: #0d9488;
  --hn-teal-dark: #0f766e;
  --hn-teal-soft: #ecfdf5;
  --hn-border: #e2e8f0;
  --hn-muted: #64748b;
  padding: 44px 0 48px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-top: 1px solid var(--hn-border);
  font-family: 'Poppins', sans-serif;
}

.dbk-home-news__container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.dbk-home-news__head { margin-bottom: 18px; }

.dbk-home-news__title {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2.8vw, 1.65rem);
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dbk-home-news__title i { color: var(--hn-teal); }

.dbk-home-news__sub {
  margin: 0;
  max-width: 560px;
  color: var(--hn-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dbk-home-news__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.dbk-home-news__tab {
  border: 1px solid var(--hn-border);
  background: #fff;
  color: #334155;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.dbk-home-news__tab:hover {
  border-color: #99f6e4;
  background: var(--hn-teal-soft);
}

.dbk-home-news__tab.is-active {
  background: linear-gradient(135deg, #ecfdf5 0%, #e0f2fe 100%);
  border-color: #5eead4;
  color: var(--hn-teal-dark);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.12);
}

/* Shell: featured left + scroll sidebar right */
.dbk-home-news__shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: stretch;
}

.dbk-home-news__primary[hidden],
.dbk-home-news__sidebar[hidden] {
  display: none !important;
}

/* Publisher line — Google style (no green pill) */
.dbk-home-news__source-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.dbk-home-news__source-line--modal {
  margin-bottom: 12px;
}

.dbk-home-news__source-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
  object-fit: contain;
}

.dbk-home-news__source-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.01em;
}

.dbk-home-news__kw {
  color: var(--hn-teal-dark);
  font-weight: 700;
}

/* Hero featured story */
.dbk-home-news__featured {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dbk-home-news__hero {
  background: #fff;
  border: 1px solid var(--hn-border);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dbk-home-news__hero:hover {
  border-color: #cbd5e1;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.dbk-home-news__hero-btn {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.dbk-home-news__hero-btn:focus-visible {
  outline: 2px solid var(--hn-teal);
  outline-offset: 2px;
}

.dbk-home-news__hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
  overflow: hidden;
}

.dbk-home-news__hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.dbk-home-news__hero-body {
  padding: 16px 18px 18px;
}

.dbk-home-news__hero-title {
  margin: 0 0 10px;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.dbk-home-news__hero-desc {
  margin: 0;
  font-size: 0.925rem;
  line-height: 1.6;
  color: var(--hn-muted);
  font-family: 'Source Sans Pro', sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Secondary row — 3 compact cards */
.dbk-home-news__secondary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dbk-home-news__secondary {
  background: #fff;
  border: 1px solid var(--hn-border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dbk-home-news__secondary:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.dbk-home-news__secondary-btn {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.dbk-home-news__secondary-btn:focus-visible {
  outline: 2px solid var(--hn-teal);
  outline-offset: 2px;
}

.dbk-home-news__secondary-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f1f5f9;
  overflow: hidden;
}

.dbk-home-news__secondary-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.dbk-home-news__secondary-body {
  padding: 10px 12px 12px;
}

.dbk-home-news__secondary-title {
  margin: 0 0 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dbk-home-news__secondary-meta {
  margin: 0;
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
}

/* Sidebar — 4 visible, scroll for rest */
.dbk-home-news__sidebar {
  background: #fff;
  border: 1px solid var(--hn-border);
  border-radius: 18px;
  padding: 16px 16px 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dbk-home-news__sidebar-title {
  margin: 0 0 14px;
  padding: 0 2px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.02em;
}

.dbk-home-news__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  height: 460px;
  max-height: 460px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
  -webkit-overflow-scrolling: touch;
}

.dbk-home-news__list::-webkit-scrollbar { width: 5px; }
.dbk-home-news__list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.dbk-home-news__list::-webkit-scrollbar-track { background: #f8fafc; }

.dbk-home-news__side-item {
  border-bottom: 1px solid #f1f5f9;
}

.dbk-home-news__side-item:last-child {
  border-bottom: 0;
}

.dbk-home-news__side-btn {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 14px 6px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.15s;
}

.dbk-home-news__side-btn:hover {
  background: #f8fafc;
}

.dbk-home-news__side-btn:focus-visible {
  outline: 2px solid var(--hn-teal);
  outline-offset: -2px;
  border-radius: 8px;
}

.dbk-home-news__side-title {
  margin: 4px 0 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dbk-home-news__side-thumb {
  width: 88px;
  height: 66px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  align-self: start;
}

.dbk-home-news__side-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.dbk-home-news__side-main {
  min-width: 0;
}

.dbk-home-news__side-desc {
  margin: 6px 0 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: #64748b;
  font-family: 'Source Sans Pro', sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dbk-home-news__scroll-hint {
  margin: 12px 0 0;
  padding: 10px 8px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid #f1f5f9;
}

.dbk-home-news__scroll-hint[hidden] {
  display: none !important;
}

.dbk-home-news__loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 20px;
  color: var(--hn-muted);
  font-size: 0.9rem;
  background: #fff;
  border: 1px dashed var(--hn-border);
  border-radius: 16px;
}

.dbk-home-news__loading[hidden] { display: none !important; }

.dbk-home-news__meta {
  margin: 16px 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
}

.dbk-home-news__disclaimer {
  margin: 10px 0 0;
  font-size: 0.7rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.45;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Reader modal */
body.dbk-home-news-modal-open { overflow: hidden; }
.dbk-home-news-modal[hidden] { display: none !important; }

.dbk-home-news-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dbk-home-news-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.dbk-home-news-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(740px, 100%);
  max-height: min(92vh, 920px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--hn-border);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  animation: dbkNewsModalIn 0.25s ease;
}

.dbk-home-news-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.dbk-home-news-modal__close:hover,
.dbk-home-news-modal__close:focus-visible {
  background: #ecfdf5;
  color: var(--hn-teal-dark);
}

.dbk-home-news-modal__img {
  width: 100%;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  max-height: min(40vh, 340px);
  background: #f1f5f9;
  overflow: hidden;
}

.dbk-home-news-modal__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.dbk-home-news-modal__body {
  padding: 20px 24px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: #fff;
  color: #1e293b;
}

.dbk-home-news-modal__title {
  margin: 0 0 16px;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  padding-right: 36px;
  font-family: 'Poppins', sans-serif;
}

.dbk-home-news-modal__desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: #1e293b;
  font-family: 'Poppins', Georgia, serif;
}

.dbk-home-news-modal__cta[hidden] {
  display: none !important;
}

.dbk-home-news-modal__para { margin: 0 0 14px; color: #1e293b; }
.dbk-home-news-modal__para:last-child { margin-bottom: 0; }

.dbk-home-news-modal__publisher {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--hn-border);
}

.dbk-home-news-modal__publisher-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hn-teal-dark);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.dbk-home-news-modal__publisher-link:hover {
  color: var(--hn-teal);
  text-decoration: underline;
}

.dbk-home-news-modal__loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 0 12px;
}

.dbk-home-news-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: center;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--hn-border);
  flex-shrink: 0;
  background: #fff;
}

.dbk-home-news-modal__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--hn-teal) 0%, var(--hn-teal-dark) 100%);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}

.dbk-home-news-modal__cta:hover {
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}

.dbk-home-news-modal__dismiss {
  border: 0;
  background: transparent;
  color: var(--hn-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px 4px;
}

@keyframes dbkNewsModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 960px) {
  .dbk-home-news__shell {
    grid-template-columns: 1fr;
  }

  .dbk-home-news__secondary-row {
    grid-template-columns: 1fr;
  }

  .dbk-home-news__list {
    height: 360px;
    max-height: 360px;
  }
}

@media (max-width: 600px) {
  .dbk-home-news__secondary-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .dbk-home-news { padding: 32px 0 40px; }

  .dbk-home-news-modal {
    padding: 0;
    align-items: flex-end;
  }

  .dbk-home-news-modal__dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dbk-home-news__hero,
  .dbk-home-news__secondary { transition: none; }
  .dbk-home-news-modal__dialog { animation: none; }
  .dbk-home-news-modal__cta:hover { transform: none; }
}
