/**
 * ETS2 Row Alignment Fix
 * 修复 et_pb_row_6 的 align-items: center 不生效问题
 *
 * 问题原因：
 * - 子元素（columns）没有设置高度，导致 align-items: center 无法正常工作
 * - align-items: center 需要子元素有高度才能生效
 *
 * 解决方案：
 * - 让子元素（columns）填满整个行的高度（align-self: stretch）
 * - 只在需要垂直居中的模块上使用 flex，不改变 columns 的横向布局
 */

/* 让子元素（columns）填满整个行的高度，这样 align-items: center 才能生效 */
/* 注意：不改变 column 的布局方向，保持横向排列（左右排列） */
.et_pb_row_6.et_pb_row > .et_pb_column {
  align-self: stretch;
  /* 不设置 display: flex 和 flex-direction，保持原有布局 */
}

/* 确保 column 内的模块可以垂直居中（上下居中） */
/* 只在模块层面使用 flex，让内容在垂直方向上居中 */
.et_pb_row_6.et_pb_row > .et_pb_column > .et_pb_module {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

/* 针对 text 模块进行优化，确保内容垂直居中（上下居中） */
.et_pb_row_6 .et_pb_text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

/* 确保 text_inner 保持原有布局 */
.et_pb_row_6 .et_pb_text .et_pb_text_inner {
  display: block;
}

/**
 * ETS2 fixed intro hero
 * Mirrors the former Superfly entry screen as normal homepage content.
 */
.ets2-fixed-intro-hero {
  --ets2-panel-width: 386px;
  --ets2-coral: #f16456;
  display: grid;
  grid-template-columns: var(--ets2-panel-width) minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
  background: #fff;
  overflow: hidden;
}

.ets2-fixed-intro-hero__panel {
  display: grid;
  grid-template-rows: minmax(0, 60%) minmax(300px, 40%);
  min-height: 100vh;
  background: #fff;
  z-index: 1;
}

.ets2-fixed-intro-hero__brand {
  padding: 72px 48px 32px;
  text-align: center;
}

.ets2-fixed-intro-hero__brand h1 {
  margin: 0 0 28px;
  color: #050505;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 1px;
}

.ets2-fixed-intro-hero__brand p {
  margin: 0 auto;
  max-width: 280px;
  color: rgba(0, 0, 0, 0.22);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.25;
}

.ets2-fixed-intro-hero__menu-band {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: 28px 28px 0;
  background: var(--ets2-coral);
}

.ets2-fixed-intro-hero__menu-band h2 {
  margin: 0;
  color: #272727;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.16;
}

.ets2-fixed-intro-hero__nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 270px;
  margin: 0 auto;
  padding: 22px 20px 24px;
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.ets2-fixed-intro-hero__nav a {
  display: block;
  color: #333;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.22;
  text-align: center;
  text-decoration: none;
}

.ets2-fixed-intro-hero__nav a:hover,
.ets2-fixed-intro-hero__nav a:focus {
  color: var(--ets2-coral);
}

.ets2-fixed-intro-hero__media {
  position: relative;
  min-height: 100vh;
  background: #d8e7ee;
  overflow: hidden;
}

.ets2-fixed-intro-hero__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 2049px) {
  .ets2-fixed-intro-hero {
    --ets2-panel-width: clamp(386px, 20.104vw, 772px);
  }

  .ets2-fixed-intro-hero__brand {
    padding: clamp(72px, 3.75vw, 144px) clamp(48px, 2.5vw, 96px) clamp(32px, 1.667vw, 64px);
  }

  .ets2-fixed-intro-hero__brand h1 {
    margin-bottom: clamp(28px, 1.458vw, 56px);
    font-size: clamp(26px, 1.354vw, 52px);
  }

  .ets2-fixed-intro-hero__brand p {
    max-width: clamp(280px, 14.583vw, 560px);
    font-size: clamp(14px, 0.729vw, 28px);
  }

  .ets2-fixed-intro-hero__menu-band {
    gap: clamp(36px, 1.875vw, 72px);
    padding: clamp(28px, 1.458vw, 56px) clamp(28px, 1.458vw, 56px) 0;
  }

  .ets2-fixed-intro-hero__menu-band h2 {
    font-size: clamp(22px, 1.146vw, 44px);
  }

  .ets2-fixed-intro-hero__nav {
    gap: clamp(8px, 0.417vw, 16px);
    width: clamp(270px, 14.063vw, 540px);
    padding: clamp(22px, 1.146vw, 44px) clamp(20px, 1.042vw, 40px) clamp(24px, 1.25vw, 48px);
    border-radius: clamp(8px, 0.417vw, 16px) clamp(8px, 0.417vw, 16px) 0 0;
  }

  .ets2-fixed-intro-hero__nav a {
    font-size: clamp(26px, 1.354vw, 52px);
  }
}

@media (max-width: 980px) {
  .ets2-fixed-intro-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .ets2-fixed-intro-hero__panel {
    grid-template-rows: auto auto;
    min-height: auto;
  }

  .ets2-fixed-intro-hero__media {
    order: -1;
    min-height: 58vh;
  }

  .ets2-fixed-intro-hero__brand {
    padding: 40px 24px 28px;
  }

  .ets2-fixed-intro-hero__menu-band {
    padding: 28px 24px 0;
  }

  .ets2-fixed-intro-hero__nav {
    width: min(270px, 100%);
  }
}
