/* ==================================================
   ประกาศผลสอบ.com - MASTER STYLESHEET
   Version: 1.0 (Refactored & Enhanced)
   ================================================== */

/* ==================================================
   1. CORE & BASE STYLES
   - Variables, Body, Container, Fonts
   ================================================== */
:root {
    --primary-color: #1a237e;  /* Deep Indigo */
    --secondary-color: #d32f2f; /* Strong Red */
    --accent-color: #303f9f;   /* Lighter Indigo/Blue */
    --light-bg: #f5f7fa;      /* Light Gray-Blue */
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --white-color: #fff;
    --success-color: #27ae60;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', 'Kanit', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==================================================
   2. HEADER & NAVIGATION
   ================================================== */
.header-top {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 8px 0;
    font-size: 14px;
    text-align: center;
}
.header-date i { margin-right: 5px; }

.main-header {
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 15px 0;
}
.main-header-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.logo-link { display: flex; align-items: center; text-decoration: none; }
.logo-image { height: 50px; }
.logo-text { font-family: 'Kanit', sans-serif; font-weight: 700; color: var(--primary-color); font-size: 24px; margin-left: 10px; }

.search-container { flex: 1; max-width: 500px; margin: 0 20px; position: relative; }
.search-container #aiSearchForm { display: flex; width: 100%; }
.search-container #aiJobSearch {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px 0 0 30px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.search-container #aiJobSearch:focus { border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(48, 63, 159, 0.2); }
.search-container .search-submit-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 0 30px 30px 0;
    padding: 0 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.search-container .search-submit-btn:hover { background-color: var(--secondary-color); }

.main-nav { background-color: var(--accent-color); }
.nav-menu { display: flex; list-style: none; }
.nav-item { position: relative; }
.nav-link { display: block; color: var(--white-color); text-decoration: none; padding: 15px 20px; font-family: 'Kanit', sans-serif; font-weight: 500; transition: background-color 0.3s; }
.nav-link:hover { background-color: var(--primary-color); text-decoration: none; }
.nav-link i { margin-right: 8px; }
.dropdown-menu { position: absolute; background-color: var(--white-color); box-shadow: 0 5px 15px rgba(0,0,0,0.15); border-radius: 5px; min-width: 220px; z-index: 1000; display: none; list-style: none; padding: 10px 0; margin: 0; border-top: 3px solid var(--accent-color); }
.dropdown-menu-right { right: 0; }
.dropdown-menu li a.dropdown-link { display: block; padding: 10px 20px; color: var(--text-color); font-family: 'Kanit', sans-serif; transition: background-color 0.3s, color 0.3s; }
.dropdown-menu li a.dropdown-link:hover { background-color: var(--light-bg); color: var(--primary-color); text-decoration: none; }
.dropdown-link i { color: var(--accent-color); margin-right: 8px; transition: color 0.3s; }
.dropdown-link:hover i { color: var(--primary-color); }

.breadcrumb-bar { background-color: var(--light-bg); padding: 12px 0; font-size: 14px; border-bottom: 1px solid var(--border-color); }
.breadcrumb-list { display: flex; list-style: none; align-items: center; flex-wrap: wrap; }
.breadcrumb-list a { color: var(--text-light); }
.breadcrumb-list a:hover { color: var(--primary-color); }
.breadcrumb-separator { margin: 0 8px; color: #b0bec5; }

/* ==================================================
   3. HOMEPAGE & GENERAL SECTIONS
   ================================================== */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header h2 {
    font-family: 'Kanit', sans-serif;
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
}
.section-header h2 i {
    margin-right: 12px;
    color: var(--secondary-color);
}
.section-header p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.intent-strip-section {
    padding: 30px 0 10px;
    background-color: var(--white-color);
}

.intent-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.intent-card {
    display: block;
    padding: 24px 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff, #f6f8fc);
    border: 1px solid #e5e9f2;
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.06);
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.intent-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(26, 35, 126, 0.1);
    border-color: #c9d4f1;
    text-decoration: none;
}

.intent-card-label {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: #e8eaf6;
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.intent-card h2,
.intent-card h3 {
    margin: 0 0 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 22px;
    line-height: 1.35;
    color: var(--primary-color);
}

.intent-card p {
    margin: 0;
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.7;
}

.hero-section {
    background: linear-gradient(135deg, rgba(232, 234, 246, 0.8), rgba(245, 247, 250, 0.8)),
                url('/images/hero-background.svg'); /* Optional: Add a subtle background pattern */
    background-size: cover;
    background-position: center;
    padding: 80px 0;
    text-align: center;
}
.hero-content h1 {
    font-family: 'Kanit', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
}
.hero-content p {
    font-size: 20px;
    color: var(--accent-color);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.hero-search {
    max-width: 600px;
    margin: 0 auto 25px;
}
.hero-search form {
    display: flex;
    box-shadow: 0 10px 30px rgba(48, 63, 159, 0.15);
    border-radius: 50px;
    overflow: hidden; 
    border: 1px solid rgba(0,0,0,0.05);
}

.hero-search input {
    flex-grow: 1;
    border: none;
    padding: 16px 25px;
    font-size: 16px;
    outline: none;
    background-color: var(--white-color);
}

.hero-search button {
    background: linear-gradient(45deg, var(--secondary-color), #f44336);
    color: var(--white-color);
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.2s ease;
    flex-shrink: 0;  
    padding: 0 30px; 
    white-space: nowrap; 
}

.hero-search button:hover {
    background: var(--secondary-color);
}
.hero-tags {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    flex-wrap: wrap;
}
.hero-tags span {
    color: var(--text-light);
    font-weight: 500;
}
.hero-tags a {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    padding: 6px 15px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--accent-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    font-weight: 500;
}
.hero-tags a:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-decoration: none;
}

.categories-section {
    padding: 60px 0;
    background-color: var(--light-bg);
}
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}
.category-card {
    background-color: var(--white-color);
    padding: 30px 25px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(48, 63, 159, 0.1);
    text-decoration: none;
}
.category-icon {
    font-size: 38px;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}
.category-card:hover .category-icon {
    transform: scale(1.1);
}
.category-card h3 {
    font-size: 18px;
    margin: 0 0 8px;
    font-weight: 600;
}

.exam-tips-section {
    padding: 60px 0;
    background-color: var(--white-color);
}
.exam-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}
.exam-tip-card {
    background-color: var(--light-bg);
    border-radius: 12px;
    padding: 30px 25px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}
.exam-tip-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(211, 47, 47, 0.1);
    border-color: var(--secondary-color);
}
.tip-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--secondary-color), #f44336);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    font-size: 28px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.3);
    transition: transform 0.3s ease;
}
.exam-tip-card:hover .tip-icon {
    transform: rotate(-10deg) scale(1.1);
}
.exam-tip-card h3 {
    font-family: 'Kanit', sans-serif;
    font-size: 18px;
    margin: 0 0 10px;
    font-weight: 600;
    color: var(--primary-color);
}
.exam-tip-card p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
    min-height: 60px; /* Give it a consistent height */
}
a.read-more {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    display: inline-block; /* Make it a block for better hover */
    position: relative;
}
a.read-more:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}
a.read-more:hover:after {
    width: 100%;
}
a.read-more i {
    margin-left: 5px;
    transition: transform 0.3s;
}
a.read-more:hover i {
    transform: translateX(5px);
}

/* ==================================================
   4. JOB CARDS & LISTS (Unified Style)
   ================================================== */
.job-highlight-section {
    margin-top: 32px;
    background: #f8fafc;
    padding: 26px;
    border: 1px solid #eef1f5;
    border-radius: 8px;
}
.section-title { font-size: 24px; margin-bottom: 25px; display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--secondary-color); padding-bottom: 10px; border-bottom: 2px solid #f0f0f0; }
.job-grid, .urgent-jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 25px; }

.urgent-job-card {
    background: var(--white-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15,23,42,0.06);
    display: flex;
    border-left: 5px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.urgent-job-card:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(15,23,42,0.1); }
.urgent-job-image-container { width: 100px; flex-shrink: 0; padding: 15px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.urgent-job-image { width: 70px; height: 70px; overflow: hidden; border-radius: 8px; margin-bottom: 8px; }
.urgent-job-image img { width: 100%; height: 100%; object-fit: cover; }
.urgent-job-content { padding: 15px 15px 15px 5px; flex-grow: 1; display: flex; flex-direction: column; }
.urgent-job-content h3 { margin: 0 0 8px; font-size: 15px; line-height: 1.5; font-weight: 600; }
.urgent-job-content h3 a { color: var(--text-color); font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.urgent-job-content h3 a:hover { color: var(--primary-color); text-decoration: none; }
.job-meta-urgent { font-size: 12px; color: var(--text-light); margin-bottom: 10px; }
.job-meta-urgent i { color: var(--secondary-color); width: 14px; }
.job-info-tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; margin-top: auto; }
.job-tag { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 20px; }
.job-tag.type { background-color: #e3f2fd; color: #1e88e5; }
.job-tag.exam-req { background-color: #fff3e0; color: #fb8c00; }
.job-tag.update-date { background-color: #ffebee; color: #e53935; }

.job-list-container { margin-top: 40px; }
.job-item {
    display: flex;
    background: var(--white-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    margin-bottom: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.job-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.job-thumbnail { width: 150px; flex-shrink: 0; }
.job-details { padding: 20px; }
.job-title { margin-bottom: 12px; }
.job-title a { font-size: 18px; }
.job-excerpt { color: var(--text-light); font-size: 14px; margin-bottom: 15px; }

.listing-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.listing-card {
    display: flex;
    gap: 16px;
    padding: 18px;
    border-radius: 8px;
    background-color: var(--white-color);
    border: 1px solid #e5e9f2;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.listing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
    border-color: #ced8f0;
}

.listing-card-thumb {
    width: 104px;
    min-width: 104px;
    height: 104px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.listing-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-card-thumb-placeholder {
    font-size: 28px;
    color: var(--accent-color);
}

.listing-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.listing-card-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.listing-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.listing-status-open {
    background-color: #ecfdf3;
    color: #15803d;
}

.listing-status-soon {
    background-color: #fff7ed;
    color: #c2410c;
}

.listing-status-today {
    background-color: #fef2f2;
    color: #b91c1c;
}

.listing-status-closed {
    background-color: #f1f5f9;
    color: #475569;
}

.listing-date-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-light);
    font-size: 13px;
}

.listing-card-title {
    margin: 0 0 10px;
    font-family: 'Kanit', sans-serif;
    font-size: 19px;
    line-height: 1.45;
}

.listing-card-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.listing-card-title a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.listing-card-summary {
    margin: 0 0 14px;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.75;
}

.listing-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.job-tag.education {
    background-color: #eefbf3;
    color: #18794e;
}

.listing-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 14px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed #dbe2eb;
}

.listing-footer-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-light);
    font-size: 13px;
}

.archive-empty-state {
    padding: 32px 28px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid #dde5fb;
}

.archive-empty-state h3 {
    margin: 0 0 10px;
    font-family: 'Kanit', sans-serif;
    font-size: 22px;
    color: var(--primary-color);
}

.archive-empty-state p {
    margin: 0;
    color: var(--text-light);
}

.archive-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.pagination-meta {
    margin: 28px 0 14px;
    color: var(--text-light);
    font-size: 14px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}

.page-link,
.page-dots {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid #d8def0;
    border-radius: 8px;
    background: var(--white-color);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.page-link:hover {
    background: #eef2ff;
    text-decoration: none;
}

.page-link.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}

.page-dots {
    color: var(--text-light);
}

/* ==================================================
   5. ARCHIVE & DETAIL PAGES
   ================================================== */
/* --- Layout for Archive & Detail Pages --- */
.category-archive-section, .job-detail-section {
    padding: 34px 0;
}
.archive-header {
    padding: 24px;
    margin-bottom: 28px;
    text-align: center;
    background-color: #f8fafc;
    border: 1px solid #eef1f5;
    border-radius: 8px;
}
.archive-header h1 {
    font-size: 30px;
    font-weight: 600;
    color: var(--primary-color);
}
.archive-header h1 i {
    margin-right: 12px;
}
.archive-meta-info {
    margin-bottom: 25px;
    font-size: 15px;
    color: var(--text-light);
    padding: 12px 20px;
    background-color: #e8eaf6;
    border-radius: 8px;
    display: inline-block;
}

.landing-intro-card {
    margin-bottom: 28px;
    padding: 22px 24px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e3e9f4;
}

.landing-intro-card p {
    margin: 0;
    color: var(--text-color);
    font-size: 16px;
}

.archive-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
}

.archive-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.quick-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background-color: var(--white-color);
    border: 1px solid #d8def0;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.quick-link-chip:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
    text-decoration: none;
}

.job-detail-section > .container {
    max-width: 1180px;
}

.detail-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
}

.detail-badge-primary {
    background-color: #eef2ff;
    border-color: #dbe5ff;
    color: var(--primary-color);
}

.detail-badge-muted {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: var(--text-color);
}

.detail-badge-open {
    background-color: #ecfdf3;
    border-color: #b7ebc6;
    color: #117a37;
}

.detail-badge-closed {
    background-color: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.detail-content-card {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid #eef1f5;
}

.detail-section-title {
    margin: 0 0 18px;
    font-family: 'Kanit', sans-serif;
    font-size: 24px;
    line-height: 1.4;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section-title i {
    color: var(--secondary-color);
}

.job-detail-content {
    background-color: var(--white-color);
    padding: 30px;
    border: 1px solid #eef1f5;
    border-radius: 8px;
    box-shadow: 0 2px 14px rgba(15,23,42,0.06);
}
.job-detail-header h1 {
    font-size: 30px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.38;
    margin: 0 0 20px 0;
}
.job-detail-header .job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-light);
}
.job-detail-header .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f0f4ff; /* Subtle background */
    padding: 6px 14px;
    border-radius: 20px; /* Pill shape */
    border: 1px solid #dbe2ff;
    color: var(--accent-color);
}
.job-detail-header .meta-item i {
    color: var(--accent-color);
}

.job-info-box {
    display: flex;
    gap: 25px;
    align-items: center;
    margin: 30px 0;
    background: #f8fafc;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.job-image-square {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.job-image-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.job-info-details {
    flex-grow: 1;
}
.job-info-details .info-item {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dashed #dce1e7;
}
.job-info-details .info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.job-info-details .info-label {
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.job-info-details .info-label i {
    color: var(--accent-color);
}
.job-info-details .info-value {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
}

/* --- Main Content Styling --- */
.job-main-content,
.extra-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    word-break: break-word;
    overflow-wrap: anywhere;
}
.job-main-content p,
.job-main-content ul,
.job-main-content ol,
.extra-content p,
.extra-content ul,
.extra-content ol {
    margin-bottom: 1em;
}
.job-main-content ul,
.job-main-content ol,
.extra-content ul,
.extra-content ol {
    padding-left: 22px;
}
.job-main-content h2,
.job-main-content h3,
.job-main-content h4,
.extra-content h2,
.extra-content h3,
.extra-content h4 {
    margin: 28px 0 14px;
    color: var(--primary-color);
    line-height: 1.45;
}
.job-main-content iframe,
.extra-content iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 360px;
    border: 0;
    border-radius: 8px;
}
.job-main-content img,
.extra-content img {
    margin: 25px auto; /* Center image */
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.job-main-content a,
.extra-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}
/* Wrapper for table to make it scrollable on mobile */
.table-wrapper {
    overflow-x: auto;
    margin: 2em 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.job-main-content table,
.extra-content table {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    border-style: hidden; /* Hide default border, use wrapper border */
}
.job-main-content th, .job-main-content td,
.extra-content th, .extra-content td {
    border: 1px solid var(--border-color);
    padding: 12px 15px;
}
.job-main-content th,
.extra-content th {
    background-color: var(--light-bg);
}

.exam-related-box {
    margin-top: 24px;
    padding: 16px 18px;
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    background-color: #f8fafc;
}

.exam-related-box h3 {
    margin: 0 0 12px;
    font-size: 18px;
    color: var(--primary-color);
}

.job-summary-wrapper .job-meta-footer {
    display: none;
}

.detail-content-card .job-info-box {
    margin: 0;
}

.job-extra-info > h3 {
    margin: 0 0 18px;
    font-family: 'Kanit', sans-serif;
    font-size: 24px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.job-extra-info > h3 i {
    color: var(--secondary-color);
}

.social-share {
    margin-top: 40px;
    padding: 25px;
    text-align: center;
    background-color: var(--light-bg);
    border-radius: 12px;
}
.social-share h3 {
    margin-bottom: 20px;
    font-weight: 500;
    color: var(--text-light);
    font-size: 16px;
}
.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}
.share-btn:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.share-btn.facebook { background-color: #3b5998; }
.share-btn.twitter { background-color: #1da1f2; }
.share-btn.line { background-color: #00c300; }

.related-jobs {
    margin-top: 32px;
}

.related-section {
    margin-top: 32px;
    padding: 26px;
    background-color: var(--white-color);
    border: 1px solid #eef1f5;
    border-radius: 8px;
    box-shadow: 0 2px 14px rgba(15,23,42,0.06);
}

.related-section-intro {
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--text-light);
}
.related-title {
    font-size: 24px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-bg);
}
.related-title i {
    color: var(--secondary-color);
}
.related-grid {
    display: grid;
    /* ✨ 2 columns on PC as requested */
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* ==================================================
   6. FOOTER
   ================================================== */
.footer-widgets {
    background-color: #0d47a1; /* สีน้ำเงินที่เข้มขึ้นเล็กน้อย */
    padding: 50px 0;
    color: #bbdefb; /* สีข้อความปกติที่สว่างขึ้น อ่านง่าย */
}

.footer-widgets-grid.three-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* ทำให้ยืดหยุ่น */
    gap: 40px;
}
/* ลบ Grid 4 คอลัมน์เดิม หรือปล่อยไว้ก็ได้ */
.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-widget-title {
    font-family: 'Kanit', sans-serif;
    font-size: 20px;
    margin-bottom: 20px;
    color: #ffffff; /* สีหัวข้อ (สีขาว) */
    font-weight: 500;
    padding-bottom: 10px;
    border-bottom: 2px solid #1976d2; /* เส้นใต้ที่สีสว่างขึ้น */
}
.footer-widget p {
    font-size: 14px;
    line-height: 1.8;
}
.footer-widget ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.footer-widget ul li {
    margin-bottom: 12px;
}
.footer-widget ul a {
    color: #e3f2fd;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    position: relative;
}
.footer-widget ul a:hover {
    color: #ffffff; /* สีลิงก์ตอน hover */
    padding-left: 5px; /* เพิ่มเอฟเฟกต์เล็กน้อย */
    text-decoration: none;
}
.contact-info li {
    display: flex;
    align-items: center;
    gap: 12px; /* เพิ่มระยะห่างระหว่างไอคอนกับข้อความ */
}
.contact-info i {
    color: #81d4fa; /* สีไอคอนที่สว่างสดใส */
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.footer-main {
    background-color: var(--primary-color);
    padding: 25px 0;
    font-size: 14px;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.copyright {
    color: #bbdefb;
}
.footer-bottom-links {
    display: flex;
    gap: 20px;
}
.footer-bottom-links a {
    color: #bbdefb;
}
.footer-bottom-links a:hover {
    color: #ffffff;
}

/* ==================================================
   7. EXTRA SECTIONS (Stats, Newsletter)
   ================================================== */
.statistics-section { padding: 60px 0; background-color: var(--primary-color); color: var(--white-color); text-align: center; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-top: 40px; }
.stat-number { font-family: 'Kanit', sans-serif; font-size: 48px; font-weight: 700; color: #81d4fa; margin-bottom: 10px; }
.newsletter-section { padding: 60px 0; background-color: var(--accent-color); color: white; text-align: center; }
.newsletter-form { display: flex; max-width: 500px; margin: 0 auto; }
.newsletter-form input { flex: 1; padding: 15px 20px; border: none; border-radius: 30px 0 0 30px; font-size: 16px; }
.newsletter-form button { background-color: var(--primary-color); color: white; border: none; padding: 0 25px; border-radius: 0 30px 30px 0; cursor: pointer; }

/* ==================================================
   8. UTILITY & COMPONENTS (Popup, Cookie, etc.)
   ================================================== */
/* --- ✨ [IMPROVED] AI Search Popup --- */
.ai-results-popup {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--white-color);
    border: 1px solid var(--border-color);
    z-index: 1020;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.ai-results-popup.show {
    display: block; /* Control display with JS */
    opacity: 1;
    transform: translateY(0);
}
.popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}
.popup-avatar-header {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.popup-title {
    color: var(--primary-color);
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
}
.popup-subtitle {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}
.popup-close-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #9e9e9e;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s, transform 0.3s;
}
.popup-close-btn:hover {
    color: var(--secondary-color);
    transform: rotate(90deg);
}
.popup-content {
    padding: 15px;
    max-height: 350px;
    overflow-y: auto;
}
.popup-footer {
    text-align: center;
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background-color: var(--light-bg);
    border-radius: 0 0 12px 12px;
}
.popup-chat-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.2s ease;
}
.popup-chat-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}
.popup-chat-btn i {
    margin-right: 8px;
}
.popup-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
}
.popup-question {
    background: #f1f5f9;
    color: #475569;
}
.popup-answer-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.popup-answer {
    background: #eef2ff;
    color: #312e81;
    flex-grow: 1;
}
.popup-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}
.popup-loader, .popup-error {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}
.popup-error {
    background: #ffebee;
    color: var(--secondary-color);
    border: 1px solid #ffcdd2;
    border-radius: 8px;
}


/* --- ✨ [IMPROVED] Cookie Consent Banner --- */
.cookie-consent-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(26, 35, 126, 0.95); /* Dark blue with slight transparency */
    backdrop-filter: blur(5px);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.cookie-consent-banner.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.cookie-consent-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.cookie-consent-text {
    flex: 1 1 400px; /* Allow wrapping on small screens */
}
.cookie-consent-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}
.cookie-consent-text a {
    color: #81d4fa; /* Light blue for links */
    text-decoration: underline;
    font-weight: 500;
}
.cookie-consent-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.cookie-consent-actions button {
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cookie-consent-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.cookie-consent-actions .btn-accept {
    background-color: var(--success-color);
    color: white;
}
.cookie-consent-actions .btn-reject {
    background-color: #757575;
    color: white;
}
.cookie-consent-actions .btn-details {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
}

.ip-notice {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #37474f;
    color: white;
    padding: 15px;
    border-radius: 8px;
    max-width: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 9998;
    transition: bottom 0.5s ease;
}
.ip-notice p {
    margin: 0 0 10px 0;
    font-size: 13px;
    line-height: 1.5;
}
.ip-notice .btn-understand {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    width: 45px;
    height: 45px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: background-color 0.3s, opacity 0.3s, transform 0.3s, bottom 0.5s ease;
	align-items: center;
    justify-content: center;
}
.back-to-top-btn:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}
/* When cookie banner is shown, push up the other buttons */
body.cookie-banner-active .ip-notice,
body.cookie-banner-active .back-to-top-btn {
    bottom: 120px; /* Adjust this value based on cookie banner height */
}

/* ==================================================
   9. RESPONSIVE DESIGN (MOBILE-FIRST OVERHAUL)
   ================================================== */

/* --- Tablet & Smaller Desktops --- */
@media (max-width: 992px) {
    .main-header-container { gap: 15px; }
    .search-container { order: 3; width: 100%; margin: 10px 0 0 0; }
	.footer-widgets-grid.three-columns,
    .footer-widgets-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
.mobile-menu-toggle {
    display: none;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px 10px; /* เพิ่ม padding ทำให้พื้นที่กดใหญ่ขึ้น */
    transition: background-color 0.3s, color 0.3s;
}

.mobile-menu-toggle i {
    font-size: 26px; /* ทำให้ไอคอนใหญ่ขึ้น */
    display: block; /* แก้ปัญหาบาง browser มี space ใต้ icon */
}

.mobile-menu-toggle:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}
    .main-nav { display: none; }
    .footer-widgets-grid { grid-template-columns: repeat(2, 1fr); }
    .job-item { flex-direction: column; }
    .job-thumbnail { width: 100%; height: 200px; }
	.related-grid { grid-template-columns: 1fr; }
}
/* --- Mobile Phones --- */
@media (max-width: 768px) {
    /* General Typography & Spacing */
    .section-header h2, .archive-header h1, .job-detail-header h1 { font-size: 24px; }
    .job-detail-header h1 { line-height: 1.45; margin-bottom: 16px; }
    .detail-section-title, .job-extra-info > h3 { font-size: 20px; }
    .hero-content h1 { font-size: 32px; }
    .hero-section, .categories-section, .exam-tips-section, .latest-announcements, .urgent-jobs-section { padding: 40px 0; }
    .category-archive-section { padding: 26px 0; }
    .archive-header {
        padding: 18px;
        margin-bottom: 20px;
        text-align: left;
    }
    .archive-header h1 {
        line-height: 1.45;
    }
    .archive-header h1 i {
        margin-right: 8px;
    }
    .job-highlight-section {
        margin-top: 24px;
        padding: 18px;
    }
	.related-grid { grid-template-columns: 1fr; }
    .landing-intro-card {
        padding: 18px;
        margin-bottom: 22px;
    }
    .landing-intro-card p {
        font-size: 15px;
        line-height: 1.8;
    }
    .archive-summary-row {
        gap: 8px;
        margin-top: 14px;
    }
    .archive-meta-info {
        width: 100%;
        margin-bottom: 0;
        padding: 9px 12px;
        font-size: 13px;
        border-radius: 8px;
    }
    .archive-quick-links {
        gap: 8px;
        margin-top: 14px;
    }
    .quick-link-chip {
        padding: 8px 11px;
        font-size: 13px;
        line-height: 1.45;
    }
    .intent-card h2, .intent-card h3 { font-size: 20px; }
    .listing-results-grid { grid-template-columns: 1fr; gap: 14px; }
    .listing-card {
        gap: 14px;
        padding: 15px;
    }
    .listing-card-thumb { width: 96px; min-width: 96px; height: 96px; }
    .listing-card-title { font-size: 18px; line-height: 1.5; }
    .listing-card-summary { font-size: 14px; line-height: 1.75; }
    .listing-card-status-row { gap: 8px; margin-bottom: 10px; }
    .listing-card-footer { gap: 8px 12px; }
    .section-title {
        font-size: 20px;
        line-height: 1.4;
        gap: 8px;
        margin-bottom: 18px;
    }

    /* Header */
    .logo-text { font-size: 20px; }
    
    /* Hero */
    .hero-container { flex-direction: column; }
    .hero-content { padding-right: 0; margin-bottom: 30px; }

    /* Cards & Grids */
    .job-grid, .urgent-jobs-grid, .categories-grid, .exam-tips-grid, .intent-strip { grid-template-columns: 1fr; gap: 20px; }
    .urgent-job-card {
        /* Change to vertical layout on small screens for better readability */
        flex-direction: column;
        border-left: none;
        border-top: 4px solid var(--secondary-color);
    }
    .urgent-job-image-container {
        width: 100%;
        padding: 15px;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 15px;
    }
    .urgent-job-content { padding: 0 15px 15px 15px; }

    /* Detail Page */
    .detail-badge-row { gap: 8px; }
    .detail-badge {
        padding: 6px 10px;
        font-size: 12px;
    }
    .job-detail-header .job-meta {
        gap: 8px;
        padding-bottom: 18px;
        margin-bottom: 20px;
    }
    .job-detail-header .meta-item {
        width: 100%;
        align-items: flex-start;
        border-radius: 8px;
        padding: 8px 10px;
        line-height: 1.5;
    }
    .detail-content-card { margin-top: 24px; padding-top: 20px; }
    .job-info-box {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 18px;
    }
    .job-image-square {
        width: 86px;
        height: 86px;
        margin: 0 auto;
    }
    .job-detail-content { padding: 18px; border-radius: 8px; }
    .job-main-content,
    .extra-content { font-size: 16px; line-height: 1.85; }
    .job-main-content iframe,
    .extra-content iframe { min-height: 320px; max-height: 70vh; }
    .job-main-content img,
    .extra-content img { margin: 18px auto; border-radius: 6px; }
    .social-share {
        margin-top: 30px;
        padding: 18px;
        border-radius: 8px;
    }
    .share-buttons { gap: 10px; }
    .share-btn {
        min-height: 44px;
        padding: 10px 14px;
    }
    .related-section { padding: 18px; border-radius: 8px; }
    .related-title {
        font-size: 20px;
        line-height: 1.4;
        gap: 8px;
        margin-bottom: 16px;
    }
    .related-section-intro { font-size: 13px; line-height: 1.65; }
    .urgent-job-content h3 { font-size: 16px; line-height: 1.55; }
    .urgent-job-content h3 a { -webkit-line-clamp: 3; }
    .job-meta-urgent { font-size: 13px; line-height: 1.6; }
    .pagination-meta {
        margin-top: 22px;
        text-align: center;
        font-size: 13px;
    }
    .pagination {
        gap: 7px;
    }
    .page-link,
    .page-dots {
        min-width: 38px;
        min-height: 38px;
        padding: 7px 10px;
    }

    /* Footer */
    .footer-widgets-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 15px; }
    .footer-bottom-links { flex-direction: column; gap: 10px; }
	.footer-widgets-grid.three-columns,
    .footer-widgets-grid {
        grid-template-columns: 1fr;
    }
    
    /* Stats & Newsletter */
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .newsletter-form { flex-direction: column; }
    .newsletter-form input, .newsletter-form button { width: 100%; border-radius: 30px; }
    .newsletter-form button { margin-top: 10px; padding: 15px; }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .category-archive-section { padding: 20px 0; }
    .archive-header {
        padding: 16px;
        margin-bottom: 16px;
    }
    .archive-header h1 { font-size: 21px; }
    .landing-intro-card { padding: 16px; }
    .job-highlight-section {
        padding: 14px;
        margin-top: 18px;
    }
    .section-title { font-size: 19px; margin-bottom: 14px; }
    .quick-link-chip { width: 100%; justify-content: center; }
    .listing-card {
        padding: 12px;
        gap: 12px;
        box-shadow: none;
    }
    .listing-card-thumb {
        width: 78px;
        min-width: 78px;
        height: 78px;
    }
    .listing-card-title { font-size: 16px; margin-bottom: 8px; }
    .listing-card-summary {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 10px;
    }
    .listing-chip-row { gap: 6px; margin-bottom: 10px; }
    .job-tag { line-height: 1.45; }
    .listing-card-footer {
        padding-top: 10px;
        gap: 8px;
    }
    .listing-footer-item { font-size: 12px; }
    .job-detail-section { padding: 22px 0; }
    .job-detail-content { padding: 16px; box-shadow: none; }
    .job-detail-header h1 { font-size: 22px; }
    .detail-section-title, .job-extra-info > h3 { font-size: 19px; }
    .detail-badge-row { margin-bottom: 14px; }
    .detail-badge { max-width: 100%; line-height: 1.45; }
    .job-main-content,
    .extra-content { font-size: 15.5px; line-height: 1.9; }
    .job-main-content iframe,
    .extra-content iframe { min-height: 260px; }
    .job-info-box { padding: 16px; }
    .social-share h3 { font-size: 15px; margin-bottom: 14px; }
    .stats-grid { grid-template-columns: 1fr; }
    .breadcrumb-list { font-size: 13px; }
    .share-buttons { flex-direction: column; }
    .share-btn { justify-content: center; width: 100%; }
    .related-section { padding: 16px; box-shadow: none; }
    .urgent-job-card {
        flex-direction: row;
        border-top: none;
        border-left: 4px solid var(--secondary-color);
        box-shadow: none;
    }
    .urgent-job-image-container { padding: 12px; }
    .urgent-job-content { padding: 12px 12px 12px 0; }
    .urgent-job-image-container {
        width: 82px;
        min-width: 82px;
        flex-direction: column;
        gap: 6px;
    }
    .urgent-job-image {
        width: 58px;
        height: 58px;
    }
    .urgent-job-content h3 { font-size: 15px; }
    .job-info-tags { gap: 5px; }
    .pagination {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .page-link,
    .page-dots {
        flex: 0 0 auto;
    }
}

/* (Include Mobile Nav and other utility styles here from the previous master file) */
.mobile-nav { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #303f9f; z-index: 1020; overflow-y: auto; }
.mobile-nav-inner { padding-top: 60px; }
.mobile-menu { list-style: none; margin: 0; padding: 0; }
.mobile-link, .mobile-dropdown-toggle { display: block; color: white; text-decoration: none; padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.mobile-dropdown-icon { float: right; margin-top: 3px; transition: transform 0.3s; }
.mobile-submenu { display: none; list-style: none; background-color: #1a237e; margin: 0; padding: 0; }
.mobile-submenu-link { display: block; padding: 12px 20px 12px 40px; color: white; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
.mobile-close-btn { position: fixed; top: 15px; right: 15px; color: white; font-size: 24px; cursor: pointer; z-index: 1021; }

/* ==================================================
   10. FLOATING ACTION BUTTONS (NEW)
   ================================================== */

/* --- ปุ่มลอย "ถามคุณกานดา" --- */
#kanda-fab-btn {
    position: fixed;
    /* ตำแหน่ง: อยู่เหนือปุ่ม Back to Top (80px = 20px base + 45px btn height + 15px margin) */
    bottom: 80px; 
    right: 20px;
    
    display: none; /* เริ่มต้นให้ซ่อนไว้ก่อน (จะใช้ JS ควบคุมการแสดงผลเหมือนปุ่ม Back to Top) */
    width: 55px;   /* ทำให้ใหญ่กว่าปุ่ม Back to Top เล็กน้อย */
    height: 55px;
    background-color: var(--primary-color); /* ใช้สีหลักของเว็บ */
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    
    /* จัดไอคอนให้อยู่กึ่งกลาง */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

#kanda-fab-btn:hover {
    background-color: var(--secondary-color); /* เปลี่ยนสีเมื่อ hover */
    transform: scale(1.1) rotate(-10deg); /* เพิ่ม animation ดึงดูดสายตา */
    text-decoration: none; /* ไม่ต้องขีดเส้นใต้ */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* --- ปรับตำแหน่งเมื่อ Cookie Banner แสดง --- */
/* ทำให้ปุ่มใหม่ลอยสูงขึ้นด้วยเมื่อมี Cookie Banner เหมือนกับที่ทำกับปุ่ม Back to Top */
body.cookie-banner-active #kanda-fab-btn {
    /* 180px = 120px (ตำแหน่ง back-to-top) + 45px (ความสูง) + 15px (ระยะห่าง) */
    bottom: 180px; 
}
