* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container_timeline {
  overflow-y:hidden;
  width: 100%;
  max-width: 1200px;
  margin: 10% auto;
  padding: 0 20px;
  position: relative;
  z-index: 5;
  overflow-x: hidden;
  height: 230%
}

.title {
  position: relative;
  font-size: 4rem;
  text-align: center;
  margin-bottom: 4rem;
  background: linear-gradient(120deg, #fff, #87CEFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow:
    0 0 20px rgba(152, 213, 251, 0.5),
    0 0 40px rgba(135, 206, 250, 0.3);
  font-family: 'Frozen', sans-serif;
  animation: timelineTitleGlow 3s ease-in-out infinite alternate;
  overflow: visible;
}

@keyframes timelineTitleGlow {
  0% {
    text-shadow:
      0 0 20px rgba(135, 206, 250, 0.5),
      0 0 40px rgba(135, 206, 250, 0.3);
  }
  100% {
    text-shadow:
      0 0 40px rgba(135, 206, 250, 0.7),
      0 0 80px rgba(135, 206, 250, 0.5);
  }
}

.timeline {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin-top: 2rem;
}

.timeline-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s ease-out;
}

.timeline-event.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-event:nth-child(even) {
  flex-direction: row-reverse;
}

.event-container {
  width: 41.666667%;
  position: relative;
  transform: translateY(0);

}


.event-glow {
  position: absolute;
  inset: -2.5rem;
  background: linear-gradient(to right, rgba(6, 182, 212, 0), rgba(6, 182, 212, 0.2), rgba(6, 182, 212, 0));
  opacity: 0;
  filter: blur(24px);
  transition: opacity 0.7s;
}

.event-container:hover .event-glow {
  opacity: 1;
}

.event-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.1), rgba(6, 182, 212, 0.3));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(103, 232, 249, 0.2);
  transition: all 0.7s;
  z-index: 8;
}

.event-container:hover .event-card {
  transform: scale(1.05) rotate(-1deg);
  box-shadow: 0 25px 50px -12px rgba(6, 182, 212, 0.3);
}

.ice-sculpture {
  width: 64px;
  height: 64px;
  position: relative;
  transition: transform 0.7s ease-in-out;
  transform-origin: center;
 
    transform: scale(0.9);
    animation: slowRotateMobile 30s linear infinite; /* Slower rotation for mobile */
}

.event-container:hover + .timeline-connector .ice-sculpture {
  animation: fastRotateMobile 3s linear infinite; 
}
.ice-rotate {
  animation: slowRotate 20s linear infinite;
}

.hover-rotate {
  animation: fastRotate 2s linear infinite !important;
}

@keyframes slowRotateMobile{
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fastRotateMobile {
  from { transform: rotate(0deg) scale(1.2); }
  to { transform: rotate(360deg) scale(1.2); }
}
.ice-glow {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0.2;
  filter: blur(24px);
  transition: all 0.7s;
}

.ice-layers {
  position: absolute;
  inset: 0;
}

.ice-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.1), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  transition: all 0.7s;
  transform-origin: center;
}

.event-container:hover + .timeline-connector .ice-layer:nth-child(1) {
  transform: scale(1.5) rotate(360deg);
  transition-delay: 0s;
}

.event-container:hover + .timeline-connector .ice-layer:nth-child(2) {
  transform: scale(1.4) rotate(270deg);
  transition-delay: 0.1s;
}

.event-container:hover + .timeline-connector .ice-layer:nth-child(3) {
  transform: scale(1.3) rotate(180deg);
  transition-delay: 0.2s;
}

.event-container:hover + .timeline-connector .ice-layer:nth-child(4) {
  transform: scale(1.2) rotate(90deg);
  transition-delay: 0.3s;
}

.event-container:hover + .timeline-connector .ice-glow {
  transform: scale(1.5);
  opacity: 0.3;
}

.snowflakes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s;
}

.event-container:hover .snowflakes {
  opacity: 1;
}

.snowflake {
  position: absolute;
  color: rgba(165, 243, 252, 0.3);
  animation: spin 3s linear infinite;
  transform-origin: center;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: #a5f3fc;
  font-size: 0.875rem;
}

.event-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  background: linear-gradient(to right, #a5f3fc, #fff, #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.5s;
}

.event-container:hover .event-title {
  transform: translateX(0.5rem);
}

.event-description {
  font-size: 0.875rem;
  color: rgba(165, 243, 252, 0.8);
  border-left: 2px solid rgba(103, 232, 249, 0.3);
  padding-left: 0.75rem;
  transition: all 0.5s;
}

.event-description:hover {
  border-left-color: rgba(103, 232, 249, 0.5);
  transform: translateX(0.5rem);
}

.timeline-connector {
  width: 16.666667%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.connector-line {
  height: 96px;
  width: 4px;
  background: linear-gradient(to bottom, rgba(6, 182, 212, 0.5), transparent);
  position: relative;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes northernLights {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (min-width:480px)and (max-width: 768px) {
  .container_timeline {
    width: 200%;
    max-width: 1200px;
    margin: 10% auto;
    padding: 0 20px;
    position: relative;
    z-index: 5;
    overflow: visible;
  }
  /*.container_timeline{
    width:400%;
  }
  .title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
  }

  .timeline-event,
  .timeline-event:nth-child(even) {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .event-container {
    width: 100%;
    max-width: 500px;
    transform: none;
  }

  .timeline-connector {
    width: 100%;
    flex-direction: row;
    padding: 1rem 0;
  }

  .connector-line {
    width: 96px;
    height: 4px;
    background: linear-gradient(to right, rgba(6, 182, 212, 0.5), transparent);
  }

  .ice-sculpture {
    transform: scale(0.9);
  }

  .snowflake {
    animation: spin 4s linear infinite;
  }*/
} 
@media (max-width: 480px) {
  .container_timeline {
    
    padding: 0 15px;
    
    width: 100%;
    overflow-x: hidden;
  }

  .title {
    font-size: 3rem;
  }
  
  .timeline {
    width: 100%;
    overflow: hidden;

  }

  .timeline-event {
    width: 100%;
    overflow: visible;
    padding: 0;
    margin: 0;
  }

  .event-container {
    width: 100%;
    padding: 0 5px;
    overflow: visible;
  }

  .timeline-connector {
    width: 100%;
    min-width: fit-content;
    overflow: visible;
    padding: 1rem 0;
  }

  .connector-line {
    width: 60px;
    margin: 0 auto;
    overflow: hidden;
  }

  .ice-sculpture {
    transform: scale(0.8);
    animation: slowRotateMobile 30s linear infinite;
    width: 48px;
    height: 48px;
    overflow: visible;
    position: relative;
  }

  .ice-glow {
    position: absolute;
    inset: -5px;
    background: rgba(255, 255, 255, 0.4); 
    opacity: 0.4; 
    filter: blur(8px);
    transition: all 0.7s;
  }

  .ice-layers {
    position: absolute;
    inset: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
  }

  .ice-layer {
    overflow: hidden;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, 
      rgba(255, 255, 255, 0.2), 
      rgba(6, 182, 212, 0.4)
    ); 
  }

  .event-card {
    padding: 1rem;
    width: 100%;
    overflow: hidden;
  }

  .event-title {
    font-size: 1.25rem;
  }

  .snowflakes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
  }

  .snowflake {
    position: absolute;
    overflow: hidden;
    max-width: 14px; 
    max-height: 14px; 
    color: rgba(165, 243, 252, 0.5); 
    font-size: 14px; 
  }

  .event-glow {
    overflow: hidden;
    inset: -1rem;
  }

  
  .event-container:hover + .timeline-connector .ice-glow {
    opacity: 0.6; 
    filter: blur(12px);
    background: rgba(255, 255, 255, 0.5);
  }
}
