/* ========== Hero Section ========== */
.hero {
  position: relative;
  margin-bottom: 240px;
}

.hero__video-wrap {
  position: relative;
  width: 100%;
  height: clamp(420px, 52vw, 620px);
  overflow: hidden;
  background: #0d2133;
}

.hero__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.25) 45%,
    rgba(0, 0, 0, 0.1) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  padding-top: clamp(48px, 12vh, 120px);
  z-index: 2;
  pointer-events: none;
}

.hero__title {
  max-width: 640px;
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-white);
}

/* ========== Product Cards ========== */
.hero__cards {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(calc(62% - 40px));
  z-index: 5;
}

.hero__cards-inner {
  width: 100%;
  padding: 0 200px;
  box-sizing: border-box;
}

.product-cards {
  --card-body-h: 280px;
  --card-body-hover-h: 304px;
  --card-machine-overlap: 64px;

  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: end;
}

.product-cards__item {
  position: relative;
  height: calc(var(--card-body-h) + 120px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.product-cards__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: var(--card-body-h);
  box-sizing: border-box;
  padding: 48px 18px 22px;
  background: var(--color-white);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  text-align: center;
  overflow: hidden;
  transition:
    height var(--transition),
    padding var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.product-cards__item:hover {
  z-index: 3;
}

.product-cards__item:hover .product-cards__body {
  height: var(--card-body-hover-h);
  padding-bottom: 26px;
  background: var(--color-primary);
  box-shadow: 0 12px 36px rgba(0, 83, 135, 0.22);
}

.product-cards__machine-wrap {
  position: absolute;
  left: 50%;
  bottom: calc(var(--card-body-h) - var(--card-machine-overlap));
  width: 145%;
  height: 180px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 3;
  transition: bottom var(--transition);
}

.product-cards__item:hover .product-cards__machine-wrap {
  bottom: calc(var(--card-body-hover-h) - var(--card-machine-overlap));
}

.product-cards__machine {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12));
}

.product-cards__icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  object-fit: contain;
  transition: filter var(--transition);
}

.product-cards__item:hover .product-cards__icon {
  filter: brightness(0) invert(1);
}

.product-cards__title {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color var(--transition);
}

.product-cards__desc {
  flex: 1;
  font-size: 16px;
  line-height: 1.45;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.product-cards__item:hover .product-cards__title,
.product-cards__item:hover .product-cards__desc {
  color: var(--color-white);
}

/* ========== Shared Button ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 16px;
  font-weight: 600;
  border-radius: 999px;
  transition: background var(--transition), opacity var(--transition);
}

.btn-primary:hover {
  opacity: 0.9;
}

/* ========== Section 1: About Factory ========== */
.about-factory {
  position: relative;
  min-height: clamp(480px, 55vw, 620px);
  display: flex;
  align-items: center;
  padding: 60px 0;
}

.about-factory__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.about-factory__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.about-factory__inner {
  position: relative;
  z-index: 2;
}

.about-factory__panel {
  max-width: 560px;
  padding: 48px 44px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--color-white);
}

.about-factory__title {
  margin-bottom: 24px;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.about-factory__text {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
}

.about-factory__text:last-of-type {
  margin-bottom: 28px;
}

/* ========== Section 2: Machine Finder ========== */
.machine-finder {
  position: relative;
  padding: 60px 0 80px;
  background: var(--color-white);
  overflow: hidden;
}

.machine-finder__inner {
  position: relative;
}

.machine-finder__head {
  position: relative;
  text-align: center;
  padding: 20px 0 48px;
  min-height: 140px;
}

.machine-finder__watermark {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(80px, 12vw, 147px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.machine-finder__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}

.machine-finder__image img {
  width: 100%;
  max-width: 360px;
  max-height: 280px;
  object-fit: contain;
}

.machine-finder__center {
  text-align: center;
}

.machine-finder__title {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

.machine-finder__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* ========== Section 3: CTA Banner ========== */
.cta-banner {
  padding: 0;
}

.cta-banner__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.cta-banner__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 40px 24px;
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  text-align: center;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.75);
  transition: transform var(--transition);
}

.cta-banner__item:first-child {
  border-left: none;
}

.cta-banner__item:hover {
  z-index: 1;
}

.cta-banner__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  transition: background var(--transition);
}

.cta-banner__item:hover .cta-banner__overlay {
  background: rgba(0, 83, 135, 0.88);
}

.cta-banner__icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  color: var(--color-white);
}

.cta-banner__icon img {
  width: 64px;
  height: 64px;
  filter: brightness(0) invert(1);
}

.cta-banner__label {
  position: relative;
  z-index: 1;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ========== Section 4: Video Channel ========== */
.video-channel {
  padding: 80px 0;
  background: var(--color-white);
}

.video-channel__top {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}

.video-channel__title {
  margin-bottom: 20px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

.video-channel__desc {
  margin-bottom: 28px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-muted);
}

.video-channel__player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d2133;
  overflow: hidden;
}

.video-channel__player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-channel__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  transition: opacity var(--transition);
}

.video-channel__play.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.video-channel__carousel {
  display: flex;
  align-items: center;
  gap: 16px;
}

.video-swiper {
  flex: 1;
  overflow: hidden;
}

.video-swiper__prev,
.video-swiper__next {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.video-swiper__prev:hover,
.video-swiper__next:hover {
  color: var(--color-primary);
}

.video-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-left: 1px solid var(--color-border);
  padding-left: 20px;
}

.swiper-slide:first-child .video-card {
  border-left: none;
  padding-left: 0;
}

.video-card__thumb {
  flex-shrink: 0;
  width: 120px;
  height: 72px;
  object-fit: cover;
  background: var(--color-bg-light);
}

.video-card__text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  transition: color var(--transition);
}

  .video-card:hover .video-card__text {
  color: var(--color-primary);
}

/* ========== Section: Industries Flip Cards ========== */
.industries {
  width: 100%;
  padding: 0;
  background: var(--color-white);
  overflow: hidden;
}

.industries__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: calc(420 / 1920 * 100vw);
  gap: 0;
  width: 100%;
}

.industry-card {
  width: 100%;
  height: calc(420 / 1920 * 100vw);
  perspective: 1200px;
}

@media (min-width: 1920px) {
  .industries__grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 420px;
  }

  .industry-card {
    height: 420px;
  }
}

.industry-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform var(--transition);
}

.industry-card:hover .industry-card__inner {
  transform: rotateY(180deg);
}

.industry-card__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.industry-card__front {
  background-size: cover;
  background-position: center;
  color: var(--color-white);
}

.industry-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.industry-card__front .industry-card__title {
  position: relative;
  z-index: 1;
}

.industry-card__back {
  transform: rotateY(180deg);
  background: #4a4e51;
  color: var(--color-white);
  text-align: center;
}

.industry-card__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.industry-card__back .industry-card__title {
  margin-bottom: 16px;
}

.industry-card__desc {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

/* ========== Section: News ========== */
.news-section {
  padding: 80px 0;
  background: var(--color-white);
}

.news-section__title {
  margin-bottom: 48px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-text);
}

.news-section__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.news-card__image-wrap {
  display: block;
  overflow: hidden;
}

.news-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform var(--transition);
}

.news-card:hover .news-card__image {
  transform: scale(1.03);
}

.news-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 32px;
  text-align: center;
}

.news-card__heading {
  flex: 1;
  margin-bottom: 24px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
}

.news-card__heading a {
  color: var(--color-text);
  transition: color var(--transition);
}

.news-card__heading a:hover {
  color: var(--color-primary);
}

.news-card__btn {
  min-width: 140px;
}

/* ========== Section: Facebook Posts ========== */
.fb-posts {
  padding: 60px 0 80px;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
}

.fb-posts__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.fb-posts__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #1877f2;
  color: var(--color-white);
  border-radius: 4px;
}

.fb-posts__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

.fb-posts__grid,
.fb-posts__feed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.fb-posts__feed > #cff,
.fb-posts__feed > .cff-wrapper {
  display: contents;
}

.fb-card {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.fb-card__meta {
  margin-bottom: 4px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-text);
}

.fb-card__meta a {
  color: var(--color-primary);
  font-weight: 600;
}

.fb-card__time {
  display: block;
  margin-bottom: 12px;
  font-size: 16px;
  color: var(--color-text-muted);
}

.fb-card__text {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
}

.fb-card__link,
.fb-card__view {
  display: inline-block;
  font-size: 16px;
  color: var(--color-primary);
  transition: opacity var(--transition);
}

.fb-card__link {
  margin-bottom: 12px;
  margin-right: 20px;
}

.fb-card__link:hover,
.fb-card__view:hover {
  opacity: 0.8;
}

/* ========== Service Banner ========== */
.service-banner {
  width: 100%;
  padding: 0;
}

.service-banner__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 368px;
  padding: 32px 40px;
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  text-align: center;
}

.service-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.service-card__icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  background: rgba(40, 40, 40, 0.85);
  border-radius: 50%;
  color: var(--color-white);
}

.service-card__icon img {
  width: 40px;
  height: 40px;
  filter: brightness(0) invert(1);
}

.service-card__title {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}

.service-card__desc {
  position: relative;
  z-index: 1;
  max-width: 360px;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 900px) {
  .service-banner__grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    height: auto;
    min-height: 368px;
  }
}

/* ========== Responsive: Sections ========== */
@media (max-width: 1024px) {
  .industries__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: 0;
  }

  .industry-card {
    width: 100%;
    height: calc(420 / 1920 * 100vw);
  }

  .news-section__grid,
  .fb-posts__grid,
  .fb-posts__feed {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .machine-finder__head {
    padding-bottom: 32px;
  }

  .machine-finder__layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .machine-finder__image {
    max-width: 360px;
    margin: 0 auto;
  }

  .machine-finder__image--right {
    order: 3;
  }

  .video-channel__top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .industries__grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .industry-card {
    width: 100%;
    height: auto;
    aspect-ratio: 464 / 420;
    max-width: none;
    margin: 0;
  }
.hero__title {
  font-size: 24px;
}
.video-card {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-left: none;
}
  .about-factory__panel {
    padding: 32px 24px;
  }

  .cta-banner__grid {
    grid-template-columns: 1fr;
  }

  .cta-banner__item {
    min-height: 220px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.75);
  }

  .cta-banner__item:first-child {
    border-top: none;
  }

  .video-channel__carousel {
    gap: 8px;
  }

  .video-card__thumb {
    width: 96px;
    height: 60px;
  }
}

/* ========== Page Main ========== */
.page-main {
  background: var(--color-white);
}

/* ========== Responsive: Hero ========== */
@media (max-width: 1200px) {
  .product-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .hero {
    margin-bottom: 280px;
  }
}

@media (max-width: 1440px) {
  .hero__cards-inner {
    padding: 0 120px;
  }
}

@media (max-width: 1200px) {
  .hero__cards-inner {
    padding: 0 60px;
  }
}

@media (max-width: 900px) {
  .hero__cards-inner {
    padding: 0 24px;
  }

  .product-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    margin-bottom: 320px;
  }

  .hero__title {
    max-width: 90%;
  }
}

@media (max-width: 640px) {
  .hero {
    margin-bottom: 0;
    padding-bottom: 40px;
  }

  .hero__cards {
    position: static;
    transform: none;
    margin-top: -60px;
  }

  .product-cards {
    display: flex;
    gap: 16px;
    align-items: stretch;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .product-cards::-webkit-scrollbar {
    display: none;
  }

  .product-cards__item {
    flex: 0 0 min(280px, 85vw);
    height: auto;
    scroll-snap-align: center;
  }

  .product-cards {
    --card-body-h: 280px;
    --card-body-hover-h: 300px;
  }

  .product-cards__body {
    height: var(--card-body-h);
  }

  .product-cards__item:hover .product-cards__body {
    height: var(--card-body-hover-h);
  }

  .product-cards__machine-wrap {
    position: relative;
    left: auto;
    bottom: auto;
    width: 120%;
    height: 150px;
    transform: none;
    margin: 0 auto -48px;
    z-index: 3;
  }

  .product-cards__item:hover .product-cards__machine-wrap {
    bottom: auto;
  }
}
