body {
  overflow: unset!important;
}
.language-and-location .language{
    display: none!important;
}
.main-page {
  background: #fff;
}
.main-page, .content{
    overflow: unset!important;
}
/* Glossary Container */
.glossary-content {
    padding: 28px 53px 22px 90px;
    margin: 0 auto;
}
/* Title Section */
.title-glossary {
    margin-bottom: 20px;
}

.title-glossary .title {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* Description */
.content-glossary {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 30px;
}

/* Search Box */
.glossary-search {
    margin: 0px 0 28px;
    width: 100%;
    display: flex;
}
.search-button{
    padding: 0 12px;
    border: none;
    background: #8E9EA4;
    border-bottom-right-radius: 5px;
    border-top-right-radius: 5px;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glossary-search input {
    width: 100%;
    max-width: 500px;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    outline: none;
    color:#757575 ;
    font-family:'Roboto-Medium' ;
}

.glossary-search input:focus {
    border-color: #00A651;
}

/* A-Z Filter */
.glossary-filter {
    margin: 0;
    padding: 8px 16px;
    background: #fff;
    border-radius: 5px;
    border: 1px solid #CED0D6;
    display: inline-flex;
    max-width: 100%;
}

.glossary-filter .filter-label {
    display: inline-block;
    font-weight: 500;
    margin-right: 0px;
    color: #282828;
    width: auto;
    display: flex;
    align-items: center;
    font-size: 15px;
    font-family: 'Roboto-Medium', sans-serif;
    flex-shrink: 0;
}

.glossary-filter .filter-buttons {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

/* Thai filter with horizontal scroll */
.glossary-filter.thai-filter {
    max-width: 100%;
    overflow: hidden;
}

.glossary-filter.thai-filter .filter-buttons {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for Chrome, Safari, Opera */
.glossary-filter.thai-filter .filter-buttons::-webkit-scrollbar {
    height: 4px;
}

.glossary-filter.thai-filter .filter-buttons::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 2px;
}

.glossary-filter.thai-filter .filter-buttons::-webkit-scrollbar-thumb { 
    border-radius: 2px;
}

.filter-letter {
    background: none;
    border:0;
    color: #757575;
    padding: 2px 6px;
    margin: 3px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: normal;
}

.filter-letter:hover {
    background: #00A651;
    color: #fff;
    border-color: #00A651;
}

.filter-letter.active {
    background: #00A651;
    color: #fff;
    border-color: #00A651;
}

/* Glossary Items */
.glossary-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 28px;
    margin-bottom: 40px;
}

.glossary-item {
    background: #FAFAFA;
    border: 1px solid #DBDBDB;
    border-radius: 5px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 129px;
}

/* Item Header with Letter Badge */
.glossary-item-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #F0F0F0;
}

.letter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00A651 0%, #008040 100%);
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 166, 81, 0.2);
}

.glossary-item .item-title {
    font-size: 16px;
    font-weight: 500;
    color: #000;;
    margin-bottom: 12px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

/* Item Content */
.glossary-item .item-content {
    font-size: 15px;
    line-height: 16px;
    color: #757575;
    padding:0;
    flex: 1;
    margin-bottom: 12px;
}

.glossary-item .item-content p:last-child {
    margin-bottom: 0;
}

/* Item Footer */
.item-footer {
    padding: 16px 20px;
    background: #F8F9FA;
    border-top: 1px solid #F0F0F0;
}

.glossary-item .read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #000;
    font-size: 15px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    font-family:'Roboto-Regular' ;
}

.glossary-item .read-more:hover {
    color: #000;
}

/* Pagination */
.glossary-pagination {
    margin: 50px 0 40px;
    text-align: center;
    clear: both;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

/* All pagination links */
.glossary-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Hover state for number links */
.glossary-pagination a:not(.active):not(.prev):not(.next):not(.page-ellipsis):not(.prevent):hover {
    background: #E0F2E9;
    color: #00A651;
}

/* Current/Active page */
.glossary-pagination a.active {
    background: #C8E6D4;
    color: #00A651;
    cursor: default;
}

/* Ellipsis */
.glossary-pagination a.page-ellipsis {
    background: transparent;
    padding: 0 8px;
    min-width: auto;
    color: #666;
    cursor: default;
}

/* Previous button */
.glossary-pagination a.prev {
    background: #7A8A84;
    color: #fff;
    padding: 0;
    width: 48px;
}

.glossary-pagination a.prev:not(.prevent):hover {
    background: #6A7A74;
    color: #fff;
}

.glossary-pagination a.prev.prevent {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Next button */
.glossary-pagination a.next {
    background: #4A7C59;
    color: #fff;
    padding: 0;
    width: 48px;
}

.glossary-pagination a.next:not(.prevent):hover {
    background: #3A6C49;
    color: #fff;
}

.glossary-pagination a.next.prevent {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Icons for prev/next */
.glossary-pagination a.prev .icon::before,
.glossary-pagination a.next .icon::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}

.glossary-pagination a.prev .icon::before {
    transform: rotate(45deg);
}

.glossary-pagination a.next .icon::before {
    transform: rotate(-135deg);
}

/* Responsive */
@media (max-width: 1024px) {
    .glossary-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .glossary-items {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .glossary-content {
        padding: 20px;
    }
    
    .title-glossary .title {
        font-size: 28px;
    }
    
    .filter-letter {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .glossary-pagination .page-numbers a,
    .glossary-pagination .page-numbers span {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* Pagination Bar - Similar to show-latest-posts */
.pagination-bar-posts {
    text-align: center;
    padding: 0px 0px 35px 0px;
}

.pagination-bar-posts a {
    text-decoration: none;
   padding: 0 5px;
    display: inline-flex !important;
    font-size: 16px;
    font-family: 'Roboto-Medium';
    font-weight: bold;
    margin: 0 5px;
}

.pagination-bar-posts a,
.pagination-bar-posts a:link,
.pagination-bar-posts a:visited,
.pagination-bar-posts a:active {
    color: #434343;
}
.pagination-bar-posts a.active {
    background-color: #d1e0c7;
    padding:5px 5px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.pagination-bar-posts a.page-ellipsis {
    pointer-events: none;
    color: #666;
    padding: 0;
}

.pagination-bar-posts a.prev {
    margin-right: 12px;
    margin-left: 0;
}

.pagination-bar-posts a.next {
   margin-left: 12px;
    margin-right: 0;
}

.pagination-bar-posts a.prev,
.pagination-bar-posts a.next {
    position: relative;
    padding: 10px 14px;
    background-color: #00751a;
    border-radius: 5px;
    display: inline-flex!important;
    align-items: center;
    justify-content: center;
}

.pagination-bar-posts a.next:not(.prevent) {
    background-color: #00751a;
}

.pagination-bar-posts a.prev span.icon,
.pagination-bar-posts a.next span.icon {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    display: block;
}

.pagination-bar-posts a.prev span.icon {
    border-right: 8px solid #fff;
}

.pagination-bar-posts a.next span.icon {
    border-left: 8px solid #fff;
}

.pagination-bar-posts a.prev.prevent,
.pagination-bar-posts a.next.prevent {
    background-color: #8E9EA4;
    pointer-events: none;
}

.no_item {
    min-height: 100px;
    text-align: center;
}
.no-results-message, .error-message {
    min-height: 100px;
    text-align: center;
    color: #666;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.item-content p {
    overflow: hidden;
  display: -webkit-box; 
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

#th-site .filter-letter {
    font-family: 'DB Adman X';
    font-size: 20px;
    padding: 0 4px;
}

#th-site .glossary-item .item-title {
    font-family: 'DB Heavent';
    font-size: 26px;
    font-weight: 500;
    line-height: 28px;
}
#th-site .glossary-item .read-more {
    font-size: 20px;
    font-weight: 400;
    line-height: 22px;
    font-family: 'DB Heavent';
}
#th-site .glossary-item .item-content {
    font-size: 18px;
    line-height: 22px;
    font-family: 'DB Adman X';
    font-weight: 300;
}
#th-site #glossary-search-input, #th-site .filter-label{
    font-family: 'DB Adman X';
    font-size: 20px;
}
#th-site .no-results-message{
    font-size: 24px;
}

#th-site .filter-label {
    margin-right: 10px;
}
.glossary-item .read-more.disablelink {
    pointer-events: none;
    color: #666;
    opacity: 0.5;
}