/**
 * Plearnjob Main Stylesheet
 * ไฟล์นี้เป็นศูนย์กลางของ Style สำหรับหน้าเว็บหลักทั้งหมด
 *
 * Sections:
 * 1. Global & Root Variables       - การตั้งค่าตัวแปรกลาง (สี, ฟอนต์)
 * 2. Body & Typography             - การตั้งค่าพื้นฐานของ body และตัวอักษร
 * 3. Layout & Main Components      - การจัดวางโครงสร้างหลัก (Header, Footer)
 * 4. Component Styles              - สไตล์ของส่วนประกอบย่อย (Cards, Buttons, Forms)
 * 5. Utility & Helper Classes      - คลาสเสริมช่วยในการจัดสไตล์
 *
 * @version 1.2
 * @last-updated 2025-09-03
 */

/* =================================================================
   1. Global & Root Variables
================================================================= */
:root {
    --primary-color: #0d6efd;      /* Bootstrap Primary Blue */
    --secondary-color: #6c757d;    /* Bootstrap Secondary Gray */
    --success-color: #198754;      /* Bootstrap Success Green */
    --danger-color: #dc3545;       /* Bootstrap Danger Red */
    --warning-color: #ffc107;      /* Bootstrap Warning Yellow */
    --info-color: #0dcaf0;         /* Bootstrap Info Cyan */
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --text-dark: #212529;
    --border-color: #dee2e6;
    --font-family-main: 'Sarabun', sans-serif;
}

/* =================================================================
   2. Body & Typography
================================================================= */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-main);
    background-color: var(--light-gray);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

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

a:hover {
    text-decoration: underline;
    color: #0b5ed7;
}

/* =================================================================
   3. Layout & Main Components
================================================================= */

/* --- Header / Navbar --- */
.navbar.fixed-top {
    border-bottom: 1px solid var(--border-color);
}

/* --- Main Content Wrapper --- */
/* ส่วนนี้สำคัญมาก! ป้องกันไม่ให้เนื้อหาถูก Navbar (fixed-top) บัง */
.main-content {
    flex: 1; /* ทำให้เนื้อหายืดเต็มพื้นที่ที่เหลือ */
    padding-top: 80px; /* เว้นระยะห่างจาก Navbar ด้านบน */
    padding-bottom: 4rem; /* เว้นระยะห่างสำหรับ Footer */
}

/* --- Footer --- */
.footer {
    height: 60px;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
}


/* =================================================================
   4. Component Styles
================================================================= */

/* --- Buttons --- */
.btn {
    transition: all 0.2s ease-in-out;
    border-radius: 0.375rem;
}

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

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* --- Job Cards --- */
.job-card {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    border-color: var(--primary-color);
}

.job-card .card-title {
    color: var(--text-dark);
    font-weight: 600;
}

.job-card .card-subtitle {
    color: var(--secondary-color);
}

/* --- Favorite Button --- */
.favorite-btn i.bi-heart-fill {
    color: var(--danger-color); /* สีแดงสำหรับปุ่มที่ถูกกด */
}
.favorite-btn.text-danger i.bi-heart-fill {
    color: var(--danger-color);
}
.favorite-btn:not(.text-danger) i.bi-heart-fill {
    color: inherit;
}


/* --- Forms --- */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* --- Applicant Card (Employer Dashboard) --- */
.applicant-card {
    border-left: 4px solid var(--primary-color);
}

/* --- Pricing Card (Buy Credits Page) --- */
.pricing-card .card-header {
    background-color: var(--light-gray);
}
.pricing-card {
    transition: all 0.3s ease;
}
.pricing-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* =================================================================
   5. Utility & Helper Classes
================================================================= */
.fw-bold {
    font-weight: 700 !important;
}
.fw-semibold {
    font-weight: 600 !important;
}