/* ================== รีเซ็ตและฟอนต์พื้นฐาน ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

p {
    margin-top: 0;
    margin-bottom: 0rem;
}

body {
    font-family: 'Prompt', sans-serif;
    background: linear-gradient(to bottom, #b6dcff 0%, #b6dcff 65%, #3d95ec 100%);
    color: #333;
    line-height: 1.6;
    padding: 0;
}

/* ================== ส่วน Header ================== */
/* ปรับ header-container */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, #68b6f27a 0%, #d6fbcf7d 100%);
    color: #0d3c78;
    padding: 8px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 4px solid #0d3c78;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header-container h1 {
    font-size: 25px;
    font-weight: bold;
}

button:active {
    transform: scale(0.95);
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

button span {
    display: block;
    margin-left: 0.4em;
    transition: all 0.3s;
}

button svg {
    width: 18px;
    height: 18px;
    fill: white;
    transition: all 0.3s;
}

button .svg-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    margin-right: 0.5em;
    transition: all 0.3s;
}

button:hover .svg-wrapper {
    background-color: rgba(255, 255, 255, 0.5);
}

button:hover svg {
    transform: rotate(45deg);
}

/* ปรับขนาดไอคอนให้ใหญ่ขึ้น */
.svg-wrapper-1 {
    position: relative;
    width: 28px;
    height: 28px;
}

/* ไอคอนพื้นฐาน */
.svg-wrapper-1 svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* ซ่อนลูกศรลงไว้ก่อน */
.icon-arrow-down {
    display: none;
}

.ask-icon.show button .icon-arrow-down {
    display: block;
}

.ask-icon.show button .icon-menu {
    display: none;
}

#dropdownToggle {
    outline: none;
    border: none;
}

#dropdownToggle:focus {
    outline: none;
    box-shadow: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 1000;
    border-radius: 8px;
    left: -100%;
    top: 107%;
}

.ask-icon {
    position: relative;
    display: inline-block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    text-decoration: none;
    color: #000;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
    border-radius: 5px;
}

.dropdown-item img {
    width: 20px;
    height: 20px;
}

.ask-icon.show .dropdown-menu {
    background-color: #e6f0ff;
    border: 1px solid #3399ff;
    box-shadow:
        0 0 8px 2px rgba(51, 153, 255, 0.6),
        0 0 15px 5px rgba(51, 153, 255, 0.3);
    transition: box-shadow 0.3s ease;
}

.ask-icon .dropdown-menu {
    box-shadow: none;
    border: 1px solid transparent;
}

.dropdown-item:hover {
    background-color: #99ccff;
    color: #004080;
    border-radius: 5px;
}

.dropdown-menu,
.dropdown-item {
    transition: background-color 0.3s ease, color 0.3s ease;
}


/* CSS view_detail */
button.landBtn,
button.buildBtn,
button.treeBtn {
    width: 119px;
    height: 35px;
    font-family: inherit;
    font-size: 13px;
    background: linear-gradient(to bottom, #3f83e9 0%, #7056bf 100%);
    color: white;
    padding: 0.8em 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 25px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

button.landBtn:focus,
button.buildBtn:focus,
button.treeBtn:focus {
    outline: none;
    box-shadow: none;
}

.btn-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ปุ่มหลัก */
.link-log-btn {
    font-family: inherit;
    font-size: 18px;
    background: linear-gradient(to bottom, #3f83e9 0%, #9676f7 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: .25rem 1.5rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s;
}

.link-log-btn img {
    width: 27px;
    height: 27px;
}

.link-log-btn:hover,
.info-icon:hover,
.link-log-btn:focus {
    background: linear-gradient(to bottom, #3f83e9 0%, #3da1cf 100%);
    color: rgb(199, 240, 123);
    text-decoration: none;
}

/* ปุ่ม info วงกลม */
.info-icon {
    background: linear-gradient(to bottom, #3f83e9 0%, #7056bf 100%);
    border: none;
    color: #FFEB3B;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    padding: 0;
}

.info-icon:focus,
.link-log-btn:focus,
.info-icon:active,
.link-log-btn:active {
    outline: none;
    box-shadow: none;
}

.close {
    position: sticky;
    top: 0;
    right: 16px;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    color: #f73e3e;
    z-index: 999;
    display: inline-block;
}

/* ================== เนื้อหา Page ================== */
.page {
    /* padding: 66px; */
    padding-top: 65px;
    max-width: 75%;
    margin: auto;
}

/* ================== Banner ================== */
.banner {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    width: 100%;
}

.swiper-slide img {
    max-width: 100%;
    max-height: 400px;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}


/* กล่องไม่มีข้อมูลประชาสัมพันธ์ */
.banner-no-data .no-data-box {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to right, #f8f8f8, #e2e2e2);
    border: 2px dashed #ccc;
    border-radius: 12px;
    box-sizing: border-box;
}

.banner-no-data .no-data-box p {
    font-size: 1.5rem;
    color: #666;
    margin: 0;
}

.carousel-indicators {
    position: absolute;
    right: 0;
    bottom: -59px;
    left: 0;
    z-index: 15;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-pack: center;
    justify-content: center;
    padding-left: 0;
    margin-right: 15%;
    margin-left: 15%;
    list-style: none;
}

.carousel-indicators li {
    background-color: #ffffff;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    margin: 5px;
    transition: background-color 0.3s;
}

.carousel-indicators .active {
    background-color: #0d3c78;
}

.carousel-inner img {
    margin: 15px auto 0 auto;
    height: 500px;
}


/* ================== กล่องข้อมูลหลัก ================== */
.boxinfo {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.boxinfo-scrollable {
    max-height: 340px;
    overflow-y: auto;
    padding-right: 10px;
}

.sticky-header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
}

/* scrollbar styles สำหรับ .boxinfo-scrollable */
.boxinfo-scrollable::-webkit-scrollbar {
    width: 8px;
}

.boxinfo-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.boxinfo-scrollable::-webkit-scrollbar-thumb {
    background: #1354A2;
    border-radius: 10px;
}

.boxinfo-scrollable::-webkit-scrollbar-thumb:hover {
    background: #0d3c78;
}

.boxinfo img {
    height: 26px;
}

/* ================== ข่าว / กฎหมาย / ลิงก์ ================== */
.flex-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.boxinfo {
    flex: 1 1 100%;
}

@media (min-width: 768px) {
    .boxinfo {
        flex: 1 1 48%;
    }
}

/* แต่ละรายการภายใน boxinfo */
.item,
.item_model {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.item img,
.item_model img {
    width: 65px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

/* .item-title {
    font-weight: bold;
    font-size: 1.1rem;
} */

.item-subtitle {
    color: #666;
    font-size: 0.95rem;
}

.item-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* กล่องข้อมูลหลัก */
.boxinfo {
    /* background: linear-gradient(to bottom, #ecfbe9, #addaff);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #333;
    font-family: 'Sarabun', sans-serif; */
}

/* หัวข้อหลัก */
.boxinfo h3 {
    font-family: 'Prompt', sans-serif;
    font-size: 22px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    color: #0b3d91;
    font-weight: bold;
}

/* ไอเท็มรายการทรัพย์สิน */
.item {
    background: rgba(255, 255, 255, 0.85);
    margin: 15px 0;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 15px;
}

.item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.item-content {
    font-family: 'Prompt', sans-serif;
    flex-grow: 1;
}

.item-title {
    font-family: 'Prompt', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #0b3d91;
    margin-bottom: 6px;
}

.item-detail {
    font-family: 'Prompt', sans-serif;
    font-size: 14px;
    color: #333;
}

/* ฝั่งขวาของไอเท็ม */
.item-right {
    display: flex;
    align-items: center;
}

.step-detail {
    font-family: 'Prompt', sans-serif;
    background-color: #e3f2fd;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #0b3d91;
    font-weight: 500;
}

.step-detail .current-step {
    color: #ff9800;
}

/* ================== เว็บลิงก์ ================== */

.box_web_link_nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.box_web_link {
    display: flex;
    overflow: hidden;
    scroll-behavior: smooth;
}

.link-item {
    flex: 0 0 260px;
    margin-right: 20px;
    box-sizing: border-box;
}

.web_link_btn {
    background: linear-gradient(to bottom, #3f83e9 0%, #7056bf 100%);
    font-family: inherit;
    font-size: 18px;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;

    padding: 0.8em 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 25px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.web_link_btn {
    outline: none;
}

.web_link_btn:focus {
    outline: none;
    box-shadow: none;
}

/* กำหนดขนาดกล่องให้เท่ากัน */
.link-item {
    flex: 0 0 auto;
    width: 260px;
    height: 250px;
    box-sizing: border-box;
}

/* กล่องลิงก์ */
.link-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border: 2px solid #1354A2;
    border-radius: 12px;
    padding: 10px;
    text-decoration: none;
    color: #1354A2;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    background-color: #f9fbff;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* รูปภาพลิงก์ */
.link-item a img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

/* hover รูป */
.link-item a:hover img {
    transform: scale(1.05);
}

/* ข้อความหัวข้อเว็บ */
.link-item a h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
    color: inherit;
    word-break: break-word;
    line-height: 1.4;
    padding: 0 5px;
}

/* ================== ลิงก์เข้าสู่ระบบเจ้าหน้าที่ ================== */
.login_admin {
    text-align: center;
}

.login_admin .boxinfo a {
    color: #1354A2;
    text-decoration: none;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    transition: color 0.3s;
}

.login_admin .boxinfo a:hover {
    color: #0d3c78;
}

.login_admin img {
    height: 28px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    padding: 20px;
    border-radius: 12px;
    max-width: 70%;
    width: 90%;
    margin-top: -30%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: fadeInScale 0.3s ease-in-out;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}



/* ================== Responsive สำหรับ Tablet / Mobile ================== */
@media (max-width: 991px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 20px;
        text-align: left;
    }

    .header-container h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .ask-icon {
        align-self: flex-end;
        margin-top: 10px;
    }

    .page {
        padding: 0px;
        max-width: 90%;
        margin-top: 42px;
    }

    .flex-wrapper {
        flex-direction: column;
    }

    .boxinfo {
        flex: 1 1 100%;
        width: 100%;
        padding: 15px;
    }

    .item,
    .item_model {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .item img,
    .item_model img {
        width: 100px;
        height: auto;
        margin-bottom: 10px;
    }

    .item-title,
    .item-subtitle {
        font-size: 16px;
    }

    .link-item {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .link-item a img {
        height: 140px;
    }

    .modal-content {
        margin-top: 0;
        max-width: 90%;
        max-height: 90vh;
    }

    .dropdown-menu {
        left: 0;
        width: 250px;
        margin-left: 0;
    }

    .carousel-inner img {
        margin: 55px auto 0 auto;
        height: 200px;
    }

    .link-log-btn {
        font-size: 14px;
    }

    .item_model {
        margin-bottom: 62px;
    }


    .info-icon {
        width: 39px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    button {
        width: 100%;
        height: auto;
        padding: 12px;
        font-size: 16px;
    }

    .svg-wrapper-1 {
        width: 24px;
        height: 24px;
    }

    .link-item a h3 {
        font-size: 0.9rem;
    }

    .banner img {
        height: auto;
        max-height: 200px;
    }
}