/* history-section vision-section */
.history-section, .vision-section{
    text-align: center;
    font-size: 20px;
    /* padding-left: 20px; */
    color: var(--color-2);
}

.history-section p{
    padding-left: 10px;
}

.history-section h1, .vision-section h1{
    text-align: center;
    font-size: 30px;
    color: var(--color-2);
    padding-top: 50px;
}

.history-section span, .vision-section span{
    color: var(--color-4);
}

.information-slogan p , .information-detail, .vision{
    margin: 20px 0;
    color: black;
}

.information-history p {
    font-size: 18px;
    margin-top: 10px;
    color: black;
}

.timeline img{
    width: 80%;
    margin-bottom: 20px;
    padding-top: 60px;
}

.row {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.vision {
    margin: 0 auto;
    text-align: center;
}

.column {
    flex: 1;
    padding: 15px;
    border-radius: 10px;
    /* box-shadow: 0 4px 8px rgba(253, 197, 0, 1); */
    text-align: left;
    display: grid;
    gap: 50px;
}

/* structure-section */
.structure-section h1{
    text-align: center;
    font-size: 30px;
    color: var(--color-2);
    padding-top: 50px;
}

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

.structure img {
    width: 70%;
}

/* emblem-section */
.emblem-section h1{
    text-align: center;
    font-size: 30px;
    color: var(--color-2);
    padding-top: 50px;
}

.emblem-section span{
    color: var(--color-4);
}

.emblem-section {
    text-align: center;
    font-size: 20px;
    color: var(--color-2);
}

.container {
    display: flex;
    align-items: flex-start;
    max-width: 1920px;
    gap: 90px;
    align-items: center;
    justify-content: center;
    padding-top: 20px;
    flex-direction: column;
}

.logo {
    width: 250px;
    height: auto;
    align-items: center;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.icon {
    width: 50px;
    height: auto;
}

.text {
    max-width: 1000px;
    text-align: left;
    padding-left: 20px;
}

.emblem-section h2 {
    color:var(--color-4);
    font-size: 1.2em;
    margin: 0;
    text-align: left;
}

.emblemimg {
    /* width: 1920px;
    height: auto; */
    display: block;
    align-items: center;
}

/* authority-section */
.authority {
    text-align: center;
}

.authority-section h1{
    text-align: center;
    font-size: 30px;
    color: var(--color-2);
    padding-top: 50px;
}

/* travel-section */
.travel {
  display: flex;
  flex-direction: column;
  align-items: center; /* จัดแนวนอนตรงกลาง */
  text-align: center;   /* จัดข้อความให้อยู่กึ่งกลาง */
}

.travel img {
  max-width: 80%;
  height: auto;
  display: block;
  margin: 0 auto; /* สำหรับกรณีไม่ใช้ flex */
}

/* .travel img{
    width: 50%;
    margin-bottom: 20px;
    padding-top: 10px;
    align-items: center;
    justify-content: center;
} */

@import url('https://fonts.googleapis.com/css?family=Quicksand:400,500,700&subset=latin-ext');

html {
  position: relative;
  overflow-x: hidden !important;
}

body {
  font-family: 'Quicksand', sans-serif;
}

a, a:hover {
  text-decoration: none;
}

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke-width: 0;
  stroke: currentColor;
  fill: currentColor;
}

.background {
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
}

.background:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(45deg, rgba(209, 0, 42, 0.6) 0%, #0E5DC4 100%);
  opacity: 0.9;
}

.background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.item-bg {
  width: 300px;
  height: 500px;
  position: absolute;
  top: 30px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 26px 6px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: all 0.3s;
  left: -30px;
}

.item-bg.active {
  left: 0;
  top: 0;
  opacity: 1;
}

.news-slider {
  z-index: 2;
  max-width: 1300px;
  margin: 60px auto;
}

.news-slider__wrp {
  display: flex;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.news-slider__item {
  width: 400px;
  flex-shrink: 0;
  transition: all 0.3s;
}

.news-slider__item.swiper-slide {
  opacity: 0;
  pointer-events: none;
}

.news-slider__item.swiper-slide-active,
.news-slider__item.swiper-slide-prev,
.news-slider__item.swiper-slide-next {
  opacity: 1;
  pointer-events: auto;
}

.news-slider__ctr {
  position: relative;
  z-index: 12;
}

.news-slider__arrow {
  background: #fff;
  border: none;
  display: inline-flex;
  width: 50px;
  height: 50px;
  justify-content: center;
  align-items: center;
  box-shadow: 0 6px 26px 6px rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  z-index: 12;
  cursor: pointer;
}

.news-slider-prev {
  left: 15px;
  transform: translateY(-50%);
}

.news-slider-next {
  right: 15px;
  transform: translateY(-50%);
}

.news-slider__pagination {
  text-align: center;
  margin-top: 50px;
}

.swiper-pagination-bullet {
  width: 13px;
  height: 10px;
  display: inline-block;
  background: #fff;
  opacity: 0.2;
  margin: 0 5px;
  border-radius: 20px;
  transition: opacity 0.5s, background-color 0.5s, width 0.5s;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: #ffffff;
  width: 100px;
}

.news__item {
  padding: 40px;
  color: #fff;
  border-radius: 10px;
  display: block;
  transition: all 0.3s;
}

.news__item.active {
  color: #222222;
}

.news-date {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 2px solid;
  display: inline-block;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.news-date__title {
  display: block;
  font-size: 32px;
  margin-bottom: 10px;
  font-weight: 500;
}

.news-date__txt {
  font-size: 16px;
}

.news__title {
  font-size: 25px;
  font-weight: 500;
  opacity: 0.7;
  margin-top: 10px;
  margin-bottom: 15px;
  transition: opacity 0.3s;
}

.news__txt {
  margin: 10px 0;
  line-height: 1.6em;
  font-size: 15px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.news__img {
  border-radius: 10px;
  box-shadow: 0 6px 26px 6px rgba(0, 0, 0, 0.25);
  height: 200px;
  margin-top: 30px;
  width: 100%;
  transition: all 0.3s;
  transform-origin: 0% 0%;
}

.news__img img {
  max-width: 100%;
  border-radius: 10px;
  height: 100%;
  width: 100%;
}


/* policy-section */
.policy-section {
    text-align: center;
    flex-direction: row;
}

.policy-container img {
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.policy-container img:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.policy-section h1 {
    font-size: 2em;
    margin-top: 40px;
    text-align: center;
    color: var(--color-2);
}

.policy-section span{
    color: var(--color-4);
}

.policy-container, .policy-section p {
    font-size: 18px;
    color: var(--color-2);
}

.policy-container {
    display: flex;
    gap: 40px; /* ระยะห่างระหว่างแต่ละองค์ประกอบ */
    align-items: center; /* จัดให้องค์ประกอบอยู่ในแนวกลาง */
    justify-content: center;
    flex-wrap: wrap;
}

.image-wrapper {
    position: relative;
    display: inline-block;
}

.image-wrapper img {
    border-radius: 10px;
    transition: transform 0.3s ease;
    width: 100%;
}

.image-wrapper:hover img {
    transform: scale(1.05); /* ขยายรูปภาพเล็กน้อย */
}

.hover-text {
    position: absolute;
    bottom: 100%; /* ป๊อปอัปลอยขึ้นจากด้านล่างของรูป */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-2); /* สีพื้นหลังป๊อปอัป */
    color: white; /* สีตัวอักษร */
    padding: 10px;
    border-radius: 5px;
    white-space: nowrap; /* ป้องกันข้อความยาวเกินแล้วตัดบรรทัด */
    opacity: 0; /* ซ่อนป๊อปอัปเริ่มต้น */
    pointer-events: none; /* ไม่ให้ป๊อปอัปขัดกับการคลิก */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.image-wrapper:hover .hover-text {
    opacity: 1; /* แสดงป๊อปอัปเมื่อ hover */
    transform: translateX(-50%) translateY(-10px); /* ขยับขึ้นนิดหน่อย */
}

/* political-section */
h1 {
    font-size: 2em;
    margin-top: 40px;
    text-align: center;
    color: var(--color-2);
}
.political-section {
    text-align: center;
    flex-direction: row;
}

.political-section h1 {
    font-size: 2em;
    margin-top: 40px;
    text-align: center;
    color: var(--color-2);
}

.political-section h2 {
    color: var(--color-2);
    font-size: 1.8em;
}
.political-container, .political-section p {
    font-size: 18px;
    color: var(--color-2);
}

.political-container {
    display: flex;
    gap: 40px; /* ระยะห่างระหว่างแต่ละองค์ประกอบ */
    align-items: center; /* จัดให้องค์ประกอบอยู่ในแนวกลาง */
    justify-content: center;
    flex-wrap: wrap;
}

.structure-election p {
    text-align: justify;
    line-height: 2;
    color: black;
    font-size: 18px;
    text-indent: 100px;
    /* padding-left: 50px; */
}

.structure-election img {
    width: 100%;
    height: auto;
}

.fa-phone {
    color: var(--color-4);
}
/* ปุ่มลอย */
.floating-popup {
    position: fixed;
    top: 50%; /* วางกลางด้านข้าง */
    left: 10px; /* ระยะห่างจากขอบซ้าย */
    transform: translateY(-50%);
    z-index: 1000;
}

.popup-button {
    background-color: var(--color-4); /* สีพื้นหลังปุ่ม */
    color: white; /* สีตัวอักษร */
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.popup-button:hover {
    background-color: #0056b3; /* สีพื้นหลังเมื่อ hover */
}

/* เนื้อหาในป๊อปอัป */
.popup-content {
    display: none; /* ซ่อนเนื้อหาเริ่มต้น */
    position: absolute;
    top: 0;
    left: 100%; /* แสดงถัดจากปุ่ม */
    background-color: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    width: 200px;
    padding: 10px;
}

.popup-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.popup-content ul li {
    margin: 10px 0;
}

.popup-content ul li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
}

.popup-content ul li a:hover {
    color: #007bff; /* สีลิงก์เมื่อ hover */
}

/* แสดงป๊อปอัปเมื่อมีคลาส active */
.floating-popup.active .popup-content {
    display: block;
}




@media (max-width: 768px) {
    .row {
        flex-direction: column; /* เปลี่ยนจากแถวเป็นคอลัมน์ */
        gap: 10px; /* ลดช่องว่าง */
    }

    .column {
        gap: 20px; /* ลดช่องว่างภายใน */
        padding: 10px;
    }

    .timeline img, .authority img, .authority1 img {
        width: 100%; /* ปรับรูปภาพให้เต็มความกว้าง */
        padding-top: 30px;
    }

    .structure img {
        width: 90%; /* ลดความกว้างของภาพ */
    }

    .container {
        gap: 20px; /* ลดช่องว่าง */
        padding: 10px; /* ลด Padding */
    }

    .logo {
        width: 100px; /* ลดขนาดโลโก้ */
        padding-left: 0;
    }

    .text {
        padding-left: 10px;
    }

    .emblem-section h1, .authority-section h1, .structure-section h1, .history-section h1, .vision-section h1, .information-section h1, .travel-section h1{
        font-size: 20px; /* ลดขนาดฟอนต์ */
        padding-top: 20px;
    }

    .emblem-section h1 span {
        display: block; /* บังคับให้ข้อความใน <span> อยู่บรรทัดใหม่ */
        text-align: center;
    }

    .vision-section h2, .emblem-section h2 {
        font-size: 18px;
    }

    .banner-content {
        font-size: 20px; /* ลดขนาดฟอนต์ของแบนเนอร์ */
        padding: 10px 0;
    }

    .travel img {
        padding-top: 20px; /* ลด Padding ด้านบน */
    }

    p {
        font-size: 17px; /* ลดฟอนต์ลง */
        line-height: 1.5; /* เพิ่มระยะห่างระหว่างบรรทัดให้อ่านง่าย */
    }
}

@media (max-width: 1024px) {
    .row {
        flex-wrap: wrap; /* อนุญาตให้แถวห่อหุ้มเมื่อพื้นที่ไม่พอ */
        gap: 15px;
    }

    .column {
        padding: 8px;
    }

    .timeline img, .authority img, .authority1 img {
        width: 100%; /* ลดขนาดรูปภาพ */
    }

    .structure img {
        width: 100%;
    }

    .container {
        gap: 40px;
    }

    .logo {
        width: 150px;
        align-items: center;
    }

    .text {
        padding-left: 15px;
    }

    /* .emblem-section h1, .authority-section h1 {
        font-size: 28px;
    } */

    .banner-content {
        font-size: 24px; /* ลดขนาดฟอนต์ของแบนเนอร์ */
    }

}

.contact-info {
    text-align: center;
}
