/* การตั้งค่าสีทั่วไป */
:root {
    --primary-color-1: #D6D5CF; /* เขียวเข้ม PMS 329 C */
    --primary-color-2: #B2C51E; /* เขียวมะนาว PMS 383 C */
    --secondary-color: #74787B; /* เทา PMS 431 C */
    --highlight-orange: #FFA500; /* สีส้มเด่น */
    --background-white: #FFFFFF; 
    --dark-gray: #4A4A4A; 
    --light-gray: #F5F7FA;
    --gold-accent: #FFD700;
    --shadow-color: none;
}

     /*Reset และตั้งค่าพื้นฐาน */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    color: var(--dark-gray);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #FFFFFF;
}

      /* Header*/
header {
    background-image: url(ภา.jpg);
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 80px 10px;
    position: sticky;
    top: 0;
    z-index: 900;
    animation: slideIn 0.5s ease-in-out;
}

header h6 {
    font-size: 0.80rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 750;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

@keyframes slideIn {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* ==========================
   Navigation
   ========================== */
nav {
  display: flex;
  flex-wrap: wrap;   /* ให้ขึ้นบรรทัดใหม่ถ้าเกินหน้าจอ */
  justify-content: center; /* จัดกลาง */
  background-color: #004d40; /* สีเขียวเข้ม */
  padding: 10px;
}

nav a {
  color: white;
  text-decoration: none;
  margin: 5px 10px;
  font-size: 16px;
}

@media (max-width: 768px) {
  nav {
    flex-direction: column; /* ในมือถือให้เรียงเป็นแนวตั้ง */
    align-items: center;
  }
  nav a {
    display: block;
    margin: 8px 0;
  }
}


nav a:hover,
nav a.active {
    background: var(--primary-color-2);
    color: var(--dark-gray);
    transform: translateY(-3px);
    text-decoration: none;
}


/* ==========================
   Video Section
   ========================== */
.video-section {
    text-align: center;
    margin: 30px 0;
}

.video-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.video-container iframe {
    width: 90%;
    max-width: 700px;
    height: 400px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ==========================
   News Section
   ========================== */
.news {
    padding: 60px 20px;
    max-width: 1300px;
    margin: 0 auto;
    background: var(--background-white);
    border-radius: 20px;
}

.news h2 {
    text-align: center;
    color: #B2C51E;
    font-size: 2.5em;
    margin-bottom: 40px;
    text-transform: uppercase;
    position: relative;
}

.news h2::after {
    content: '';
    width: 100px;
    height: 4px;
    background: var(--primary-color-2);
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.news-item {
    background: var(--background-white);
    padding: 30px;
    border-radius: 15px;
    transition: all 0.3s ease;
    border-left: 6px solid var(--primary-color-1);
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-item h3 {
    color: var(--secondary-color);
    font-size: 1.6em;
    margin-bottom: 15px;
}

.news-item p {
    color: var(--dark-gray);
    font-size: 1.1em;
}
.news-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; /* ระยะห่างระหว่าง Facebook กับ YouTube */
    flex-wrap: wrap; /* ให้ย่อได้ในจอเล็ก */
}

.youtube-link img {
    width: 180px;   /* ขนาดโลโก้ YouTube */
    height: auto;
    transition: transform 0.3s ease;
}

.youtube-link img:hover {
    transform: scale(1.1); /* ขยายโลโก้ตอน hover */
}


.read-more {
    color: var(--primary-color-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: var(--background-white);
}

.read-more:hover {
    background: var(--primary-color-2);
    color: var(--dark-gray);
}

/* ==========================
   Section (ข้อมูลทั่วไปและเอกสาร)
   ========================== */
.section {
    padding: 60px 20px;
    max-width: 1300px;
    margin: 0 auto;
    background: var(--background-white);
    border-radius: 20px;
}

.section h3 {
    color: var(--secondary-color);
    font-size: 1.8em;
    margin: 20px 0 10px;
}

.section p, .section ul {
    font-size: 1.2em;
    color: var(--dark-gray);
    margin-bottom: 15px;
}

.section ul {
    padding-left: 30px;
}

.section ul li {
    margin-bottom: 10px;
}

/* ==========================
   ปุ่ม
   ========================== */


/* กล่องรวมปุ่ม */
.document-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 คอลัมน์ตลอด */
    gap: 15px;
    max-width: 900px;
    margin: 20px auto;
}

/* ปุ่มพื้นฐาน */
.button {
    color: var(--dark-gray);       /* ตัวหนังสือสีดำ */
    background: transparent;       /* ไม่มีพื้นหลัง */
    border: 2px solid var(--dark-gray); /* เส้นขอบดำ */
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    text-align: center;
    display: block;
    width: 100%;
}

/* Hover */
.button:hover {
    background: var(--primary-color-2); /* พื้นส้มเวลา hover */
    color: var(--background-white);     /* ตัวอักษรขาวเวลา hover */
    transform: translateY(-3px);
}

/* ==========================
   Contact Section
   ========================== */
.contact-container {
    min-height: 70vh;
    background: var(--background-white);
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.contact-box {
    background: #004d40;
    color: #ffffff;
    padding: 60px;
    border-radius: 20px;
    max-width: 700px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--primary-color-2);
}

.contact-box h2 {
    font-size: 2.5em;
    color: var(--gold-accent);
    margin-bottom: 25px;
    text-transform: uppercase;
}

.contact-box p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.contact-details {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

.contact-details p {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.contact-details a.phone-number {
    color: var(--primary-color-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.3em;
    display: inline-block;
    padding: 8px 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.contact-details a.phone-number:hover {
    background: var(--primary-color-2);
    color: var(--dark-gray);
    transform: scale(1.05);
    text-decoration: none;
}

.contact-button {
    background: var(--primary-color-1);
    color: var(--background-white);
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.2em;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.contact-button:hover {
    background: var(--primary-color-2);
    transform: translateY(-3px);
}

.social-links {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.social-icon:hover {
    background: var(--primary-color-2);
    transform: scale(1.1);
}

/* ==========================
   Footer
   ========================== */
footer {
    background-color: #004d40;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 1.1em;
}

/* ==========================
   Details/Summary
   ========================== */
.section#generalInfoContent {
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section#generalInfoContent h2 {
    margin-bottom: 20px;
}

details {
    margin-bottom: 10px;
    background: var(--background-white);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--light-gray);
}

details summary {
    padding: 10px 15px;
    background: var(--primary-color-2);
    color: var(--background-white);
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary,
details summary:hover {
    background: var(--highlight-orange);
    color: var(--dark-gray);
    transform: scale(1.05);
}

details p {
    padding: 15px;
    background: var(--background-white);
    font-size: 1.1em;
    color: var(--dark-gray);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
    opacity: 0;
}

details[open] p {
    max-height: 200px;
    opacity: 1;
}

/* ==========================
   Personnel / แนะนำบุคลากร
   ========================== */
.personnel-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.person {
    width: 280px;
    text-align: center;
    background: #fff;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.person img {
    width: 260px;
    height: 360px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.name {
    font-size: 15px;
    margin-top: 8px;
    white-space: nowrap;
}

.position {
    font-size: 0.95em;
    color: #555;
    margin-top: 4px;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
}
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    img {
        max-width: 100%;
        height: auto;
    }
    nav ul {
        flex-direction: column;
        text-align: center;
    }
}
