.main3 {
  position: relative;
  height: 100vh;
  /* border: 1px solid red; */
  background: url("../img/section3.jpg") no-repeat center center fixed;
  background-size: cover;
}

/* ตั้งค่า container */
.timeline-container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
  text-align: center;
  z-index: 2;
}

/* Mobile (แนวตั้ง) */
.timeline {
  display: flex;
  flex-direction: column;
  /* เรียงจากบนลงล่าง */
  align-items: center;
  gap: 10px;
  position: relative;
}

/* กล่องแต่ละเหตุการณ์ */
.timeline-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 5px;
  max-width: 300px;
  text-align: center;
  position: relative;
}

/* เส้น Timeline */
.timeline-line {
  width: 4px;
  height: 50px;
  /* ความสูงเส้นแนวตั้ง */
  background: #fff;
}

.timeline-container {
  position: relative;
}

/* Desktop ปรับให้เป็นเส้นแนวนอน */
@media (min-width: 768px) {
  .timeline-line {
    width: 50px;
    /* ความกว้างเส้นแนวนอน */
    height: 4px;
    /* ความสูงของเส้น */
  }

  .timeline {
    flex-direction: row;
    /* เรียงจากซ้ายไปขวา */
    justify-content: center;
    align-items: center;
  }
}

.timeline-title {
  font-size: clamp(20px, 4vw, 36px);
  /* ขนาดฟอนต์ระหว่าง 20px ถึง 36px */
  font-weight: bold;
}

.timeline-year {
  color: white;
  font-size: clamp(16px, 3vw, 28px);
  font-weight: bold;
}

.timeline-item p {
  font-size: clamp(14px, 2vw, 20px);
}

@media (max-width: 575.98px) {
  .timeline-container {
    margin: 20px;
  }
}

/* Small devices (sm) - มือถือทั่วไป (576px ขึ้นไป) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .timeline-container {
    padding: 10%;
    margin: 20px;
  }

  .timeline-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    border-top: 8px solid #f4f1e1;
    border-left: 8px solid #f4f1e1;
  }

  /* กรอบขวาล่าง */
  .timeline-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-bottom: 8px solid #f4f1e1;
    border-right: 8px solid #f4f1e1;
  }
}

/* Medium devices (md) - แท็บเล็ต (768px ขึ้นไป) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .timeline-line {
    width: 50px;
    height: 4px;
  }

  .timeline {
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }

  .timeline-container {
    padding: 3%;
    margin: 20px;
  }

  .timeline-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    border-top: 15px solid #f4f1e1;
    border-left: 15px solid #f4f1e1;
  }

  /* กรอบขวาล่าง */
  .timeline-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 120px;
    height: 120px;
    border-bottom: 15px solid #f4f1e1;
    border-right: 15px solid #f4f1e1;
  }
}

/* Large devices (lg)  */
@media (min-width: 992px) {
  .timeline-line {
    width: 50px;
    height: 4px;
  }

  .timeline {
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }
  .timeline-container {
    padding: 5%;
    margin: 20px;
  }

  .timeline-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    border-top: 15px solid #f4f1e1;
    border-left: 15px solid #f4f1e1;
  }

  /* กรอบขวาล่าง */
  .timeline-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 200px;
    height: 200px;
    border-bottom: 15px solid #f4f1e1;
    border-right: 15px solid #f4f1e1;
  }
}
