/* Custom styles for the application */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Noto+Sans+Thai:wght@400;700&display=swap');

body {
    background-color: #f8f9fa;
    font-family: 'Prompt', 'Noto Sans Thai', 'Tahoma', 'Arial', 'sans-serif';
}

/* Navbar styles */
.navbar {
    background: linear-gradient(90deg, #28a745 0%, #21759b 100%) !important;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.navbar-nav .nav-link {
    color: #fff !important;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
}
.navbar-nav .nav-link.active, .navbar-nav .nav-link:focus {
    background: #17608a;
    border-radius: 6px;
}
.navbar-nav .nav-link:hover {
    background: #17608a;
    color: #fff;
    border-radius: 6px;
}

/* Header bar styles */
.header-bar {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}
.header-logo {
    max-height: 60px;
}

/* Banner section */
.banner-section {
    position: relative;
    background: #222;
    color: #fff;
    min-height: 240px;
    border-radius: 0;
    overflow: hidden;
}
.banner-section img {
    width: 100%;
    height: auto;
    object-fit: cover;
    opacity: 0.7;
}
.banner-section .banner-text {
    position: absolute;
    top: 150px;
    left: 40px;
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 1px 1px 8px rgba(0,0,0,0.2);
}
.banner-section .banner-box {
    position: absolute;
    top: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.8);
    color: #222;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    max-width: 400px;
}
.banner-section .banner-box .btn {
    min-width: 120px;
    font-size: 1rem;
}

/* Section title bar */
.section-title {
    background: #21759b;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.4rem 1.2rem;
    border-radius: 8px 8px 0 0;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Box styles for banner/news/video */
.custom-box {
    background: #888;
    color: #fff;
    min-height: 180px;
    font-size: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

/* News list styles */
.news-list {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1rem;
}
.news-list .news-item {
    display: flex;
    margin-bottom: 1rem;
}
.news-list .news-thumb {
    background: #888;
    color: #fff;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}
.news-list .news-content {
    margin-left: 0.75rem;
    font-size: 0.95rem;
}
.news-list .news-content a {
    color: #21759b;
    text-decoration: underline;
    font-size: 0.95rem;
}
.news-list .news-content a:hover {
    color: #17608a;
}
.news-list .btn {
    font-size: 0.95rem;
    padding: 0.2rem 0.8rem;
}

/* Footer styles */
.footer {
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    font-size: 1rem;
    color: #888;
    padding: 1rem 0;
}
.footer .container {
    text-align: center;
}

/* Login Page Styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.login-container .card {
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.login-container .card-header {
    background: linear-gradient(90deg, #28a745 0%, #21759b 100%);
    color: white;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    padding: 20px;
}

.login-container .btn-primary {
    background-color: #21759b;
    border-color: #21759b;
    padding: 10px;
    font-size: 1.1rem;
}

.login-container .btn-primary:hover {
    background-color: #17608a;
    border-color: #17608a;
}

/* Left Sidebar Styles */
.sidebar-container {
    position: fixed;
    top: 168px;
    left: 0;
    min-height: 100%;
    height: auto;
    width: 250px;
    z-index: 1042; /* Higher than sticky header */
    transform: translateX(0); /* Always visible */
    transition: none;
}

/* Remove hover effect and trigger area */
.sidebar-trigger {
    display: none;
}

/* Remove content push on hover */
.page-content {
    padding-left: 250px;
}

.sidebar-nav {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(90deg, #28a745 0%, #21759b 100%) !important;
    padding-top: 20px;
}

.sidebar-nav .navbar-nav {
    width: 100%;
}

.sidebar-nav .nav-item {
    width: 100%;
}

.sidebar-nav .nav-link {
    padding: 15px 25px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.sidebar-nav .nav-link:hover {
    background-color: #17608a;
}

body {
    transition: padding-left 0.3s ease-in-out;
}

/* Push content when sidebar is active */
.sidebar-container:hover ~ .page-content {
    padding-left: 250px;
}

/* Responsive tweaks */
@media (min-width: 1440px) {
    /* Desktop FHD+ scaling to 67% */
    html {
        zoom: 67%;
    }
    
    /* Additional desktop-specific adjustments */
    .container {
        max-width: 1200px; /* Maintain reasonable max-width even with zoom */
    }
    
    .header-logo {
        max-height: 40px; /* 67% of 60px */
    }
    
    .navbar-nav .nav-link {
        font-size: 0.7rem; /* 67% of 1.05rem */
        padding: 0.33rem 0.8rem; /* 67% of 0.5rem 1.2rem */
    }
    
    .banner-section {
        min-height: 160px; /* 67% of 240px */
    }
    
    .banner-section .banner-text {
        top: 100px; /* 67% of 150px */
        left: 27px; /* 67% of 40px */
        font-size: 1.47rem; /* 67% of 2.2rem */
    }
    
    .banner-section .banner-box {
        top: 27px; /* 67% of 40px */
        right: 27px; /* 67% of 40px */
        padding: 1rem; /* 67% of 1.5rem */
        max-width: 268px; /* 67% of 400px */
    }
    
    .banner-section .banner-box .btn {
        min-width: 80px; /* 67% of 120px */
        font-size: 0.67rem; /* 67% of 1rem */
    }
    
    .section-title {
        font-size: 0.74rem; /* 67% of 1.1rem */
        padding: 0.27rem 0.8rem; /* 67% of 0.4rem 1.2rem */
        margin-bottom: 0.33rem; /* 67% of 0.5rem */
    }
    
    .custom-box {
        min-height: 120px; /* 67% of 180px */
        font-size: 1rem; /* 67% of 1.5rem */
        margin-bottom: 1rem; /* 67% of 1.5rem */
    }
    
    .news-list {
        padding: 0.67rem; /* 67% of 1rem */
    }
    
    .news-list .news-item {
        margin-bottom: 0.67rem; /* 67% of 1rem */
    }
    
    .news-list .news-thumb {
        width: 47px; /* 67% of 70px */
        height: 47px; /* 67% of 70px */
        font-size: 0.6rem; /* 67% of 0.9rem */
    }
    
    .news-list .news-content {
        margin-left: 0.5rem; /* 67% of 0.75rem */
        font-size: 0.64rem; /* 67% of 0.95rem */
    }
    
    .news-list .news-content a {
        font-size: 0.64rem; /* 67% of 0.95rem */
    }
    
    .news-list .btn {
        font-size: 0.64rem; /* 67% of 0.95rem */
        padding: 0.13rem 0.54rem; /* 67% of 0.2rem 0.8rem */
    }
    
    .footer {
        font-size: 0.67rem; /* 67% of 1rem */
        padding: 0.67rem 0; /* 67% of 1rem */
    }
    
    .sidebar-container {
        top: 105px; /* 67% of 105px */
        width: 168px; /* 67% of 250px */
    }
    
    .page-content {
        padding-left: 168px; /* 67% of 250px */
    }
    
    .sidebar-nav {
        padding-top: 13px; /* 67% of 20px */
    }
    
    .sidebar-nav .nav-link {
        padding: 10px 17px; /* 67% of 15px 25px */
        gap: 10px; /* 67% of 15px */
    }
    
    .sidebar-container:hover ~ .page-content {
        padding-left: 168px; /* 67% of 250px */
    }
}

@media (max-width: 1200px) {
    .header-logo {
        max-height: 60px;
    }
    .banner-section img {
        height: 180px;
    }
    .banner-section .banner-text {
        font-size: 1.5rem;
        position: absolute;
        top: 120px;
        left: 40px;
    }
    .banner-section .banner-box {
        padding: 1rem;
        max-width: 100%;
        background: rgba(255, 255, 255, 0.8);
    }
    .custom-box {
        min-height: 120px;
        font-size: 1.1rem;
    }
}
@media (max-width: 1023.98px) {
    .header-bar .container, .navbar .container {
        flex-direction: column;
        gap: 0.5rem;
    }
    .header-logo {
        max-height: 50px;
    }
    .banner-section img {
        height: 120px;
    }
    .banner-section .banner-text {
        font-size: 5rem;
        font-weight: 700;
        text-shadow: 1px 1px 8px rgba(0,0,0,0.2);
        position: absolute;
        top: 20px;
        left: 40px;
        margin: 1rem 0;
        padding: auto;
    }
    .banner-section .banner-box {
        position: static;
        margin: 1rem 0;
        padding: auto;
        max-width: 100%;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.8);
    }
    .custom-box {
        min-height: 80px;
        font-size: 1rem;
    }
    .sidebar-container {
        display: none !important;
    }
    .page-content {
        padding-left: 0 !important;
    }
}
@media (max-width: 576px) {
    .header-bar .container, .navbar .container {
        flex-direction: column;
        gap: 0.25rem;
    }
    .header-logo {
        max-height: 36px;
    }
    .banner-section img {
        height: 80px;
    }
    .banner-section .banner-text {
        font-size: 5rem;
        margin: 0.5rem 0;
        padding: auto;
        position: absolute;
        top: 0px;
        left: 60px;
    }
    .banner-section .banner-box {
        padding: 0.5rem;
        font-size: 0.95rem;
        background: rgba(255, 255, 255, 0.8);
    }
    .custom-box {
        min-height: 50px;
        font-size: 0.9rem;
    }
    .section-title {
        font-size: 0.95rem;
        padding: 0.3rem 0.7rem;
    }
}

.navbar-brand {
    font-weight: bold;
}

.badge {
    font-size: 85%;
}

.card {
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    font-weight: bold;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Style for action buttons */
.btn-sm {
    margin-right: 5px;
}

/* Custom review score colors */
.score-low {
    color: #dc3545;
}

.score-medium {
    color: #ffc107;
}

.score-high {
    color: #28a745;
}

/* Custom alerts */
.alert {
    border-radius: 0.25rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Thai font support is handled by @import above */

/* ========== FAQ STYLES ========== */

/* FAQ List Page */
.faq-page-header {
    margin-bottom: 2rem;
}

.faq-search-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
}

.faq-accordion-item {
    border-radius: 0.5rem !important;
    overflow: hidden;
}

.faq-accordion-button {
    background-color: #fff;
    border: none;
    padding: 1.25rem 1.5rem;
}

.faq-accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: #0d6efd;
    box-shadow: none;
}

.faq-accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.faq-accordion-body {
    font-size: 1.05rem;
    line-height: 1.6;
    padding: 1.5rem;
}

.faq-answer-content {
    color: #495057;
}

.faq-meta {
    background-color: #f8f9fa;
    margin: 1rem -1.5rem -1.5rem -1.5rem;
    padding: 1rem 1.5rem;
}

.faq-empty-state i {
    opacity: 0.3;
}

/* Search highlight */
.faq-highlight {
    background-color: #fff3cd;
    padding: 0.1em 0.2em;
    border-radius: 0.2em;
}

/* FAQ Detail Page */
.faq-article {
    background: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 2rem;
}

.faq-question-icon,
.faq-answer-icon {
    flex-shrink: 0;
}

.faq-question-title {
    color: #2c3e50;
    line-height: 1.4;
}

.faq-answer-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #495057;
    /* border-left: 4px solid #28a745; */
}

.faq-meta .meta-item {
    display: flex;
    align-items: center;
}

.faq-share-buttons .btn {
    margin-bottom: 0.5rem;
}

.faq-sidebar .card {
    border: 1px solid #e9ecef;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.faq-sidebar .card-title {
    color: #495057;
    font-size: 1rem;
}

/* FAQ Responsive Design */
@media (max-width: 768px) {
    .faq-search-container {
        padding: 1rem !important;
    }
    
    .faq-accordion-button {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .faq-accordion-body {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .faq-article {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .faq-question-icon,
    .faq-answer-icon {
        display: none;
    }
    
    .faq-answer-content {
        font-size: 1rem;
        margin-left: 0;
    }
    
    .faq-share-buttons .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
}

/* FAQ Print Styles */
@media print {
    .faq-sidebar,
    .faq-share-section,
    .breadcrumb {
        display: none !important;
    }
    
    .faq-article {
        box-shadow: none;
        padding: 0;
    }
}
