/* ===== Careers Page ===== */

/* Page Hero */
.page-hero {
  position: relative;
  height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--dark);
}
.page-hero__bg {
  position: absolute;
  inset: 0;
}
.page-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 54, 109, 0.85) 0%, rgba(2, 67, 137, 0.52) 50%, rgba(1, 83, 169, 0.36) 100%);
}
.page-hero .container {
  width: 100%;
}
.page-hero__content {
  position: relative;
  z-index: 2;
  padding-bottom: 72px;
  text-align: left;
}
.page-hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 52px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 16px 0 16px;
}
.page-hero__title em {
  font-style: normal;
  color: #fff;
}
.page-hero__sub {
  font-size: 15px;
  opacity: 0.85;
}

/* ===== Why Join ===== */
.careers-intro { background: var(--bg); }
.careers-intro__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.intro-card {
  background: #f8fafc;
  border-radius: var(--radius-card);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.intro-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.intro-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(0, 73, 158, 0.18);
}
.intro-card:hover::before {
  transform: scaleX(1);
}
.intro-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(0, 73, 158, 0.1), rgba(0, 73, 158, 0.04));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.intro-card__icon img { width: 26px; height: 26px; }
.intro-card__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.intro-card__desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ===== Positions ===== */
.positions { background: var(--bg-alt); }
.pos-tabs {
  position: relative;
  display: flex;
  width: 100%;
  gap: 0;
  margin: 40px 0 32px;
  padding: 6px;
  background: #ffffff;
  border-radius: var(--radius-button);
}
.pos-tabs::before {
  content: '';
  position: absolute;
  top: 6px;
  left: var(--indicator-left, 0);
  width: var(--indicator-width, 0);
  height: calc(100% - 12px);
  background: #00489e;
  border-radius: var(--radius-button);
  box-shadow: 0 2px 8px rgba(0, 72, 158, 0.25);
  transition: left .35s cubic-bezier(0.16, 1, 0.3, 1), width .35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}
.pos-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: color .3s;
  white-space: nowrap;
}
.pos-tab:hover {
  color: var(--primary);
}
.pos-tab.is-active {
  background: #00489e;
  color: #ffffff;
  font-weight: 600;
}

/* Team Photos Marquee */
.team-marquee {
  margin-top: 56px;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.team-marquee__track {
  display: flex;
  width: max-content;
  animation: teamMarquee 40s linear infinite;
}
.team-marquee:hover .team-marquee__track {
  animation-play-state: paused;
}
.team-marquee__group {
  display: flex;
  gap: 20px;
  padding-right: 20px;
}
.team-photo {
  flex-shrink: 0;
  width: 260px;
  height: 175px;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(13, 27, 42, 0.12);
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes teamMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.pos-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pos-item {
  background: #fff;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.pos-item:hover {
  border-color: rgba(0, 73, 158, 0.3);
  box-shadow: 0 12px 30px -10px rgba(0, 73, 158, 0.12);
}
.pos-item.is-open {
  border-color: var(--primary);
  box-shadow: 0 16px 36px -12px rgba(0, 73, 158, 0.18);
}
.pos-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  cursor: pointer;
  user-select: none;
}
.pos-item__main { flex: 1; }
.pos-item__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.pos-item__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-faint);
}
.pos-item__tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(0, 73, 158, 0.08);
  color: var(--primary);
  border-radius: var(--radius-badge);
  font-weight: 500;
}
.pos-item__salary {
  color: var(--accent);
  font-weight: 600;
}
.pos-item__arrow {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef2f7;
  color: #9aa5b1;
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.pos-item__arrow::before,
.pos-item__arrow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  border-radius: var(--radius-badge);
  transform: translate(-50%, -50%);
}
.pos-item__arrow::before {
  width: 16px;
  height: 2px;
}
.pos-item__arrow::after {
  width: 2px;
  height: 16px;
}
.pos-item.is-open .pos-item__arrow {
  transform: rotate(45deg);
  background: var(--ink);
  color: #fff;
}
.pos-item__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.pos-item.is-open .pos-item__body {
  max-height: 700px;
}
.pos-item__section {
  padding: 20px 28px;
  border-top: 1px solid var(--line);
}
.pos-item__section:first-child {
  border-top: none;
}
.pos-item__section h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}
.pos-item__section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pos-item__section ul li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.pos-item__section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.pos-item__body .btn {
  margin: 8px 28px 24px;
}

/* ===== Benefits ===== */
.benefits { background: var(--bg); }
.benefits__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.benefit-item {
  padding: 36px 28px;
  background: #f8fafc;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}
.benefit-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.benefit-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(0, 73, 158, 0.15);
  border-color: rgba(0, 73, 158, 0.2);
}
.benefit-item:hover::before {
  transform: scaleX(1);
}
.benefit-item__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(0, 73, 158, 0.1), rgba(0, 73, 158, 0.04));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.benefit-item__icon img {
  width: 26px;
  height: 26px;
}
.benefit-item h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.benefit-item p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ===== Apply CTA ===== */
.careers-apply {
  position: relative;
  background: var(--primary);
  color: #fff;
  overflow: hidden;
}
.careers-apply::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/foot-1.jpg") center / 100% auto fixed no-repeat;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}
.careers-apply .container {
  position: relative;
  z-index: 1;
}
.careers-apply__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0;
}
.careers-apply__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 20px 0 28px;
}
.careers-apply__title em {
  font-style: normal;
  color: #fff;
}
.careers-apply__desc {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  max-width: 560px;
  margin-bottom: 32px;
}
.careers-apply__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: #fff;
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-button);
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
}
.careers-apply__btn:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
}
.careers-apply__right {
  display: flex;
  justify-content: center;
}
.careers-apply__table {
  width: auto;
  border-collapse: collapse;
}
.careers-apply__table th,
.careers-apply__table td {
  padding: 16px 0;
  text-align: left;
  font-size: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.careers-apply__table tr:last-child th,
.careers-apply__table tr:last-child td {
  border-bottom: none;
}
.careers-apply__table th {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  width: 140px;
}
.careers-apply__table td {
  font-weight: 500;
  color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .careers-intro__grid,
  .benefits__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .careers-apply__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .pos-tabs { gap: 0; padding: 4px; }
  .pos-tabs::before { top: 4px; height: calc(100% - 8px); }
  .pos-tab { padding: 8px 14px; font-size: 13px; }
}
@media (max-width: 640px) {
  .page-hero__title { font-size: 36px; }
  .careers-intro__grid,
  .benefits__grid { grid-template-columns: 1fr; }
  .pos-item__head { padding: 18px; }
  .pos-item__title { font-size: 16px; }
  .pos-item__meta { font-size: 12px; gap: 10px; }
  .careers-apply__title { font-size: 32px; }
  .careers-apply__table th,
  .careers-apply__table td { padding: 14px 16px; font-size: 14px; }
  .careers-apply__table th { width: 110px; }
}
