/* ==========================================================================
   สหกรณ์ออมทรัพย์ครูอุบลราชธานี จำกัด (ubonteacher.com)
   Style Sheet หลัก - Responsive & Modern Thai Cooperative Theme
   ========================================================================== */

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

:root {
    /* โทนสีเขียวโมโนโครเมติค อ่อนละมุน ทันสมัย (Soft Monochromatic Green Theme) */
    --primary: #2d7a5b;          /* เขียวเสจ/มรกตโปร่ง นุ่มนวล อบอุ่น เป็นมิตร สบายตา */
    --primary-dark: #1e563f;     /* เขียวเข้มปานกลาง สุขุม นุ่มลึก ไม่มืดทึบ */
    --primary-light: #48a07c;    /* เขียวสดใสกำลังดี ให้ชีวิตชีวา */
    --primary-soft: #edf7f2;     /* เขียวพาสเทลอ่อนมาก สำหรับ Badge, Active Tab, Hover */
    
    /* โมโนโครเมติค - คุมโทนสีเขียวกลมกลืน */
    --secondary: #3b8f6c;        /* เขียวหยกคลาสสิก เข้าชุดแบบโมโนโครม */
    --secondary-hover: #26684d;  /* เขียวเข้มขึ้นเมื่อ Hover */
    --secondary-soft: #e2f2e9;   /* เขียวอ่อนนวลตา */
    --accent: #52b788;           /* เขียวมิ้นต์สดชื่น สำหรับไฮไลต์ */
    
    --text-main: #1d3528;        /* ตัวอักษรสีเขียวเทาเข้ม ชัดเจน สบายตา */
    --text-muted: #587566;       /* ตัวอักษรรอง สีเขียวเอิร์ธโทน นุ่มนวล */
    --bg-light: #f8fbf9;         /* พื้นหลังเว็บสีขาวนวลอมเขียวจางๆ สว่าง โปร่ง สบายตา */
    --bg-warm: #f0f6f2;          /* พื้นหลังบล็อกไฮไลต์ */
    --bg-white: #ffffff;
    --border-color: #d6e8de;     /* เส้นขอบสีเขียวอ่อนละมุน */

    --shadow-sm: 0 2px 6px rgba(30, 86, 63, 0.05);
    --shadow-md: 0 8px 22px -4px rgba(30, 86, 63, 0.08), 0 3px 6px -1px rgba(30, 86, 63, 0.03);
    --shadow-lg: 0 20px 36px -6px rgba(30, 86, 63, 0.11), 0 6px 12px -3px rgba(30, 86, 63, 0.05);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --font-heading: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-main);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-dark);
    line-height: 1.35;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ----------------------------------------------------
   1. Top Bar & Header
   ---------------------------------------------------- */
.top-bar {
    background-color: var(--primary-dark);
    color: #e2e8f0;
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.top-bar-info span, .top-bar-info a {
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-actions .admin-link {
    background-color: rgba(255,255,255,0.15);
    padding: 2px 10px;
    border-radius: 4px;
    color: #fff;
    font-size: 0.8rem;
}

.top-bar-actions .admin-link:hover {
    background-color: var(--secondary);
}

/* Site Branding Header */
.site-header {
    background-color: var(--bg-white);
    padding: 16px 0;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.site-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    box-shadow: 0 6px 18px rgba(45,122,91,0.22);
    flex-shrink: 0;
}

.site-title h1 {
    font-size: 1.45rem;
    margin: 0;
    color: var(--primary-dark);
    letter-spacing: -0.3px;
    font-weight: 700;
}

.site-title p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.header-contact-badge {
    text-align: right;
    display: none;
}

@media(min-width: 900px) {
    .header-contact-badge {
        display: block;
    }
}

.header-contact-badge .call-center-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.header-contact-badge .call-center-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-heading);
}

/* ----------------------------------------------------
   2. Main Navigation Bar (Top Navigation)
   ---------------------------------------------------- */
.main-nav {
    background: linear-gradient(90deg, #1e563f 0%, #2d7a5b 100%);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 18px rgba(30,86,63,0.14);
    border-bottom: 3px solid var(--accent);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 15px 18px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover, .nav-item.active .nav-link {
    background-color: rgba(255,255,255,0.14);
    color: #ffffff;
    border-bottom-color: var(--accent);
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    list-style: none;
    padding: 8px 0;
    z-index: 1000;
    border-top: 3px solid var(--accent);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.dropdown-menu li a:hover {
    background-color: var(--primary-soft);
    color: var(--primary);
    padding-left: 24px;
}

.nav-item.has-dropdown:hover > .dropdown-menu {
    display: block;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 10px;
    cursor: pointer;
}

/* ----------------------------------------------------
   3. Hero Banner / Carousel (Wireframe Template 1)
   ---------------------------------------------------- */
.hero-slider {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f2f8f5 0%, #e8f4ed 50%, #f6faf7 100%);
    min-height: 540px;
}

.slider-container {
    position: relative;
    width: 100%;
    min-height: 540px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 540px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(248,252,249,0.96) 0%, rgba(248,252,249,0.86) 50%, rgba(248,252,249,0.40) 100%);
}

.slide-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 80px 0;
    color: var(--text-main);
}

.slide-content h2 {
    color: var(--primary-dark);
    font-size: 2.35rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: none;
    letter-spacing: -0.3px;
    line-height: 1.35;
}

.slide-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 26px;
    line-height: 1.7;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(45,122,91,0.28);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: #ffffff;
}

.slider-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(45,122,91,0.22);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background-color: var(--primary);
    width: 32px;
    border-radius: 8px;
}

/* ----------------------------------------------------
   4. Quick Service Icons (Wireframe Template 1)
   ---------------------------------------------------- */
.quick-services-section {
    padding: 45px 0 25px;
    margin-top: 35px;
    position: relative;
    z-index: 10;
}

.quick-services-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.service-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 24px 14px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.service-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #edf7f2 0%, #d8ede2 100%);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon-circle {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff;
    transform: scale(1.08);
}

.service-card-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-dark);
}

/* ----------------------------------------------------
   5. Section Header & Layout Common
   ---------------------------------------------------- */
.section {
    padding: 50px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 1.6rem;
    position: relative;
    display: inline-block;
    color: var(--primary-dark);
    margin: 0 0 10px 0;
    padding-bottom: 8px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
}

.section-subtitle,
.section-header p {
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.view-all-link {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    padding: 5px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

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

/* ----------------------------------------------------
   6. News Preview Cards (Wireframe Template 1 & 3)
   ---------------------------------------------------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.news-thumb {
    position: relative;
    height: 190px;
    overflow: hidden;
    background-color: #e2e8f0;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-thumb img {
    transform: scale(1.05);
}

.news-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: rgba(15,62,109,0.88);
    color: #fff;
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.news-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-title {
    font-size: 1.08rem;
    line-height: 1.45;
    margin-bottom: 10px;
    flex-grow: 1;
}

.news-title a {
    color: var(--primary-dark);
}

.news-title a:hover {
    color: var(--primary);
}

.news-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ----------------------------------------------------
   7. Monthly Operating Summary Bar (Wireframe Template 1)
   ---------------------------------------------------- */
.monthly-summary-bar {
    background: linear-gradient(135deg, #1e563f 0%, #2d7a5b 100%);
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    color: #ffffff;
    box-shadow: var(--shadow-lg);
    margin: 40px 0;
    border: 1px solid rgba(255,255,255,0.12);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 15px;
}

.summary-title h3 {
    color: #ffffff;
    font-size: 1.35rem;
    margin: 0;
}

.summary-title p {
    color: #d1fae5;
    font-size: 0.88rem;
    margin: 2px 0 0;
}

.summary-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.15);
    padding: 0 15px;
}

.stat-item:last-child {
    border-right: none;
}

.stat-label {
    font-size: 0.95rem;
    color: #e2f2e9;
    margin-bottom: 6px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

.stat-unit {
    font-size: 0.85rem;
    color: #bbf7d0;
    margin-left: 4px;
}

/* ----------------------------------------------------
   8. Gallery Preview Grid (Wireframe Template 1 & 7)
   ---------------------------------------------------- */
.gallery-grid-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.gallery-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.gallery-thumb {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-thumb img {
    transform: scale(1.06);
}

.gallery-caption {
    padding: 12px 14px;
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ----------------------------------------------------
   9. Content Page Layout with Sidebar (Wireframe Template 2)
   ---------------------------------------------------- */
.content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 35px;
    margin: 35px 0 60px;
}

.sidebar-menu {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 20px 0;
}

.sidebar-title {
    font-size: 1.15rem;
    padding: 0 20px 14px;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    color: var(--primary);
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-main);
    font-size: 0.95rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar-list li a:hover, .sidebar-list li.active a {
    background-color: var(--primary-soft);
    color: var(--primary);
    border-left-color: var(--secondary);
    font-weight: 600;
}

.main-content-panel {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 35px 40px;
}

.content-header-title {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 12px;
    border-bottom: 3px solid var(--secondary);
    padding-bottom: 10px;
    display: inline-block;
}

.breadcrumb-bar {
    padding: 12px 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

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

.breadcrumb-bar a:hover {
    color: var(--secondary);
}

/* ----------------------------------------------------
   10. List Page (Wireframe Template 3)
   ---------------------------------------------------- */
.list-filter-bar {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.list-item-row {
    background-color: var(--bg-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s ease;
}

.list-item-row:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
    transform: translateX(4px);
}

.date-badge {
    width: 64px;
    height: 64px;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-dark);
}

.date-badge .badge-day {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}

.date-badge .badge-month {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.list-item-details {
    flex-grow: 1;
}

.list-item-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.list-item-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 15px;
}

/* ----------------------------------------------------
   11. Service / Data Table (Wireframe Template 4)
   ---------------------------------------------------- */
.data-table-wrapper {
    overflow-x: auto;
    margin: 25px 0 35px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-white);
    font-size: 0.95rem;
}

.custom-table th {
    background-color: var(--primary);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 500;
    padding: 14px 18px;
    text-align: left;
}

.custom-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.custom-table tr:hover td {
    background-color: #f8fafc;
}

.cta-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-md);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-box-text h4 {
    color: var(--primary-dark);
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.cta-box-text p {
    color: #064e3b;
    font-size: 0.95rem;
    margin: 0;
}

/* ----------------------------------------------------
   12. Loan Calculator (Wireframe Template 5)
   ---------------------------------------------------- */
.calculator-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 30px;
    margin-top: 25px;
}

.calc-form-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--primary-dark);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    outline: none;
    font-family: var(--font-body);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21,94,67,0.15);
}

.calc-result-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.result-header {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    border-bottom: 2px solid #bbf7d0;
    padding-bottom: 10px;
}

.result-metric {
    margin-bottom: 22px;
}

.result-metric-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.result-metric-value {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
}

.result-metric-value.highlight {
    color: var(--secondary);
}

.result-metric-unit {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: normal;
    margin-left: 6px;
}

.calc-disclaimer {
    margin-top: auto;
    padding-top: 15px;
    font-size: 0.82rem;
    color: var(--text-muted);
    border-top: 1px solid #bbf7d0;
}

/* ----------------------------------------------------
   13. App Guide (Wireframe Template 6)
   ---------------------------------------------------- */
.app-store-badges {
    display: flex;
    gap: 16px;
    margin: 25px 0 40px;
    flex-wrap: wrap;
}

.store-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: #0f172a;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.25s;
}

.store-badge-btn:hover {
    background-color: var(--secondary);
    color: #ffffff;
    transform: translateY(-2px);
}

.store-badge-btn i {
    font-size: 2rem;
}

.store-badge-btn .badge-text small {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #94a3b8;
}

.store-badge-btn .badge-text strong {
    font-size: 1.15rem;
    font-family: var(--font-heading);
}

.app-step-item {
    display: grid;
    grid-template-columns: 80px 1fr 300px;
    gap: 25px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 24px;
    align-items: center;
}

.step-number {
    width: 64px;
    height: 64px;
    background-color: var(--primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}

.step-details h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.step-mockup img {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* ----------------------------------------------------
   14. Personnel Directory (ชุดที่ 66 / เจ้าหน้าที่)
   ---------------------------------------------------- */
.personnel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 25px;
}

.personnel-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.personnel-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.personnel-avatar {
    width: 140px;
    height: 180px;
    margin: 0 auto 16px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: #f1f5f9;
    border: 3px solid #e2e8f0;
}

.personnel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.personnel-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.personnel-pos {
    font-size: 0.88rem;
    color: var(--secondary);
    font-weight: 500;
}

/* หมวดหมู่เจ้าหน้าที่สหกรณ์ (Staff Department Grouping & Navigation) */
.staff-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0 30px;
    padding: 16px;
    background: var(--bg-warm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.staff-filter-btn {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.staff-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.staff-filter-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(45, 122, 91, 0.25);
}

.staff-dept-section {
    margin-bottom: 45px;
    padding-bottom: 25px;
    border-bottom: 1px dashed var(--border-color);
}

.staff-dept-section:last-child {
    border-bottom: none;
}

.staff-dept-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: linear-gradient(135deg, #edf7f2 0%, #f4faf6 100%);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 15px;
}

.staff-dept-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.staff-dept-title i {
    color: var(--primary);
}

.staff-count-badge {
    font-size: 0.82rem;
    font-weight: 500;
    padding: 3px 10px;
    background: var(--bg-white);
    color: var(--primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* ----------------------------------------------------
   15. Contact Page (Wireframe Template 8)
   ---------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 35px;
    margin-top: 25px;
}

.contact-info-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.contact-info-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.contact-info-list li {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.contact-info-list li i {
    color: var(--secondary);
    font-size: 1.2rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.contact-map-wrapper {
    margin-top: 20px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 250px;
    border: 1px solid var(--border-color);
}

.contact-map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-form-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

/* ----------------------------------------------------
   16. Pagination Common
   ---------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 35px 0 15px;
    list-style: none;
    padding: 0;
}

.pagination li a, .pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: var(--font-heading);
}

.pagination li.active span, .pagination li a:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ----------------------------------------------------
   17. Site Footer (Wireframe Footer)
   ---------------------------------------------------- */
.site-footer {
    background: linear-gradient(180deg, #1e563f 0%, #164230 100%);
    color: #bed6c9;
    padding: 55px 0 25px;
    font-size: 0.9rem;
    margin-top: 50px;
    border-top: 4px solid var(--accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr;
    gap: 35px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1.15rem;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 2px;
    background-color: var(--accent);
}

.footer-col p {
    line-height: 1.7;
    margin-bottom: 12px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    color: #cce3d8;
}

.footer-links li a:hover {
    color: #ffffff;
    padding-left: 4px;
}

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-btn {
    width: 38px;
    height: 38px;
    background-color: rgba(255,255,255,0.12);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}

.social-btn:hover {
    background-color: var(--accent);
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    text-align: center;
    font-size: 0.82rem;
    color: #6d8a7c;
}

/* ----------------------------------------------------
   18. Responsive Media Queries
   ---------------------------------------------------- */
@media (max-width: 1024px) {
    .quick-services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .personnel-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .quick-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .gallery-grid-preview {
        grid-template-columns: repeat(2, 1fr);
    }
    .summary-stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .stat-item {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        padding-bottom: 15px;
    }
    .stat-item:last-child {
        border-bottom: none;
    }
    .content-layout {
        grid-template-columns: 1fr;
    }
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    .app-step-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .step-number {
        margin: 0 auto;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .personnel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .mobile-nav-toggle {
        display: block;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--primary);
    }
    .nav-menu.active {
        display: flex;
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: rgba(0,0,0,0.2);
    }
    .dropdown-menu li a {
        color: #e2e8f0;
        padding-left: 30px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------------
   Rich Text Content Styling (TinyMCE Output)
   ---------------------------------------------------- */
.news-article-content {
    line-height: 1.9;
    font-size: 1.05rem;
    color: var(--text-main);
    word-break: break-word;
}
.news-article-content p {
    margin-bottom: 1.25rem;
}
.news-article-content h1,
.news-article-content h2,
.news-article-content h3,
.news-article-content h4 {
    color: var(--primary-dark);
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    font-family: var(--font-heading);
}
.news-article-content ul,
.news-article-content ol {
    margin: 1rem 0 1.5rem 2rem;
}
.news-article-content li {
    margin-bottom: 0.4rem;
}
.news-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    overflow-x: auto;
    display: block;
}
.news-article-content table th,
.news-article-content table td {
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    font-size: 0.95rem;
}
.news-article-content table th {
    background-color: #f1f8f4;
    color: var(--primary-dark);
    font-family: var(--font-heading);
}
.news-article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    margin: 1.5rem 0;
    background: #f8fafc;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-muted);
    font-style: italic;
}
.news-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}
.news-article-content a {
    color: var(--primary);
    text-decoration: underline;
}
.news-article-content a:hover {
    color: var(--primary-dark);
}

