/* ==================================================
   CRUZ MAYA - DISEÑO AJUSTADO TIPO REFERENCIA
   assets/cruzmaya.css
   ================================================== */

.cross-section {
  --cross-base-size: 760px;
  --cross-scale: 1;
  --cross-visible-size: calc(var(--cross-base-size) * var(--cross-scale));

  margin: 16px auto 10px;
  padding: 10px 8px;
  overflow-x: hidden;
  overflow-y: visible;
}

.cross-section h3 {
  text-align: center;
  color: #f4d27a;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 9px;
  text-shadow: 0 3px 10px rgba(0,0,0,.8);
}

/* ==================================================
   CONTENEDOR MÁS GRANDE Y CENTRADO
   ================================================== */

.cross-container {
  position: relative;
  width: var(--cross-base-size);
  min-width: 0;
  height: var(--cross-base-size);
  margin: 0 auto;

  display: grid;
  grid-template-columns: 230px 190px 230px;
  grid-template-rows: 150px 120px 150px 120px 150px;

  justify-content: center;
  align-content: center;
  align-items: center;

  overflow: visible;
}

/* ==================================================
   IMAGEN DE FONDO TRANSPARENTE CON MOVIMIENTO
   ================================================== */

.cross-container .cross-bg {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  opacity: 0.05;

  z-index: 0;
  pointer-events: none;

  overflow: hidden;
}

.cross-container .cross-bg::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url('https://i.postimg.cc/Y2WXbDwS/ruedasmayas.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;

  filter:
    drop-shadow(0 0 12px rgba(0,0,0,.4))
    saturate(1.1);

  animation: ruedaMayaRotate 90s linear infinite;
  transform-origin: center center;
}

@keyframes ruedaMayaRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ==================================================
   LÍNEAS DE LA CRUZ
   ================================================== */

.cross-container::before {
  content: "";
  position: absolute;
  width: calc(var(--cross-base-size) - 140px);
  height: 10px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(
      to right,
      transparent 0%,
      #7a4e21 8%,
      #7a4e21 32%,
      #237c34 46%,
      #237c34 54%,
      #b88d2f 68%,
      #b88d2f 92%,
      transparent 100%
    );
  border-radius: 999px;
  z-index: 1;
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,.25),
    0 2px 6px rgba(0,0,0,.9);
}

.cross-container::after {
  content: "";
  position: absolute;
  width: 10px;
  height: calc(var(--cross-base-size) - 150px);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(
      to bottom,
      transparent 0%,
      #ddd6c8 10%,
      #ddd6c8 28%,
      #2d883a 40%,
      #2d883a 54%,
      #8b8b8b 66%,
      #1694c8 78%,
      #0d4b75 92%,
      transparent 100%
    );
  border-radius: 999px;
  z-index: 1;
  box-shadow:
    inset 1px 0 2px rgba(255,255,255,.25),
    0 2px 6px rgba(0,0,0,.9);
}

/* ==================================================
   CUADROS BASE CON BORDES REDONDEADOS
   ================================================== */

.cross-item {
  position: relative;
  z-index: 5;
  width: 145px;
  height: 145px;
  border-radius: 34px;
  box-sizing: border-box;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 2px solid rgba(15,15,10,.95);
  box-shadow:
    inset 4px 5px 5px rgba(255,255,255,.22),
    inset -6px -7px 8px rgba(0,0,0,.38),
    0 8px 12px rgba(0,0,0,.72);
  transition:
    transform .2s ease,
    filter .2s ease;
}

.cross-item:hover {
  transform: scale(1.04);
  filter: brightness(1.08);
}

/* ==================================================
   POSICIONES
   ================================================== */

.cross-item:nth-of-type(1) {
  grid-column: 2;
  grid-row: 3;
  justify-self: center;
  align-self: center;
  background:
    radial-gradient(circle at 35% 25%,
      #62db58 0%,
      #20953a 48%,
      #07551f 100%);
}

.cross-item:nth-of-type(2) {
  grid-column: 1;
  grid-row: 3;
  justify-self: end;
  align-self: center;
  margin-right: 45px;
  background:
    radial-gradient(circle at 35% 25%,
      #e85b4b 0%,
      #b52a23 52%,
      #6c1210 100%);
}

.cross-item:nth-of-type(3) {
  grid-column: 3;
  grid-row: 3;
  justify-self: start;
  align-self: center;
  margin-left: 45px;
  background:
    radial-gradient(circle at 35% 25%,
      #ffe15b 0%,
      #d8a824 55%,
      #8e6610 100%);
}

.cross-item:nth-of-type(4) {
  grid-column: 2;
  grid-row: 1;
  width: 135px;
  height: 135px;
  border-radius: 32px;
  justify-self: center;
  align-self: center;
  background:
    radial-gradient(circle at 35% 25%,
      #ffffff 0%,
      #d9d3c5 55%,
      #827b70 100%);
}

.cross-item:nth-of-type(5) {
  grid-column: 2;
  grid-row: 5;
  width: 145px;
  height: 145px;
  border-radius: 34px;
  justify-self: center;
  align-self: center;
  background:
    radial-gradient(circle at 35% 25%,
      #46cdf0 0%,
      #128bbd 55%,
      #064f7b 100%);
}

/* ==================================================
   QUITAR CUADRITOS / FLECHAS
   ================================================== */

.cross-item:nth-of-type(1)::before,
.cross-item:nth-of-type(1)::after,
.cross-item:nth-of-type(2)::after,
.cross-item:nth-of-type(3)::before,
.cross-item:nth-of-type(4)::after,
.cross-item:nth-of-type(5)::before {
  content: none !important;
  display: none !important;
}

/* ==================================================
   PUNTOS DECORATIVOS
   ================================================== */

.cross-item:nth-of-type(2)::before,
.cross-item:nth-of-type(3)::after,
.cross-item:nth-of-type(4)::before,
.cross-item:nth-of-type(5)::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #1b130d;
  box-shadow:
    inset 2px 2px 2px rgba(255,255,255,.25),
    0 2px 4px rgba(0,0,0,.75);
}

.cross-item:nth-of-type(2)::before {
  left: -72px;
  top: 50%;
  transform: translateY(-50%);
  background: #b8241d;
}

.cross-item:nth-of-type(3)::after {
  right: -72px;
  top: 50%;
  transform: translateY(-50%);
  background: #c69520;
}

.cross-item:nth-of-type(4)::before {
  left: 50%;
  top: -42px;
  transform: translateX(-50%);
  background: #d9d3c5;
}

.cross-item:nth-of-type(5)::after {
  left: 50%;
  bottom: -42px;
  transform: translateX(-50%);
  background: #064f7b;
}

/* ==================================================
   TEXTO Y GLIFOS
   ================================================== */

.cross-label {
  width: 100%;
  font-size: 10px;
  line-height: 1.1;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 900;
  margin-bottom: 6px;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 1px 2px rgba(0,0,0,1),
    1px 1px 0 rgba(0,0,0,.75);
}

.cross-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cross-content img {
  width: 66px;
  height: 66px;
  object-fit: contain;
  filter:
    drop-shadow(0 1px 0 rgba(255,255,255,.25))
    drop-shadow(0 2px 2px rgba(0,0,0,.75));
}

.cross-content img:not([src]) {
  visibility: hidden;
}

.cross-content img[src] {
  visibility: visible;
}

.cross-content span {
  max-width: 125px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  text-shadow:
    0 1px 2px rgba(0,0,0,1),
    1px 1px 0 rgba(0,0,0,.75);
}

/* ==================================================
   MÓVIL - MEJORADO
   ================================================== */

@media (max-width: 768px) {

  .cross-section {
    --cross-scale: 0.56;
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
    padding-top: 6px;
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
  }

  .cross-container {
    position: relative;
    left: 50%;

    width: var(--cross-base-size);
    min-width: 0;
    max-width: var(--cross-base-size);
    height: var(--cross-base-size);

    display: grid;
    grid-template-columns: 230px 190px 230px;
    grid-template-rows: 150px 120px 150px 120px 150px;

    transform: translateX(-50%) scale(var(--cross-scale));

    transform-origin: top center;

    margin: 0 0 calc(var(--cross-visible-size) - var(--cross-base-size));

    overflow: visible;
  }

  .cross-container .cross-bg {
    opacity: 0.04;
  }

  .cross-item {
    width: 145px;
    height: 145px;
    min-width: 145px;
    padding: 16px 12px;
    border-radius: 34px;
  }

  .cross-item:nth-of-type(4) {
    width: 135px;
    height: 135px;
    min-width: 135px;
    border-radius: 32px;
  }

  .cross-item:nth-of-type(5) {
    width: 145px;
    height: 145px;
    min-width: 145px;
    border-radius: 34px;
  }

  .cross-content img {
    width: 66px;
    height: 66px;
  }

  .cross-content span {
    max-width: 125px;
    font-size: 16px;
  }

  .cross-label {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .cross-section {
    --cross-scale: 0.50;
    margin-top: 8px;
  }

  .cross-container {
    overflow: visible;
  }
}

@media (max-width: 380px) {
  .cross-section {
    --cross-scale: 0.46;
  }

  .cross-container {
    overflow: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cross-container .cross-bg::before {
    animation: none;
  }
}
