/* ========== Reset & Base ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #1a6dd4;
    --primary-light: #e8f0fc;
    --primary-dark: #0d4a94;
    --text: #2c2c2c;
    --text-light: #666;
    --white: #ffffff;
    --bg-light: #A8D3FD;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
    --transition: .3s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    color: var(--text);
    line-height: 1.8;
    background: var(--white);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1002;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: background var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    padding: 8px 0;
    position: relative;
    transition: color var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== Banner ========== */
.banner {
    width: 100%;
    padding-top: 64px;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== Section Common ========== */
.section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 32px;
    text-align: center;
}

.title-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

/* ========== Intro ========== */
.intro {
    background: var(--bg-light);
    padding-top: 80px;
}

.intro-card {
    background: var(--white);
    border-radius: 28px;
    padding: 40px 48px;
    margin: 0 auto;
}

.intro-card .intro-text {
    font-size: 14px;
    color: var(--text-light);
    text-indent: 2em;
    margin-bottom: 20px;
    text-align: justify;
    line-height: 1.8;
}

.intro-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.intro-subtitle {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
}

.intro-text {
    font-size: 14px;
    color: var(--text-light);
    text-indent: 2em;
    margin-bottom: 20px;
    text-align: justify;
}

.video-wrapper {
    margin-top: 32px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #000;
    position: relative;
}

.video-wrapper .video-poster {
    position: absolute;
    inset: 0;
    background: url('../images/banner.webp') center/cover no-repeat;
    z-index: 2;
    transition: opacity .3s ease;
    pointer-events: none;
}

.video-wrapper .video-poster .video-poster-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.video-wrapper .video-poster.hidden {
    opacity: 0;
}

.video-wrapper video {
    width: 100%;
    display: block;
    max-height: 480px;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), border-color var(--transition);
}

.video-play-btn svg {
    width: 32px;
    height: 32px;
    color: #fff;
    margin-left: 4px;
}

.video-play-btn:hover {
    background: rgba(0, 0, 0, 0.65);
    border-color: rgba(255, 255, 255, 0.9);
}

.video-play-btn.hidden {
    display: none;
}

/* ========== Carousel ========== */

/* ========== Carousel ========== */
.carousel-section {
    background: var(--white);
}

.carousel-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.carousel-track {
    display: flex;
    transition: transform .5s ease;
    width: 100%;
}

.carousel-slide {
    width: 100%;
    flex-shrink: 0;
}

.carousel-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.carousel-btn:hover {
    background: var(--primary);
}

.carousel-btn:hover svg {
    color: var(--white);
}

.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0 16px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.4));
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--white);
    transform: scale(1.3);
}

/* ========== Companies Section ========== */
.companies-section {
    background: var(--bg-light);
}

.area-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.area-tab {
    padding: 8px 24px;
    font-size: 14px;
    color: var(--text);
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.area-tab:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.area-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.company-card {
    background: var(--white);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.company-card-arrow {
    width: 16px;
    height: 16px;
    color: #ccc;
    flex-shrink: 0;
    margin-left: auto;
    transition: color var(--transition);
}

.company-card:hover .company-card-arrow {
    color: var(--primary);
}

.company-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.company-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-card-icon svg {
    width: 18px;
    height: 18px;
}

.company-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.companies-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text-light);
    font-size: 14px;
    grid-column: 1 / -1;
}

.companies-pagination {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 0 4px;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: var(--text-light);
    padding: 0 4px;
    user-select: none;
}

@media (max-width: 768px) {
    .area-tabs {
        gap: 8px;
        margin-bottom: 24px;
    }

    .area-tab {
        padding: 6px 16px;
        font-size: 14px;
    }

    .companies-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .company-card {
        min-width: 0;
        padding: 14px;
    }

    .company-card-name {
        font-size: 14px;
    }
}

/* ========== Footer ========== */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,.85);
    text-align: center;
    padding: 24px 0;
    font-size: 14px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        top: 0; left: 0;
        width: 260px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 80px 0 0;
        box-shadow: 4px 0 20px rgba(0,0,0,.15);
        transform: translateX(-100%);
        transition: transform var(--transition);
    }

    .nav-menu.open { transform: translateX(0); }

    .nav-link {
        display: block;
        padding: 16px 24px;
        border-bottom: 1px solid #eee;
        font-size: 15px;
        color: var(--text);
    }

    .banner { padding-top: 64px; }

    .banner img {
        height: 200px;
        width: 100%;
        object-fit: cover;
        object-position: center;
    }

    .section { padding: 30px 0 50px; }

    .section-title {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .intro-subtitle { font-size: 18px; }
    .intro-text { font-size: 14px; }

    .intro-card {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .video-wrapper { margin-top: 24px; border-radius: 8px; }
    .video-wrapper video { max-height: 240px; }

    .carousel-slide img { height: 280px; }

    .carousel-btn { width: 36px; height: 36px; }
    .carousel-btn svg { width: 16px; height: 16px; }
    .carousel-btn.prev { left: 8px; }
    .carousel-btn.next { right: 8px; }
}

/* ========== Scroll overlay for mobile menu ========== */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ========== Positions Page ========== */
.positions-section {
    padding: 30px 0 60px;
    background: var(--white);
    min-height: calc(100vh - 64px);
}

.positions-section .section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 32px;
    text-align: center;
}

.positions-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 24px;
}

/* Sidebar */
.sidebar {
    width: 275px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    height: fit-content;
    position: sticky;
    top: 84px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    background: var(--primary-light);
    border-bottom: 1px solid #e0e8f0;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.company-list {
}

.area-list {
}

.area-item {
    padding: 12px 20px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
}

.area-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.area-item.active {
    background: var(--primary);
    color: var(--white);
    font-weight: 500;
}

.company-item {
    padding: 12px 20px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
}

.company-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.company-item.active {
    background: var(--primary);
    color: var(--white);
    font-weight: 500;
}

/* Content Area */
.content-area {
    flex: 1;
    min-width: 0;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

#searchInput {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 14px;
    outline: none;
    background: transparent;
}

#searchInput::placeholder {
    color: #aaa;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.search-btn svg {
    width: 18px;
    height: 18px;
}

/* Filter Bar */
.filter-bar {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.filter-row:last-child {
    border-bottom: none;
}

.filter-row-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 2px;
}

.filter-tags-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
}

.filter-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.filter-tag {
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
    padding: 2px 12px;
    white-space: nowrap;
    transition: color var(--transition);
    user-select: none;
}

.filter-tag:hover {
    color: var(--primary);
}

.filter-tag.active {
    color: var(--primary);
    font-weight: 600;
}

.filter-more-wrap {
    position: relative;
    flex-shrink: 0;
    margin-left: 4px;
}

.filter-more-btn {
    font-size: 13px;
    color: var(--primary);
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 4px;
    transition: opacity var(--transition);
}

.filter-more-btn::after {
    content: '\25BE';
    font-size: 10px;
}

.filter-more-btn:hover {
    opacity: 0.7;
}

.filter-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    padding: 8px 0;
    min-width: 160px;
    max-width: 300px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
}

.filter-dropdown.show {
    display: block;
}

.filter-dropdown .filter-tag {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text);
}

.filter-dropdown .filter-tag:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.filter-dropdown .filter-tag.active {
    color: var(--primary);
    font-weight: 600;
}

.filter-dropdown-footer {
    padding: 8px 16px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.filter-dropdown-close {
    font-size: 13px;
    color: var(--primary);
    cursor: pointer;
    padding: 4px 12px;
    border: none;
    background: none;
    transition: opacity var(--transition);
}

.filter-dropdown-close:hover {
    opacity: 0.7;
}

/* Job List */
.job-list-header {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.job-list-header strong {
    color: var(--primary);
}

.job-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.job-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
}

.job-header {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.job-header-left {
    flex: 1;
    min-width: 0;
}

.job-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-light);
}

.job-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-meta svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
    flex-shrink: 0;
}

.dian {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0;
    vertical-align: middle;
}

.job-expand-icon {
    width: 24px;
    height: 24px;
    color: #aaa;
    transition: transform var(--transition);
    flex-shrink: 0;
}

.job-card.expanded .job-expand-icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.job-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 24px;
    border-top: 1px solid transparent;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease, border-color 0.4s ease;
}

.job-card.expanded .job-details {
    max-height: 2000px;
    opacity: 1;
    padding: 0 24px 24px;
    border-top-color: #f0f0f0;
}

.job-detail-grid {
    display: block;
    padding-top: 20px;
}

.job-detail-item {
    display: flex;
    gap: 4px;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
    align-items: flex-start;
}

.job-detail-label {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
}

.job-detail-label::after {
    content: '\FF1A';
    margin-left: 2px;
}

.job-detail-value {
    color: var(--text-light);
    line-height: 1.8;
    flex: 1;
}

.job-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition);
    margin-top: 20px;
}

.job-apply-btn:hover {
    background: var(--primary-dark);
}

.job-apply-btn svg {
    width: 16px;
    height: 16px;
}

/* Mobile filter overlay */
.mobile-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 2000;
    display: none;
}

.mobile-filter-overlay.show {
    display: block;
}

.mobile-filter {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    background: var(--white);
    border-radius: 16px 16px 0 0;
    overflow-y: auto;
    z-index: 2001;
    transform: translateY(100%);
    transition: transform .3s ease;
}

.mobile-filter-overlay.show .mobile-filter {
    transform: translateY(0);
}

.mobile-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    font-weight: 600;
}

.mobile-filter-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-filter-close svg {
    width: 20px;
    height: 20px;
    color: var(--text-light);
}

.mobile-filter-body {
    padding: 16px 20px;
}

.mobile-filter-section {
    margin-bottom: 20px;
}

.mobile-filter-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.mobile-filter-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #eee;
}

.btn-reset {
    flex: 1;
    padding: 12px;
    background: #f0f2f5;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text);
}

.btn-confirm {
    flex: 1;
    padding: 12px;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    color: var(--white);
}

/* Mobile job detail overlay */
.mobile-job-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
}

.mobile-job-overlay.show {
    display: block;
}

.mobile-job-detail {
    position: fixed;
    inset: 0;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform .3s ease;
}

.mobile-job-overlay.show .mobile-job-detail {
    transform: translateY(0);
}

.mobile-job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    font-size: 14px;
    font-weight: 600;
}

.mobile-job-back {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-job-back svg {
    width: 20px;
    height: 20px;
    color: var(--text);
}

.mobile-job-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.mobile-job-footer {
    padding: 12px 16px;
    background: var(--white);
    box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}

.btn-apply {
    display: block;
    text-align: center;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.mobile-job-section {
    background: var(--white);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.mobile-job-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-job-section p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}

/* Mobile responsive for positions page */
@media (max-width: 768px) {
    .nav-logo img {
        height: 30px;
    }
    .positions-section {
        padding: 20px 0 40px;
    }

    .positions-container {
        flex-direction: column;
        padding: 0 12px;
        gap: 16px;
    }

    .sidebar {
        display: none;
    }

    .search-wrapper {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-bottom: 20px;
    }

    .search-wrapper .search-box {
        flex: 1;
        border-radius: 10px;
        margin-bottom: 0;
    }

    .mobile-filter-btn {
        width: 48px;
        height: 48px;
        border: none;
        background: var(--white);
        border-radius: 10px;
        box-shadow: var(--shadow);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: background var(--transition);
    }

    .mobile-filter-btn:hover {
        background: var(--primary-light);
    }

    .mobile-filter-btn svg {
        width: 22px;
        height: 22px;
        color: var(--primary);
    }

    .search-btn {
        flex-shrink: 0;
        padding: 14px 10px;
        font-size: 0;
        gap: 2px;
    }

    .search-btn svg {
        width: 18px;
        height: 18px;
        display: inline-block;
    }

    .search-btn::after {
        content: '搜索';
        font-size: 14px;
    }

    .filter-bar {
        display: none;
    }

    .job-header {
        padding: 20px 16px 16px;
    }

    .job-name {
        font-size: 15px;
    }

    .job-meta {
        gap: 8px;
    }
    .job-meta span:first-child {
        display: none;
    }

    .job-detail-grid {
        gap: 0;
    }

    .job-details {
        padding: 0;
    }

    .job-list-header {
        font-size: 14px;
    }

    .filter-tag {
        padding: 5px 12px;
        font-size: 12px;
    }

    .mobile-filter-section .filter-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Mobile company accordion */
    .mobile-company-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .mobile-company-tags .filter-tag {
        padding: 5px 12px;
        font-size: 13px;
    }

    .mobile-more-btn {
        font-size: 13px;
        color: var(--primary);
        cursor: pointer;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        padding: 5px 4px;
    }

    .mobile-company-hidden {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 4px;
    }

    .mobile-company-hidden .filter-tag {
        padding: 5px 12px;
        font-size: 13px;
    }
}

/* ========== Auth Buttons ========== */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.nav-btn-login {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.nav-btn-login:hover {
    background: var(--primary-light);
}

.nav-btn-register {
    background: var(--primary);
    color: var(--white);
}

.nav-btn-register:hover {
    background: var(--primary-dark);
}

.nav-user-info {
    display: none;
    align-items: center;
    gap: 12px;
}

.nav-username {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
    padding: 4px 12px;
    background: var(--primary-light);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-username::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.nav-btn-logout {
    background: transparent;
    color: var(--text-light);
    border: 1px solid #e0e0e0;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
}

.nav-btn-logout:hover {
    color: #e74c3c;
    border-color: #e74c3c;
    background: #fef2f2;
}

/* ========== Modal ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-dialog {
    background: var(--white);
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.3s ease;
}

.modal-dialog-large {
    max-width: 560px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--text);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.required {
    color: #e74c3c;
    margin-right: 2px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.file-name {
    font-size: 13px;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.file-hint {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.error-msg {
    min-height: 20px;
    font-size: 13px;
    color: #e74c3c;
    margin-bottom: 12px;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-light);
}

.modal-switch a {
    color: var(--primary);
    font-weight: 500;
}

/* ========== Mobile Auth ========== */
@media (max-width: 768px) {
    .nav-auth {
        flex-direction: column;
        gap: 10px;
        padding: 16px 24px;
        border-top: 1px solid #eee;
        margin-top: 8px;
    }

    .nav-btn {
        width: 100%;
        padding: 10px;
        font-size: 14px;
        text-align: center;
    }

    .nav-user-info {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .nav-username {
        text-align: center;
        font-size: 14px;
        justify-content: center;
    }

    .nav-btn-logout {
        width: 100%;
        padding: 10px;
        text-align: center;
    }

    .modal-dialog {
        max-width: 100%;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 12px 12px 0 0;
        margin-top: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        animation: modalSlideUp 0.3s ease;
    }

    .modal-dialog-large {
        max-width: 100%;
    }

    .modal-body {
        padding-bottom: 80px;
    }

    @keyframes modalSlideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .file-name {
        max-width: 140px;
    }
}



/* ========== Flatpickr ========== */
.flatpickr-calendar {
    z-index: 9999 !important;
}


/* ========== Apply Button Loading ========== */
.job-apply-btn.loading,
.btn-apply.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}


/* ========== Applied Button ========== */
.job-apply-btn.applied,
.btn-apply.applied {
    background: var(--text-light) !important;
    color: var(--white) !important;
    cursor: default !important;
    opacity: 0.8;
    pointer-events: none;
}

.job-apply-btn.ended,
.btn-apply.ended {
    background: #d0d0d0 !important;
    color: var(--white) !important;
    cursor: default !important;
    opacity: 0.7;
    pointer-events: none;
}

.job-apply-btn.offline-apply {
    background: var(--primary-dark);
    color: var(--white);
    cursor: pointer;
}

.job-apply-btn.offline-apply:hover {
    background: #0a3d7a;
}

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 24px 0;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    background: var(--white);
    color: var(--text);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.page-ellipsis {
    color: #999;
    padding: 0 4px;
}

@media (max-width: 768px) {
    .pagination {
        gap: 4px;
        padding: 16px 0;
    }
    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        padding: 0 8px;
    }
}
