/* =============================================
   style.css - Main Stylesheet (Government Blue)
   ============================================= */

/* --- Font & Base --- */
* { box-sizing: border-box; }
body {
    font-family: 'Sarabun', sans-serif;
    background-color: #f0f4f8;
    color: #2c3e50;
    font-size: 16px;
}
.fs-xs { font-size: 0.72rem; }

/* --- Government Blue Palette --- */
:root {
    --gov-primary: #1c69f7;
    --gov-secondary: #3facf0;
    --gov-accent: #d4ac0d;
    --gov-light: #eaf0fb;
    --gov-border: #c8d6e8;
}

/* --- Navbar --- */
.bg-primary-gov {
    background: linear-gradient(135deg, var(--gov-primary) 0%, var(--gov-secondary) 100%) !important;
}
.navbar-dark .nav-link {
    color: rgba(255,255,255,.85) !important;
    font-weight: 500;
    transition: all .2s;
}
.navbar-dark .nav-link:hover,
.navbar-dark .nav-link.active {
    background: rgba(255,255,255,.15);
    color: #fff !important;
}
.brand-icon {
    width: 60px; height: 60px;
    background: rgba(15, 15, 15, 0.2);
    border-radius: 30px;
    display: flex; align-items: center; justify-content: center;
    color: #070707;
}
.brand-icon-school {
    width: 100px; height: 100px;
    background: rgba(236, 234, 234, 0.2);
    border-radius: 50px;
    box-shadow: #070707;
    display: flex; align-items: center; justify-content: center;
    color: #070707;
    
}
/* --- Layout --- */
.main-wrapper {
    display: flex;
    min-height: calc(100vh - 58px);
}
.content-area {
    flex: 1;
    min-width: 0;
    padding: 1.5rem;
}
.sidebar-area {
    width: 280px;
    
    flex-shrink: 0;
    padding: 1.5rem 1rem 1.5rem 0;
}




/* --- Sidebar Widget --- */
.sidebar-widget {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,48,135,.08);
    overflow: hidden;
    border: 1px solid var(--gov-border);
}
.widget-header {
    background: var(--gov-primary);
    color: #fff;
    padding: .6rem 1rem;
    font-weight: 600;
    font-size: .9rem;
}
.widget-body {
    padding: .75rem;
}
.latest-news-item {
    padding: .5rem 0;
    border-bottom: 1px dashed #e0e8f5;
}
.latest-news-item:last-child { border-bottom: none; }
.latest-news-item a:hover div { color: var(--gov-primary) !important; }

/* --- Slideshow --- */
.carousel-item img {
    height: 700px;
    object-fit: cover;
    width: 100%;
}
.carousel-caption {
    background: linear-gradient(to top, rgba(0,48,135,.85), transparent);
    padding: 2rem 2rem 1.5rem;
    text-align: left;
    left: 0; right: 0; bottom: 0;
    border-radius: 0;
}
.carousel-caption h5 { font-size: 1.5rem; font-weight: 700; }
.carousel-indicators [data-bs-target] {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,.6);
}
.carousel-indicators .active { background: var(--gov-accent); }

/* --- Section Headers --- */
.section-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 3px solid var(--gov-primary);
}
.section-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gov-primary);
    margin: 0;
}
.section-header-icon {
    width: 36px; height: 36px;
    background: var(--gov-primary);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}

/* --- News Cards --- */
.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,48,135,.07);
    transition: transform .2s, box-shadow .2s;
    border: 1px solid var(--gov-border);
    height: 100%;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,48,135,.15);
}
.news-card-img {
    height: 180px;
    object-fit: cover;
    width: 100%;
}
.news-card-img-placeholder {
    height: 180px;
    background: linear-gradient(135deg, var(--gov-primary), var(--gov-secondary));
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.5);
    font-size: 3rem;
}
.news-card-body { padding: 1rem; }
.news-card-title {
    font-weight: 600;
    font-size: .95rem;
    color: #1a1a2e;
    line-height: 1.5;
    display: -webkit-box;
    /* -webkit-line-clamp: 2; */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-title a { text-decoration: none; color: inherit; }
.news-card-title a:hover { color: var(--gov-primary); }
.badge-category { font-size: .72rem; }

/* --- Department Cards --- */
.dept-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,48,135,.07);
    transition: all .2s;
    border: 1px solid var(--gov-border);
    text-align: center;
    height: 100%;
}
.dept-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,48,135,.15);
    border-color: var(--gov-primary);
}
.dept-icon {
    width: 100px; height: 100px;
    background: #fff;;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    margin: 0 auto .75rem;
}

/* --- Dashboard --- */
.dash-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--gov-primary);
    min-height: 100vh;
}
.dash-sidebar .nav-link {
    color: rgba(255,255,255,.75);
    padding: .6rem 1.25rem;
    border-radius: 8px;
    margin: 2px 8px;
    font-size: .9rem;
    transition: all .2s;
}
.dash-sidebar .nav-link:hover,
.dash-sidebar .nav-link.active {
    background: rgba(255,255,255,.15);
    color: #fff;
}
.dash-sidebar .nav-link i { width: 20px; }
.dash-sidebar .sidebar-heading {
    color: rgba(255,255,255,.45);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .75rem 1.25rem .25rem;
}
.dash-brand {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.dash-content {
    flex: 1;
    background: #f0f4f8;
    padding: 1.5rem;
    min-width: 0;
}
.dash-topbar {
    background: #fff;
    border-bottom: 1px solid var(--gov-border);
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Stat Cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,48,135,.07);
    border: 1px solid var(--gov-border);
    display: flex;
    align-items: center;
    gap: 1rem;
}


.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-card .number { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card .label { font-size: .82rem; color: #6c757d; }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,48,135,.15);
    border-color: var(--gov-primary);
}
/* Data Table */
.table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,48,135,.07);
    border: 1px solid var(--gov-border);
    overflow: hidden;
}
.table-wrapper .table { margin-bottom: 0; }
.table-wrapper .table thead th {
    background: var(--gov-primary);
    color: #fff;
    font-weight: 600;
    border: none;
    font-size: .875rem;
}
.table-wrapper .table tbody tr:hover { background: var(--gov-light); }

/* Form Card */
.form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,48,135,.07);
    border: 1px solid var(--gov-border);
    padding: 1.75rem;
}
.form-label { font-weight: 600; font-size: .875rem; color: #374151; }
.form-control:focus, .form-select:focus {
    border-color: var(--gov-primary);
    box-shadow: 0 0 0 .2rem rgba(0,48,135,.15);
}

/* Buttons */
.btn-gov { background: var(--gov-primary); color: #fff; }
.btn-gov:hover { background: var(--gov-secondary); color: #fff; }

/* Page Header */
.page-header {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,48,135,.07);
    border: 1px solid var(--gov-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}
.page-header h4 { margin: 0; font-weight: 700; color: var(--gov-primary); }
.breadcrumb { margin-bottom: 0; font-size: .82rem; }
.breadcrumb-item a { color: var(--gov-primary); text-decoration: none; }

/* Footer */
.footer { background: var(--gov-primary); }
.footer-top { padding: 3rem 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.65); text-decoration: none; font-size: .875rem; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-contact li { color: rgba(255,255,255,.75); margin-bottom: .5rem; font-size: .875rem; }
.footer-news-item a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .875rem; }
.footer-news-item a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.social-btn { width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; }

/* Alert Messages */
.alert { border-radius: 10px; border: none; }

/* Responsive */
@media (max-width: 991px) {
    .sidebar-area { width: 100%; padding: 0 0 1rem; }
    .main-wrapper { flex-direction: column; }
    .carousel-item img { height: 250px; }
    .dash-sidebar { width: 100%; min-height: auto; }
}
@media (max-width: 768px) {
    .content-area { padding: 1rem; }
    .dash-content { padding: 1rem; }
}
.doc-card {
            background:#fff; border-radius:12px; padding:20px;
            box-shadow:0 1px 6px rgba(0,0,0,.07);
            transition: box-shadow .2s, transform .15s;
            border-left: 4px solid transparent;
        }
        .doc-card:hover { box-shadow:0 4px 16px rgba(0,0,0,.12); transform:translateY(-2px); }
        .doc-card.pdf-card  { border-left-color: #e74c3c; }
        .doc-card.word-card { border-left-color: #2980b9; }
        .doc-card.other-card{ border-left-color: #95a5a6; }
