/* components.css — 再利用部品 */

/* ============ Section heading tag (青タグ) ============ */
.section-tag {
  position: absolute;
  z-index: 5;
  background-color: #3cabe6;
  color: var(--color-white);
  padding: 20px 32px 24px;
  width: 446px;
  height: 109px;
  box-sizing: border-box;
}

.section-tag--top-left {
  top: 0;
  left: 0;
  padding-left: 88px;
}

.section-tag--top-right {
  top: 0;
  right: 0;
  padding-left: 88px;
  text-align: left;
}

.section-tag--center {
  position: static;
  margin-inline: auto;
  text-align: center;
  background-color: transparent;
  color: var(--color-blue);
  padding: 0;
  min-width: 0;
  min-height: 0;
}

/* Figma 完全準拠: Poppins Regular 40px / line-height 30px / tracking 2px */
.section-tag__en {
  font-family: var(--ff-en-body);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 2px;
  line-height: 30px;
}

/* Figma 完全準拠: Noto Sans JP Medium 20px / line-height 30px / tracking 1px */
.section-tag__jp {
  margin-top: 7px;
  font-family: var(--ff-jp);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 30px;
}

.section-tag--center .section-tag__en {
  font-size: 48px;
  color: var(--color-blue);
}

.section-tag--center .section-tag__jp {
  color: var(--color-blue);
}

/* ============ Framed image card (白枠＋左上タグ＋右下矢印) ============ */
.image-card {
  position: relative;
  display: block;
  background: var(--color-white);
  padding: 12px;
  box-shadow: 0 6px 24px rgba(0, 44, 106, 0.08);
  transition: transform var(--transition-base);
}

.image-card:hover {
  transform: translateY(-4px);
  opacity: 1;
}

.image-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-card__tag {
  position: absolute;
  top: -20px;
  left: 0;
  z-index: 2;
  background-color: #155c99;
  color: var(--color-white);
  padding: 8px 18px;
  font-family: var(--ff-jp);
  font-size: 16px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.05em;
}

/* 矢印: 白ボックス (26x26) に水平線 (14px) + 右上斜線 */
.image-card__arrow {
  position: absolute;
  bottom: 20px;
  right: 18px;
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.92);
  z-index: 2;
}
.image-card__arrow::before {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 1px;
  background: #003c7c;
  transform: translateY(-50%);
}
.image-card__arrow::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 7px;
  height: 1px;
  background: #003c7c;
  transform-origin: right center;
  transform: translateY(-50%) rotate(35deg);
}
.image-card__arrow img {
  display: none;
  width: 16px;
  height: 10px;
}

/* ============ CTA Button (濃紺 + 白矢印) ============ */
.cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 281px;
  height: 46px;
  background-color: var(--color-blue-dark); /* #002c6a */
  color: var(--color-white);
  font-family: var(--ff-jp);
  font-size: 15px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  transition: opacity var(--transition-base);
}

.cta-btn:hover { opacity: 0.85; }

.cta-btn__arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 18px;
  height: 1px;
  background: #ffffff;
  transform: translateY(-50%);
}
.cta-btn__arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 9px;
  height: 1px;
  background: #ffffff;
  transform-origin: right center;
  transform: rotate(35deg);
}
.cta-btn__arrow img { display: none; }

/* ============ Decor squares (装飾半透明四角) ============ */
.decor {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.decor--blue   { background-color: rgba(0, 145, 221, 0.20); }
.decor--white  { background-color: rgba(255, 255, 255, 0.30); }

/* ============ Global Menu (ハンバーガー展開) ============ */
/* Figma: メニューはヘッダー下から開く (ヘッダーは見えたまま) */
.menu {
  position: fixed;
  inset: 50px 0 0 0;
  z-index: 90;                  /* ヘッダー(100)より下 */
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}
@media (max-width: 767px) {
  .menu { inset: 56px 0 0 0; }
}

.menu.is-open {
  visibility: visible;
  opacity: 1;
}

.menu__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
}

.menu__panel {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  background-color: rgba(0, 47, 102, 0.90);
  color: var(--color-white);
  padding: 63px 60px 56px;
  max-height: 100vh;
  overflow-y: auto;
  transform: translateY(-32px);
  transition: transform var(--transition-base);
}

.menu.is-open .menu__panel {
  transform: translateY(0);
}

.menu__topbar {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.78);
}

.menu__topbar-divider { opacity: 0.6; }

.menu__corp-link {
  color: inherit;
  letter-spacing: 0.05em;
}

.menu__nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.menu__group {}

.menu__heading {
  display: block;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--color-white);
}

.menu__heading-en {
  display: block;
  font-family: var(--ff-en-body); /* Poppins */
  font-size: 30px;
  font-weight: var(--fw-medium);
  color: var(--color-white);
  letter-spacing: 0.08em;
}

.menu__heading-jp { display: none; }

.menu__sub li {
  margin-bottom: 8px;
}

.menu__sub a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-jp);
  font-size: 13px;
  font-weight: var(--fw-regular);
  color: var(--color-white);
  letter-spacing: 0.05em;
}
.menu__sub a:hover { opacity: 0.85; }

/* 矢印: 水平線 + 右上斜線 */
.menu__arrow {
  position: relative;
  width: 18px;
  height: 1px;
  background: var(--color-white);
  display: inline-block;
  flex: 0 0 18px;
}
.menu__arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 7px;
  height: 1px;
  background: var(--color-white);
  transform-origin: right center;
  transform: rotate(35deg);
}

/* close: X アイコンのみ。Figma Group 710 x=1161 y=9 size 28x28 → right:11 top:9 (panelから見て) */
.menu__close {
  position: absolute;
  top: 9px;
  right: 11px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.menu__close-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.menu__close-icon {
  position: relative;
  width: 28px;
  height: 28px;
}
.menu__close-icon::before,
.menu__close-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 1.5px;
  background: var(--color-white);
  transform-origin: center;
}
.menu__close-icon::before { transform: translate(-50%, -50%) rotate(45deg); }
.menu__close-icon::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* メニュー内 CTA ボタン (INTERNSHIP / ENTRY / MY PAGE) - menu__nav の grid 6番目に配置 */
/* ボタン開始位置を .menu__heading の下線位置 (heading-en 高さ + padding-bottom + border + margin-bottom) に揃える */
.menu__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding-top: calc(22px * 1.2 + 10px + 1px + 14px);
}
.menu__cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 238px;
  height: 47.6px;
  font-family: var(--ff-en-body);
  font-size: 16px;
  font-weight: var(--fw-regular);
  letter-spacing: 0.15em;
  text-decoration: none;
}
.menu__cta-btn--internship {
  background: var(--color-white);
  color: #e71a10;
}
.menu__cta-btn--entry {
  background: #0091dd;
  color: var(--color-white);
}
.menu__cta-btn--mypage {
  background: #006ab7;
  color: var(--color-white);
}

@media (max-width: 767px) {
  /* SP: パネルはビューポート高さを満たす、内部だけスクロール */
  .menu__panel {
    padding: 48px 18px 20px;
    min-height: 100vh;
    max-height: 100vh;
  }
  .menu__nav {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-bottom: 8px;
  }
  .menu__topbar {
    flex-wrap: wrap;
    font-size: 10px;
    margin-bottom: 10px;
    gap: 2px 4px;
  }
  .menu__heading {
    padding-bottom: 4px;
    margin-bottom: 4px;
  }
  .menu__heading-en { font-size: 14px; letter-spacing: 0.06em; }
  .menu__heading-jp { font-size: 10px; margin-top: 0; }
  .menu__sub { display: flex; flex-wrap: wrap; gap: 0 16px; }
  .menu__sub li { margin-bottom: 2px; }
  .menu__sub a { font-size: 11px; padding-left: 10px; line-height: 1.6; }
  .menu__sub a::before { width: 4px; }

  /* close ボタン: パネル内右上、スクロールに巻き込まれず固定 */
  .menu__close {
    position: fixed;
    top: 9px;
    right: 11px;
    z-index: 5;
  }
}
