/* =============================================
   Nopparat Concrete - Custom Styles
   ============================================= */

/* Base font size bump */
/* กันจอเลื่อนซ้าย-ขวา: clip ไม่สร้าง scroll container (hidden ทำให้ position:sticky ทั้งเว็บใช้ไม่ได้) · hidden = สำรองเบราว์เซอร์เก่า */
html {
    font-size: 18px;
    overflow-x: hidden;
    overflow-x: clip;
}
body {
    overflow-x: hidden;
    overflow-x: clip;
}

/* Nav Links — white for dark header */
.nav-link {
    color: #ffffff;
    position: relative;
    transition: color 0.2s;
    padding-bottom: 2px;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #16a34a;
    transition: width 0.25s ease;
}
.nav-link:hover,
.nav-link.active {
    color: #4ade80;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 0.875rem;
    border-radius: 0.5rem;
    color: #d1d5db;
    transition: background 0.15s, color 0.15s;
    font-size: 1rem;
}
.mobile-nav-link:hover {
    background: rgba(22,163,74,0.2);
    color: #4ade80;
}

/* Footer Links */
.footer-link {
    transition: color 0.2s;
}
.footer-link:hover {
    color: #4ade80;
}

/* Hero Gradient Overlay */
.hero-overlay {
    background: rgba(255,255,255,0.30);
}

/* Section Title Underline */
.section-title::after {
    content: '';
    display: block;
    width: 3rem;
    height: 3px;
    background: #16a34a;
    margin-top: 0.75rem;
}
.section-title.center::after {
    margin-left: auto;
    margin-right: auto;
}

/* Product Card Hover */
.product-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}
.product-card img {
    transition: transform 0.4s ease;
}
.product-card:hover img {
    transform: scale(1.05);
}

/* News Card */
.news-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.1);
}

/* Stat Counter */
.stat-item {
    position: relative;
}
.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255,255,255,0.2);
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    background: #e8f5e9;
    color: #16a34a;
    border: 1px solid #c8e6c9;
}

/* Inquiry Form */
.form-label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #374151;
    font-family: 'IBM Plex Sans Thai', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}
.form-input:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}

/* Scrollbar */
::-webkit-scrollbar        { width: 6px; }
::-webkit-scrollbar-track  { background: #f1f5f9; }
::-webkit-scrollbar-thumb  { background: #16a34a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #15803d; }

/* Admin FAB button */
.admin-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
    opacity: 0.45;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: opacity 0.2s, background 0.2s, color 0.2s;
}
.admin-fab:hover {
    opacity: 1;
    background: #9ca3af;
    color: #ffffff;
}

/* Back to top visibility */
#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

/* Animate on scroll */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Admin specific */
.admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #d1d5db;
    transition: background 0.15s, color 0.15s;
}
.admin-sidebar-link:hover,
.admin-sidebar-link.active {
    background: rgba(22,163,74,0.4);
    color: #ffffff;
}

/* Table responsive */
.table-responsive { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}
.data-table th {
    padding: 0.875rem 1rem;
    background: #f9fafb;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}
.data-table tbody tr:hover td {
    background: #f9fafb;
}

/* Status badges */
.badge-active     { background:#dcfce7; color:#15803d; }
.badge-inactive   { background:#f3f4f6; color:#6b7280; }
.badge-new        { background:#dbeafe; color:#1d4ed8; }
.badge-contacted  { background:#fef3c7; color:#b45309; }
.badge-closed     { background:#f3f4f6; color:#6b7280; }
.badge-published  { background:#dcfce7; color:#15803d; }
.badge-draft      { background:#fef3c7; color:#b45309; }

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* =============================================
   World-Class Feature Styles
   ============================================= */

/* Star Rating */
.star-filled { color: #f59e0b; }
.star-empty  { color: #d1d5db; }

/* Project Card */
.project-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.14);
}
.project-card .overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 60%);
    transition: opacity 0.3s ease;
}

/* Testimonial Card */
.testimonial-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.1);
}

/* Calculator */
.calc-result {
    background: #f7fdf9;
    border-left: 3px solid #004d40;
    border-radius: 0 0.625rem 0.625rem 0;
    padding: 0.875rem 1rem;
}
.calc-tab {
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.7rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    color: #6b7280;
    background: #f3f4f6;
    white-space: nowrap;
    flex-shrink: 0;
    border: none;
}
.calc-tab.active {
    background: #004d40;
    color: #ffffff;
}
.calc-label {
    display: block;
    font-size: 0.69rem;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 0.3rem;
}
.calc-input {
    width: 100%;
    padding: 0.45rem 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    color: #374151;
    font-family: 'IBM Plex Sans Thai', sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #f9fafb;
}
.calc-input:focus {
    outline: none;
    border-color: #004d40;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0,77,64,0.1);
}

/* Process stepper */
.process-step { position: relative; }

.steps-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.steps-row .step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .steps-row {
        flex-direction: row;
        align-items: flex-start;
    }
    .steps-row .step-item {
        flex: 1;
        margin-bottom: 0;
    }
}

.process-connector { display: none; }
.process-connector-v { display: flex; align-items: center; justify-content: center; height: 32px; margin-bottom: 1rem; }
@media (min-width: 768px) {
    .process-connector {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 40px;
        padding-top: 1.75rem;
    }
    .process-connector-v { display: none; }
}

/* Certification badge */
.cert-badge {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cert-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.1);
}

/* FAQ accordion transition */
.faq-body {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
}
.faq-body.open {
    max-height: 600px;
    opacity: 1;
}

/* =============================================
   Product Detail — Gallery + Lightbox
   (custom CSS: ไม่พึ่ง Tailwind build ที่ purge แล้ว)
   ============================================= */

/* คลิป/ภาพหลัก ตัวใหญ่ */
.pd-media {
    border-radius: 1rem;
    overflow: hidden;
    background: #f9fafb;
    aspect-ratio: 16 / 9;
}
.pd-media.is-video { background: #000; }
.pd-media iframe,
.pd-media video,
.pd-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 0;
}

/* ภาพเล็กเรียงกัน 3 ช่อง */
.pd-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.pd-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f9fafb;
    border: 2px solid #f3f4f6;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.pd-thumb:hover {
    border-color: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pd-thumb .pd-zoom {
    position: absolute;
    right: 0.4rem;
    bottom: 0.4rem;
    width: 1.6rem;
    height: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.92);
    color: #16a34a;
    border-radius: 9999px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.pd-thumb:hover .pd-zoom { opacity: 1; }

/* Lightbox ป๊อบอัพ */
.pd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    padding: 1.5rem;
}
.pd-lightbox[hidden] { display: none; }
.pd-lightbox img#pd-lb-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    object-fit: contain;
    background: #fff;
}
.pd-lb-close,
.pd-lb-nav {
    position: absolute;
    background: rgba(255,255,255,0.14);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    line-height: 1;
    transition: background 0.2s ease;
}
.pd-lb-close:hover,
.pd-lb-nav:hover { background: rgba(255,255,255,0.3); }
.pd-lb-close {
    top: 1.25rem;
    right: 1.25rem;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.75rem;
}
.pd-lb-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    font-size: 2rem;
}
.pd-lb-prev { left: 1.25rem; }
.pd-lb-next { right: 1.25rem; }
.pd-lb-counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}
@media (max-width: 640px) {
    .pd-thumbs { gap: 0.5rem; }
    .pd-lb-nav { width: 2.25rem; height: 2.25rem; font-size: 1.6rem; }
    .pd-lb-close { width: 2.5rem; height: 2.5rem; }
}

/* =============================================
   Homepage Video Bands — แต่ละคลิป = section อิสระ
   (custom CSS: ไม่พึ่ง Tailwind build ที่ purge แล้ว → zigzag ไม่พังอีก)
   ============================================= */
.vband {
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
    background: #ffffff;
}
.vband--dark { background: #374151; }            /* charcoal */
.vband__dots {
    position: absolute; inset: 0; opacity: 0.04; pointer-events: none;
    background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
    background-size: 32px 32px;
}
.vband__inner { position: relative; max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
.vband__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}
@media (min-width: 1024px) {
    .vband { padding: 6rem 0; }
    .vband__grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
    .vband--right .vband__text  { order: 1; }
    .vband--right .vband__media { order: 2; }
    .vband--left  .vband__text  { order: 2; }
    .vband--left  .vband__media { order: 1; }
    .vband__title { font-size: 2.25rem; }
}

/* คอลัมน์ข้อความ */
.vband__badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.875rem; font-weight: 600;
    padding: 0.375rem 1rem; border-radius: 9999px; margin-bottom: 1.25rem;
    background: rgba(22,163,74,0.1); color: #16a34a;
}
.vband--dark .vband__badge { background: rgba(22,163,74,0.15); color: #22c55e; }
.vband__badge svg { width: 1rem; height: 1rem; }
.vband__title {
    font-size: 1.75rem; font-weight: 700; line-height: 1.3;
    margin-bottom: 1rem; color: #374151;
}
.vband--dark .vband__title { color: #ffffff; }
.vband__desc {
    font-size: 1rem; line-height: 1.7; margin-bottom: 1.75rem;
    max-width: 32rem; color: #6b7280;
}
.vband--dark .vband__desc { color: #9ca3af; }
.vband__hint {
    display: inline-flex; align-items: flex-start; gap: 0.5rem;
    font-size: 0.875rem; margin-bottom: 1.75rem; max-width: 32rem; color: #16a34a;
}
.vband--dark .vband__hint { color: #22c55e; }
.vband__hint svg { width: 1rem; height: 1rem; margin-top: 0.15rem; flex-shrink: 0; }
.vband__btn {
    display: inline-flex; align-items: center; gap: 0.625rem;
    font-weight: 600; padding: 0.75rem 1.5rem; border-radius: 0.75rem;
    cursor: pointer; border: none; text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    background: #16a34a; color: #ffffff;
}
.vband__btn:hover { background: #15803d; box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.vband--dark .vband__btn { background: #ffffff; color: #374151; }
.vband--dark .vband__btn:hover { background: #16a34a; color: #ffffff; }
.vband__btn svg { width: 1.25rem; height: 1.25rem; }

/* คอลัมน์วิดีโอ */
.vband__frame {
    position: relative; border-radius: 1rem; overflow: hidden; background: #000;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.45);
}
.vband__ratio { position: relative; aspect-ratio: 16 / 9; }
.vband__trigger {
    position: absolute; inset: 0; width: 100%; height: 100%;
    border: 0; padding: 0; cursor: pointer; background: #000; display: block;
}
.vband__poster { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.vband__trigger:hover .vband__poster { transform: scale(1.05); }
.vband__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 60%); }
.vband__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.vband__play > span {
    width: 4.5rem; height: 4.5rem; border-radius: 9999px;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center; transition: transform 0.3s, background 0.3s;
}
.vband__trigger:hover .vband__play > span,
.vband__btn:hover ~ * .vband__play > span { transform: scale(1.1); background: #16a34a; }
.vband__play svg { width: 1.9rem; height: 1.9rem; color: #fff; transform: translateX(2px); }
.vband__tag {
    position: absolute; top: 0.75rem; left: 0.75rem;
    display: inline-flex; align-items: center; gap: 0.375rem;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); color: #fff;
    font-size: 0.75rem; font-weight: 500; padding: 0.25rem 0.625rem; border-radius: 9999px;
}
.vband__tag svg { width: 0.875rem; height: 0.875rem; }
.vband__iframe, .vband__video {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000;
}

/* Placeholder (เห็นเฉพาะแอดมิน) — หน้าตาเหมือนจริง */
.vband__frame--empty {
    background: transparent; box-shadow: none;
    border: 2px dashed #d1d5db; border-radius: 1rem;
}
.vband--dark .vband__frame--empty { border-color: #4b5563; background: rgba(255,255,255,0.05); }
.vband__empty {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 0.75rem; text-align: center; padding: 1.5rem;
}
.vband__empty-icon {
    width: 4.5rem; height: 4.5rem; border-radius: 9999px;
    display: flex; align-items: center; justify-content: center; background: rgba(22,163,74,0.1);
}
.vband--dark .vband__empty-icon { background: rgba(255,255,255,0.1); }
.vband__empty-icon svg { width: 1.9rem; height: 1.9rem; color: #16a34a; transform: translateX(2px); }
.vband--dark .vband__empty-icon svg { color: #22c55e; }
.vband__empty-text { font-size: 0.875rem; color: #6b7280; }
.vband--dark .vband__empty-text { color: #9ca3af; }
.vband__adminbadge {
    position: absolute; top: 1.25rem; left: 1.25rem; z-index: 10;
    display: inline-flex; align-items: center; gap: 0.375rem;
    background: #fef3c7; color: #b45309;
    font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 9999px;
}
.vband__adminbadge svg { width: 0.875rem; height: 0.875rem; }

/* ═══════════ ใบสมัครงาน HR-003 (career-detail.php) ═══════════ */
.af-wrap { width: 80%; margin: 0 auto; }
@media (max-width: 63.99rem) { .af-wrap { width: auto; padding: 0 1rem; } }
.af-page { padding: 2.5rem 0 4rem; background: #f8fafc; }
.af-page [hidden] { display: none !important; }
.af-layout { display: grid; grid-template-columns: minmax(290px, 23%) minmax(0, 1fr); gap: 1.75rem; }
@media (max-width: 79.99rem) { .af-layout { grid-template-columns: minmax(0, 1fr); } }
.af-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 1rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); }

/* ข้อมูลตำแหน่ง */
.af-side { display: flex; flex-direction: column; gap: 1.25rem; }
.af-job { padding: 1.5rem; }
.af-badge { display: inline-block; background: #dcfce7; color: #15803d; font-size: .75rem; font-weight: 600; padding: .25rem .625rem; border-radius: 9999px; margin-bottom: .75rem; }
.af-job-title { font-size: 1.375rem; font-weight: 700; color: #1f2937; line-height: 1.35; margin-bottom: 1rem; }
.af-meta { display: flex; flex-direction: column; gap: .625rem; font-size: .9375rem; color: #4b5563; }
.af-meta li { display: flex; gap: .625rem; align-items: flex-start; }
.af-meta svg { width: 1.125rem; height: 1.125rem; color: #16a34a; flex-shrink: 0; margin-top: .15rem; }
.af-job-block { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid #e5e7eb; }
.af-job-block h3 { font-weight: 600; color: #1f2937; font-size: .9375rem; margin-bottom: .5rem; }
.af-job-block div { font-size: .875rem; color: #4b5563; line-height: 1.75; }
.af-nav { position: sticky; top: 6.5rem; padding: 1rem; display: flex; flex-direction: column; gap: .125rem; }
.af-nav-title { font-size: .75rem; font-weight: 600; color: #9ca3af; letter-spacing: .04em; padding: 0 .5rem .5rem; }
.af-nav a { display: flex; align-items: center; gap: .625rem; padding: .5rem; border-radius: .5rem; font-size: .9rem; color: #4b5563; transition: background .15s, color .15s; }
.af-nav a span { width: 1.5rem; height: 1.5rem; border-radius: 9999px; background: #f1f5f9; color: #64748b; font-size: .75rem; font-weight: 600; display: grid; place-items: center; flex-shrink: 0; }
.af-nav a:hover { background: #f0fdf4; color: #15803d; }
.af-nav a.on { background: #f0fdf4; color: #15803d; font-weight: 600; }
.af-nav a.on span { background: #16a34a; color: #fff; }
@media (max-width: 79.99rem) { .af-side { display: none; } }

/* หัวใบสมัคร + หัวข้อ */
.af-main { min-width: 0; }
.af-intro { padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-left: 4px solid #16a34a; }
.af-intro h2 { font-size: 1.5rem; font-weight: 700; color: #1f2937; }
.af-intro h2 small { font-size: .875rem; font-weight: 500; color: #9ca3af; letter-spacing: .06em; margin-left: .5rem; }
.af-intro p { font-size: .875rem; color: #6b7280; margin-top: .25rem; }
.af-code { font-size: .75rem; font-weight: 600; color: #6b7280; background: #f1f5f9; padding: .25rem .625rem; border-radius: .375rem; white-space: nowrap; }
.af-sec { padding: 1.5rem 1.75rem 1.75rem; margin-bottom: 1.25rem; scroll-margin-top: 6.5rem; display: flex; flex-direction: column; gap: 1.125rem; }
.af-sec-h { display: flex; align-items: center; gap: .875rem; padding-bottom: 1rem; border-bottom: 1px solid #f1f5f9; }
.af-num { width: 2.25rem; height: 2.25rem; border-radius: .625rem; background: #16a34a; color: #fff; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.af-sec-h h3 { font-size: 1.125rem; font-weight: 700; color: #1f2937; line-height: 1.3; }
.af-sec-h p { font-size: .8125rem; color: #9ca3af; }
.af-caption { font-size: .9375rem; font-weight: 600; color: #374151; margin-bottom: -.5rem; }
.af-caption small, .af-sub-title small { font-weight: 400; color: #9ca3af; font-size: .8125rem; margin-left: .375rem; }
.af-hint { font-size: .8125rem; color: #6b7280; margin-bottom: -.5rem; }

/* ช่องกรอก: grid คอลัมน์ตรงกันทุกแถว (เหมือนตารางในใบสมัครกระดาษ) — ช่องสั้น 1 ช่อง · ชื่อ/ตัวเลือก 2 ช่อง · ยาว เต็มแถว */
.af-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); grid-auto-flow: row dense; gap: 1rem 1.25rem; align-items: end; }
.af-f { display: flex; flex-direction: column; gap: .375rem; min-width: 0; }
.af-grow, .af-choice { grid-column: span 2; }
.af-choice.af-one { grid-column: span 1; }
.af-full, .af-choice.af-wide { grid-column: 1 / -1; }
.af-label { font-size: .9375rem; font-weight: 500; color: #374151; line-height: 1.4; }
.af-label small { font-weight: 400; color: #9ca3af; font-size: .8125rem; }
.af-req { color: #ef4444; font-weight: 600; }
.af-label-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.af-inline-check { display: inline-flex; align-items: center; gap: .375rem; font-size: .875rem; color: #4b5563; cursor: pointer; }
.af-inline-check input, .af-certify input { accent-color: #16a34a; width: 1.05rem; height: 1.05rem; }
.af-page .form-input { padding: .625rem .875rem; line-height: 1.5; }
/* ตัดความกว้าง intrinsic ของ input (size=20) ไม่ให้ดันช่อง grid · แล้วยืดเต็มช่อง */
.af-f > .form-input { width: 0; min-width: 100%; }
.af-page textarea.form-input { resize: vertical; min-height: 4.75rem; }
.af-readonly { background: #f8fafc !important; color: #15803d !important; font-weight: 600; }
.af-invalid { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.15) !important; }
.af-suffix { display: flex; align-items: stretch; }
.af-suffix .form-input { flex: 1 1 0; width: 0; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.af-suffix em { font-style: normal; font-size: .875rem; color: #6b7280; background: #f8fafc; border: 1px solid #d1d5db; border-left: 0; border-radius: 0 .5rem .5rem 0; padding: 0 .75rem; display: flex; align-items: center; white-space: nowrap; }

/* ตัวเลือกแบบเม็ดยา */
.af-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.af-pill { position: relative; cursor: pointer; }
.af-pill input { position: absolute; opacity: 0; pointer-events: none; }
.af-pill span { display: inline-flex; align-items: center; gap: .375rem; min-height: 2.75rem; padding: .5rem .9rem; border: 1px solid #d1d5db; border-radius: .5rem; font-size: .9rem; color: #4b5563; background: #fff; transition: all .15s; }
.af-pill:hover span { border-color: #16a34a; color: #15803d; }
.af-pill input:checked + span { border-color: #16a34a; background: #f0fdf4; color: #15803d; font-weight: 600; box-shadow: inset 0 0 0 1px #16a34a; }
.af-one .af-pills { gap: .375rem; flex-wrap: nowrap; }
.af-one .af-pill span { padding: .5rem .7rem; }
.af-pill input:focus-visible + span { outline: 2px solid #16a34a; outline-offset: 2px; }
.af-check span::before { content: ''; width: .95rem; height: .95rem; border: 1.5px solid #9ca3af; border-radius: .25rem; flex-shrink: 0; }
.af-check input:checked + span::before { border-color: #16a34a; background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center/100% no-repeat; }

/* กลุ่มย่อย (บิดา/มารดา/ขับรถ) */
.af-sub { background: #f8fafc; border: 1px solid #eef2f7; border-radius: .75rem; padding: 1rem 1.125rem; display: flex; flex-direction: column; gap: .875rem; }
.af-sub-title { font-weight: 600; color: #374151; font-size: .9375rem; }
.af-drive { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1rem; }
.af-drive .af-row { display: flex; flex-wrap: wrap; gap: .875rem 1.5rem; }
.af-qs { display: flex; flex-direction: column; border: 1px solid #eef2f7; border-radius: .75rem; overflow: hidden; }
.af-q { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .625rem 1rem; }
.af-q + .af-q { border-top: 1px solid #eef2f7; }
.af-q > span { font-size: .9375rem; color: #374151; }
.af-q > span small { display: block; font-size: .8125rem; color: #9ca3af; }
.af-q .af-pill span { min-height: 2.5rem; }

/* ส่วนตำแหน่ง + รูปถ่าย */
.af-pos { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem; gap: 1.5rem; align-items: start; }
.af-photo { width: 8.5rem; aspect-ratio: 3 / 4; border: 2px dashed #d1d5db; border-radius: .75rem; display: grid; place-items: center; cursor: pointer; overflow: hidden; background: #f8fafc; transition: border-color .15s; }
.af-photo:hover { border-color: #16a34a; }
.af-photo input { display: none; }
.af-photo img { width: 100%; height: 100%; object-fit: cover; }
.af-photo span { display: flex; flex-direction: column; align-items: center; gap: .25rem; font-size: .8125rem; color: #6b7280; text-align: center; padding: .5rem; }
.af-photo span svg { width: 2rem; height: 2rem; color: #9ca3af; }
.af-photo small { font-size: .6875rem; color: #9ca3af; }
@media (max-width: 39.99rem) { .af-pos { grid-template-columns: minmax(0, 1fr); } .af-photo { justify-self: center; order: -1; } }

/* ตารางกรอก — จอกว้าง = ตาราง % · จอแคบ = การ์ดต่อแถว (ไม่มีสกอลซ้าย-ขวา) */
.af-tbl { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; border: 1px solid #e5e7eb; border-radius: .75rem; overflow: hidden; }
.af-tbl thead th { background: #f8fafc; font-size: .8125rem; font-weight: 600; color: #374151; text-align: center; padding: .5rem .375rem; border-bottom: 1px solid #e5e7eb; line-height: 1.3; }
.af-tbl thead th small { display: block; font-weight: 400; color: #9ca3af; font-size: .75rem; }
.af-tbl tbody td { padding: .375rem .3rem; border-top: 1px solid #f1f5f9; }
.af-tbl tbody tr:first-child td, .af-tbl tbody tr:first-child th { border-top: 0; }
.af-tbl .af-rowhead { font-size: .8125rem; font-weight: 500; color: #6b7280; text-align: center; border-top: 1px solid #f1f5f9; padding: .375rem; }
.af-tbl-fixed .af-rowhead { text-align: left; padding-left: .75rem; color: #374151; }
.af-tbl .form-input { width: 100%; padding: .5rem .625rem; font-size: .9375rem; }
@media (max-width: 47.99rem) {
    .af-tbl, .af-tbl tbody, .af-tbl tr, .af-tbl td, .af-tbl th { display: block; width: auto; }
    .af-tbl { border: 0; border-radius: 0; overflow: visible; }
    .af-tbl colgroup, .af-tbl thead { display: none; }
    .af-tbl tbody tr { border: 1px solid #e5e7eb; border-radius: .75rem; padding: .625rem .75rem; margin-bottom: .75rem; background: #fff; }
    .af-tbl .af-rowhead { text-align: left; padding: 0 0 .375rem; border: 0; color: #16a34a; font-weight: 600; }
    .af-tbl:not(.af-tbl-fixed) .af-rowhead::before { content: 'รายการที่ '; }
    .af-tbl tbody td { display: flex; align-items: center; gap: .625rem; padding: .25rem 0; border: 0; }
    .af-tbl tbody td::before { content: attr(data-label); flex: 0 0 6.5rem; font-size: .8125rem; color: #6b7280; }
    .af-tbl tbody td .form-input { flex: 1 1 0; min-width: 0; }
}

/* ไฟล์แนบ — กล่องเส้นประ + ปุ่มถ่ายรูป (เฉพาะจอสัมผัส) / เลือกไฟล์ · สถานะ AI อ่านเอกสารใต้ชื่อไฟล์ */
.af-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1rem 1.25rem; align-content: start; }
.af-row > .af-doc { grid-column: span 2; }
.af-file { display: flex; align-items: center; gap: .75rem; border: 2px dashed #d1d5db; border-radius: .75rem; padding: .625rem .75rem .625rem 1rem; transition: border-color .15s, background .15s; min-height: 3.75rem; }
.af-file-on { border-color: #16a34a; background: #f0fdf4; }
.af-file svg { width: 1.5rem; height: 1.5rem; color: #9ca3af; flex-shrink: 0; }
.af-file-on svg { color: #16a34a; }
.af-file-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .125rem; }
.af-file-text { font-size: .9rem; color: #9ca3af; overflow-wrap: anywhere; }
.af-file-on .af-file-text { color: #15803d; font-weight: 500; }
.af-file-btns { display: flex; gap: .375rem; flex-shrink: 0; }
.af-fbtn { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 .8rem; border: 1px solid #d1d5db; border-radius: .5rem; background: #fff; font-size: .875rem; font-weight: 500; color: #374151; cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s; }
.af-fbtn:hover { border-color: #16a34a; color: #15803d; }
.af-cam { display: none; border-color: #16a34a; background: #16a34a; color: #fff; }
.af-cam:hover { color: #fff; background: #15803d; }
/* ทุกเครื่องที่ไม่ใช่คอมพิวเตอร์ (เมาส์ชี้ได้ + โฮเวอร์ได้) = มีปุ่มถ่ายรูป + กรอบรูปหน้าตรงบอก "แตะเพื่อถ่ายรูป"
   ไม่ใช้ pointer: coarse อย่างเดียว — มือถือบางรุ่น/emulator รายงานเป็น pointer: fine แต่ hover: none */
.af-photo-mb { display: none; }
.af-photo-t { font-style: normal; }
@media not all and (hover: hover) and (pointer: fine) { .af-cam { display: inline-flex; } .af-photo-pc { display: none; } .af-photo-mb { display: block; } }
/* จอแคบ: ชื่อไฟล์บรรทัดบนเต็มกว้าง ปุ่มลงบรรทัดล่าง (ไม่บีบข้อความเป็น 2 บรรทัด) */
@media (max-width: 39.99rem) { .af-file { flex-wrap: wrap; } .af-file-main { flex-basis: calc(100% - 2.25rem); } .af-file-btns { width: 100%; } .af-fbtn { flex: 1 1 0; justify-content: center; } }
.af-file-input { display: none; }
.af-ai-st { font-size: .8125rem; line-height: 1.4; }
.af-ai-st.run { color: #2563eb; }
.af-ai-st.run::before { content: ''; display: inline-block; width: .7rem; height: .7rem; margin-right: .375rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -.05rem; animation: af-spin .8s linear infinite; }
.af-ai-st.ok { color: #15803d; }
.af-ai-st.warn { color: #b45309; }
@keyframes af-spin { to { transform: rotate(360deg); } }
.af-ai-note { font-size: .875rem; color: #4b5563; background: #f8fafc; border: 1px solid #eef2f7; border-radius: .75rem; padding: .75rem 1rem; line-height: 1.7; }
.af-ai-note b { color: #1f2937; }
.af-ai-chip, .af-page .form-input.af-ai { background: #dcfce7; }
.af-ai-chip { color: #15803d; font-weight: 600; padding: .05rem .5rem; border-radius: .375rem; margin: 0 .25rem; }
.af-page .form-input.af-ai { border-color: #86efac; }
.af-pill.af-ai input:checked + span { background: #dcfce7; }
[data-req].af-invalid, .af-tbl.af-invalid { border-radius: .75rem; box-shadow: 0 0 0 3px rgba(239,68,68,.2); }
.af-tbl.af-invalid { border-color: #ef4444; }

/* คำรับรอง + ปุ่มส่ง */
.af-certify { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem 1.125rem; border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: .75rem; cursor: pointer; font-size: .9rem; color: #374151; line-height: 1.7; }
.af-certify input { margin-top: .3rem; flex-shrink: 0; }
.af-certify small { display: block; color: #6b7280; font-size: .8125rem; margin-top: .25rem; }
.af-submit { width: 100%; background: #16a34a; color: #fff; font-weight: 700; font-size: 1.0625rem; padding: .95rem; border-radius: .75rem; box-shadow: 0 4px 12px rgba(22,163,74,.25); transition: background .15s, box-shadow .15s; }
.af-submit:hover { background: #15803d; box-shadow: 0 6px 16px rgba(22,163,74,.3); }

/* กรอกทีละขั้น: แถบขั้นตอน + ปุ่มย้อนกลับ/ถัดไป (JS เปิดทีละหัวข้อ · ก่อน JS พร้อมโชว์แค่หัวข้อแรก) */
#af-form.af-wiz:not(.af-ready) .af-sec ~ .af-sec { display: none; }
.af-steps { padding: 1rem 1.5rem; margin-bottom: 1.25rem; scroll-margin-top: 6.5rem; display: flex; flex-direction: column; gap: .75rem; }
.af-steps-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; }
.af-steps-t { font-size: .9375rem; color: #4b5563; }
.af-steps-t b, .af-steps-t span { color: #15803d; font-weight: 700; }
.af-save { font-size: .8125rem; color: #9ca3af; }
.af-save.ok { color: #16a34a; }
.af-bar { display: flex; gap: .375rem; }
.af-bar button { flex: 1; padding: .375rem 0; cursor: pointer; }
.af-bar button::before { content: ''; display: block; height: .4rem; border-radius: 9999px; background: #e5e7eb; transition: background .2s; }
.af-bar button.done::before { background: #86efac; }
.af-bar button.on::before { background: #16a34a; }
.af-bar button.lock { cursor: default; }
.af-resume { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; padding: .625rem .875rem; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: .625rem; font-size: .875rem; color: #166534; }
.af-resume small { color: #6b7280; }
.af-resume button { font-size: .8125rem; font-weight: 600; color: #b91c1c; padding: .25rem .5rem; border-radius: .375rem; }
.af-resume button:hover { background: #fee2e2; }
.af-nav a.done span { background: #dcfce7; color: #15803d; }
.af-nav a.lock { color: #c0c6cf; cursor: default; }
.af-nav a.lock:hover { background: none; color: #c0c6cf; }
.af-step-msg { flex: 1 0 100%; padding: .75rem 1rem; border-radius: .625rem; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: .9rem; }
.af-stepnav { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .625rem .75rem; padding: .75rem 0; background: linear-gradient(to top, #f8fafc 75%, rgba(248,250,252,0)); }
.af-prev, .af-next { min-height: 3rem; padding: 0 1.5rem; border-radius: .75rem; font-weight: 700; font-size: 1rem; transition: background .15s; }
.af-prev { background: #fff; border: 1px solid #d1d5db; color: #374151; }
.af-prev:hover { background: #f3f4f6; }
.af-next { margin-left: auto; min-width: 12rem; background: #16a34a; color: #fff; box-shadow: 0 4px 12px rgba(22,163,74,.25); }
.af-next:hover { background: #15803d; }
@media (max-width: 39.99rem) {
    .af-steps { padding: .875rem 1rem; }
    .af-prev { padding: 0 1rem; }
    .af-next { flex: 1; min-width: 0; }
}

@media (max-width: 39.99rem) {
    .af-sec { padding: 1.125rem 1rem 1.25rem; }
    .af-intro { flex-direction: column; align-items: flex-start; }
    .af-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .af-grow, .af-choice, .af-choice.af-one { grid-column: 1 / -1; }
}

/* ======================== HERO: สไลด์ซ้าย + ตำแหน่งงานขวา (includes/_hero_jobs.php) ======================== */
.hero-split { position: relative; width: 100%; background: #1f2937; overflow: hidden; display: flex; flex-direction: column; }
.hero-slides { position: relative; height: 90vh; overflow: hidden; }
.hero-split.has-jobs .hero-slides { height: 56vh; }
@media (min-width: 64rem) {
    .hero-split.has-jobs { flex-direction: row; height: 90vh; }
    .hero-split.has-jobs .hero-slides { flex: 1 1 auto; height: auto; }
    .hero-split.has-jobs .hj { flex: 0 0 clamp(360px, 28vw, 560px); }
}

/* แผงขวา = รูปประกาศ 3 ใบ เลื่อนขึ้นวนต่อเนื่อง · รูปทุกสัดส่วนไม่ถูกครอป (ภาพหลัก contain บนพื้นเป็นรูปเดียวกันเบลอ) */
.hj { position: relative; overflow: hidden; padding: 7px 14px; background: linear-gradient(165deg, #111827 0%, #0f1f17 55%, #0b2a19 100%); box-shadow: -18px 0 40px rgba(0,0,0,.3); }
.hj-track { height: 100%; transition: transform .8s cubic-bezier(.65,0,.35,1); will-change: transform; }
.hj-track.no-anim { transition: none; }
.hj-item { height: calc(100% / var(--hj-rows, 3)); padding: 7px 0; }   /* รูปน้อยกว่า 3 ใบ = แบ่งเต็มแผง */

.hj-card { position: relative; display: block; height: 100%; overflow: hidden; border-radius: 16px; background: #0b2a19;
           box-shadow: 0 10px 28px rgba(0,0,0,.4); transition: transform .3s, box-shadow .3s; }
.hj-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); pointer-events: none; }
.hj-card:hover { transform: translateX(-4px); box-shadow: 0 16px 36px rgba(0,0,0,.5); }
.hj-card:focus-visible { outline: 3px solid #4ade80; outline-offset: -3px; }
.hj-bg { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(18px) brightness(.7) saturate(1.2); }
.hj-img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .4s; }
.hj-card:hover .hj-img { transform: scale(1.03); }

@media (max-width: 63.99rem) {
    .hj { height: min(calc((100vw - 28px) * 9 / 16 * var(--hj-rows, 3) + 14px * var(--hj-rows, 3) + 14px), 900px); box-shadow: none; }   /* ใบละ 16:9 เต็มความกว้าง */
}
@media (prefers-reduced-motion: reduce) {
    .hj-track { transition-duration: .01s; }
}

/* ป๊อบอัพภาพประกาศใหญ่ (includes/_hero_jobs.php) */
.hjm { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px 72px;
       background: rgba(3, 18, 10, .86); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
       animation: hjmIn .25s ease-out; }   /* เฟดด้วย CSS (ไม่ใช้ x-transition — ค้างได้ถ้าเปิดตอนแท็บไม่แสดง) */
@keyframes hjmIn { from { opacity: 0; } to { opacity: 1; } }
.hjm-box { position: relative; width: min(1200px, 100%, calc((100vh - 170px) * 16 / 9)); border-radius: 18px; overflow: visible; background: #0b2a19;
           box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.hjm-img { border-radius: 18px 18px 0 0; overflow: hidden; background: #000; }
.hjm-img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.hjm-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-radius: 0 0 18px 18px;
           background: linear-gradient(90deg, #0b2a19, #14532d); color: #fff; }
.hjm-title { font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.hjm-br { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: .95rem; font-weight: 600; color: #86efac; }
.hjm-br svg { width: 18px; height: 18px; flex-shrink: 0; }
.hjm-act { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hjm-more { padding: 10px 18px; border-radius: 12px; font-weight: 600; color: #fff; border: 1px solid rgba(255,255,255,.3); transition: background .2s; }
.hjm-more:hover { background: rgba(255,255,255,.1); }
.hjm-apply { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 12px; font-weight: 700; font-size: 1.05rem; color: #052e16;
             background: #22c55e; box-shadow: 0 8px 20px rgba(34,197,94,.35); transition: background .2s, gap .2s; }
.hjm-apply svg { width: 18px; height: 18px; }
.hjm-apply:hover { background: #4ade80; gap: 12px; }
.hjm-x { position: absolute; top: -16px; right: -16px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; font-size: 28px; line-height: 1;
         color: #0b2a19; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.hjm-x:hover { background: #dcfce7; }
.hjm-nav { position: absolute; top: calc(50% - 60px); width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
           color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); transition: background .2s; }
.hjm-nav svg { width: 22px; height: 22px; }
.hjm-nav:hover { background: #16a34a; border-color: #16a34a; }
.hjm-prev { left: -62px; }
.hjm-next { right: -62px; }
.hjm-count { position: absolute; top: -34px; left: 2px; font-size: .85rem; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
@media (max-width: 47.99rem) {
    .hjm { padding: 56px 10px 16px; }
    .hjm-box { width: 100%; }
    .hjm-bar { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
    .hjm-act { justify-content: stretch; }
    .hjm-more, .hjm-apply { flex: 1 1 0; justify-content: center; text-align: center; }
    .hjm-x { top: -50px; right: 0; }
    .hjm-nav { top: auto; bottom: calc(100% + 6px); width: 40px; height: 40px; }
    .hjm-prev { left: auto; right: 104px; }
    .hjm-next { right: 56px; }
    .hjm-count { top: -38px; }
}

/* ===== หน้าร่วมงานกับเรา (careers.php) — เลย์เอาต์แบบเว็บหางาน ===== */
.jb-hero { position: relative; color: #fff; text-align: center; padding: 52px 16px 40px;
           background: radial-gradient(circle at 88% 10%, rgba(34,197,94,.35), transparent 42%),
                       radial-gradient(circle at 5% 100%, rgba(22,163,74,.35), transparent 45%),
                       linear-gradient(135deg, #1f2937 0%, #14532d 55%, #15803d 100%); }
.jb-hero-in { max-width: 60rem; margin: 0 auto; }
.jb-hero-h { font-size: 2.1rem; font-weight: 700; margin-bottom: 6px; }
.jb-hero-p { color: #d1fae5; font-size: 1rem; }

.jb-search { display: flex; align-items: stretch; gap: 0; margin: 26px auto 0; padding: 8px; text-align: left;
             background: #fff; border-radius: 18px; box-shadow: 0 24px 48px -20px rgba(0,0,0,.55); }
.jb-field { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 18px; min-width: 0; border-radius: 12px; cursor: text; }
.jb-field + .jb-field { border-left: 1px solid #e5e7eb; }
.jb-field:focus-within { background: #f0fdf4; }
.jb-field--q { flex: 1 1 58%; }
.jb-field--loc { flex: 1 1 42%; cursor: pointer; }
.jb-flabel { font-size: .72rem; font-weight: 700; letter-spacing: .02em; color: #15803d; }
.jb-fin { display: flex; align-items: center; gap: 8px; height: 30px; }
.jb-fin > svg { width: 18px; height: 18px; color: #9ca3af; flex: none; }
.jb-fin input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
            font: inherit; font-size: .95rem; color: #111827; }
.jb-fin input::placeholder { color: #9ca3af; }
.jb-fin input::-webkit-search-cancel-button { display: none; }
.jb-qx { width: 26px; height: 26px; border-radius: 50%; font-size: 18px; line-height: 1; color: #6b7280; background: #e5e7eb; flex: none; }
.jb-qx[hidden] { display: none; }
.jb-qx:hover { background: #d1d5db; color: #111827; }
.jb-go-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 0 28px; border-radius: 12px;
             font-weight: 700; font-size: 1rem; color: #fff; background: #16a34a; transition: background .15s; }
.jb-go-btn svg { width: 20px; height: 20px; }
.jb-go-btn:hover { background: #15803d; }

.jb-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 18px; font-size: .88rem; color: #d1fae5; }
.jb-stats b { font-size: 1.1rem; color: #fff; margin-right: 2px; }

.jb-body { max-width: 80rem; margin: 0 auto; padding: 22px 16px 72px; }

.jb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
          padding-bottom: 14px; border-bottom: 1px solid #e5e7eb; }
.jb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.jb-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 15px; border-radius: 999px;
           font-size: .86rem; font-weight: 600; color: #374151; background: #fff; border: 1px solid #e5e7eb; transition: all .15s; }
.jb-chip span { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center;
                font-size: .72rem; color: #6b7280; background: #f3f4f6; }
.jb-chip:hover { border-color: #16a34a; color: #15803d; }
.jb-chip.is-on { color: #fff; background: #16a34a; border-color: #16a34a; }
.jb-chip.is-on span { color: #15803d; background: #fff; }
.jb-tools { display: flex; gap: 8px; }

.jb-count { margin: 14px 0 12px; font-size: .9rem; color: #6b7280; }
.jb-count b { color: #111827; }

/* แบ่งซ้าย (รายการ) / ขวา (รายละเอียด) */
.jb-split { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.jb-detail { display: none; }
@media (min-width: 64rem) {
    .jb-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
    .jb-detail { display: flex; flex-direction: column; position: sticky; top: calc(6rem + 16px);
                 height: calc(100vh - 6rem - 32px); background: #fff; border: 1px solid #e5e7eb; border-radius: 18px;
                 box-shadow: 0 10px 30px -18px rgba(16,24,40,.25); overflow: hidden; }
    .jb-detail[hidden] { display: none; }
}
.jb-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.jb-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: 16px;
           background: #fff; border: 1px solid #e5e7eb; transition: border-color .15s, box-shadow .15s; }
.jb-card[hidden] { display: none; }
.jb-card:hover { border-color: #86efac; box-shadow: 0 10px 24px -16px rgba(22,101,52,.4); }
.jb-card.is-sel { border-color: #16a34a; box-shadow: 0 0 0 1px #16a34a, 0 10px 24px -16px rgba(22,101,52,.45); background: #fbfefc; }
.jb-card.is-sel::before { content: ""; position: absolute; left: -1px; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: #16a34a; }
.jb-c-head { display: flex; gap: 12px; align-items: flex-start; }
.jb-logo { width: 46px; height: 46px; flex: none; border-radius: 10px; object-fit: contain; padding: 5px; background: #1f2937; }
.jb-logo--lg { width: 60px; height: 60px; border-radius: 14px; padding: 7px; }
.jb-c-tt { min-width: 0; }
.jb-title { font-size: 1.05rem; font-weight: 700; line-height: 1.4; color: #111827; }
.jb-card:hover .jb-title, .jb-card.is-sel .jb-title { color: #15803d; }
.jb-co { font-size: .82rem; color: #6b7280; margin-top: 1px; }
.jb-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .84rem; color: #4b5563; }
.jb-meta li { display: flex; align-items: center; gap: 5px; }
.jb-meta svg, .jb-vac svg { width: 15px; height: 15px; flex: none; color: #9ca3af; }
.jb-meta .jb-sal { font-weight: 700; color: #15803d; }
.jb-meta .jb-sal svg { color: #16a34a; }
.jb-snip { font-size: .82rem; line-height: 1.6; color: #6b7280; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jb-c-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap;
             padding-top: 10px; border-top: 1px dashed #e5e7eb; font-size: .78rem; color: #6b7280; }
.jb-vac { display: flex; align-items: center; gap: 5px; }
.jb-close em { font-style: normal; font-weight: 600; margin-left: 4px; padding: 1px 8px; border-radius: 999px; color: #15803d; background: #dcfce7; }
.jb-close em.is-soon { color: #b45309; background: #fef3c7; }

/* ช่องรายละเอียดงาน */
.jd-top { flex: none; padding: 22px 26px 18px; border-bottom: 1px solid #eef0f2; }
.jd-head { display: flex; gap: 14px; align-items: center; }
.jd-title { font-size: 1.35rem; font-weight: 700; line-height: 1.35; color: #111827; }
.jd-act { display: flex; gap: 10px; margin-top: 16px; }
.jd-apply { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 30px; border-radius: 12px;
            font-weight: 700; color: #fff; background: #16a34a; box-shadow: 0 8px 18px -8px rgba(22,163,74,.7); transition: background .15s; }
.jd-apply:hover { background: #15803d; }
.jd-share { display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 16px; border-radius: 12px;
            font-size: .88rem; font-weight: 600; color: #374151; background: #fff; border: 1px solid #d1d5db; }
.jd-share svg { width: 18px; height: 18px; }
.jd-share:hover { border-color: #16a34a; color: #15803d; }
.jd-share.is-ok { color: #15803d; border-color: #16a34a; background: #f0fdf4; }
.jd-scroll { flex: 1; overflow-y: auto; padding: 20px 26px 26px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d1d5db transparent; }
.jd-scroll::-webkit-scrollbar { width: 6px; }
.jd-scroll::-webkit-scrollbar-track { background: transparent; }
.jd-scroll::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 6px; }
.jd-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.jd-facts li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #f8faf9; font-size: .9rem; color: #1f2937; }
.jd-facts svg { width: 20px; height: 20px; flex: none; color: #16a34a; margin-top: 2px; }
.jd-facts small { display: block; font-size: .72rem; color: #6b7280; }
.jd-sal { color: #15803d; }
.jd-poster { display: block; width: 100%; max-height: 520px; object-fit: contain; margin-top: 18px; border-radius: 12px; background: #f3f4f6; }
.jd-sec { margin-top: 22px; }
.jd-sec h3 { font-size: 1rem; font-weight: 700; color: #111827; margin-bottom: 8px; padding-left: 10px; border-left: 3px solid #16a34a; }
.jd-sec > div { font-size: .92rem; line-height: 1.8; color: #374151; }
.jd-about-in { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1px solid #eef0f2; }
.jd-about-in p { font-size: .86rem; color: #6b7280; margin: 2px 0 4px; }
.jd-about-in a { font-size: .86rem; font-weight: 600; color: #15803d; }
.jd-apply--block { display: flex; width: 100%; margin-top: 22px; }

.jb-empty { text-align: center; padding: 56px 16px; border-radius: 16px; background: #fff; border: 1px dashed #d1d5db; }
.jb-empty[hidden] { display: none; }
.jb-empty svg { width: 52px; height: 52px; margin: 0 auto 12px; color: #d1d5db; }
.jb-empty-h { font-size: 1.05rem; font-weight: 600; color: #4b5563; }
.jb-empty-p { font-size: .88rem; color: #9ca3af; margin-top: 4px; }
.jb-reset { margin-top: 18px; height: 44px; padding: 0 22px; border-radius: 12px; font-weight: 600; color: #fff; background: #16a34a; }
.jb-reset:hover { background: #15803d; }

/* รายการเลือกแบบออกแบบเอง (สถานที่/ประเภท/เรียง) */
.dd-native { display: none !important; }
.dd-host { position: relative; }
.dd-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 100%; padding: 0; text-align: left;
          font: inherit; font-size: .95rem; color: #111827; background: transparent; border: 0; outline: 0; cursor: pointer; }
.dd-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-car { width: 16px; height: 16px; flex: none; color: #6b7280; transition: transform .2s; }
.is-open > .dd-btn .dd-car, .is-open .jb-fin .dd-car { transform: rotate(180deg); color: #16a34a; }
.dd-menu { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; right: 0; min-width: 240px; max-height: 400px; overflow-y: auto;
           padding: 6px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; text-align: left; cursor: default;
           box-shadow: 0 22px 44px -14px rgba(16,24,40,.32); animation: ddIn .14s ease-out; scrollbar-width: thin; }
.dd-menu[hidden] { display: none; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dd-menu li { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 12px; border-radius: 10px;
              font-size: .9rem; color: #374151; cursor: pointer; }
.dd-menu li.is-act { background: #f0fdf4; color: #15803d; }
.dd-menu li.is-on { font-weight: 600; color: #15803d; }
.dd-t { flex: 1; min-width: 0; }
.dd-n { min-width: 26px; height: 22px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center;
        font-size: .72rem; font-weight: 600; color: #6b7280; background: #f3f4f6; }
.dd-menu li.is-on .dd-n { color: #15803d; background: #dcfce7; }
.dd-ck { width: 16px; height: 16px; flex: none; color: #16a34a; visibility: hidden; }
.dd-menu li.is-on .dd-ck { visibility: visible; }
.jb-field--loc .dd-menu { top: calc(100% + 12px); }
.jb-dd .dd-btn { height: 38px; padding: 0 12px; min-width: 170px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff;
                 font-size: .86rem; color: #374151; }
.jb-dd .dd-btn:hover, .jb-dd.is-open .dd-btn { border-color: #16a34a; }
.jb-dd--end .dd-menu { left: auto; right: 0; min-width: 220px; }

@media (max-width: 47.99rem) {
    .jb-hero { padding: 34px 16px 28px; }
    .jb-hero-h { font-size: 1.6rem; }
    .jb-search { flex-direction: column; padding: 6px; }
    .jb-field { padding: 8px 12px; }
    .jb-field + .jb-field { border-left: 0; border-top: 1px solid #e5e7eb; border-radius: 0 0 12px 12px; }
    .jb-go-btn { justify-content: center; height: 48px; margin-top: 6px; }
    .jb-bar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
    .jb-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
    .jb-chips::-webkit-scrollbar { display: none; }
    .jb-chip { flex: none; }
    .jb-tools .jb-dd { flex: 1 1 0; min-width: 0; }
    .jb-dd .dd-btn { width: 100%; min-width: 0; height: 44px; }
    .jb-dd--end .dd-menu { left: 0; right: 0; }
    .jb-card { padding: 16px; }
}

/* หน้ารายละเอียดตำแหน่ง (career-detail.php ไม่มี &apply) — ดูอย่างเดียว · ปุ่มสมัครไปหน้าใบสมัคร · คลาส cd-* (jd-* เป็นของหน้า careers.php) */
.cd-wrap { width: auto; max-width: 56rem; margin: 0 auto; padding: 0 1rem; }
.cd-card { padding: 1.5rem 1.75rem 1.75rem; }
.cd-poster { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .875rem; margin-bottom: 1.25rem; background: #0b2a19; }
.cd-close { margin-top: 1rem; font-size: .9rem; color: #6b7280; }
.cd-close b { color: #15803d; }
.cd-cta { display: flex; align-items: center; gap: .75rem; margin-top: 1.25rem; }
.cd-apply { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-align: center; }
.cd-back { flex: 0 0 auto; padding: .9rem 1.25rem; border-radius: .75rem; border: 1px solid #d1d5db; color: #374151; font-weight: 600; transition: border-color .15s, color .15s; }
.cd-back:hover { border-color: #16a34a; color: #15803d; }
@media (max-width: 39.99rem) {
    .cd-card { padding: 1rem; }
    .cd-cta { flex-direction: column; align-items: stretch; }
    .cd-back { text-align: center; }
}
