body {
  margin: 0;
  font: 16px/22px "Prompt", sans-serif;
  color: black;		  
}	

a:hover, a:active, a:focus {
  text-decoration: none;
  outline: none;
}  
  
/* เล็กน้อยสำหรับสไตล์ตัวอย่าง */
.hero-carousel img{width:100%;}
.card-excerpt{height:72px;overflow:hidden}
  
/*  CSS เพิ่มเติม */

.info-card {
  background-color: #d0f0fd; /* ฟ้าอ่อน */
  transition: all 0.3s ease;
}

.info-card:hover {
  background-color: #a0e0fc; /* ฟ้าเข้มเล็กน้อย */
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.topic-box {
	background: #e8f4ff;          /* พื้นหลังฟ้าอ่อน */
	border: 1px solid #cde4ff;    /* กรอบฟ้า */
	border-radius: 12px;
	padding: 18px;
	text-align: center;
	transition: 0.2s;
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.topic-box:hover {
	background: #d8ecff;
	transform: translateY(-3px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.topic-icon {
	font-size: 36px;
	color: #0d6efd;
	margin-bottom: 10px;
}
.topic-title {
	font-weight: 700;
	font-size: 17px;
	color: #003d80;
}
.topic-space {
margin-top: 40px;	
margin-bottom: 40px;
}
/* สำหรับมือถือ */
@media (max-width: 767px) {
  .topic-space {
    margin-top: 10px;
    margin-bottom: 10px;
  }
}



/* CSS เสริม แบนเนอร์  */

.card-banner { display:block; position:relative; overflow:hidden; }
.card-banner img { width:100%; height:180px; object-fit:cover; }
.banner-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(0,102,204,0.85);
  color: #fff;
  padding:6px 10px;
  border-radius:6px;
  font-weight:600;
  font-size:14px;
}
@media (min-width: 992px) {
  .card-banner img { height:250px; } /* ปรับขนาดบน desktop ถ้าต้องการ */
}



/* CSS หัวข้อข่าว */

/* พื้นหลังพาสเทลโทนอ่อน */
/*.news-banner.pastel-line {
    width: 100%;
    padding: 30px 0;
    background: linear-gradient(120deg, #e6f4ff, #ffe9f3);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}*/

/* ลวดลายเส้นบาง ๆ */
.news-banner.pastel-line::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(
        135deg,
        rgba(255,255,255,0.5) 0px,
        rgba(255,255,255,0.5) 2px,
        transparent 2px,
        transparent 6px
    );
    background-size: 12px 12px;
    opacity: 0.5;
    pointer-events: none;
}

/* ตัวหนังสือแบบโทนอ่อน */
.news-title-light {
    font-size: 30px;
    font-weight: 400;
    color: #3a4a5a;   /* เทาอมฟ้า */
    position: relative;
    display: inline-block;
    padding: 18px 38px;
    z-index: 2;
}

/* กล่องพื้นหลังด้านหลังตัวอักษร */
.news-title-light::before {
    content: "";
    position: absolute;
    left: -14px;
    top: -12px;
    width: calc(100% + 28px);
    height: calc(100% + 24px);
    background: #ffffffaa; /* ขาวโปร่งใสลุคนุ่ม */
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    z-index: -1;
}

/* เส้นลาย soft pastel บาง ๆ */
.news-title-light::after {
    content: "";
    position: absolute;
    left: -18px;
    top: -16px;
    width: calc(100% + 36px);
    height: calc(100% + 32px);
    background-image: linear-gradient(
        145deg,
        rgba(173,216,230,0.25) 0%, 
        rgba(255,182,193,0.25) 100%
    );
    border-radius: 18px;
    z-index: -2;
    opacity: 0.4;
}

.news-header-line {
    width: 100%;
    padding: 15px 0;
    border-bottom: 4px solid #4da6ff;  /* เส้นฟ้ายาวเต็มเว็บ */
    margin-bottom: 20px;
}

/* ไอคอนด้านหน้า */
.news-icon {
    font-size: 32px;
    color: #007bff; /* ฟ้าน้ำเงิน */
}

/* ข้อความหัวข้อ */
.news-title {
    font-size: 28px;
    font-weight: 700;
    color: #003d66;
}

/* ปุ่มอ่านทั้งหมด */
.news-readall {
    font-size: 18px;
    font-weight: 600;
    color: #007bff;
    text-decoration: none;
    transition: 0.2s;
}

.news-readall:hover {
    color: #0056b3;
    text-decoration: underline;
}
 
    /* กล่องรวมข่าวที่เลื่อน */
    .news-container {
      max-height: 600px;
      overflow: hidden;
      border: 1px solid #dce8ff;
      background: #f8fbff;
      border-radius: 10px;
      padding: 10px;
      position: relative;
    }

    /* รายการข่าวทั้งหมดด้านใน */
    .news-list {
      display: flex;
      flex-direction: column;
      gap: 15px;
      animation: scrollUp 60s linear infinite;
    }
	.news-item img { width: 120px; margin-right: 10px; }
    /* หยุดเลื่อนเมื่อ hover */
    .news-container:hover .news-list {
      animation-play-state: paused;
    }

    /* keyframes เลื่อนขึ้น */
    @keyframes scrollUp {
      0%   { transform: translateY(0); }
      100% { transform: translateY(-100%); }
    }

    /* รูปแบบการ์ดข่าว */
    .news-item {
      display: flex;
      gap: 15px;
      padding: 12px;
      background: #ffffff;
      border: 1px solid #e3e9f5;
      border-radius: 10px;
      transition: background 0.2s;
    }

    .news-item:hover {
      background: #eef6ff;
    }

    .news-item img {
      width: 100px;
      border-radius: 8px;
    }

    .news-item h5 {
      margin-bottom: 5px;
      font-size: 16px;
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .news-file {
      display: flex;
      gap: 20px;
      margin-top: 4px;
      align-items: center;
    }

    .news-file a {
      text-decoration: none;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .news-file a:hover {
      text-decoration: underline;
    }

    /* ไอคอนข่าวล่าสุด */
    .news-latest i {
      color: #ff4444;
      font-size: 22px;
    }
  
    .img-box {
        border: 1px solid #e0e0e0;
        padding: 10px;
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 3px 8px rgba(0,0,0,0.1);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .img-box:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    }

    .img-container {
        width: 100%;
        height: 180px; /* กำหนดให้รูปสูงเท่ากันทั้ง 4 ช่อง */
        overflow: hidden;
        border-radius: 10px;
    }

    .img-container img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* ครอบรูปให้เต็มกรอบสวย */
    }

    .description {
        margin-top: auto; /* ดันข้อความไปด้านล่างเพื่อให้สูงเท่ากัน */
        padding-top: 10px;
    }
  


  .logo-slider {
    display: flex;
    overflow: hidden;
    align-items: center;
    height: 100px; /* กำหนดความสูงของโลโก้ */
    background: #f8f9fa;
    border-radius: 8px;
    position: relative;
  }

  .logo-slider a {
    flex: 0 0 auto;
    margin-right: 30px;
    transition: transform 0.2s;
  }

  .logo-slider img {
    max-height: 100px;
    object-fit: contain;
    display: block;
  }

  .logo-slider:hover .slider-track {
    animation-play-state: paused; /* หยุดสไลด์เมื่อ hover */
  }

  .slider-track {
    display: flex;
    animation: slide-left 30s linear infinite;
  }

  @keyframes slide-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* ปรับตามจำนวนโลโก้ */
  }


    /* กล่องหลักที่จำกัดให้เห็นแค่ 3 แถว */
    .announcement-wrapper {
        max-height: 360px; /* 120px * 3 บรรทัด */
        overflow-y: auto;
        padding-right: 10px;
    }

    /* custom scrollbar สีแดง */
    .announcement-wrapper::-webkit-scrollbar {
        width: 14px;
    }

    .announcement-wrapper::-webkit-scrollbar-track {
        background: #ffe6e6;
        border-radius: 10px;
    }

    .announcement-wrapper::-webkit-scrollbar-thumb {
        background: #ff4d4d;
        border-radius: 10px;
        border: 3px solid #ffe6e6;
    }

    .announcement-wrapper::-webkit-scrollbar-thumb:hover {
        background: #e60000;
    }

    /* กรอบข่าว */
    .announce-box {
        background: #e6f4ff;
        border-radius: 14px;
        padding: 12px;
        display: flex;
        align-items: center;
        height: 110px; /* ทำให้เท่ากันทุกกล่อง */
        box-shadow: 0px 3px 8px rgba(0,0,0,0.1);
        transition: 0.2s;
    }

    .announce-box:hover {
        transform: translateY(-3px);
        box-shadow: 0px 6px 14px rgba(0,0,0,0.15);
    }

    .announce-img {
        width: 80px;
        height: 80px;
        border-radius: 10px;
        object-fit: cover;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .announce-text {
        font-size: 14px;
        font-weight: 500;
        color: #003d66;
    }

   .announce-link {
        text-decoration: none;
        color: inherit;
        display: block;
    }
    .announce-link:hover .announce-box {
        background: #d9efff;
    }



/* css ของหมวดเมนู */

/* Layout หลัก */
    .six-box-row {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
        width: 100%;
        margin: 20px auto;
    }

    .six-box-item {
        background: #e8f4ff; /* ฟ้าอ่อน */
        border-radius: 12px;
        padding: 15px 10px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        min-height: 140px;  /* ให้กรอบเท่ากันเสมอ */
        transition: 0.2s;
    }

    .six-box-item:hover {
        background: #d8ecff;
        transform: translateY(-3px);
    }

    .six-box-item img {
        width: 75px;
        height: 75px;
        object-fit: contain;
        margin-bottom: 8px;
    }

    .six-box-item a {
        text-decoration: none;
        color: #0066aa;
        font-weight: 600;
        font-size: 14px;
    }

       .person-border {
		display: inline-block; /* ทำให้อยู่พอดีกับรูป  ใช้ padding , margin , border ใน css ควบคุมได้  */
           border: 10px solid transparent; /* ความหนาของขอบ */
           border-image-source: url('../images/border-1.png'); /* ปรับ path ให้ถูกต้อง */
           border-image-slice: 15%; /* ปรับตามลักษณะของ person-border.png */
           border-image-repeat: round; /* ทำซ้ำลวดลายให้พอดี */
           border-image-width: 35px; /* ความกว้างของขอบ */
           background-color: #ffffff; /* พื้นหลังสีขาว */
           border-radius: 10px; /* ขอบมน */
           padding: 15px; /* ระยะห่างภายใน */
           margin-bottom: 15px; /* ระยะห่างด้านล่าง */
           box-sizing: border-box;
           /* width: 100%;  เต็มความกว้างของ col-md-4 */
    }

        .person-head {
            display: block; /* ป้องกันช่องว่างด้านล่าง */
			margin-bottom: 15px ;
        } 

        .person-border p {
            text-align: center; /* จัดข้อความกึ่งกลาง */
            margin: 10px 0 0 0; /* ระยะห่างจากรูปภาพ */
        }		

    /* Responsive */
    @media(max-width: 1000px) {
        .six-box-row {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    @media(max-width: 600px) {
        .six-box-row {
            grid-template-columns: repeat(2, 1fr);
        }
    }


/* ปรับ dropdown ของ Google Translate ให้เหมือน Bootstrap */
#google_translate_element select {
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.375rem; /* มุมโค้งแบบ Bootstrap */
  padding: 0.375rem 0.75rem;
  font-size: 0.9rem;
  color: #212529;
  appearance: none; /* ซ่อนสไตล์ดั้งเดิม */
  cursor: pointer;
}

/* ซ่อนข้อความ "Powered by Google Translate" */
.goog-te-gadget {
  font-size: 0 !important;
}
.goog-te-gadget span {
  display: none;
}


    /* Responsive */
    @media(max-width: 1000px) {
        .six-box-row {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    @media(max-width: 600px) {
        .six-box-row {
            grid-template-columns: repeat(2, 1fr);
        }
    }

#textslide {
    height: 60px;
    overflow: hidden;
    position: relative;
    background-color: #ffffff;
    display: flex;
    align-items: center;       /* เปิดใช้ตัวนี้ดีกว่า comment ทิ้ง */
    border: 1px solid #ff0000;
    border-radius: 10px;
    padding: 0 15px;           /* ปรับ padding ให้สมดุล */
    margin-bottom: 10px;
    box-sizing: border-box;
}

.scroll-text {
    white-space: nowrap;
    display: inline-block;
    font-size: 1.2rem;
    
    /* เพิ่มส่วน animation ใหม่ */
    animation: scroll-left 30s linear infinite;
}

/* แก้ keyframes ให้เริ่มจากขวา */
@keyframes scroll-left {
    from {
        transform: translateX(100%);    /* เริ่มจากขวาสุด (นอกกรอบขวา) */
    }
    to {
        transform: translateX(-100%);   /* เลื่อนไปจนซ้ายสุดหายไป */
    }
}