/**
 * ==================================================
 * Indonesia Kerja Tools
 * Homepage Featured Carousel
 * ==================================================
 */

.ik-carousel {
  --ik-carousel-gap: 24px;
  margin: 30px 50px;
}

.ik-carousel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0px;
}

.ik-carousel__viewport {
  padding: 16px 0;
  margin: -16px 0;
  overflow: hidden;
}

.ik-carousel__track {
  display: flex;
  user-select: none;
  gap: var(--ik-carousel-gap);
  transition: transform 0.55s ease;
  will-change: transform;
  /* Always let the browser handle vertical scrolling but leave horizontal
     panning to our own pointer-drag logic below. This must not be limited
     to the mobile breakpoint: a phone browser rendering the page in
     "Desktop site" mode reports a viewport wider than 767px, so without
     this rule here too, the browser's native horizontal pan/back-forward
     swipe gesture competes with the drag handlers and only one swipe
     direction ends up moving the track. */
  touch-action: pan-y;
}

.ik-carousel__track a,
.ik-carousel__track img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

/* ==========================================================
   Featured Card
========================================================== */

.ik-featured-card {
  position: relative;
  flex: 0 0 calc((100% - (var(--ik-carousel-gap) * 2)) / 3);
  box-sizing: border-box;
  overflow: hidden;
  container-type: inline-size;

  background: #ffffff;
  border: 1px solid var(--ik-color-transparent);
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 5px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.ik-featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ik-featured-card__link {
  position: relative;
  z-index: 1;

  display: flex;
  flex-direction: column;
  align-items: center;

  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  padding: 10px 30px 5px;

  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ===========================
   Job Title
=========================== */
/* ===========================
   Job Title
=========================== */

.ik-featured-card__title {
  width: 100%;
  margin: 0 0 10px;

  color: var(--ik-color-heading);
  font-size: clamp(26px, 7.2cqw, 46px);
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  letter-spacing: -0.02em;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}

/* ===========================
   Company Logo
=========================== */

.ik-featured-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 60%;
  aspect-ratio: 4 / 3;
  min-height: 120px;
  max-height: 256px;
  margin: 0 0 10px;

  box-sizing: border-box;
  overflow: hidden;

  border: 0;
  border-radius: 10px;
  background: #000000;
}

.ik-featured-card__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
}

.ik-featured-card__logo .ik-job-card__initial {
  color: #ffffff;
  font-size: 28px;
}

/* ===========================
   Company Name
=========================== */

.ik-featured-card__company {
  width: 100%;
  margin: 0;

  overflow: hidden;
  color: var(--ik-color-heading);
  text-transform: capitalize;
  font-size: clamp(17px, 5cqw, 32px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

/* ===========================
   Meta Information
=========================== */

.ik-featured-card__meta {
  display: flex;
  flex-direction: column;
  gap: clamp(0px, 1.8cqw, 0px);
  width: 100%;
  margin: 8px 0 0;
  padding: 8px 0 0;

  border-top: 1px solid var(--ik-color-border);
}

.ik-featured-card__meta-row {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.2cqw, 16px);

  width: 100%;
  min-height: 35px;
  box-sizing: border-box;
  padding: 0;
}

.ik-featured-card__meta-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: clamp(32px, 6cqw, 40px);
  height: clamp(32px, 6cqw, 40px);
  flex: 0 0 clamp(32px, 6cqw, 40px);

  color: var(--ik-color-transparent);
}

.ik-featured-card__meta-icon svg {
  width: clamp(25px, 5cqw, 35px);
  height: clamp(25px, 5cqw, 35px);
  stroke-width: 1.45;
}

.ik-featured-card__meta-text {
  min-width: 0;
  flex: 1 1 auto;

  color: var(--ik-color-text);
  font-size: var(--ik-font-size-xs);
  font-weight: 500;
  line-height: 1.2;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

/* ===========================
   Overflow Fade
=========================== */

/*
 * The fade is activated by JavaScript only when the text is
 * actually wider than its available container.
 *
 * Title + company are centered, so both edges fade.
 * Meta text is left-aligned, so only the right edge fades.
 */
.ik-featured-card__title.ik-text-overflow,
.ik-featured-card__company.ik-text-overflow {
  -webkit-mask-image: linear-gradient(
    to right,
    #000 0,
    #000 calc(100% - 40px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    #000 0,
    #000 calc(100% - 40px),
    transparent 100%
  );
}

.ik-featured-card__meta-text.ik-text-overflow {
  -webkit-mask-image: linear-gradient(
    to right,
    #000 0,
    #000 calc(100% - 38px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    #000 0,
    #000 calc(100% - 38px),
    transparent 100%
  );
}

/* ==========================================================
   Carousel Controls
========================================================== */

.ik-carousel__controls {
  display: flex;
  gap: 10px;
}

.ik-carousel__prev,
.ik-carousel__next {
  width: 42px;
  height: 42px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  border: 1px solid var(--ik-color-border);
  border-radius: 50%;
  background: var(--ik-color-card);
  color: var(--ik-color-text);

  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.ik-carousel__prev:hover,
.ik-carousel__next:hover {
  background: var(--ik-color-card);
  color: var(--ik-color-heading);
  border-color: var(--ik-color-border);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.ik-carousel__prev:focus-visible,
.ik-carousel__next:focus-visible {
  outline: 2px solid #CBD5E1;
  outline-offset: 2px;
}

.ik-carousel__prev svg,
.ik-carousel__next svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.8;
}

.ik-carousel__prev:disabled,
.ik-carousel__next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==========================================================
   Responsive
========================================================== */

/* ==========================================================
   Responsive
========================================================== */

@media (max-width: 1100px) {
  .ik-featured-card__link {
    padding-left: 34px;
    padding-right: 34px;
  }
}

