/*
 * Blocuri Gutenberg + patterns „Dragne” (is-style-dr-*), pe front și în editor.
 * Front: pagini (body.page:not(.home)); editor: .editor-styles-wrapper (WordPress prefixează
 * automat selectorii din editor styles). În editor e încărcat singur (plus fontul), deci își
 * declară variabilele.
 *
 * !important rămâne doar unde trebuie bătut !important-ul din CSS-ul de layout al WordPress
 * (.is-layout-constrained > * { margin-left/right: auto !important }).
 */

/* Variabilele de mai jos dublează intenționat pe cele din base.css, ca editorul să funcționeze doar cu blocks.css. Se păstrează sincronizate. */

:root {
  --dragne-navy: #0e192f;
  --dragne-ink: #2a3242;
  --dragne-muted: #5d6675;
  --dragne-rule: #e3e6eb;
  --dragne-mist: #f1f2f5;
  --dragne-font: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
}

/* ── Bază: text și titluri în conținutul de blocuri ─────────── */

.editor-styles-wrapper,
body.page:not(.home) #site-content .wp-block-group {
  font-family: var(--dragne-font);
  color: var(--dragne-ink);
}

.editor-styles-wrapper p,
.editor-styles-wrapper li,
body.page:not(.home) #site-content .wp-block-group p,
body.page:not(.home) #site-content .wp-block-group li {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
}

body.page:not(.home) #site-content .wp-block-heading,
.editor-styles-wrapper .wp-block-heading {
  font-family: var(--dragne-font);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-transform: none;
  color: var(--dragne-navy);
}

.editor-styles-wrapper h2.wp-block-heading,
body.page:not(.home) #site-content h2.wp-block-heading {
  font-size: clamp(26px, 2.8vw, 36px);
}

.editor-styles-wrapper h3.wp-block-heading,
body.page:not(.home) #site-content h3.wp-block-heading {
  font-size: clamp(20px, 2vw, 24px);
}

body.page:not(.home) #site-content .wp-block-group a:not(.wp-block-button__link),
.editor-styles-wrapper a:not(.wp-block-button__link) {
  color: var(--dragne-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* Pozele își păstrează mărimea naturală (pozele migrate au 600px; nu le mărim) */
#site-content .wp-block-image img,
.editor-styles-wrapper .wp-block-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

/* Banda finală iese la 100vw, care include bara de scroll → tăiem ce depășește */
body.page:not(.home) {
  overflow-x: hidden;
  overflow-x: clip;
}

body.page:not(.home),
body.page:not(.home) #site-content {
  background-color: #fff;
}

/* Butoane: contur navy */
.wp-block-button .wp-block-button__link {
  padding: 12px 28px;
  border: 1px solid var(--dragne-navy);
  border-radius: 0;
  font-family: var(--dragne-font);
  font-size: 15px;
  font-weight: 500;
  color: var(--dragne-navy);
  text-decoration: none;
  background: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus-visible {
  color: #fff;
  background: var(--dragne-navy);
}

@media (prefers-reduced-motion: reduce) {
  .wp-block-button .wp-block-button__link { transition: none; }
}

/* ── Intro: frază mare stânga, text dreapta ─────────────────── */

.is-style-dr-intro {
  padding-block: 32px 64px;
}

.is-style-dr-intro > .wp-block-columns {
  gap: 64px;
  align-items: flex-start;
}

.is-style-dr-intro > .wp-block-columns > .wp-block-column:first-child { flex: 7 1 0; }
.is-style-dr-intro > .wp-block-columns > .wp-block-column:last-child { flex: 5 1 0; }

body.page:not(.home) #site-content .is-style-dr-intro .dr-label,
.editor-styles-wrapper .is-style-dr-intro .dr-label {
  margin: 0 0 12px;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--dragne-muted);
}

/* Pe front eticheta are greutatea paragrafelor din grup (400); în editor, 500 */
.editor-styles-wrapper .is-style-dr-intro .dr-label {
  font-weight: 500;
}

body.page:not(.home) #site-content .is-style-dr-intro .dr-statement,
.editor-styles-wrapper .is-style-dr-intro .dr-statement {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.22;
}

/* ── Lead: deschiderea paginii (text stânga, poză dreapta) ──── */

.is-style-dr-lead {
  padding-block: 56px 48px;
}

.is-style-dr-lead > .wp-block-columns {
  gap: 64px;
  align-items: flex-start;
}

.is-style-dr-lead > .wp-block-columns > .wp-block-column:first-child { flex: 7 1 0; }
.is-style-dr-lead > .wp-block-columns > .wp-block-column:last-child { flex: 5 1 0; }

body.page:not(.home) #site-content .is-style-dr-lead p,
.editor-styles-wrapper .is-style-dr-lead p {
  max-width: 62ch;
  font-size: 18px;
}

/* ── Listă de linkuri cu linii fine ─────────────────────────── */

.is-style-dr-link-list {
  padding-block: 0 64px;
}

.is-style-dr-link-list .wp-block-list {
  /* Grilă citită pe rânduri, ca lista de arii de pe homepage (.dh-areas) */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 64px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--dragne-rule);
}

.is-style-dr-link-list .wp-block-list li {
  margin: 0;
  border-bottom: 1px solid var(--dragne-rule);
}

body.page:not(.home) #site-content .is-style-dr-link-list .wp-block-list a,
.editor-styles-wrapper .is-style-dr-link-list .wp-block-list a {
  display: block;
  padding: 22px 0;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--dragne-navy);
  text-decoration: none;
}

body.page:not(.home) #site-content .is-style-dr-link-list .wp-block-list a:hover,
.editor-styles-wrapper .is-style-dr-link-list .wp-block-list a:hover {
  text-decoration: underline;
}

/* Eticheta „Core” la ariile principale (inc/practice-areas.php), ca pe homepage (.dh-areas) */
body.page:not(.home) #site-content .is-style-dr-link-list .wp-block-list a:has(> .dr-core) {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.is-style-dr-link-list .dr-core {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--dragne-muted);
}

/* În editor sublinierea stă mai jos; pe front rămâne cea a linkurilor din grup (3px) */
.editor-styles-wrapper .is-style-dr-link-list .wp-block-list a:hover {
  text-underline-offset: 6px;
}

/* ── Secțiune: linie fină sus, titlu mare ───────────────────── */

.is-style-dr-section {
  padding-block: 48px;
  border-top: 1px solid var(--dragne-rule);
  scroll-margin-top: 64px;
}

/* Aliniat la stânga, nu centrat de layout-ul „constrained” al WordPress (care folosește !important) */
.is-style-dr-section.is-layout-constrained > * {
  max-width: 68ch;
  margin-left: 0 !important;
  margin-right: auto !important;
}

.is-style-dr-section.is-layout-constrained > .wp-block-heading {
  max-width: none;
  margin: 0 0 24px;
}

.is-style-dr-section .wp-block-heading[id] {
  scroll-margin-top: 72px;
}

/* Contact: două coloane */
.is-style-dr-section.is-layout-constrained > .wp-block-columns {
  max-width: none;
  gap: 64px;
}

/* ── Bandă final (gri deschis, pe toată lățimea) ────────────── */

.is-style-dr-cta-band {
  margin-top: 64px;
  margin-inline: calc(50% - 50vw);
  padding: 56px calc(50vw - 50%);
  background: var(--dragne-mist);
}

.is-style-dr-cta-band > .wp-block-columns {
  align-items: center;
  gap: 32px;
}

.is-style-dr-cta-band > .wp-block-columns > .wp-block-column:last-child {
  flex: 0 0 auto;
}

.is-style-dr-cta-band .wp-block-heading {
  margin: 0 0 8px;
}

.is-style-dr-cta-band p {
  margin: 0;
  color: var(--dragne-muted);
}

.editor-styles-wrapper .is-style-dr-cta-band {
  margin-inline: 0;
  padding: 40px;
}

/* ── Citat mare pe navy ─────────────────────────────────────── */

.is-style-dr-hero-quote {
  padding: 96px 48px;
  color: #fff;
  background: var(--dragne-navy);
}

body.page:not(.home) #site-content .is-style-dr-hero-quote .dr-quote,
.editor-styles-wrapper .is-style-dr-hero-quote .dr-quote {
  max-width: 13em;
  margin: 0;
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 200;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}

body.page:not(.home) #site-content .is-style-dr-hero-quote .dr-quote-source,
.editor-styles-wrapper .is-style-dr-hero-quote .dr-quote-source {
  margin: 28px 0 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

body.page:not(.home) #site-content .is-style-dr-hero-quote a:not(.wp-block-button__link),
.editor-styles-wrapper .is-style-dr-hero-quote a:not(.wp-block-button__link) {
  color: #fff;
}

/* ── Recunoaștere ───────────────────────────────────────────── */

.is-style-dr-recognition {
  padding: 64px 48px;
  background: var(--dragne-mist);
}

.is-style-dr-recognition .wp-block-image img {
  aspect-ratio: 1;
  object-fit: contain;
  padding: 10px;
  background: #fff;
}

/* ── Mobil ──────────────────────────────────────────────────── */

@media (max-width: 781px) {
  .is-style-dr-intro { padding-block: 16px 40px; }
  .is-style-dr-link-list .wp-block-list { grid-template-columns: minmax(0, 1fr); }
  body.page:not(.home) #site-content .is-style-dr-link-list .wp-block-list a,
  .editor-styles-wrapper .is-style-dr-link-list .wp-block-list a { font-size: 20px; padding: 18px 0; }
  .is-style-dr-section { padding-block: 36px; }
  .is-style-dr-cta-band { padding-block: 40px; }
  .is-style-dr-hero-quote,
  .is-style-dr-recognition { padding: 48px 24px; }
}
