/* ຕັ້ງຄ່າ Font ແລະ ພື້ນຖານ */
body { font-family: 'Phetsarath', 'Phetsarath OT', sans-serif; margin: 0; background: #f4f7f6; color: #333; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* Header & Banner */
.main-header { background: #fff; padding: 15px 0; border-bottom: 4px solid #006633; }
.header-container {
    display: flex;
    justify-content: space-between; /* ໃຫ້ Logo ຢູ່ຊ້າຍ Banner ຢູ່ຂວາ */
    align-items: center;
    width: 100%; /* ໃຫ້ເຕັມເນື້ອທີ່ຂອງ container */ }
.navbar {
    position: -webkit-sticky; /* ສຳລັບ Safari */
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #006633; /* ສີພື້ນຂອງເມນູທ່ານ */
}
/* ປັບແຕ່ງ Logo Section ໃຫ້ເບິ່ງງາມ */
.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo-img { height: 85px; }
.text-section h1 {
    font-size: 20px;
    margin: 0;
    line-height: 1.2;
}
.banner-img { max-height: 80px; border-radius: 4px; }

/* ປັບ Navbar ໃຫ້ເມນູຢູ່ພໍດີຂອບຊ້າຍຂອງ container */
.navbar {
    background-color: #006633;
    width: 100%;
}

/* ເຮັດໃຫ້ເມນູຫຼັກລຽງແຖວນອນ */
.nav-links {
    list-style: none !important; /* ລົບຈ້ຳເມັດອອກ */
    margin: 0 !important;
    padding: 0 5% !important;
    display: flex !important;    /* ບັງຄັບໃຫ້ລຽງແຖວນອນ */
    flex-direction: row !important;
    background: #006633;
}
.nav-links > li {
    position: relative;
    display: block !important;
}
.nav-links > li > a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 25px; /* ປັບໄລຍະຫ່າງລະຫວ່າງເມນູ */
    font-size: 20px;
}

/* ສ່ວນ Dropdown ໃຫ້ລອຍຢູ່ເທິງ (ບໍ່ໃຫ້ມາແຊກແຖວນອນ) */
.dropdown-content {
    display: none !important;
    position: absolute !important; 
    top: 100%;
    left: 0;
    z-index: 9999;
    background: white;
    min-width: 200px;
    list-style: none;
    padding: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.nav-links li:hover .dropdown-content {
    display: block !important;
}

.dropdown-content { display: none; position: absolute; top: 100%; left: 0; background: white; min-width: 240px; box-shadow: 0 8px 16px rgba(0,0,0,0.2); z-index: 1000; list-style: none; padding: 0; border-top: 3px solid #ffcc00; }
.dropdown-content li a { color: #333; padding: 12px 15px; display: block; text-decoration: none; border-bottom: 1px solid #eee; font-size: 16px; }
.dropdown-content li a:hover { background: #f5f5f5; color: #006633; }
.nav-links li:hover .dropdown-content { display: block; }

/* Layout Grid 3 ຖັນ */
.main-grid { display: grid; grid-template-columns: 25% 50% 25%; gap: 20px; margin-top: 25px; }
.card { background: white; padding: 15px; border-radius: 5px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.card-title { border-bottom: 2px solid #006633; margin-bottom: 15px; color: #006633; }
.card-title h3 { margin: 0; font-size: 16px; padding-bottom: 5px; }

.side-news { display: flex; gap: 10px; margin-bottom: 12px; border-bottom: 1px solid #f0f0f0; padding-bottom: 8px; }
.side-news img { width: 70px; height: 50px; object-fit: cover; border-radius: 3px; }
.side-news p { font-size: 13px; margin: 0; line-height: 1.4; }

.featured-img { width: 100%; border-radius: 5px; }
.featured-title { font-size: 20px; color: #c00; margin: 15px 0 10px 0; }
.news-content { font-size: 14px; line-height: 1.6; color: #555; }

/* Bottom News Grid (ສ່ວນທີ່ເພີ່ມຄືນມາ) */
.section-divider { text-align: center; color: #006633; margin: 40px 0 20px 0; border-bottom: 2px solid #006633; display: inline-block; width: 100%; padding-bottom: 10px; }
.bottom-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 50px; }
.bottom-card { background: white; padding: 10px; border-radius: 5px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.bottom-card img { width: 100%; height: 140px; object-fit: cover; border-radius: 4px; }
.bottom-card h4 { font-size: 14px; margin: 10px 0 0 0; line-height: 1.4; height: 40px; overflow: hidden; }

/* Footer */
.main-footer { background: #222; color: #ccc; text-align: center; padding: 25px; margin-top: 50px; font-size: 13px; }


/* --- Organization Chart CSS --- */
.org-img {
    width: 120px !important;  /* ກຳນົດຄວາມກວ້າງໃຫ້ຕາຍຕົວ */
    height: 150px !important; /* ກຳນົດຄວາມສູງໃຫ້ຕາຍຕົວ */
    object-fit: cover;        /* ປ້ອງກັນຮູບເພ ຫຼື ຢືດ */
    flex-shrink: 0;           /* ສຳຄັນຫຼາຍ: ບັງຄັບຫ້າມບໍ່ໃຫ້ຮູບຫົດຕົວ */
    display: block;
    margin: 0 auto 10px auto;
}


.tree ul {
    padding-top: 20px; position: relative;
    transition: all 0.5s;
    display: flex; justify-content: center;
}

.tree li {
    float: left; text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 5px 0 5px;
    transition: all 0.5s;
}

/* ສ້າງເສັ້ນຕັ້ງ */
.tree li::before, .tree li::after {
    content: '';
    position: absolute; top: 0; right: 50%;
    border-top: 2px solid #006633;
    width: 50%; height: 20px;
}
.tree li::after {
    right: auto; left: 50%;
    border-left: 2px solid #006633;
}

/* ລົບເສັ້ນສ່ວນເກີນຂອງຕົວທຳອິດ ແລະ ຕົວສຸດທ້າຍ */
.tree li:only-child::after, .tree li:only-child::before { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 2px solid #006633; border-radius: 0 5px 0 0; }
.tree li:first-child::after { border-radius: 5px 0 0 0; }

/* ເສັ້ນລົງມາຫາລູກ */


/* ຕົບແຕ່ງບ໋ອກຂໍ້ຄວາມ */
.tree li a {
    border: 2px solid #006633;
    padding: 10px 20px;
    text-decoration: none;
    color: #006633;
    font-family: 'Phetsarath OT', sans-serif;
    font-size: 18px;
    font-weight: bold;
    display: inline-block;
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: all 0.5s;
}

.tree li a:hover {
    background: #006633;
    color: #fff;
    border: 2px solid #ffcc00;
}
.search-box {
    padding: 10px 0;
    display: flex;
    justify-content: flex-end; /* ໃຫ້ຢູ່ເບື້ອງຂວາຂອງເມນູ */
}
.search-box input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px 0 0 20px;
    outline: none;
}
.search-box button {
    padding: 8px 15px;
    background: #ffcc00;
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    color: #006633;
}
/* ບັງຄັບໃຫ້ສ່ວນຂ່າວສານອື່ນໆຂຶ້ນແຖວໃໝ່ ແລະ ຢູ່ກາງ container */
.section-divider {
    clear: both; 
    width: 100%;
    display: block;
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
}

.bottom-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* ໃຫ້ລຽງກັນ 4 ບ໋ອກຕໍ່ແຖວ */
    gap: 20px;
    width: 100%;
}
/* ປັບປຸງບ່ອນເກັບຮູບພາບ */
.bottom-card img {
    transition: transform 0.5s ease;
}

/* ເມື່ອຊີ້ເມົ້າໃສ່ Card ແລ້ວໃຫ້ຮູບຊູມ */
.bottom-card:hover img {
    transform: scale(1.1); /* ຂະຫຍາຍຮູບຂຶ້ນ 10% */
}
