/*-- -------------------------- -->
<---          Timeline          -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #timeline-1517 {
    position: relative;
    z-index: 1;
    width: 100%;
  }

  #timeline-1517 .cs-container {
    width: 100%;
    max-width: 34.375rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(3rem, 6vw, 4rem);
  }

  #timeline-1517 .cs-card-group {
    width: 100%;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem 1.5rem;
    position: relative;
  }

  #timeline-1517 .cs-card-group:before {
    content: "";
    width: 2px;
    background: var(--color-titulos);
    opacity: 0.2;
    position: absolute;
    display: block;
    top: 0;
    bottom: 0;
    left: 2rem; /* Adjusted for larger padding */
  }

  #timeline-1517 .cs-item {
    width: 100%;
    max-width: 25rem;
    list-style: none;
    padding: 0 0 0 4rem; /* Increased from 2.75rem to 4rem for more space */
    grid-column: span 12;
    position: relative;
  }

  #timeline-1517 .cs-item h3 {
    text-wrap: balance;
  }

  @keyframes pulse-glow {
    0% {
      box-shadow: 0 0 0 0 rgba(160, 128, 92, 0.4);
    }
    70% {
      box-shadow: 0 0 0 10px rgba(160, 128, 92, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(160, 128, 92, 0);
    }
  }

  #timeline-1517 .cs-item:hover .cs-date {
    color: var(--color-titulos);
    transform: translateY(-2px);
  }

  #timeline-1517 .cs-item:hover:before {
    background-color: var(--color-titulos);
    border-color: var(--color-titulos);
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(160, 128, 92, 0.6);
    animation: none;
  }

  #timeline-1517 .cs-item:before {
    content: "";
    width: 1.25rem;
    height: 1.25rem;
    background: var(--color-fondo-secciones-1);
    border: 2px solid var(--color-titulos);
    box-sizing: border-box;
    border-radius: 50%;
    position: absolute;
    display: block;
    top: 0.8rem;
    left: 1.45rem; /* Adjusted to align with the new 2rem line (2rem - half width) */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    animation: pulse-glow 2s infinite;
  }

  #timeline-1517 .cs-date {
    font-family: var(--fuente-1);
    font-size: 2rem;
    line-height: 1.2em;
    font-weight: var(--grosor-fuente-regular);
    margin: 0 0 0.5rem 0;
    color: var(--color-titulos);
    display: block;
    transition: all 0.3s ease;
  }

  #timeline-1517 .cs-h3 {
    font-family: var(--fuente-2);
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    line-height: 1.4em;
    font-weight: var(--grosor-fuente-light);
    width: 100%;
    margin: 0;
    color: var(--color-subtitulos);
    position: relative;
  }
}

/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
  #timeline-1517 .cs-container {
    max-width: 80rem;
    padding: 0 20px;
  }

  #timeline-1517 .cs-card-group {
    gap: clamp(1rem, 1.5vw, 1.25rem);
    row-gap: 3rem;
    justify-content: center;
  }

  #timeline-1517 .cs-card-group:before {
    display: none;
  }

  #timeline-1517 .cs-item {
    padding: 3.75rem 0 0 0;
    grid-column: span 4;
    text-align: center;
  }

  #timeline-1517 .cs-item:before {
    top: 0;
    left: 50%;
    margin-left: -0.625rem;
    transform: none;
  }

  #timeline-1517 .cs-item:hover:before {
    transform: scale(1.2);
  }

  #timeline-1517 .cs-item:after {
    content: "";
    width: 100%;
    height: 2px;
    background: var(--color-titulos);
    opacity: 0.2;
    box-sizing: border-box;
    position: absolute;
    display: block;
    top: 0.625rem;
    left: -50%;
    z-index: 1;
  }

  #timeline-1517 .cs-item:first-child:after {
    display: none;
  }

  #timeline-1517 .cs-h3 {
    width: 100%;
  }
}
