/*
 * Homepage (front-page.php): intro, arii de practică, ultimele articole, recunoaștere.
 * Hero: components.css; tile-uri: pages/news.css.
 */

.dragne-home {
  font-family: var(--dragne-font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--dragne-ink-deep);
  background: #fff;
}

#site-content.dragne-home {
  margin: 0;
  padding: 0;
}

.dragne-home :is(h1, h2, h3, p, cite, a) {
  font-family: var(--dragne-font);
}

.dragne-home h1,
.dragne-home h2,
.dragne-home h3 {
  text-transform: none;
}

.dragne-home a {
  color: inherit;
}

.dragne-home a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.dh-wrap {
  width: min(1170px, 100% - 32px);
  margin-inline: auto;
}

.dragne-home .dh-link {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.dragne-home .dh-link:hover {
  text-decoration-thickness: 2px;
}

/* ── Intro ────────────────────────────────────────────────── */

.dh-intro {
  padding-block: 128px 112px;
}

.dh-intro .dh-wrap {
  display: grid;
  grid-template-columns: 7fr 4fr;
  gap: 64px;
  align-items: end;
}

.dh-intro h1 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 300;
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--dragne-navy);
}

.dh-intro p {
  max-width: 34em;
  margin: 0 0 24px;
  color: var(--dragne-muted);
}

/* ── Arii de practică ─────────────────────────────────────── */

.dh-areas {
  padding-bottom: 128px;
}

.dh-areas ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 64px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #d9dde4;
}

.dh-areas li {
  margin: 0;
  border-bottom: 1px solid #d9dde4;
}

.dh-areas li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 26px 0;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--dragne-navy);
  text-decoration: none;
}

.dh-areas li a span {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--dragne-muted);
}

.dh-areas li a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

/* ── Ultimele articole + recunoaștere ─────────────────────── */

.dh-briefs {
  padding-bottom: 128px;
}

.dh-briefs__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 40px;
}

.dh-briefs h2,
.dh-linkedin h2,
.dh-recognition h2 {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--dragne-navy);
}

/* ── LinkedIn (pluginul „Dragne LinkedIn”) ─────────────────── */

.dh-linkedin {
  padding-bottom: 128px;
}

.dh-linkedin__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* .dragne-home în selector: peste „.dragne-home a” */
.dragne-home .dh-li-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--dragne-rule);
  background: #fff;
  color: var(--dragne-ink);
  text-decoration: none;
  transition: border-color 200ms ease;
}

.dragne-home .dh-li-card:hover {
  border-color: var(--dragne-navy);
}

.dh-li-card__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
}

.dh-li-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}

.dh-li-card__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.6;
}

.dh-li-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--dragne-muted);
}

.dh-li-card__meta .dragne-icon {
  color: var(--dragne-navy);
}

@media (max-width: 860px) {
  .dh-linkedin { padding-bottom: 72px; }
  .dh-linkedin__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .dragne-home .dh-li-card { transition: none; }
}

.dh-recognition {
  padding-block: 112px;
  background: var(--dragne-mist);
}

.dh-recognition .dh-wrap {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 64px;
  align-items: center;
}

.dh-recognition h2 {
  margin-bottom: 20px;
}

.dh-recognition p {
  max-width: 30em;
  margin: 0;
  color: var(--dragne-muted);
}

.dh-badges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dragne-home .dh-badges img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 160px;
  aspect-ratio: 1;
  align-self: start;
  overflow: hidden;
  object-fit: contain;
  padding: 10px;
  background: #fff;
}

@media (max-width: 860px) {
  .dh-intro { padding-block: 72px 56px; }

  .dh-intro .dh-wrap,
  .dh-recognition .dh-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .dh-areas ul { grid-template-columns: 1fr; }
  .dh-areas li a { font-size: 20px; padding: 20px 0; }

  .dh-areas,
  .dh-briefs { padding-bottom: 72px; }

  .dh-briefs__head { flex-direction: column; gap: 12px; }
  .dh-recognition { padding-block: 64px; }
  .dh-badges { gap: 8px; }
}

/* ── Hero homepage: carusel cu articolele featured (.dh-hero--slides) ──
   Poza și voalul trec de pe secțiune pe fiecare slide: opacitatea slide-ului
   creează un context de stivuire, deci stratul trebuie să fie în slide. */

.dh-hero--slides::before,
.dh-hero--slides::after {
  display: none;
}

.dh-hero__slides {
  display: grid;
  flex: 1;
  align-self: stretch;
}

.dh-hero__slide {
  position: relative;
  display: flex;
  grid-area: 1 / 1;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms ease, visibility 600ms;
}

.dh-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.dh-hero__slide::before {
  content: "";
  position: absolute;
  top: -9%;
  bottom: -9%;
  right: 0;
  z-index: -1;
  aspect-ratio: 3 / 2;
  background: var(--dh-hero-img, none) center 30% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.08) 12%, rgba(0, 0, 0, 0.25) 24%, rgba(0, 0, 0, 0.5) 36%, rgba(0, 0, 0, 0.75) 48%, rgba(0, 0, 0, 0.92) 60%, #000 72%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.08) 12%, rgba(0, 0, 0, 0.25) 24%, rgba(0, 0, 0, 0.5) 36%, rgba(0, 0, 0, 0.75) 48%, rgba(0, 0, 0, 0.92) 60%, #000 72%);
}

.dh-hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(14, 25, 47, 0.85) 0%, rgba(14, 25, 47, 0.6) 30%, rgba(14, 25, 47, 0.25) 50%, rgba(14, 25, 47, 0) 65%);
}

/* Loc pentru controale sub linkul slide-ului: +8px față de .dh-hero .dh-wrap, ca hero-ul să rămână la 450 */
.dh-hero__slide .dh-wrap {
  padding-bottom: 88px;
}

/* Liniuțe + pauză, sub linkul slide-ului */
.dh-hero .dh-hero__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-block: 0;
}

.dh-hero .dh-hero__controls[hidden] {
  display: none;
}

.dh-hero__dot,
.dh-hero__pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #fff;
  -webkit-appearance: none;
          appearance: none;
}

.dh-hero__dot::before {
  content: "";
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  transition: background-color 200ms ease;
}

.dh-hero__dot[aria-current="true"]::before,
.dh-hero__dot:hover::before {
  background: #fff;
}

/* Pauză = două bare; oprit = triunghi „play” */
.dh-hero__pause {
  gap: 3px;
  margin-left: 12px;
  order: 1; /* în DOM vine primul (APG), vizual rămâne după liniuțe */
}

.dh-hero__pause::before,
.dh-hero__pause::after {
  content: "";
  width: 3px;
  height: 12px;
  background: currentColor;
}

.dh-hero--slides.is-paused .dh-hero__pause::before {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
  background: none;
}

.dh-hero--slides.is-paused .dh-hero__pause::after {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .dh-hero__slide,
  .dh-hero__dot::before {
    transition: none;
  }
}

@media (max-width: 860px) {
  /* Ca .dh-hero pe mobil: poza ca fundal, voal de jos în sus */
  .dh-hero__slide {
    background:
      linear-gradient(0deg, var(--dragne-navy) 0%, rgba(14, 25, 47, 0.85) 45%, rgba(14, 25, 47, 0.2) 100%),
      var(--dh-hero-img, none) 72% 40% / cover no-repeat,
      var(--dragne-navy);
  }

  .dh-hero__slide::before,
  .dh-hero__slide::after {
    display: none;
  }

  .dh-hero .dh-hero__controls {
    bottom: 20px;
  }
}
