/* File Path: css/style.css */
:root {
    --primary-color: #05683a;
    --secondary-color: #f0f0f0;
    --font-size-base: 1rem;
}

body {
    font-family: 'Sarabun', sans-serif;
    font-size: var(--font-size-base);
    background-color: #e8e8e8;
}

/* --- Left Slider --- */
.left-slider {
    position: fixed;
    top: 30%;
    left: 0;
    width: 330px;
    background-color: #fff;
    box-shadow: 4px 0 15px rgba(0,0,0,0.15);
    transform: translateX(-100%);
    transition: transform 0.4s ease-in-out;
    z-index: 1040;
    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.left-slider.open {
    transform: translateX(0);
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    width: 40px;
    height: 70px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    font-size: 1.2rem;
}

.slider-content {
    padding: 1.5rem;
}

.director-info {
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.director-info img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.stats-info h6 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.stats-info .stat-item {
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}
.stats-info .stat-bar {
    height: 4px;
    width: 100%;
    border-radius: 2px;
    margin-top: 0.2rem;
}

/* --- Header & Navbar --- */
.top-bar {
    background-color: #d1cfcf;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #333;
}

.top-bar a {
    color: #555;
    text-decoration: none;
    margin: 0 0.5rem;
}

.top-bar a:hover {
    color: var(--primary-color);
}

.font-controls .btn {
    font-weight: 600;
}

.lang-switch .form-select {
    width: auto;
    font-size: 0.85rem;
}

.main-header {
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.navbar-brand img {
    max-height: 60px;
}

.main-navbar {
    background-color: var(--primary-color);
}

.main-navbar .nav-link {
    color: white;
    font-weight: 500;
    padding: 1rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 3px solid #fff;
}

.main-navbar .nav-link.active {
    color: #ffc778 !important;
}

/* --- Enhanced Button Styles --- */
.btn {
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* --- Main Content Cards --- */
.content-card {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #fff;
}

.card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-header-custom .fa-rss {
    font-size: 0.9rem;
}

.content-card .card-body {
    flex-grow: 1;
}

.content-card .card-footer {
    background-color: transparent;
    border-top: none;
    text-align: right;
    padding: 1rem 1.25rem;
}

.btn-view-all {
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 0.4rem 1.2rem;
    font-weight: 500;
    text-decoration: none;
}

.btn-view-all:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Card Color Variations */
.card-blue {
    background-color: #e7f3fe;
}

.card-orange {
    background-color: #fff4e6;
}

.card-green {
    background-color: #e6f4ea;
}

.card-pastel-purple {
    background-color: #f2effc;
}

.card-blue .card-header-custom {
    background-color: #d0e7ff;
}

.card-orange .card-header-custom {
    background-color: #ffe8cc;
}

.card-green .card-header-custom {
    background-color: #d0edd9;
}

.card-pastel-purple .card-header-custom {
    background-color: #e6e0f8;
}


.list-item {
    list-style: none;
    padding-left: 0;
}

.list-item li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.95rem;
}

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

.list-item a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.list-item a:hover {
    color: var(--primary-color);
}

.list-item i {
    color: var(--primary-color);
    margin-right: 0.75rem;
}

.list-item .date {
    color: #888;
    font-size: 0.85rem;
    margin-left: auto;
    padding-left: 1rem;
    white-space: nowrap;
    margin-right: 10px;
}

/* Carousel Customization */
.news-carousel-item {
    position: relative;
}

.news-carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    color: white;
    padding: 2rem 1rem 1rem 1rem;
    text-align: left;
}

.news-carousel-caption h5 {
    font-weight: bold;
}

/* Carousel Height Adjustment */
.fill-carousel,
.fill-carousel .carousel-inner,
.fill-carousel .carousel-item {
    height: 100%;
}

.fill-carousel .carousel-item img {
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Tab Card Styles */
.tab-card .nav-tabs {
    border-bottom: none;
}

.tab-card .nav-tabs .nav-link {
    border: none;
    border-top-left-radius: .5rem;
    border-top-right-radius: .5rem;
    background-color: #ffe8cc;
    color: #555;
    font-weight: 600;
    margin-right: 0.25rem;
    transition: all 0.3s ease;
}

.tab-card .nav-tabs .nav-link.active {
    background-color: #fff;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 -3px 5px rgba(0, 0, 0, 0.1);
}

.tab-content {
    background-color: #fff;
    padding: 1rem;
}

.tab-pane-scroll {
    max-height: 350px;
    overflow-y: auto;
}


/* --- Footer --- */
.footer {
    color: #fff;
    font-size: 0.9rem;
}

.footer-main {
    background-color: var(--primary-color);
}

.footer a {
    color: #fff;
    text-decoration: none;
}

.social-btn-footer {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-btn-footer:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.footer a:hover {
    text-decoration: underline;
}

.subscribe-btn {
    color: var(--primary-color) !important;
    background-color: #fff;
    border: 1px solid var(--primary-color);
}

.subscribe-btn:hover {
    background-color: var(--primary-color);
    color: #fff !important;
}

.footer-bottom {
    background-color: #04522d;
    /* Darker green */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-badge {
    height: 32px;
}

.visitor-stats {
    background-color: #05683A;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #04522d;
}

.footer-policy {
    background-color: #f0f0f0;
    font-size: 0.85rem;
}

.footer-policy a:hover {
    color: var(--primary-color) !important;
    text-decoration: underline;
}

.footer .btn-sitemap {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.footer .btn-sitemap:hover {
    color: #fff !important;
    background-color: var(--primary-color);
}

