/* Ficha CIEDES: estilos aislados de la plantilla de página. */

* {
      font-family: "Matter", Sans-serif !important;
}

.page-template-page-proyecto-ciedes .site-content > .ast-container {
  display: block;
  max-width: none;
  padding: 0;
}

.page-template-page-proyecto-ciedes #primary.cie-page {
  width: 100%;
  float: none;
  margin: 0;
  margin-top: 0px !important;
}

.cie-page {
  --cie-blue: #00587C;
  --cie-deep: #003c58;
  --cie-ink: #172c39;
  --cie-muted: #627682;
  --cie-line: #dce6e9;
  font-family: inherit;
  color: var(--cie-ink);
  background: #f5f8f9;
  width: 100%;
}

.cie-page *, .cie-page *::before, .cie-page *::after { box-sizing: border-box; }
.cie-page h1, .cie-page h3, .cie-page p { margin-top: 0; }

.cie-container { 
  width: 100%;
  padding-left: 30px;
  padding-right: 30px; 
  margin-inline: auto; 
}

.cie-hero { display: grid; grid-template-columns: 48% 52%; min-height: 600px; background: #fff; }
.cie-visual { position: relative; min-height: 560px; overflow: hidden; background: radial-gradient(circle at 75% 22%, #7dd7d7 0, transparent 31%), linear-gradient(145deg, #004963 0%, #006d83 48%, #07334d 100%); }
.cie-visual--photo { background-size: cover; background-position: center; }
.cie-visual__image { display: block; width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.cie-visual::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgb(0 33 52 / .52), transparent 42%); }
.cie-map { position: absolute; inset: 0; opacity: .95; }
.cie-map::before { content: ""; position: absolute; width: 66%; aspect-ratio: 1; left: -17%; top: -14%; border: 1px solid rgb(231 252 255 / .19); border-radius: 50%; box-shadow: 0 0 0 95px rgb(231 252 255 / .045), 0 0 0 190px rgb(231 252 255 / .035); }
.cie-map__route { position: absolute; display: block; height: 18px; border: 3px solid rgb(216 250 246 / .76); border-left: 0; border-right: 0; border-radius: 80px; transform-origin: center; box-shadow: 0 0 0 7px rgb(0 57 75 / .16); }
.cie-map__route--one { width: 130%; left: -13%; top: 38%; transform: rotate(-28deg); }
.cie-map__route--two { width: 115%; left: 3%; top: 74%; transform: rotate(36deg); }
.cie-map__route--three { width: 95%; left: 33%; top: 19%; transform: rotate(78deg); border-color: rgb(255 218 61 / .8); }
.cie-map__ring { position: absolute; width: 210px; aspect-ratio: 1; left: 47%; top: 38%; border-radius: 50%; border: 1px solid rgb(255 255 255 / .48); box-shadow: 0 0 0 20px rgb(255 255 255 / .06), 0 0 0 49px rgb(255 255 255 / .05); }
.cie-map__pin { position: absolute; width: 28px; height: 28px; left: calc(47% + 91px); top: calc(38% + 91px); border-radius: 50%; background: #fbd341; border: 7px solid #fff; box-shadow: 0 0 0 12px rgb(255 255 255 / .2), 0 8px 20px rgb(0 33 52 / .25); }
.cie-visual__caption { position: absolute; z-index: 1; left: clamp(26px, 5vw, 84px); bottom: 55px; color: #fff; display: grid; gap: 3px; text-shadow: 0 2px 14px rgb(0 25 38 / .3); }
.cie-visual__caption span { font-size: .82rem; letter-spacing: .27em; font-weight: 700; }
.cie-visual__caption strong { font-size: clamp(1.65rem, 2.3vw, 2.8rem); line-height: 1.12; max-width: 420px; }

.cie-hero__content { 
  padding: 30px; 
  align-self: center;
}

.cie-hero__topline { 
  display: flex; 
  gap: 14px; 
  flex-wrap: wrap; 
  align-items: center; 
  justify-content: end; 
  margin-bottom: 30px;
}

.cie-kicker { font-size: .76rem; font-weight: 800; letter-spacing: .16em; color: var(--cie-blue); }

.cie-date { 
  padding: 8px 15px; 
  background: linear-gradient(90deg, #fff9dd, #ffd11a); 
  color: #003A51; 
  font-size: 16px; 
  font-weight: 600; 
  width: 70%;
  text-align: right;
  }

.cie-hero h1 { 
  color: var(--cie-blue); 
  font-size: 34px; 
  line-height: 35px; 
  margin-bottom: 15px; 
  text-align:right
}

.cie-subtitle { 
  color: #000000; 
  font-size: 23px; 
  font-weight: 400;
  line-height: 27px; 
  margin-bottom: 10px; 
  text-align: right;
}

.cie-justification { display: flex; justify-content: space-between; gap: 16px; align-items: center; background: var(--cie-blue); color: #fff; padding: 13px 17px; margin-bottom: 14px; font-size: .8rem; letter-spacing: .04em; }
.cie-justification strong { font-size: .85rem; text-align: right; font-weight:500 !important; }
.cie-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cie-fact { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; min-height: 132px; padding: 14px 10px; line-height: 1.2; font-size: .79rem; }
.cie-fact--green { background: #2fbf18; }
.cie-fact--blue { background: #0875b9; }
.cie-fact--navy { background: #073aa3; }
.cie-fact__icon { font-size: 1.5rem; line-height: 1; margin-bottom: 9px; font-weight: 700; }
.cie-fact strong { display: block; font-size: .9rem; margin-top: 3px; font-weight: 500; }
.cie-logos { display: flex; justify-content: center; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 24px; }


.cie-logos img { 
  max-height: 60px; 
  max-width: 100%; 
  width: auto; 
  object-fit: contain; 
}

.cie-funding-note { text-align: center; color: var(--cie-muted); font-size: .78rem; margin: 23px 0 0; }
.cie-funding-note span { color: #e1b800; margin-inline: 5px; }

.cie-intro { background: #F3F3F3; padding: 25px 0px 22px 0px; }

.cie-section-label { color: var(--cie-blue); font-size: .73rem; font-weight: 800; letter-spacing: .18em; }

.cie-intro p { 
  max-width: 100%; 
  font-size: 16px; 
  line-height: 20px; 
  font-weight: 400;
  margin: 11px 0 0; 
}

.cie-sections { padding-top: 5px; padding-bottom: 76px; }
.cie-accordion { border: 1px solid var(--cie-line); background: #fff; margin-bottom: 0px; box-shadow: 0 6px 24px rgb(0 55 75 / .045); }
.cie-accordion summary { display: flex; align-items: center; gap: 14px; list-style: none; cursor: pointer; background: var(--cie-blue); color: #fff; padding: 15px 22px; text-transform: uppercase; font-size: .92rem; font-weight: 800; letter-spacing: .025em; }
.cie-accordion summary::-webkit-details-marker { display: none; }
.cie-accordion summary::before { content: "+"; font-size: 1.35rem; line-height: .7; width: 15px; font-weight: 400; }
.cie-accordion[open] summary::before { content: "−"; }

.cie-accordion summary:hover, .cie-accordion summary:focus-visible { 
  background-color: transparent;
  background-image: linear-gradient(90deg, #05729E 0%, #00587C 50%); 
  color: #ffcc00 !important;
}

.cie-accordion summary:focus-visible { outline: 3px solid #ffcc22; outline-offset: 3px; }
.cie-accordion__body { padding: 20px 30px; color: var(--cie-blue); font-size: 1rem; line-height: 1.6; }
.cie-accordion__body > p:last-child { margin-bottom: 0; }

.cie-actions { 
  display: flex;
  flex-direction: column;  
  gap: 0 40px; 
}

.cie-action { 
  display: flex; 
  flex-direction: column;
  gap: 7px; 
  padding: 10px 0; 
}

.cie-action:nth-last-child(-n+2) { border-bottom: 0; }
.cie-action__number { color: #11a8ae; font-size: 1.15rem; font-weight: 800; }
.cie-action h3 { color: var(--cie-blue); font-size: 1.02rem; line-height: 1.35; margin-bottom: 8px; }
.cie-action p { margin-bottom: 0; }

.cie-investment { 
  display: flex; 
  flex-direction: column;
  gap: 0px; 
}

.cie-investment div {
  margin-bottom: 10px;
}

.cie-investment p {
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  color: #00587C;
  margin-bottom:5px;
}

.cie-source { margin: 22px 0 0; color: var(--cie-muted); font-size: .9rem; }
.cie-period { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.cie-period p { margin: 0; }
.cie-status { color: #197e38; background: #e7f7e7; border-radius: 40px; padding: 5px 13px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.cie-empty { max-width: 800px; margin: 80px auto; padding: 36px; background: #fff; }

@media (max-width: 1050px) {
  .cie-hero { grid-template-columns: 43% 57%; }
  .cie-hero__content { padding: 30px; }
  .cie-facts { gap: 7px; }
  .cie-fact { min-height: 120px; }
}

@media (max-width: 780px) {
  .cie-hero { display: block; }
  .cie-visual { min-height: 330px; }
  .cie-hero__content { padding: 32px 24px 38px; }
  .cie-hero__topline { margin-bottom: 20px; }
  .cie-container { width: min(100% - 32px, 1320px); }
  .cie-intro { padding: 32px 0; }
  .cie-intro p { font-size: 1rem; }
  .cie-actions { grid-template-columns: 1fr; }
  .cie-action:nth-last-child(2) { border-bottom: 1px solid var(--cie-line); }
  .cie-investment { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .cie-visual { min-height: 260px; }
  .cie-visual__caption { bottom: 28px; }
  .cie-facts { grid-template-columns: 1fr; }
  .cie-fact { min-height: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; justify-items: stretch; text-align: left; column-gap: 12px; row-gap: 10px; padding: 16px 18px 18px; }
  .cie-facts .cie-fact > svg { grid-column: 1; grid-row: 1; margin: 0 !important; }
  .cie-fact > span { grid-column: 2; grid-row: 1; font-size: .84rem; font-weight: 600; }
  .cie-fact > strong { grid-column: 1 / -1; grid-row: 2; width: 100%; margin: 0; font-size: .95rem; line-height: 1.35; overflow-wrap: break-word; }
  .cie-accordion summary { padding: 13px 16px; }
  .cie-accordion__body { padding: 20px 17px; }
  .cie-period { align-items: flex-start; flex-direction: column; }
}

/* Fotos y enlaces que devuelve la API para la ficha de proyecto. */
.cie-gallery { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; }
.cie-gallery a { display: block; width: 170px; aspect-ratio: 1.3; overflow: hidden; background: #edf3f5; }
.cie-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.cie-gallery a:hover img { transform: scale(1.05); }
.cie-gallery a:focus-visible { outline: 3px solid #ffcc22; outline-offset: 3px; }
.cie-links { padding: 0; margin: 0; }
.cie-links li + li { margin-top: 11px; }
.cie-links a { color: var(--cie-blue); text-decoration: underline; text-underline-offset: 2px; }
.cie-links a:hover, .cie-links a:focus-visible { color: var(--cie-deep); }

@media (max-width: 480px) {
  .cie-gallery a { width: calc(50% - 9px); }
}


/* Visor de la galería de Resultados. */
.cie-lightbox {
  position: fixed;
  width: fit-content;
  min-width: 0;
  max-width: calc(100vw - 128px);
  max-height: calc(100vh - 96px);
  padding: 0;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  overflow: visible;
}
.cie-lightbox::backdrop { background: rgb(0 18 31 / .88); }
.cie-lightbox__content { position: relative; width: 100%; height: 100%; }
.cie-lightbox__figure { width: 100%; height: 100%; margin: 0; line-height: 0; }
.cie-lightbox__figure img { display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; box-shadow: 0 16px 50px rgb(0 0 0 / .3); }
.cie-lightbox__arrow, .cie-lightbox__close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgb(255 255 255 / .6); border-radius: 50%; background: rgb(255 255 255 / .13); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.cie-lightbox__arrow:hover, .cie-lightbox__close:hover { background: #00587c; color: #fff; }
.cie-lightbox__arrow:focus-visible, .cie-lightbox__close:focus-visible { outline: 3px solid #ffcc22; outline-offset: 3px; }
.cie-lightbox__arrow[hidden] { display: none !important; }
.cie-lightbox__arrow { position: absolute; top: 50%; transform: translateY(-50%); }
.cie-lightbox__arrow[data-cie-prev] { left: -62px; }
.cie-lightbox__arrow[data-cie-next] { right: -62px; }
.cie-lightbox__close { position: absolute; top: -54px; right: 0; }
@media (max-width: 640px) {
  .cie-lightbox { max-width: calc(100vw - 24px); }
  .cie-lightbox__arrow { width: 36px; height: 36px; }
  .cie-lightbox__arrow[data-cie-prev] { left: 8px; }
  .cie-lightbox__arrow[data-cie-next] { right: 8px; }
}

.cie-facts svg {
  margin-bottom: 5px !important;
}

.cie-links a:hover {
  text-decoration: underline !important;
}