@import url('https://fonts.googleapis.com/css2?family=Kanit&display=swap');

body {
    font-family: 'Kanit', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f9fff8 100%); /* ขาวอมเขียว */
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #2e7d32; /* เขียวเข้ม */
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2e7d32, #c0a040); /* เขียว-ทอง */
    border-radius: 2px;
}

/* Search and Filter Section */
.search-filter-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(46, 125, 50, 0.1);
    border: 1px solid rgba(192, 160, 64, 0.15);
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.search-btn {
    background: linear-gradient(135deg, #2e7d32, #c0a040);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #1b5e20, #a58c2f);
    transform: translateY(-2px);
}

.filter-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-family: 'Kanit', sans-serif;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #c0a040; /* ทอง */
}

/* Job Stats */
.job-stats {
    text-align: center;
    margin-bottom: 2rem;
    color: #64748b;
    font-size: 1.1rem;
}

.job-list {
    list-style: none;
    display: grid;
    gap: 2rem;
    padding: 0;
    margin: 0;
}

.job-item {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(46, 125, 50, 0.1);
    border: 1px solid rgba(192, 160, 64, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.job-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2e7d32, #c0a040);
}

.job-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(46, 125, 50, 0.15);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.job-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2e7d32; /* เขียวเข้ม */
    line-height: 1.3;
    flex: 1;
}

.bookmark-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.bookmark-btn:hover {
    background: rgba(192, 160, 64, 0.1);
}

.bookmark-btn.saved {
    color: #c0a040; /* ทอง */
}

.job-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.job-location,
.job-type {
    background: linear-gradient(135deg, #2e7d32, #c0a040);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.job-location::before {
    content: '📍';
}

.job-type::before {
    content: '💼';
}

.job-description {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.job-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.apply-btn {
    background: linear-gradient(135deg, #2e7d32, #c0a040);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

.apply-btn::after {
    content: '→';
    transition: transform 0.3s ease;
}

.apply-btn:hover {
    background: linear-gradient(135deg, #1b5e20, #a58c2f);
    transform: translateX(5px);
    box-shadow: 0 10px 25px rgba(46, 125, 50, 0.25);
}

.apply-btn:hover::after {
    transform: translateX(5px);
}

.share-btn {
    background: linear-gradient(135deg, #c0a040, #e6d267);
    color: #2e7d32;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.share-btn:hover {
    background: linear-gradient(135deg, #a58c2f, #c0a040);
    transform: translateY(-2px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    color: #64748b;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #c0a040;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2e7d32;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: linear-gradient(135deg, #2e7d32, #c0a040);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1.1rem;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #1b5e20, #a58c2f);
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

/* ✅ ส่วน Media Queries คงเดิม */

/* --- มือถือ: จอเล็กกว่า 768px --- */
@media (max-width: 767px) {

    h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-input {
        min-width: auto;
    }

    .filter-options {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-select {
        width: 100%;
    }

    .job-item {
        padding: 1.5rem;
    }

    .job-header {
        flex-direction: column;
        gap: 1rem;
    }

    .job-title {
        font-size: 1.3rem;
    }

    .job-actions {
        flex-direction: column;
    }

    .apply-btn, .share-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

/* --- iPad / Tablet: จอ 768px ถึง 1024px --- */
@media (min-width: 768px) and (max-width: 1024px) {

    .container {
        max-width: 720px;
    }

    h2 {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }

    .search-bar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .filter-options {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .filter-select {
        min-width: 200px;
    }

    .job-item {
        padding: 1.8rem;
    }

    .job-title {
        font-size: 1.4rem;
    }

    .job-actions {
        flex-wrap: wrap;
    }
}

/* --- จอใหญ่ (Desktop 1025px ขึ้นไป) --- */
@media (min-width: 1025px) {

    .container {
        max-width: 1000px;
    }

    h2 {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }

    .job-item {
        padding: 2rem;
    }

    .job-title {
        font-size: 1.5rem;
    }

    .search-bar, .filter-options {
        flex-wrap: nowrap;
    }
}
/* ==================== DARK MODE ==================== */
body.dark-mode {
  background: linear-gradient(135deg, #121212 0%, #1a1a1a 100%);
  color: #e0e0e0;
}

/* Container */
body.dark-mode .container {
  background: transparent;
}

/* Heading */
body.dark-mode h2 {
  color: #c0a040;
}

body.dark-mode h2::after {
  background: linear-gradient(90deg, #2e7d32, #c0a040);
}

/* Search & Filter Section */
body.dark-mode .search-filter-section {
  background: #1e1e1e;
  border: 1px solid rgba(192, 160, 64, 0.25);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

body.dark-mode .search-input {
  background: #121212;
  color: #eee;
  border: 2px solid #333;
}

body.dark-mode .search-input:focus {
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46,125,50,0.3);
}

body.dark-mode .search-btn {
  background: linear-gradient(135deg, #2e7d32, #c0a040);
  color: #fff;
}

body.dark-mode .search-btn:hover {
  background: linear-gradient(135deg, #1b5e20, #a58c2f);
}

/* Filter Select */
body.dark-mode .filter-select {
  background: #121212;
  color: #ddd;
  border: 2px solid #333;
}

body.dark-mode .filter-select:focus {
  border-color: #c0a040;
}

/* Job Stats */
body.dark-mode .job-stats {
  color: #aaa;
}

/* Job Item */
body.dark-mode .job-item {
  background: #1a1a1a;
  border: 1px solid rgba(192, 160, 64, 0.2);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

body.dark-mode .job-item::before {
  background: linear-gradient(90deg, #2e7d32, #c0a040);
}

body.dark-mode .job-item:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.7);
}

/* Job Title */
body.dark-mode .job-title {
  color: #c0a040;
}

/* Bookmark */
body.dark-mode .bookmark-btn {
  color: #aaa;
}

body.dark-mode .bookmark-btn:hover {
  background: rgba(192, 160, 64, 0.15);
}

body.dark-mode .bookmark-btn.saved {
  color: #c0a040;
}

/* Job Info (location / type) */
body.dark-mode .job-location,
body.dark-mode .job-type {
  background: linear-gradient(135deg, #2e7d32, #c0a040);
  color: #fff;
}

/* Description */
body.dark-mode .job-description {
  color: #bbb;
}

/* Apply Button */
body.dark-mode .apply-btn {
  background: linear-gradient(135deg, #2e7d32, #c0a040);
  color: #fff;
}

body.dark-mode .apply-btn:hover {
  background: linear-gradient(135deg, #1b5e20, #a58c2f);
}

/* Share Button */
body.dark-mode .share-btn {
  background: linear-gradient(135deg, #c0a040, #e6d267);
  color: #121212;
}

body.dark-mode .share-btn:hover {
  background: linear-gradient(135deg, #a58c2f, #c0a040);
  color: #fff;
}

/* Modal */
body.dark-mode .modal-content {
  background: #1a1a1a;
  color: #ddd;
  border: 1px solid rgba(192, 160, 64, 0.25);
}

body.dark-mode .close {
  color: #aaa;
}

body.dark-mode .close:hover {
  color: #c0a040;
}

/* Form */
body.dark-mode .form-label {
  color: #c0a040;
}

body.dark-mode .form-input,
body.dark-mode .form-textarea {
  background: #121212;
  color: #eee;
  border: 2px solid #333;
}

body.dark-mode .form-input:focus,
body.dark-mode .form-textarea:focus {
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46,125,50,0.3);
}

/* Submit */
body.dark-mode .submit-btn {
  background: linear-gradient(135deg, #2e7d32, #c0a040);
  color: #fff;
}

body.dark-mode .submit-btn:hover {
  background: linear-gradient(135deg, #1b5e20, #a58c2f);
}
