* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 12% 25%, rgba(95, 169, 218, 0.28), transparent 34%),
    radial-gradient(ellipse at 88% 72%, rgba(245, 179, 53, 0.16), transparent 30%),
    linear-gradient(135deg, #f2f7fb 0%, #dceaf4 48%, #edf3f8 100%);
  font-family: Arial, Helvetica, sans-serif;
}

.hero {
  position: relative;
  width: min(88%, 1100px);
  height: auto;
  aspect-ratio: 1411 / 768;
  overflow: hidden;
  margin: 0 auto 56px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background: linear-gradient(135deg, #0d3158, #287cac 55%, #f2b64e);
  box-shadow: 0 22px 55px rgba(16, 54, 88, 0.24);
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  animation: show-banner 18s infinite;
}

.hero-slide:first-child {
  opacity: 1;
}

.hero-slide:nth-child(2) {
  animation-delay: 6s;
}

.hero-slide:nth-child(3) {
  animation-delay: 12s;
}

@keyframes show-banner {
  0%,
  3% {
    opacity: 0;
  }

  6%,
  30% {
    opacity: 1;
  }

  33.333%,
  100% {
    opacity: 0;
  }
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  width: min(100% - 48px, 1184px);
  margin: 48px auto;
}

.quick-link {
  display: block;
  aspect-ratio: 0.605;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 11%;
  background-image: url("images/botones-referencia.jpg");
  background-repeat: no-repeat;
  background-size: 330% auto;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(10, 43, 77, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.quick-link-about {
  background-position: 3.6% 50%;
}

.quick-link-work {
  background-position: 50% 50%;
}

.quick-link-proposals {
  background-position: 96.6% 50%;
}

.quick-link-about:hover,
.quick-link-about:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px rgba(10, 43, 77, 0.2);
}

.quick-link-about:focus-visible {
  outline: 4px solid #f5b335;
  outline-offset: 4px;
}

.quick-link-about:active {
  transform: translateY(2px) scale(0.985);
  box-shadow: inset 0 5px 10px rgba(0, 15, 42, 0.3), 0 2px 5px rgba(0, 16, 48, 0.15);
}

.quick-link-proposals {
  cursor: default;
}

.quick-link-work {
  position: relative;
  isolation: isolate;
  cursor: default;
}

.quick-link-work::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(3, 25, 58, 0.08), rgba(3, 25, 58, 0.55));
  content: "";
}

.quick-link-work:focus-visible {
  outline: 4px solid #f5b335;
  outline-offset: 4px;
}

.axis-links {
  position: absolute;
  inset: 7% 7% 24%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 10px);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.quick-link-work:hover .axis-links,
.quick-link-work:focus-within .axis-links {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.axis-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: clamp(3px, 0.7vw, 7px);
  min-width: 0;
  min-height: 0;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: clamp(9px, 1.3vw, 16px);
  background: rgba(5, 48, 112, 0.94);
  color: #fff;
  font-size: clamp(0.56rem, 0.9vw, 0.78rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(10, 43, 77, 0.2), inset 0 1px rgba(255, 255, 255, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.axis-link-icon {
  width: clamp(23px, 3.1vw, 38px);
  height: clamp(23px, 3.1vw, 38px);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.8;
}

.axis-link-figures {
  grid-column: 1 / -1;
}

.axis-link:hover {
  transform: translateY(-3px);
  background: rgba(10, 75, 154, 0.98);
  box-shadow: 0 10px 18px rgba(0, 16, 48, 0.38), inset 0 1px rgba(255, 255, 255, 0.2);
}

.axis-link:focus-visible {
  outline: 3px solid #f5b335;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(245, 179, 53, 0.2), 0 10px 20px rgba(10, 43, 77, 0.3);
}

.axis-link:active {
  transform: translateY(2px) scale(0.985);
  background: #052b63;
  box-shadow: inset 0 5px 10px rgba(0, 15, 42, 0.35), 0 2px 5px rgba(0, 16, 48, 0.2);
}

.pdf-dialog {
  width: min(100% - 32px, 1100px);
  height: min(90vh, 850px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  color: #17324d;
  box-shadow: 0 20px 60px rgba(5, 25, 45, 0.35);
  animation: dialog-appear 260ms ease-out;
}

.pdf-dialog::backdrop {
  background: rgba(4, 20, 36, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: backdrop-appear 260ms ease-out;
}

@keyframes dialog-appear {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes backdrop-appear {
  from {
    background: rgba(4, 20, 36, 0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
  }

  to {
    background: rgba(4, 20, 36, 0.78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

.pdf-toolbar {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: #eef4f8;
}

.pdf-toolbar h2 {
  margin: 0;
  font-size: 1.1rem;
}

.pdf-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pdf-open-link,
.pdf-close {
  color: #103b70;
  font: inherit;
  font-weight: 700;
}

.pdf-open-link {
  text-decoration: none;
}

.pdf-close {
  padding: 9px 14px;
  border: 0;
  border-radius: 6px;
  background: #103b70;
  color: #fff;
  cursor: pointer;
}

.pdf-frame {
  display: block;
  width: 100%;
  height: calc(100% - 64px);
  border: 0;
  background: #fff;
}

@media (max-width: 680px) {
  .hero {
    width: calc(100% - 28px);
    margin-bottom: 32px;
    border-radius: 14px;
  }

  .hero-slide {
    object-position: center;
  }

  .quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "work work"
      "about proposals";
    width: calc(100% - 24px);
    gap: 8px;
    margin: 20px auto;
  }

  .quick-link-about {
    grid-area: about;
  }

  .quick-link-work {
    grid-area: work;
    aspect-ratio: 0.66;
  }

  .quick-link-proposals {
    grid-area: proposals;
  }

  .quick-link {
    border-radius: 10%;
  }

  .axis-links {
    inset: 7% 7% 23%;
  }

  .axis-link {
    gap: 5px;
    padding: 8px 5px;
    border-radius: 14px;
    font-size: clamp(0.68rem, 2.8vw, 0.9rem);
  }

  .axis-link-icon {
    width: clamp(30px, 9vw, 42px);
    height: clamp(30px, 9vw, 42px);
  }

  .pdf-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .pdf-frame {
    height: calc(100% - 100px);
  }

  .pdf-actions {
    justify-content: space-between;
    width: 100%;
  }

}

@media (hover: none), (pointer: coarse) {
  .quick-link-work .axis-links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

@media (max-width: 360px) {
  .hero {
    width: calc(100% - 20px);
  }

  .quick-links {
    width: calc(100% - 16px);
    gap: 5px;
  }

  .quick-link-work {
    aspect-ratio: 0.62;
  }

  .axis-link {
    gap: 4px;
    padding: 6px 4px;
    font-size: 0.66rem;
  }

  .axis-link-icon {
    width: 29px;
    height: 29px;
  }

  .pdf-dialog {
    width: calc(100% - 16px);
  }

  .pdf-toolbar {
    padding: 10px 12px;
  }

  .pdf-actions {
    gap: 10px;
    font-size: 0.9rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-slide {
    animation: none;
  }

  .hero-slide:first-child {
    opacity: 1;
  }

  .quick-link {
    transition: none;
  }

  .axis-link,
  .axis-links {
    transition: none;
  }

  .pdf-dialog,
  .pdf-dialog::backdrop {
    animation: none;
  }
}


/* --- Barra Inferior (Derechos de Autor) --- */
.footer-bottom {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 20px 20px;
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #333333;
  color: #777777;
  font-size: 14px;
}

/* --- Media Query para Pantallas Medianas y Grandes (Tablets / PC) --- */
@media screen and (min-width: 768px) {
  .footer-section {
    flex: 1; /* Distribuye el espacio equitativamente entre las 3 columnas */
  }
}