/* ==== TIMELINE SECTION ==== */ 
.timeline-section {
    padding: 64px 32px;
}

/* Main heading styling */
.timeline-section h1 {
    text-align: center;
    margin-bottom: 48px;
}

/* Container for the entire timeline section */
.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* -- Timeline Content --*/
.timeline-content-wrapper {
    position: relative;
    min-height: 500px;
    margin-bottom: 48px;
}

.timeline-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px;
    background-color: var(--whhite);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: opacity 0.5s, transform 0.5s;
}

/* Era title section */
.timeline-era {
    text-align: center;
    margin-bottom: 32px;
    width: 100%;
}

.timeline-era h2 {
    font-size: 40px;
    margin-bottom: 8px;
    color: var(--primary-color);
    letter-spacing: 2px;
    text-transform: capitalize;
}

.timeline-styles {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 48px;
}

.timeline-style {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--off-white);
}

.timeline-style:last-child {
    border-bottom: none;
}

.timeline-style-image {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.timeline-style-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.timeline-style-content {
    flex: 1.5;
    min-width: 300px;
}

/* Hairstyle title */
.timeline-style-content h3 {
    font-family: "friandise", sans-serif;
    font-size: 28px;
    margin-bottom: 16px;
    color:var(--primary-color);
    text-align: center;
}

.timeline-style-content p {
    line-height: 1.7;
    color: var(--black);
    font-size: 18px;
}

/* Loading state when timeline data is being fetched */
.timeline-loading {
    text-align: center;
    padding: 48px;
    color: var(--background-grey);
    font-size: 19px;
}

/* -- Timeline Navigation -- */
.timeline-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    position: relative;
    padding: 24px 0;
}

.timeline-track {
    position: relative;
    width: 80%;
    height: 6px;
    background-color: var(--off-white);
    margin: 0 20px;
    border-radius: 3px;
    overflow: visible;
}
/* Displays a coloured progress line that fills as you navigate */
.timeline-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: var(--secondary-color);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Navigation arrow buttons */
.nav-arrow {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Hover effect for navigation arrows */
.nav-arrow:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
}

/* Disabled state for navigation arrows when at the beginning or end */
.nav-arrow:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: scale(1);
    box-shadow: none;
}

/* ----Timeline Points ----*/
/* The interactive dots on the timeline representing each era */
.timeline-point {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: var(--off-white);
    border: 2px solid var(--white);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.timeline-point:hover {
    transform: translateY(-50%) scale(1.2);
}

/* Active (current) timeline point */
.timeline-point.active {
    background-color: var(--primary-color);
    transform: translateY(-50%) scale(1.3);
    box-shadow: 0 2px 8px var(--secondary-color);
}

/* Colours the visited timeline points */
.timeline-point.visited {
    background-color: var(--secondary-color);
}

/* Labels for timeline points */
.timeline-point-label {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 14px;
    color: var(--black);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

.timeline-style-image img {
    border: 2px solid var(--secondary-color);
}

/* Show labels on hover or when active */
.timeline-point:hover .timeline-point-label,
.timeline-point.active .timeline-point-label {
    opacity: 1;
    bottom: 35px;
}

/* -- Animation Classes -- */
.slide-in {
    animation: slideIn 0.6s forwards;
}

.slide-out {
    animation: slideOut 0.6s forwards;
}

/* Animation for new content appearing */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Animation for old content appearing */
@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* ====== RESPONSIVE SECTION ===== */

/* Mobile Resolution (0 - 600px) (Base styling for smallest screens) */
@media screen and (min-width: 0) and (max-width: 600px) {
    .timeline-section h1 {
      font-size: 28px;
      margin-bottom: 20px;
      align-items: center;
    }
    
    .timeline-content h2 {
      font-size: 20px;
      margin-bottom: 10px;
      align-items: center;
    }
    
    .timeline-content p {
        font-size: 16px;
        align-items: center;
        justify-content: center;
      }
    
    .timeline-navigation {
      margin-top: 15px;
    }
    
    .timeline-track {
      width: 70%;
    }
    
    .nav-arrow {
      width: 30px;
      height: 30px;
      font-size: 16px;
    }
    
    .timeline-point {
      width: 15px;
      height: 15px;
    }
  }
  
  /* Tablet Resolution (601px - 1023px) (For medium-sized screens) */
  @media screen and (min-width: 601px) and (max-width: 1023px) {
    .timeline-section h1 {
      font-size: 36px;
    }
    
    .timeline-container {
      padding: 0 20px;
    }
    
    .timeline-content-wrapper {
      padding: 20px;
    }
    
    .timeline-track {
      width: 80%;
    }

    .timeline-style-image img {
        align-items: center;
    }
  }
