/* Reset or remove old styles for .job-position, .job-list etc. if they exist */

/* --- Join Us Page Layout Styles --- */

/* General Section Styles */
.join-us-hero,
.category-section,
.what-we-offer-section,
.office-environment-section {
    background-color: #252525; /* Default background color */
    padding: 2em 10%;
    position: relative; /* Ensure pseudo-element positioning works */
}

.category-section::after,
.what-we-offer-section::after,
.office-environment-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%; /* Start 10% from the left */
    width: 80%; /* Line width is 80% */
    height: 1px;
    background-color: gray; /* Line color */
}

/* Hero Section */
.join-us-hero {
    position: relative;
    height: 600px; /* Adjust height as needed */
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff; /* Default text color on hero */
}

.join-us-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

h1.hero-title {
    color: white;
    font-size: 4em; /* Adjust size */
    font-weight: bold;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* Optional shadow */
}

/* Category Section */
.category-section {
    text-align: center;
}

.category-cards-container {      
    max-width: 900px; /* Unified width */
    margin: 0 auto; /* Center align */
    padding: 0 15px;
}

.offer-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; /* Space between cards */
    max-width: 900px; /* Unified width */
    margin: 0 auto; /* Center align */
    padding: 0 15px;
}

.category-card-link {
    text-decoration: none !important; /* Remove underline */
}

.category-card{
    position: relative;
    background-color: #0056ff; /* Default background */
    font-size: 3em;
    font-weight: bold;
    border-radius: 70px;  
    padding: 15px 10px;
    text-align: center;
    color: #fff; /* White text */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Hide overflow */
    text-decoration: none; /* Remove underline */
}

.offer-card {
    position: relative;
    background-color: #0056ff; /* Default background */
    border-radius: 8px;
    padding: 40px 10px 30px 10px;
    text-align: center;
    color: #fff; /* White text */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Hide overflow */
}

.category-card[style*="background-image"],
.offer-card[style*="background-image"] {
    color: #ffffff; /* White text on background image */
}

.category-card[style*="background-image"]::before,
.offer-card[style*="background-image"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    border-radius: 8px;
}

.category-card[style*="background-image"] > *,
.offer-card[style*="background-image"] > * {
    position: relative;
    z-index: 2;
}

.card-title,
.offer-card-title {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0;
    margin-bottom: 10px;
}

.card-icon,
.offer-card-icon {
    max-width: 50px;
    max-height: 50px;
    margin-bottom: 15px;
}

/* Office Environment Section */
.office-photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Default 3 columns */
    gap: 15px;
}

.gallery-item {
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0; /* Optional background */
    min-height: 200px;
    overflow: hidden;
}

.gallery-item img {
    display: block;
    height: 200px;
    width: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
}

@media (max-width: 992px) {
    .gallery-item img {
        height: 160px;
    }
    .gallery-item {
        min-height: 160px;
    }
}

@media (max-width: 768px) {
    .office-photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-item img {
        height: 180px;
    }
    .gallery-item {
        min-height: 180px;
    }
}

@media (max-width: 480px) {
    .office-photo-gallery {
        grid-template-columns: 1fr;
    }
    .gallery-item img {
        height: 220px;
    }
    .gallery-item {
        min-height: 220px;
    }
}

/* --- 修复标题居中问题 --- */
.offer-section-title,
.office-section-title {
    text-align: center; /* 确保标题居中 */
    margin: 0 auto; /* 居中对齐 */
}

/* --- 修复 category-section 中卡片在桌面端一行显示 --- */
@media (min-width: 992px) {
    .category-cards-container {
        grid-template-columns: repeat(3, 1fr); /* 在桌面端显示三列 */
    }
}

/* --- Multilingual Handling (Keep this section) --- */

/* Default: Hide English when Chinese is active (assuming body has .show-zh) */
body.show-zh [data-lang="en"] {
    display: none;
}
/* Default: Hide Chinese when English is active (assuming body has .show-en) */
body.show-en [data-lang="zh"] {
    display: none;
}

/* Fallback: If no language class is set on body, show only the default (e.g., Chinese) */
body:not(.show-zh):not(.show-en) [data-lang="en"] {
     display: none;
}
body:not(.show-zh):not(.show-en) [data-lang="zh"] {
     display: inline; /* Default for spans */
}
/* Ensure block elements display correctly in fallback */
body:not(.show-zh):not(.show-en) h1[data-lang="zh"],
body:not(.show-zh):not(.show-en) h2[data-lang="zh"],
body:not(.show-zh):not(.show-en) h3[data-lang="zh"],
body:not(.show-zh):not(.show-en) div[data-lang="zh"] {
     display: block;
}

/* Ensure correct display based on body class */
body.show-zh [data-lang="zh"],
body.show-en [data-lang="en"] {
    display: inline; /* Default for spans */
}
body.show-zh h1[data-lang="zh"], body.show-en h1[data-lang="en"],
body.show-zh h2[data-lang="zh"], body.show-en h2[data-lang="en"],
body.show-zh h3[data-lang="zh"], body.show-en h3[data-lang="en"],
body.show-zh div[data-lang="zh"], body.show-en div[data-lang="en"] {
    display: block; /* Ensure block elements are block */
}