/*=============== HISTORY PAGE STYLES ===============*/

/*========== HISTORY SECTION ==========*/
.history {
  padding: var(--section-padding);
}

.history__container {
  max-width: var(--container-max-width);
  margin: 0 auto;
}

/*========== HISTORY BANNER ==========*/
.history-banner {
  text-align: center;
  margin-bottom: 4rem;
  padding: 3rem 0;
}

.history-banner__subtitle {
  font-size: var(--normal-font-size);
  color: var(--vert-mini);
  font-weight: var(--font-bold);
  font-family: var(--second-font);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.history-banner__title {
  font-size: var(--biggest-font-size);
  font-weight: var(--font-bold);
  color: var(--white-color);
  background: linear-gradient(to right, var(--vert-mini), var(--bleu-mini));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--second-font);
}

/*========== TIMELINE ==========*/
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, 
    var(--vert-mini) 0%, 
    var(--bleu-mini) 50%, 
    var(--fuschia-mini) 100%);
  border-radius: 2px;
}

/*========== TIMELINE STEPS ==========*/
.timeline-step {
  position: relative;
  margin-bottom: 4rem;
  display: flex;
  align-items: center;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

.timeline-step--left {
  flex-direction: row;
}

.timeline-step--right {
  flex-direction: row-reverse;
}

/*========== TIMELINE DOTS ==========*/
.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid var(--black-color);
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-dot--green {
  background: var(--vert-mini);
  box-shadow: 0 0 20px var(--vert-mini);
}

.timeline-dot--blue {
  background: var(--bleu-mini);
  box-shadow: 0 0 20px var(--bleu-mini);
}

.timeline-dot--fuschia {
  background: var(--fuschia-mini);
  box-shadow: 0 0 20px var(--fuschia-mini);
}

.timeline-step:hover .timeline-dot {
  transform: translateX(-50%) scale(1.2);
}

/*========== TIMELINE CONTENT ==========*/
.timeline-content {
  width: 45%;
  background: var(--black-color-light);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 8px 32px hsla(0, 0%, 0%, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.timeline-step--left .timeline-content {
  margin-right: auto;
}

.timeline-step--right .timeline-content {
  margin-left: auto;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px hsla(0, 0%, 0%, 0.2);
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
}

.timeline-step--left .timeline-content::before {
  right: -10px;
  transform: translateY(-50%);
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent var(--black-color-light);
}

.timeline-step--right .timeline-content::before {
  left: -10px;
  transform: translateY(-50%);
  border-width: 10px 10px 10px 0;
  border-color: transparent var(--black-color-light) transparent transparent;
}

/*========== TIMELINE IMAGE ==========*/
.timeline-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--vert-mini);
  transition: all 0.3s ease;
}

.timeline-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-content:hover .timeline-img {
  border-color: var(--bleu-mini);
  transform: scale(1.1);
}

/*========== TIMELINE DATE ==========*/
.timeline-date {
  font-size: var(--small-font-size);
  color: var(--vert-mini);
  font-weight: var(--font-bold);
  font-family: var(--second-font);
  text-align: center;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/*========== TIMELINE TITLE ==========*/
.timeline-title {
  font-size: var(--h2-font-size);
  font-weight: var(--font-bold);
  color: var(--white-color);
  text-align: center;
  margin-bottom: 1rem;
  font-family: var(--second-font);
}

/*========== TIMELINE DESCRIPTION ==========*/
.timeline-desc {
  font-size: var(--normal-font-size);
  color: var(--text-color);
  line-height: 1.6;
  text-align: center;
}

/*========== RESPONSIVE ADJUSTMENTS ==========*/
@media screen and (max-width: 768px) {
  .timeline::before {
    left: 2rem;
  }
  
  .timeline-step {
    flex-direction: row !important;
    margin-left: 2rem;
  }
  
  .timeline-dot {
    left: 2rem;
    transform: translateX(-50%);
  }
  
  .timeline-step:hover .timeline-dot {
    transform: translateX(-50%) scale(1.2);
  }
  
  .timeline-content {
    width: calc(100% - 4rem);
    margin-left: 2rem !important;
    margin-right: 0 !important;
  }
  
  .timeline-step--left .timeline-content::before,
  .timeline-step--right .timeline-content::before {
    left: -10px;
    right: auto;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--black-color-light) transparent transparent;
  }
  
  .history-banner__title {
    font-size: 2.5rem;
  }
  
  .timeline-content {
    padding: 1.5rem;
  }
  
  .timeline-img {
    width: 60px;
    height: 60px;
  }
  
  .timeline-title {
    font-size: 1.25rem;
  }
}

@media screen and (max-width: 550px) {
  .timeline::before {
    left: 1.5rem;
  }
  
  .timeline-step {
    margin-left: 1.5rem;
  }
  
  .timeline-dot {
    left: 1.5rem;
  }
  
  .timeline-content {
    width: calc(100% - 3rem);
    margin-left: 1.5rem !important;
    padding: 1rem;
  }
  
  .history-banner__title {
    font-size: 2rem;
  }
  
  .history-banner__subtitle {
    font-size: 0.875rem;
  }
  
  .timeline-img {
    width: 50px;
    height: 50px;
  }
  
  .timeline-title {
    font-size: 1.125rem;
  }
  
  .timeline-desc {
    font-size: 0.875rem;
  }
}

@media screen and (min-width: 769px) and (max-width: 1023px) {
  .timeline-content {
    width: 40%;
    padding: 1.75rem;
  }
  
  .history-banner__title {
    font-size: 3rem;
  }
}

@media screen and (min-width: 1024px) {
  .timeline-content {
    width: 45%;
    padding: 2rem;
  }
  
  .history-banner__title {
    font-size: 3.5rem;
  }
}

@media screen and (min-width: 1152px) {
  .timeline-content:hover {
    transform: translateY(-8px);
  }
  
  .history-banner__title {
    font-size: var(--biggest-font-size);
  }
}

/*========== ANIMATIONS ==========*/
@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes slideInLeft {
  from { 
    opacity: 0; 
    transform: translateX(-50px); 
  }
  to { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

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

.history-banner {
  animation: fadeInUp 0.8s ease-out;
}

.timeline-step {
  animation: fadeInUp 0.6s ease-out;
}

.timeline-step--left {
  animation: slideInLeft 0.6s ease-out;
}

.timeline-step--right {
  animation: slideInRight 0.6s ease-out;
}

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

/*========== REDUCED MOTION ==========*/
@media (prefers-reduced-motion: reduce) {
  .history-banner,
  .timeline-step {
    animation: none;
  }
  
  .timeline-content:hover {
    transform: none;
  }
  
  .timeline-step:hover .timeline-dot {
    transform: translateX(-50%) scale(1);
  }
  
  .timeline-content:hover .timeline-img {
    transform: none;
  }
}

/*========== DARK MODE ENHANCEMENTS ==========*/
@media (prefers-color-scheme: dark) {
  .timeline-content {
    border: 1px solid var(--black-color-light);
  }
  
  .timeline-dot {
    border-color: var(--black-color);
  }
}

/*========== PRINT STYLES ==========*/
@media print {
  .timeline::before {
    background: black;
  }
  
  .timeline-content {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .timeline-content:hover {
    transform: none;
  }
  
  .history-banner__title {
    -webkit-text-fill-color: black;
    background: none;
  }
  
  .timeline-dot {
    border-color: black;
  }
}
