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

:root {
    --primary:        #1d4ed8;
    --primary-dark:   #1e3a8a;
    --primary-light:  #3b82f6;
    --accent:         #f59e0b;
    --success:        #10b981;
    --surface:        #ffffff;
    --bg:             #f1f5f9;
    --text:           #0f172a;
    --text-muted:     #64748b;
    --border:         #e2e8f0;
    --radius:         12px;
    --shadow-sm:      0 2px 8px rgba(0,0,0,0.07);
    --shadow-md:      0 4px 20px rgba(0,0,0,0.10);
    --shadow-lg:      0 8px 40px rgba(0,0,0,0.14);
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    font-family: 'Sarabun', sans-serif;
    color: var(--text);
    margin: 0;
}

/* ========================================
   Navbar
   ======================================== */
.navbar-brand { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.3px; }

/* ========================================
   HERO SECTION — ปรับปรุงใหม่
   ======================================== */
.search-box {
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 45%, #2563eb 70%, #0ea5e9 100%);
    padding: 56px 0 48px;
    margin-bottom: 32px;
    overflow: hidden;
}

/* พื้นหลัง Decorative */
.search-box::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.search-box::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -60px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(14,165,233,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Grid dots subtle */
.search-box .hero-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.search-box h1 {
    color: #fff;
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: -0.5px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.2);
    margin-bottom: 8px;
}
.search-box h1 i { opacity: 0.9; }

.search-box .hero-sub {
    color: rgba(255,255,255,0.82);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    margin-bottom: 32px;
    font-weight: 400;
}

/* Search Card */
.hero-search-card {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 20px;
    padding: 24px 28px 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.hero-search-card .form-control,
.hero-search-card .form-select {
    border-radius: 10px;
    border: 1.5px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.95);
    font-family: 'Sarabun', sans-serif;
    font-size: 14px;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-search-card .form-control:focus,
.hero-search-card .form-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96,165,250,0.25);
    background: #fff;
}

.hero-search-card .form-control-lg { font-size: 15px; }

/* ปุ่มค้นหา */
.btn-search-hero {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 20px;
    width: 100%;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(249,115,22,0.4);
    font-family: 'Sarabun', sans-serif;
}
.btn-search-hero:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(249,115,22,0.5);
    color: #fff;
}
.btn-search-hero:active { transform: translateY(0); }

/* Divider ระหว่าง row */
.hero-divider {
    height: 1px;
    background: rgba(255,255,255,0.12);
    margin: 14px 0;
}

/* ปุ่ม Reset */
.btn-hero-reset {
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.9);
    border-radius: 10px;
    font-family: 'Sarabun', sans-serif;
    font-size: 14px;
    transition: background 0.2s;
}
.btn-hero-reset:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

/* Trending Tags */
.hero-trending {
    margin-top: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.hero-trending-label {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    font-weight: 500;
}
.hero-tag {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.92);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.hero-tag:hover {
    background: rgba(255,255,255,0.28);
    color: #fff;
    transform: translateY(-1px);
}

/* Stats Bar */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}
.hero-stat {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 14px 20px;
    text-align: center;
    min-width: 110px;
    backdrop-filter: blur(8px);
    transition: background 0.2s, transform 0.2s;
}
.hero-stat:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}
.hero-stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    display: block;
}
.hero-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    margin-top: 4px;
    display: block;
}

/* ========================================
   Job Card
   ======================================== */
.job-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    border: 1.5px solid var(--border);
}
.job-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #bfdbfe;
}
.job-card h5 a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}
.job-card h5 a:hover { text-decoration: underline; color: var(--primary-dark); }

/* Badge job type */
.badge-fulltime   { background-color: #2563eb; }
.badge-parttime   { background-color: #7c3aed; }
.badge-freelance  { background-color: #ea580c; }
.badge-internship { background-color: #059669; }

/* Salary */
.salary-text { color: #16a34a; font-weight: 700; }

/* ========================================
   Form Card
   ======================================== */
.form-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* ========================================
   Job Matching Sidebar
   ======================================== */
.matching-sidebar {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.matching-sidebar__header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.matching-sidebar__title { font-size: 15px; font-weight: 700; color: var(--text); margin: 0; }
.matching-sidebar__empty { text-align: center; padding: 16px 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.matching-sidebar__empty a { color: var(--primary-light); text-decoration: none; font-weight: 600; }

.match-card {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 10px 0; border-bottom: 1px solid #f8fafc;
    text-decoration: none; transition: background 0.15s;
}
.match-card:last-child { border-bottom: none; }
.match-card:hover { background: #f8fafc; border-radius: 8px; padding: 10px 8px; }

.match-card__score-wrap { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.match-card__ring { width: 48px; height: 48px; transform: rotate(-90deg); }
.match-card__score-num { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 11px; font-weight: 700; }

.match-card__info { flex: 1; min-width: 0; }
.match-card__job-title { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-card__company { font-size: 12px; color: var(--text-muted); margin: 0 0 2px; }
.match-card__location { font-size: 12px; color: #94a3b8; margin: 0 0 6px; }
.match-card__badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }

.matching-sidebar__view-all {
    display: block; text-align: center; margin-top: 12px; padding-top: 12px;
    border-top: 1px solid var(--border); color: var(--primary-light);
    text-decoration: none; font-size: 13px; font-weight: 600;
}
.matching-sidebar__view-all:hover { text-decoration: underline; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .search-box { padding: 36px 0 32px; }
    .hero-search-card { padding: 18px 16px 14px; border-radius: 16px; }
    .hero-stat { min-width: 80px; padding: 10px 14px; }
    .hero-stat-num { font-size: 1.3rem; }
}