@import url(/static/css/globals.css);

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 90%;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

.mis-experiencias {
  text-align: center;
  margin-top: var(--spacing-3xl);
  padding: var(--spacing-general);
}

.mis-experiencias h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

.mis-experiencias p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Timeline Container */
.timeline {
  position: relative;
  padding: var(--spacing-xl) 0;
}

/* Línea vertical central */
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--text-primary), var(--text-accent));
  border-radius: var(--border-radius-lg);
}

/* Timeline Item */
.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-3xl);
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(1) {animation-delay: 0.1s;}
.timeline-item:nth-child(2) {animation-delay: 0.2s;}
.timeline-item:nth-child(3) {animation-delay: 0.3s;}
.timeline-item:nth-child(4) {animation-delay: 0.4s;}
.timeline-item:nth-child(5) {animation-delay: 0.5s;}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Alternar lados */
.timeline-item:nth-child(odd) {flex-direction: row-reverse;}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
  margin-right: var(--spacing-xl);
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: auto;
  margin-left: var(--spacing-xl);
  text-align: left;
}

/* Punto central en la línea */
.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: var(--text-primary);
  border: 4px solid var(--surface);
  border-radius: var(--border-radius-full);
  box-shadow: var(--shadow-md);
  z-index: 2;
  transition: all var(--transition-normal);
}

.timeline-item:hover .timeline-dot {
  background: var(--text-accent);
  transform: translateX(-50%) scale(1.3);
  box-shadow: var(--shadow-lg), 0 0 20px var(--text-accent);
}

/* Contenido de cada item */
.timeline-content {
  width: calc(50% - var(--spacing-2xl));
  background: var(--surface);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 2px solid transparent;
}

.timeline-content:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--text-primary);
}

.timeline-date {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  background: linear-gradient(135deg, var(--text-primary), var(--text-accent));
  color: white;
  border-radius: var(--border-radius-lg);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.timeline-title {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

.timeline-description {
  color: var(--text-muted);
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
}

.timeline-image {
  width: 100%;
  object-fit: cover;
  border-radius: var(--border-radius-xl);
  margin-top: var(--spacing-md);
  transition: transform var(--transition-normal);
}

.timeline-content:hover .timeline-image {
  transform: scale(1.02);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--text-primary);
  font-weight: 600;
  margin-top: var(--spacing-md);
  transition: gap var(--transition-fast);
}

.read-more:hover {
  gap: var(--spacing-md);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  padding: var(--spacing-xl);
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--border-radius-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-image {
  width: 100%;
  object-fit: cover;
  border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.modal-body {padding: var(--spacing-2xl);}

.modal-date {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  background: linear-gradient(135deg, var(--text-primary), var(--text-accent));
  color: white;
  border-radius: var(--border-radius-lg);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.modal-title {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: var(--spacing-lg);
  font-weight: 700;
}

.modal-description {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.05rem;
}

/* Responsive */
@media (max-width: 768px) {
  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    flex-direction: row !important;
    padding-left: 60px;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    width: 100%;
    margin: 0;
    text-align: left;
  }

  .timeline-dot {left: 30px;}
  .modal-content {margin: var(--spacing-md);}
  .modal-image {height: 250px;}
  .modal-title {font-size: 1.5rem;}
}

/* Scroll suave */
html {scroll-behavior: smooth;}

/* Scrollbar personalizado */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {background: var(--background);}

::-webkit-scrollbar-thumb {
  background: var(--text-primary);
  border-radius: var(--border-radius-lg);
}

::-webkit-scrollbar-thumb:hover {background: var(--text-accent);}
