/*
 * Știri: tile-urile de articole (homepage, arhivă, categorii, „More from” pe articol)
 * și arhiva de știri (taburi, articolul principal, lista de text, paginarea).
 * Încărcat pe: front page, blog, categorii, articole.
 */

/* ── Tile-uri (templates/parts/brief-tile.php) ────────────── */

.dh-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}

/* .dh-tiles în selector: peste „.dragne-home a { color: inherit }” */
.dh-tiles .dh-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 460px;
  padding: 32px;
  color: #fff;
  font-family: var(--dragne-font);
  text-decoration: none;
  background: var(--dragne-navy) center / cover no-repeat;
  isolation: isolate;
}

.dh-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(14, 25, 47, 0.88) 0%, rgba(14, 25, 47, 0.55) 55%, rgba(14, 25, 47, 0.8) 100%);
  transition: opacity 0.25s ease;
}

.dh-tile:hover::before {
  opacity: 0.85;
}

.dh-tile__top {
  display: block;
}

.dh-tile .dh-tile__title {
  margin: 0;
  font-family: var(--dragne-font);
  font-size: 26px;
  font-weight: 300;
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-transform: none;
  color: #fff;
}

.dh-tile:hover .dh-tile__title,
.dh-tile:focus-visible .dh-tile__title {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.dh-tile:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -6px;
}

.dh-tile .dh-tile__excerpt {
  display: -webkit-box;
  max-width: 62ch;
  margin: 16px 0 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-family: var(--dragne-font);
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

.dh-tile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.dh-tile__cat::after {
  content: "·";
  margin-left: 12px;
}

/* Articolul principal: tile lat */
.dh-tiles .dh-tile--featured {
  grid-column: 1 / -1;
  min-height: 420px;
  padding: 48px;
}

.dh-tile--featured .dh-tile__title {
  max-width: 20em;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 200;
  line-height: 1.12;
}

@media (max-width: 860px) {
  .dh-tiles { grid-template-columns: 1fr; }
  .dh-tiles .dh-tile { min-height: 280px; padding: 24px; }
  .dh-tiles .dh-tile--featured { min-height: 340px; padding: 28px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .dh-tile::before { transition: none; }
}

/* ── Arhiva de știri (templates/parts/news-loop.php) ──────── */

body.blog,
body.category {
  background-color: #fff;
}

.dragne-news-archive {
  padding-top: 8px;
  font-family: var(--dragne-font);
  color: var(--dragne-ink-deep);
}

.dragne-news-archive :is(h2, h3) {
  font-family: var(--dragne-font);
}

.dragne-news-archive a:focus-visible {
  outline: 2px solid var(--dragne-navy);
  outline-offset: 3px;
}

/* Taburi pe categorii */
.dragne-news-archive .news-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 32px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--dragne-rule);
}

.dragne-news-archive .news-tab {
  display: inline-block;
  margin-bottom: -1px;
  padding: 0 0 14px;
  border-bottom: 1px solid transparent;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dragne-slate);
  text-decoration: none;
  transition: color 0.2s ease;
}

.dragne-news-archive .news-tab:hover,
.dragne-news-archive .news-tab:focus {
  color: var(--dragne-navy);
  text-decoration: none;
}

.dragne-news-archive .news-tab.is-active {
  border-bottom-color: var(--dragne-navy);
  font-weight: 500;
  color: var(--dragne-navy);
}

.dragne-news-archive .news-item {
  margin: 0;
}

.dragne-news-archive .dh-tiles {
  margin-bottom: 0;
}

/* Articolul principal */
.dragne-news-archive .news-lead {
  padding-block: 48px 64px;
}

.dragne-news-archive .news-lead__item {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: 64px;
  align-items: center;
  margin: 0;
}

.dragne-news-archive .news-lead__title {
  margin: 0;
  font-family: var(--dragne-font);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 300;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-transform: none;
  color: var(--dragne-navy);
}

.dragne-news-archive .news-lead__title a,
.dragne-news-archive .news-text__title a {
  color: var(--dragne-navy);
  text-decoration: none;
}

.dragne-news-archive .news-lead__title a:hover,
.dragne-news-archive .news-text__title a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.dragne-news-archive .news-lead__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 20px 0 0;
  font-size: 15px;
  color: var(--dragne-muted);
}

.dragne-news-archive .news-lead__excerpt {
  max-width: 40em;
  margin: 0 0 20px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--dragne-muted);
}

.dragne-news-archive .news-meta {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--dragne-muted);
}

.dragne-news-archive .news-meta__cat::after {
  content: "·";
  margin: 0 8px;
}

.dragne-news-archive .news-lead__more {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  color: var(--dragne-navy);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.dragne-news-archive .news-lead__more:hover {
  color: var(--dragne-navy);
  text-decoration-thickness: 2px;
}

/* Lista de text (3 coloane) */
.dragne-news-archive .news-text {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 64px;
}

.dragne-news-archive .news-text__item {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--dragne-rule);
}

.dragne-news-archive .news-text__title {
  margin: 0 0 12px;
  font-family: var(--dragne-font);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dragne-navy);
}

.dragne-news-archive .news-text__excerpt {
  display: -webkit-box;
  margin: 0 0 16px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dragne-muted);
}

.dragne-news-archive .news-text__item .news-meta {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .dragne-news-archive .news-lead__item,
  .dragne-news-archive .news-text {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Paginare */
.dragne-news-archive .news-pagination {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--dragne-rule);
  text-align: left;
}

.dragne-news-archive .news-pagination .page-numbers {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dragne-news-archive .news-pagination .page-numbers a,
.dragne-news-archive .news-pagination .page-numbers span {
  display: inline-block;
  min-width: 36px;
  padding: 6px 10px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  font-size: 15px;
  text-align: center;
  color: var(--dragne-slate);
  text-decoration: none;
}

.dragne-news-archive .news-pagination .page-numbers a:hover {
  border-bottom-color: var(--dragne-navy);
  background: transparent;
  color: var(--dragne-navy);
  text-decoration: none;
}

.dragne-news-archive .news-pagination .page-numbers .current {
  border-bottom-color: var(--dragne-navy);
  background: transparent;
  font-weight: 500;
  color: var(--dragne-navy);
}

/* Mobil: taburile defilează orizontal, cu o umbră spre dreapta */
@media (max-width: 767px) {
  .dragne-news-archive .news-tabs-wrap {
    position: relative;
  }

  .dragne-news-archive .news-tabs-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3rem;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
  }

  .dragne-news-archive .news-tabs {
    flex-wrap: nowrap;
    padding-right: 2.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .dragne-news-archive .news-tabs::-webkit-scrollbar {
    display: none;
  }

  .dragne-news-archive .news-tab {
    white-space: nowrap;
  }
}
