/* =========================================================
   CRONOGRAFÍAS
========================================================= */

.chrono-intro {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto 56px auto;
}

.chrono-hero {
  width: min(760px, 100%);
  margin: 0 auto 38px auto;
}

.chrono-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  object-position: center center;
}

/* =========================================================
   BLOQUE INTRO
========================================================= */

.chrono-intro-text {
  max-width: 780px;
  margin: 0 auto;
  color: rgba(0,0,0,0.78);
}

.chrono-intro-text p {
  margin: 0 0 22px 0;

  font-size: var(--text-base);
  font-weight: 300;
  line-height: var(--leading-base);
  letter-spacing: var(--tracking-base);

  text-align: justify;
  text-justify: inter-word;

  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;

  word-break: normal;
  overflow-wrap: normal;
}

.chrono-intro-text strong,
.chrono-intro-text b {
  font-weight: 500;
}

.chrono-pdf-link {
  display: table;
  margin: 10px auto 0 auto;

  color: #00008b;
  text-decoration: none;

  font-family: var(--font-main);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: var(--leading-base);
  letter-spacing: var(--tracking-base);
}

.chrono-pdf-link:hover {
  text-decoration: underline;
}

/* =========================================================
   LISTA DE PROYECTOS
========================================================= */

.chrono-list {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

.chrono-item {
  display: grid;
  grid-template-columns: 30% 1fr;
  column-gap: 42px;
  padding: 34px 0;
  border-bottom: 1px solid rgba(0,0,0,0.12);
}

/* THUMB */

.chrono-preview {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.chrono-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  object-position: center center;
}

/* TEXTO */

.chrono-info {
  color: rgba(0,0,0,0.76);
}

.chrono-info p {
  margin: 0 0 18px 0;

  font-size: var(--text-base);
  font-weight: 300;
  line-height: var(--leading-base);
  letter-spacing: var(--tracking-base);

  text-align: justify;
  text-justify: inter-word;

  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;

  word-break: normal;
  overflow-wrap: normal;
}

.chrono-info strong,
.chrono-info b {
  font-weight: 500;
}

.chrono-info em {
  font-style: italic;
}

/* BOTONES */

.chrono-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chrono-open-btn {
  display: block;
  width: fit-content;
  padding: 0;
  border: none;
  background: none;
  color: #00008b;
  cursor: pointer;
  text-decoration: none;

  font-family: var(--font-main);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: var(--leading-base);
  letter-spacing: var(--tracking-base);
}

.chrono-open-btn:hover {
  text-decoration: underline;
}

/* =========================================================
   MODAL
========================================================= */

.chrono-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  background: rgba(0,0,0,0.95);
  padding: 18px;
}

.chrono-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.chrono-modal-panel {
  position: relative;
  width: 96vw;
  height: 94vh;
  
  color: #ffffff;
  display: grid;
  grid-template-rows: 1fr auto;
  /* background: #050505;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);*/
  overflow: hidden;
}

.chrono-modal-content {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px 56px 22px 56px;
}

.chrono-modal-media {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chrono-modal-media iframe {
  width: 100%;
  max-width: 1180px;
  aspect-ratio: 16 / 9;
  display: block;
  border: none;
  background: #000000;
}

.chrono-modal-media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 82vh;
  display: block;
  object-fit: contain;
  object-position: center center;
}

/* CERRAR */

.chrono-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 30;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

/* FLECHAS */

.chrono-modal-arrow {
  position: absolute;
  top: 45%;
  z-index: 20;
  width: 38px;
  height: 54px;
  border: none;
  border-radius: 4px;
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.55;
}

.chrono-modal-arrow:hover {
  opacity: 1;
  background: rgba(255,255,255,0.22);
}

.chrono-modal-prev {
  left: 14px;
}

.chrono-modal-next {
  right: 14px;
}

/* THUMBS MODAL */

.chrono-modal-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 58px;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 56px 18px 56px;
  background: #050505;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.chrono-modal-thumb {
  width: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.55;
}

.chrono-modal-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.chrono-modal-thumb.is-active {
  opacity: 1;
  border-color: rgba(255,255,255,0.75);
  transform: translateY(-2px);
}

/* =========================================================
   TABLETA
========================================================= */

@media (max-width: 1024px) {
  .chrono-item {
    grid-template-columns: 34% 1fr;
    column-gap: 28px;
  }

  .chrono-modal-panel {
    width: 97vw;
    height: 95vh;
  }
}

/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 768px) {
  .chrono-intro {
    margin-bottom: 42px;
  }

  .chrono-hero {
    width: 100%;
    margin-bottom: 28px;
  }

  .chrono-intro-text p,
  .chrono-info p {
    font-size: var(--text-base);
    font-weight: 300;
    line-height: var(--leading-base);
    letter-spacing: var(--tracking-small);

    text-align: justify;
    text-justify: inter-word;

    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;

    word-break: normal;
    overflow-wrap: normal;
  }

  .chrono-list {
    max-width: 100%;
  }

  .chrono-item {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px 0;
  }

  .chrono-open-btn,
  .chrono-pdf-link {
    font-size: var(--text-base);
    line-height: var(--leading-base);
    letter-spacing: var(--tracking-small);
  }

  .chrono-modal {
    padding: 0;
    overflow-x: hidden;
  }

  .chrono-modal-panel {
    width: 100%;
    height: 100svh;
    max-height: none;
    display: grid;
    grid-template-rows: 1fr auto auto;
    overflow-x: hidden;
  }

  .chrono-modal-content {
    width: 100%;
    min-height: 0;
    padding: 48px 14px 8px 14px;
    overflow-x: hidden;
  }

  .chrono-modal-media {
    width: 100%;
    min-height: 0;
    padding: 0 8px;
    align-items: center;
    overflow-x: hidden;
  }

  .chrono-modal-media iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .chrono-modal-media img {
    max-width: 100%;
    max-height: 72svh;
  }

  .chrono-modal-close {
    top: 10px;
    right: 10px;
    width: 46px;
    height: 46px;
    font-size: 2rem;
  }

  .chrono-modal-prev,
  .chrono-modal-next {
    position: fixed;
    transform: none;
    bottom: 66px;
    z-index: 35;
  }

  .chrono-modal-arrow {
    top: auto;
    width: 38px;
    height: 34px;
    font-size: 1.1rem;
  }

  .chrono-modal-prev {
    left: 12px;
  }

  .chrono-modal-next {
    right: 12px;
  }

  .chrono-modal-thumbs {
    grid-auto-columns: 46px;
    gap: 7px;
    padding: 46px 12px 14px 12px;
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  .chrono-modal-thumb {
    width: 46px;
    height: 46px;
  }
}