body {
    font-family: 'Kanit', sans-serif;
    word-break: break-word;
}

@media (min-width: 1400px) {
    .container {
        width: 1250px;
    }
}

@media (min-width: 1500px) {
    .container {
        width: 1400px;
    }
}

#header .header-top.header-top-colored p, #header .header-top.header-top-colored a, #header .header-top.header-top-colored span {
    color: #222;
}


a:hover {
    text-decoration: none;
    color: #0088cc;
}
.panel-warning {
    border-color: #FFC33A;
}

.panel-warning>.panel-heading {
    color: #333;
    background-color: #FFC33A;
    border-color: #FFC33A;
}

.faq-panel {
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    border-color: #f5f5f5;
}

.faq-heading {
    padding: 12px 15px;
    background-color: #f9f9f9;
    transition: background-color 0.3s;
    border-color: #f5f5f5;
}

.faq-heading:hover {
    background-color: #FFF3D0;
}

.faq-panel .panel-title {
    font-size: 14px;
    font-weight: 600;
}

.faq-panel .panel-title a {
    display: block;
    text-decoration: none;
    color: #333;
}

.faq-icon {
    margin-right: 8px;
    color: #FFC33A;
}

.faq-panel .panel-body {
    padding: 15px;
    line-height: 1.6;
}

.faq-btn {
    background-color: #FFC33A;
    border-color: #DDA520;
    color: #333;
}

.faq-btn:hover {
    background-color: #DDA520;
    border-color: #BB8B1A;
    color: #333;
}

.alert-warning {
    background-color: #FFF3D0;
    border-color: #FFC33A;
    color: #8A6D3B;
}

.mt-md {
    margin-top: 15px;
}

.mt-lg {
    margin-top: 25px;
}

/* ปรับ CSS ให้เข้ากับธีมสีเหลือง */
.faq-panel {
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    border-color: #f5f5f5;
}

.faq-heading {
    padding: 12px 15px;
    background-color: #f9f9f9;
    transition: background-color 0.3s;
    border-color: #f5f5f5;
}

.faq-heading:hover {
    background-color: #FFF3D0;
}

.faq-panel .panel-title {
    font-size: 16px;
    font-weight: 600;
}

.faq-panel .panel-title a {
    display: block;
    text-decoration: none;
    color: #333;
}

.faq-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background-color: #FFC33A;
    color: #333;
    border-radius: 50%;
    margin-right: 10px;
    font-weight: bold;
}

.faq-icon {
    margin-right: 8px;
    color: #FFC33A;
}

.faq-panel .panel-body {
    padding: 15px;
    line-height: 1.6;
}

.faq-btn {
    background-color: #FFC33A;
    border-color: #DDA520;
    color: #333;
}

.faq-btn:hover {
    background-color: #DDA520;
    border-color: #BB8B1A;
    color: #333;
}

.alert-warning {
    background-color: #FFF3D0;
    border-color: #FFC33A;
    color: #8A6D3B;
}

.view-count {
    background-color: #FFC33A;
    color: #333;
}

.mt-md {
    margin-top: 15px;
}

.mr-md {
    margin-right: 15px;
}

.search-panel {
    border-color: #FFC33A;
    margin-bottom: 20px;
}

.search-panel .panel-body {
    padding: 20px;
}

.search-btn {
    background-color: #FFC33A !important;
    border-color: #DDA520 !important;
}

.search-btn:hover {
    background-color: #DDA520 !important;
    border-color: #BB8B1A !important;
}

.search-results-header {
    margin-top: 25px;
}

.search-count {
    background-color: #FFC33A;
    color: #333;
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
    font-weight: bold;
}

.search-result-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item h5 {
    margin: 0;
    font-size: 16px;
}

.search-result-item h5 a {
    color: #333;
    text-decoration: none;
}

.search-result-item h5 a:hover {
    color: #FFC33A;
}

.search-result-item h5 small {
    margin-left: 10px;
    font-size: 12px;
}

.search-result-item i.fa {
    margin-right: 8px;
    color: #FFC33A;
}

.search-tips {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.search-tips h5 {
    color: #FFC33A;
    font-weight: bold;
}

.search-tips ul {
    margin-top: 10px;
    padding-left: 20px;
}

.search-tips li {
    margin-bottom: 5px;
}

.alert-warning {
    background-color: #FFF3D0;
    border-color: #FFC33A;
    color: #8A6D3B;
}

.border-panel-title {
    background-color: #f9f9f9;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-left: 3px solid #FFC33A;
    color: #666;
}

.content-detail {
    line-height: 1.8;
    margin-bottom: 30px;
    overflow-wrap: break-word;
}

.content-detail img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.max-width {
    max-width: 100%;
}

.portfolio-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.portfolio-list li {
    margin-bottom: 15px;
}

.date {
    color: #777;
    font-size: 0.9em;
    margin: 5px 0;
}

/* CSS สำหรับไฟล์แนบ */
.attachments-section {
    margin: 20px 0 30px;
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 15px;
    border: 1px solid #eee;
}

.attachments-section h4 {
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.attachments-section .table {
    margin-bottom: 0;
}

.attachments-section .table th {
    background-color: #f0f0f0;
}

.attachments-section .fa-file-pdf-o {
    color: #e74c3c;
}

.attachments-section .fa-file-word-o {
    color: #3498db;
}

.attachments-section .fa-file-excel-o {
    color: #2ecc71;
}

.attachments-section .fa-file-powerpoint-o {
    color: #e67e22;
}

.attachments-section .fa-file-image-o {
    color: #9b59b6;
}

.attachments-section .fa-file-archive-o {
    color: #f39c12;
}


.poll-container {
    background: #f7f7f7;
    font-family: 'Kanit', sans-serif;

    a:hover,
    a:focus {
        text-decoration: unset;
    }

    .logo {
        text-align: center;
        padding: 7px 7px 0px;

        img {
            width: 100%;
            max-width: 150px;
        }
    }

    .text-content {
        text-align: center;
        padding: 7px;

        .main-title {
            color: #4CAF50;
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .sub-title {
            color: #333;
            font-size: 14px;
        }
    }

    a.btn {
        background: #FCC43B;
        width: 100%;
    }
}


/* สไตล์สำหรับรายการข่าว */
.news-list-container {
    background-color: #fff;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list .news-item {
    position: relative;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.news-list .news-item:hover {
    border-left: 5px solid #FCC43B;
    border-top: 1px solid #FCC43B;
    border-bottom: 1px solid #FCC43B;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.news-list .news-item:last-child {
    border-bottom: none;
}

.news-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.news-link:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

.news-link:hover .news-title {
    color: #222;
}

.news-date {
    width: 110px;
    flex-shrink: 0;
    color: #666;
    font-size: 13px;
}

.news-date i {
    margin-right: 5px;
    color: #999;
}

.news-title {
    flex-grow: 1;
    font-weight: 500;
}

.news-actions {
    margin-top: 15px;
}

.news-actions .btn {
    margin-left: 5px;
}

/* สไตล์สำหรับมือถือ */
@media (max-width: 767px) {
    .news-link {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-date {
        margin-bottom: 5px;
    }
}

.btn-default {
    padding: 8px 15px;
    border-radius: 1px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.btn-default {
    background-color: transparent;
    color: #555;
    border: 1px solid #ddd;
}

.btn-default:hover {
    background-color: #f5f5f5;
    color: #333;
}


/* สไตล์สำหรับลิงก์ด่วน */

.quick-link {
    display: block;
    text-decoration: none;
    color: #333;
    margin-bottom: 15px;
}

.quick-link:hover {
    text-decoration: none;
    color: #2baab1;
}

.quick-link-item {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.quick-link-item:hover {
    background-color: #f5f5f5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.quick-link-icon {
    font-size: 24px;
    width: 40px;
    color: #2baab1;
    text-align: center;
}

.quick-link-text {
    font-size: 14px;
    font-weight: 500;
    flex-grow: 1;
    padding-left: 10px;
}

/* สำหรับการแสดงผลบนมือถือ */
@media (max-width: 767px) {
    .quick-link-item {
        padding: 10px;
    }
    
    .quick-link-icon {
        font-size: 20px;
        width: 30px;
    }
    
    .quick-link-text {
        font-size: 13px;
    }
}

/* Add these styles to your CSS file or in a <style> tag in your header */
.weblink-gallery {
    /* display: flex;
    flex-wrap: wrap; */
}

.weblink-item {
    margin-bottom: 15px;
}

.weblink-thumbnail {
    padding: 4px;
    width: 100%;
    height: 100%;
    margin-bottom: 0;
}

.weblink-gallery .image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 30%; /* 3:5 aspect ratio - adjust as needed */
    overflow: hidden;
}

.weblink-gallery .image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* This ensures the image covers the container without distortion */
    object-position: center;
}

/* เพิ่ม CSS สำหรับ Modal */
.event-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.event-details div {
    margin-bottom: 8px;
}
.event-details i.fa {
    color: #FFC33A;
    width: 20px;
    text-align: center;
}
#eventModalContent {
    line-height: 1.6;
}

/* CSS เฉพาะสำหรับหน้า weblink */
.weblink-page .weblink-container {
	margin-bottom: 30px;
}

.weblink-page .weblink-box, 
.weblink-page .weblink-box-icon {
	position: relative;
	transition: all 0.3s ease;
	height: 100%;
	overflow: hidden;
}

.weblink-page .weblink-box:hover, 
.weblink-page .weblink-box-icon:hover {
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
	transform: translateY(-3px);
}

.weblink-page .weblink-item {
	margin-bottom: 20px;
}

.weblink-page .image-container {
	position: relative;
	overflow: hidden;
	padding-top: 26.67%; /* อัตราส่วน 750:200 คิดเป็น 200/750*100 = 26.67% */
	width: 100%;
	background-color: #f9f9f9;
}

.weblink-page .image-container img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.weblink-page .weblink-title {
	padding: 10px;
	margin: 0;
	font-size: 16px;
	text-align: center;
	font-weight: 500;
	color: #333;
	min-height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.weblink-page .head-title {
	border-bottom: 2px solid #e9e9e9;
	padding-bottom: 10px;
	margin-bottom: 20px;
	color: #333;
	font-weight: 600;
}

.weblink-page .quick-link-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 20px;
	border: 1px solid #e9e9e9;
	border-radius: 4px;
	background-color: #fff;
	height: 100%;
	min-height: 120px;
}

.weblink-page .quick-link-icon {
	font-size: 36px;
	margin-bottom: 15px;
	color: #0088cc;
}

.weblink-page .quick-link-text {
	text-align: center;
	font-weight: 500;
	color: #333;
}

@media (max-width: 767px) {
	.weblink-page .image-container {
		padding-top: 26.67%; /* คงอัตราส่วนเดิมในโหมดมือถือ */
	}
	
	.weblink-page .weblink-title {
		min-height: 50px;
		font-size: 14px;
	}
	
	.weblink-page .quick-link-item {
		padding: 15px;
		min-height: 100px;
	}
	
	.weblink-page .quick-link-icon {
		font-size: 30px;
		margin-bottom: 10px;
	}
}


/* Cookies Consent */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 99999;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.cookie-container {
    max-width: 1140px;
    margin: 0 auto;
}

.cookie-content {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: cookie-slide-up 0.5s ease forwards;
    flex-wrap: wrap;
}

@keyframes cookie-slide-up {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-icon {
    font-size: 28px;
    color: #1976D2;
    margin-right: 20px;
    flex-shrink: 0;
}

.cookie-text {
    flex: 1;
    min-width: 200px;
}

.cookie-text h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.cookie-text p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.cookie-actions {
    display: flex;
    align-items: center;
    margin-left: 20px;
    flex-wrap: wrap;
}

.btn-acceptcookies, 
.btn-save-settings {
    background-color: #1976D2;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 10px;
    font-size: 14px;
}

.btn-acceptcookies:hover, 
.btn-save-settings:hover {
    background-color: #1565C0;
}

.btn-cookie-settings, 
.btn-cancel {
    background-color: #f5f5f5;
    color: #333;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

.btn-cookie-settings:hover, 
.btn-cancel:hover {
    background-color: #e0e0e0;
}

.cookie-policy-link {
    color: #1976D2;
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
}

.cookie-policy-link:hover {
    text-decoration: underline;
}

/* Modal สำหรับตั้งค่าคุกกี้ */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: none;
}

.cookie-settings-modal.show {
    display: block;
}

.cookie-settings-modal .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.cookie-settings-modal .modal-dialog {
    position: relative;
    width: 90%;
    max-width: 600px;
    margin: 30px auto;
    animation: modal-slide-down 0.3s ease forwards;
}

@keyframes modal-slide-down {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-settings-modal .modal-content {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.cookie-settings-modal .modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-settings-modal .modal-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.cookie-settings-modal .close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin: 0;
    margin-left: auto;
}

.cookie-settings-modal .close-modal:hover {
    color: #333;
}

.cookie-settings-modal .modal-body {
    padding: 20px 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.cookie-settings-modal .modal-description {
    margin-bottom: 20px;
    color: #666;
}

.cookie-option {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.cookie-option:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cookie-switch {
    display: flex;
    align-items: flex-start;
}

.cookie-option-text {
    margin-left: 16px;
    flex: 1;
}

.cookie-option-text strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
    color: #333;
}

.cookie-option-text p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.cookie-settings-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Switch toggle */
.cookie-settings-modal .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-settings-modal .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-settings-modal .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
}

.cookie-settings-modal .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

.cookie-settings-modal input:checked + .slider {
    background-color: #1976D2;
}

.cookie-settings-modal input:disabled + .slider {
    opacity: 0.7;
    cursor: not-allowed;
}

.cookie-settings-modal input:checked + .slider:before {
    transform: translateX(26px);
}

.cookie-settings-modal .slider.round {
    border-radius: 24px;
}

.cookie-settings-modal .slider.round:before {
    border-radius: 50%;
}

/* Responsive styles */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    
    .cookie-icon {
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .cookie-actions {
        margin-left: 0;
        margin-top: 16px;
        width: 100%;
        justify-content: space-between;
    }
    
    .cookie-policy-link {
        order: 3;
        margin: 12px 0 0 0;
        width: 100%;
        text-align: center;
    }
    
    .btn-cookie-settings {
        order: 1;
    }
    
    .btn-acceptcookies {
        order: 2;
        margin-left: 0;
    }
    
    .modal-dialog {
        width: 95%;
        margin: 15px auto;
    }
}

#footer .footer-copyright {
    padding: 15px 0;
    color: #f4f4f4;
}

#footer .footer-policy-links {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
}

#footer .footer-policy-links a {
    color: #f4f4f4;
    text-decoration: none;
    padding: 0 5px;
}

#footer .footer-policy-links a:hover {
    text-decoration: underline;
    color: #fff;
}

#footer .footer-counter {
    margin: 10px 0;
    font-size: 14px;
    color: #f4f4f4;
}

#footer .footer-copyright-text {
    margin-top: 5px;
    font-size: 14px;
    color: #555;
}

@media (max-width: 767px) {
    #footer .footer-policy-links {
        line-height: 2;
    }
    
    #footer .footer-counter {
        margin: 15px 0;
    }
}