@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

/* DB Helvethaica X Font Face */
@font-face {
    font-family: 'DB Helvethaica X';
    src: url('../DB Helvethaica /DB Helvethaica X Med.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'DB Helvethaica X';
    src: url('../DB Helvethaica /DB Helvethaica X Li.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

/* Thongterm Font Face */
@font-face {
    font-family: 'Thongterm';
    src: url('../thongterm-font/thongterm-light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Thongterm';
    src: url('../thongterm-font/thongterm-regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Thongterm';
    src: url('../thongterm-font/thongterm-bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Thongterm';
    src: url('../thongterm-font/thongterm-italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Thongterm';
    src: url('../thongterm-font/thongterm-bold-italic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}

body {
    font-family: 'noto sans thai', sans-serif;
}

.font-thongterm {
    font-family: 'Thongterm', 'noto sans thai', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #00b14f;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #008f3f;
}

/* Animations */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* News Detail Additional Styles */
.news-content p {
    font-family: 'Thongterm', sans-serif;
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.news-content h1 {
    font-family: 'Thongterm', sans-serif;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    /* Optional: ensure size is appropriate */
}

.news-content img {
    border-radius: 0.5rem;
}

.news-content table img {
    border-radius: 0.5rem;
    margin: 1rem 0;
    width: 100%;
}


.font-thongterm {
    font-family: 'Thongterm', sans-serif;
}

/* Override body background for News Detail if needed, or specific pages */
body.bg-light-white {
    background-color: #fefefe !important;
}

/* Helper for Thai font vertical alignment */
.thai-font-adjust {
    display: inline-block;
    line-height: 1;
    position: relative;
    top: 0px;
    /* Adjustable offset */
}

.thai-font-adjust-logo {
    display: inline-block;
    line-height: 1;
    position: relative;
    top: 10px;
    /* Adjustable offset */
}

.thai-font-adjust-sublogo {
    display: inline-block;
    line-height: 1;
    position: relative;
    top: 10px;
    /* Adjustable offset */
}

/* Blockquote Style for News Content */
.news-content blockquote {
    position: relative;
    background-color: #f1fdf4;
    /* Light green theme */
    padding: 2.5rem 3rem;
    margin: 3rem 0;
    border-radius: 1rem;
    text-align: center;
    font-family: 'Thongterm', sans-serif;
    font-size: 1.1rem;
    color: #374151;
    line-height: 1.6;
    border: none;
}

.news-content blockquote::before {
    content: '\f10d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: -15px;
    left: -15px;
    font-size: 2rem;
    color: #008841;
    /* Primary Orange for the accent */
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-content blockquote::after {
    content: '\f10e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    bottom: -15px;
    right: -15px;
    font-size: 2rem;
    color: #008841;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure blockquote text is bold if needed */
.news-content blockquote p {
    margin-bottom: 0;
    font-weight: 400;
}

/* Latest News Section Full Width */
.latest-news-section {
    background-color: #ffffff;
    width: 100%;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Event Slider Configuration */
:root {
    --event-slide-speed: 800ms;
    /* EDIT THIS to change slide transition speed */
}

.eventSwiper .swiper-wrapper {
    transition-duration: var(--event-slide-speed) !important;
}

.swiper-pagination-bullet-active {
    background-color: #00b14f !important;
}

.swiper-button-next,
.swiper-button-prev {
    color: #00b14f !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.5rem !important;
    font-weight: bold;
}

.border-title {
    border-left: 5px solid #00b14f;
    padding-left: 10px;
    border-radius: 5px 0 0 5px;
}

/* Ticker Animation Styles */
:root {
    --ticker-scroll-speed: 30s;
}

.ticker-wrapper {
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: ticker-scroll var(--ticker-scroll-speed) linear infinite;
    /* The content is duplicated, so we scroll exactly half its total length */
    width: max-content;
    flex-shrink: 0;
}

.ticker-content:hover {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}
/* Masonry Gallery inside Content */
.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.masonry-gallery img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 0.75rem;
    margin: 0 !important;
}

@media (min-width: 768px) {
    .masonry-gallery {
        gap: 1.5rem;
    }
}
