/* ฟอนต์และพื้นหลัง */
body {
    font-family: 'Kanit', sans-serif;
    background-color: #f2f4f9;
    margin: 0;
    padding: 0;
    color: #333;
    min-width: 320px; /* รองรับมือถือจอเล็ก */
    min-height: 100vh; /* เต็มความสูงหน้าจอ */
}

/* Breadcrumb */
.breadcrumb-area {
    background-size: cover;
    background-position: center;
    padding: 80px 0;
    background-color: #0066cc;
    min-height: 150px; /* กำหนดขั้นต่ำ */
    display: flex;
    align-items: center;
    height: 50vh; /* ความสูงของ breadcrumb */
}

.breadcrumb-content h4 {
    color: #fff;
    font-size: clamp(28px, 5vw, 60px); /* ขนาดฟอนต์ตอบสนอง */
    font-weight: 600;
    margin-bottom: 10px;
}

/* Container หลัก */
.history-content {
    padding: 40px 15px;
    max-width: 1500px;
    margin: 0 auto;
}

/* กล่องเนื้อหาแบ่ง 2 ฝั่ง ซ้าย-ขวา */
.history-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 30px; /* เพิ่มช่องว่างระหว่างคอลัมน์ */
    flex-wrap: wrap; /* รองรับมือถือ */
    min-height: 400px; /* กำหนดขั้นต่ำ */
}

/* คอลัมน์ซ้าย */
.history-left {
    flex: 2 1 600px; /* ยืดหยุ่น กินพื้นที่ขั้นต่ำ 350px */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.history-left-img {
    width: 100%;
    height: auto;
    margin-bottom: 200px;
    transition: transform 0.3s ease;
}

.history-left-img:hover {
    transform: scale(1.05);
}

.history-left h3 {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 700;
    color: black;
}

/* คอลัมน์ขวา */
.history-right {
    flex: 1 1 350px;
    text-align: left;
    min-width: 300px;
}

.history-right h3 {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 700;
    color: rgb(21, 168, 21);
    margin-bottom: 20px;
    line-height: 1.2;
}

.history-right-description {
    font-size: clamp(16px, 1.2vw, 20px);
    color: #2b2929;
    line-height: 1.65;
    margin-bottom: 1.3rem;
    text-align: justify;
}

.history-right-img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

/* ไฮไลต์ */
.highlight {
    background: rgba(35, 234, 71, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 8px;
    padding: 3px 8px;
    font-weight: 700;
    color: #238a00;
    box-shadow: 0 4px 12px rgba(35, 234, 71, 0.3);
    transition: all 0.3s ease;
    display: inline-block;
    cursor: default;
}

.highlight:hover {
    background: rgba(35, 234, 71, 0.6);
    box-shadow: 0 8px 24px rgba(15, 236, 107, 0.7);
    color: #0d3d00;
    transform: scale(1.05);
}

/* หัวข้อกลาง */
.history-mid-title {
    font-size: clamp(60px, 6vw, 40px);
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 40px;
    background: rgb(21, 168, 21);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.history-mid-title i {
    font-size: 20px;
    margin: 0 10px;
    color: purple;
    vertical-align: middle;
    height: 7vh;
}

.intro-welcome-line::before {
  content: '';
  display: block;
  width: 30%; /* ความกว้างเต็ม */
  height: 5px; /* ความหนา */
  background: rgb(21, 168, 21);
  margin: 10px 0; /* ระยะห่าง */
  justify-self: center;
  margin-bottom: 60px;
}

.intro-welcome-line-1::before {
  content: '';
  display: block;
  width: 90%; /* ความกว้างเต็ม */
  height: 5px; /* ความหนา */
  background: rgb(21, 168, 21);
  margin: 0 auto; /* ระยะห่าง */
  justify-self: center;
  margin-bottom: 60px;
}

#myImg {
  cursor: pointer;
  transition: 0.3s;
}

#myImg:hover {
    opacity: 0.7;
}

/* The Modal (background) */
.modal {
  display: none; 
  position: fixed; 
  z-index: 1; 
  padding-top: 100px; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

/* Modal Content (image) */
.modal-content {
  margin: auto;
  display: block;
  width: 100%;
  max-width: 700px;
}

@keyframes zoom {
  from {transform: scale(0.1)} 
  to {transform: scale(1)}
}

/* The Close Button */
.close {
  position: absolute;
  top: 35px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px){
  .modal-content {
    width: 100%;
  }
}

/* Responsive สำหรับจอเล็ก */
@media (max-width: 1024px) {
    .history-container {
        flex-direction: column;
        gap: 40px;
        min-height: auto;
    }

    .history-left,
    .history-right {
        flex: 1 1 100%;
        min-width: auto;
    }

    .history-left-img {
        max-width: 100%;
        margin-bottom: 10px;
    }

    .history-mid-title {
        margin-bottom: 10px;
    }

    .intro-welcome-line::before {
        width: 70%; 
    }
}
