/* efpi-esia.html: the environmental and social documents for DARES -
   Electrification of Federal Public Institutions. Only the theme's own
   colours (style.css :root): --color-primary (green), --color-secondary
   (near black), --color-body (grey text) and --color-success, with the
   theme's greys #f7f7f7 and #eaeaea. No orange on this page (as asked). Fonts: Exo headings, Albert Sans text.
   The page is marked .dm-keep so the dark mode script leaves it alone: its
   dark colours are set here, from the site's own dark mode (style.css) and
   the same theme colours. Document covers stay white in both. */

.efp {
  --efp-green: var(--color-primary, #006834);
  --efp-dark: var(--color-secondary, #1f1f25);
  --efp-ink: var(--color-heading-1, #1f1f25);
  --efp-muted: var(--color-body, #6e777d);
  --efp-accent: var(--color-primary, #006834);
  --efp-bg: #ffffff;
  --efp-soft: #f7f7f7;
  --efp-card: #ffffff;
  --efp-line: #eaeaea;
  --efp-chip: #f7f7f7;
  --efp-shadow: 0 22px 50px -28px rgba(31, 31, 37, .35);
  font-family: 'Albert Sans', sans-serif;
  color: var(--efp-ink);
  background: var(--efp-bg);
}
html[data-theme="dark"] .efp {
  --efp-ink: #ffffff;
  --efp-muted: #a7b0ab;
  --efp-accent: var(--color-success, #3eb75e);
  --efp-bg: #0f1512;
  --efp-soft: var(--color-secondary, #1f1f25);
  --efp-card: var(--color-secondary, #1f1f25);
  --efp-line: rgba(255, 255, 255, .1);
  --efp-chip: rgba(255, 255, 255, .06);
  --efp-shadow: 0 22px 50px -28px rgba(0, 0, 0, .8);
}
.efp h1, .efp h2, .efp h3 { font-family: 'Exo', sans-serif; font-weight: 700; }

/* --------------------------------------------------------------- hero */
.efp-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 84px;
  color: #fff;
  background:
    var(--efp-green);
}
/* rows of solar panels running away towards the horizon */
.efp-hero::before {
  content: "";
  position: absolute;
  left: -20%; right: -20%; bottom: -40%;
  height: 80%;
  background-image:
    linear-gradient(rgba(255, 255, 255, .12) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(255, 255, 255, .12) 1.5px, transparent 1.5px);
  background-size: 64px 40px;
  transform: perspective(520px) rotateX(58deg);
  transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%);
          mask-image: linear-gradient(to bottom, transparent, #000 45%);
  pointer-events: none;
}
.efp-hero .container { position: relative; z-index: 1; }

.efp-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 34px;
  font-size: 14px;
  color: rgba(255, 255, 255, .72);
}
.efp-crumbs a { color: rgba(255, 255, 255, .86); text-decoration: none; }
.efp-crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.efp-crumbs span { color: #fff; font-weight: 600; }
.efp-crumbs i { font-size: 10px; opacity: .6; }

.efp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 56px;
  align-items: center;
}
.efp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
}
.efp-eyebrow i { color: #fff; }
.efp-hero h1 {
  margin: 18px 0 16px;
  font-weight: 700;
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.1;
  letter-spacing: -.01em;
  color: #fff;
}
.efp-hero h1 em { font-style: normal; color: #fff; }
.efp-lead {
  max-width: 640px;
  margin: 0 0 32px;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .86);
}

.efp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 640px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.efp-stats li {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
}
.efp-stats b {
  display: block;
  font-family: 'Exo', sans-serif;
  font-size: 30px;
  line-height: 1.1;
  color: #fff;
}
.efp-stats span { font-size: 13px; color: rgba(255, 255, 255, .78); }

/* five first pages, fanned out like cards in a hand */
.efp-fan {
  position: relative;
  height: 400px;
  display: block;
}
.efp-fan img {
  position: absolute;
  left: 50%; bottom: 10px;
  width: 210px;
  aspect-ratio: 1 / 1.414;
  object-fit: cover;
  object-position: top;
  margin-left: -105px;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, .55);
  transform-origin: 50% 120%;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.efp-fan img:nth-child(1) { transform: rotate(-22deg); }
.efp-fan img:nth-child(2) { transform: rotate(-11deg); }
.efp-fan img:nth-child(3) { transform: rotate(0deg); }
.efp-fan img:nth-child(4) { transform: rotate(11deg); }
.efp-fan img:nth-child(5) { transform: rotate(22deg); }
.efp-fan:hover img:nth-child(1) { transform: rotate(-30deg) translateY(-6px); }
.efp-fan:hover img:nth-child(2) { transform: rotate(-15deg) translateY(-10px); }
.efp-fan:hover img:nth-child(3) { transform: rotate(0deg) translateY(-14px); }
.efp-fan:hover img:nth-child(4) { transform: rotate(15deg) translateY(-10px); }
.efp-fan:hover img:nth-child(5) { transform: rotate(30deg) translateY(-6px); }

/* ------------------------------------------------------------ the list */
.efp-docs { padding: 84px 0 100px; }
.efp-docs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 24px;
  margin-bottom: 30px;
}
.efp-kicker {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--efp-accent);
}
.efp-docs-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.2;
  color: var(--efp-ink);
}
.efp-filter {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: var(--efp-soft);
  border: 1px solid var(--efp-line);
}
.efp-filter button {
  width: auto;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--efp-muted);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.efp-filter button b {
  display: inline-block;
  min-width: 22px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--efp-line);
  font-size: 12px;
}
.efp-filter button:hover { color: var(--efp-ink); }
.efp-filter button[aria-pressed="true"] { background: var(--efp-green); color: #fff; }
.efp-filter button[aria-pressed="true"] b { background: rgba(255, 255, 255, .22); }
.efp-filter button:focus-visible { outline: 3px solid var(--efp-accent); outline-offset: 2px; }

.efp-list { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.efp-list > li { margin: 0; }
.efp-list > li[hidden] { display: none; }

.efp-doc {
  display: grid;
  grid-template-columns: 56px 128px minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  padding: 20px 26px 20px 20px;
  border-radius: 22px;
  background: var(--efp-card);
  border: 1px solid var(--efp-line);
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.efp-doc:hover { box-shadow: var(--efp-shadow); transform: translateY(-2px); border-color: transparent; }
.efp-num {
  align-self: start;
  padding-top: 6px;
  font-family: 'Exo', sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--efp-green);
  text-align: center;
}
.efp-num { -webkit-text-stroke-color: var(--efp-accent); }

.efp-cover {
  position: relative;
  display: block;
  width: 128px;
  aspect-ratio: 1 / 1.414;
  border-radius: 4px;
  background: #fff;
  overflow: visible;
}
.efp-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: #eaeaea;
  transform: rotate(5deg) translate(6px, 2px);
  transition: transform .35s ease;
}
.efp-cover img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 12px 24px -12px rgba(31, 31, 37, .45);
  transition: transform .35s ease;
}
.efp-doc:hover .efp-cover img { transform: rotate(-2deg) translateY(-3px); }
.efp-doc:hover .efp-cover::before { transform: rotate(8deg) translate(10px, 3px); }
.efp-cover:focus-visible { outline: 3px solid var(--efp-accent); outline-offset: 4px; }

.efp-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.efp-tag {
  padding: 4px 10px;
  border-radius: 8px;
  font-family: 'Exo', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #fff;
  background: var(--efp-green);
}
.efp-tag--esmp { background: var(--efp-dark); }
html[data-theme="dark"] .efp-tag--esmp { background: #fff; color: var(--efp-dark); }

.efp-doc h3 { margin: 0 0 6px; font-size: 22px; line-height: 1.25; }
.efp-doc h3 a { color: var(--efp-ink); text-decoration: none; }
.efp-doc h3 a:hover { color: var(--efp-green); }
.efp-doc h3 a:hover { color: var(--efp-accent); }
.efp-place { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--efp-green); }
.efp-place { color: var(--efp-accent); }
.efp-desc { margin: 0 0 12px; font-size: 15px; line-height: 1.55; color: var(--efp-muted); max-width: 620px; }
.efp-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--efp-muted); }
.efp-facts li { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.efp-facts i { color: var(--efp-accent); }

.efp-actions { display: flex; flex-direction: column; gap: 10px; min-width: 176px; }
.efp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 13px;
  border: 2px solid transparent;
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.efp-btn:hover { transform: translateY(-2px); text-decoration: none; }
.efp-btn:focus-visible { outline: 3px solid var(--efp-accent); outline-offset: 3px; }
.efp-btn--primary { background: var(--efp-green); color: #fff; }
.efp-btn--primary:hover { background: var(--efp-dark); color: #fff; }
.efp-btn--ghost { border-color: var(--efp-line); color: var(--efp-ink); background: transparent; }
.efp-btn--ghost:hover { border-color: var(--efp-green); color: var(--efp-green); }
html[data-theme="dark"] .efp-btn--ghost:hover { border-color: var(--efp-accent); color: var(--efp-accent); }
.efp-btn small { font-family: 'Albert Sans', sans-serif; font-size: 12px; font-weight: 600; opacity: .75; }


/* -------------------------------------------------------------- smaller */
@media (max-width: 1199px) {
  .efp-hero-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .efp-fan img { width: 170px; margin-left: -85px; }
  .efp-fan { height: 340px; }
}
@media (max-width: 991px) {
  .efp-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .efp-fan { order: -1; height: 260px; max-width: 420px; width: 100%; margin: 0 auto; }
  .efp-fan img { width: 140px; margin-left: -70px; }
  .efp-doc { grid-template-columns: 112px minmax(0, 1fr); gap: 20px; padding: 20px; }
  .efp-num { display: none; }
  .efp-cover { width: 112px; }
  .efp-actions { grid-column: 1 / -1; flex-direction: row; }
  .efp-actions .efp-btn { flex: 1 1 0; }
}
@media (max-width: 575px) {
  .efp-hero { padding: 28px 0 72px; }
  .efp-lead { font-size: 16px; }
  .efp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .efp-fan { height: 210px; }
  .efp-fan img { width: 112px; margin-left: -56px; }
  .efp-docs { padding-top: 64px; }
  .efp-filter { width: 100%; }
  .efp-filter button { flex: 1 1 auto; padding: 0 10px; }
  .efp-doc { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding: 16px; }
  .efp-cover { width: 84px; }
  .efp-doc h3 { font-size: 19px; }
  .efp-desc { display: none; }
  .efp-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .efp-fan img, .efp-doc, .efp-cover img, .efp-cover::before, .efp-btn { transition: none; }
}
