
/* =========================================================
   TOP PAGE CSS
   共通スタイルは common.css で管理
   トップページ専用
   ========================================================= */


/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 620px;
  margin-top: 70px; /* 固定ヘッダーの高さに合わせて調整 */
  overflow: hidden;
  box-sizing: border-box;
  color: #fff;
  background: var(--navy);
}

.hero-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroSlide 30s infinite;
  will-change: opacity, transform;
}

.hero-slide:nth-child(1) {
  background-image:
    linear-gradient(
      90deg,
      rgba(4, 18, 31, .90) 0%,
      rgba(4, 18, 31, .62) 45%,
      rgba(4, 18, 31, .15) 100%
    ),
    url("../plant/img/img_gaikan_04.jpg");
  animation-delay: 0s;
}

.hero-slide:nth-child(2) {
  background-image:
    linear-gradient(
      90deg,
      rgba(4, 18, 31, .90) 0%,
      rgba(4, 18, 31, .62) 45%,
      rgba(4, 18, 31, .15) 100%
    ),
    url("../images/RIMG1616.JPG");
  animation-delay: 6s;
}

.hero-slide:nth-child(3) {
  background-image:
    linear-gradient(
      90deg,
      rgba(4, 18, 31, .90) 0%,
      rgba(4, 18, 31, .62) 45%,
      rgba(4, 18, 31, .15) 100%
    ),
    url("../images/2.jpg");
  animation-delay: 12s;
}

.hero-slide:nth-child(4) {
  background-image:
    linear-gradient(
      90deg,
      rgba(4, 18, 31, .90) 0%,
      rgba(4, 18, 31, .62) 45%,
      rgba(4, 18, 31, .15) 100%
    ),
    url("../plant/img/brake_press_02.JPG");
  animation-delay: 18s;
}

.hero-slide:nth-child(5) {
  background-image:
    linear-gradient(
      90deg,
      rgba(4, 18, 31, .90) 0%,
      rgba(4, 18, 31, .62) 45%,
      rgba(4, 18, 31, .15) 100%
    ),
    url("../plant/img/DSCN2285_R.jpg");
  animation-delay: 24s;
}

@keyframes heroSlide {
  0% {
    opacity: 0;
    transform: scale(1.03);
  }

  8% {
    opacity: 1;
  }

  30% {
    opacity: 1;
  }

  38% {
    opacity: 0;
  }

  100% {
    opacity: 0;
    transform: scale(1);
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    circle at 85% 50%,
    rgba(36, 182, 212, .16),
    transparent 32%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
  padding: 45px 0;
  box-sizing: border-box;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  color: #63d5e9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .24em;
}

.hero-label::before {
  content: "";
  width: 38px;
  height: 1px;
  flex-shrink: 0;
  background: currentColor;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(42px, 5.8vw, 76px);
  line-height: 1.2;
  letter-spacing: -.045em;
  font-weight: 800;
}

.hero h1 span {
  color: #64d5e8;
}

.hero-lead {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  line-height: 2;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-scroll {
  position: absolute;
  z-index: 3;
  right: 30px;
  bottom: 24px;
  writing-mode: vertical-rl;
  color: rgba(255, 255, 255, .6);
  font-size: 10px;
  letter-spacing: .3em;
}


/* =========================================================
   Section Common
   ========================================================= */

.section {
  padding-block: 90px;
}

.section-header {
  margin-bottom: 35px;
}

.section-label {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
}

.section-title {
  margin: 0;
  color: var(--navy);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -.025em;
}

.section-lead {
  margin: 15px 0 0;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.9;
}


/* =========================================================
   News
   ========================================================= */

.news {
  background: #fff;
}

.news .section-header {
  margin-bottom: 25px;
}

.news-list {
  border-top: 1px solid var(--border);
}

.news-item {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 20px;
  min-height: 82px;
  padding: 16px 8px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: background .25s ease, padding .25s ease;
}

.news-item:hover {
  padding-inline: 16px;
  background: #f7fafc;
}

.news-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.news-title {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--blue);
  background: var(--light-blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  vertical-align: middle;
}

.news-arrow {
  color: var(--blue);
  font-size: 20px;
  text-align: right;
  transition: transform .25s ease;
}

.news-item:hover .news-arrow {
  transform: translateX(4px);
}

.more-link {
  display: inline-flex;
  margin-top: 24px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.more-link:hover {
  color: var(--blue);
}


/* =========================================================
   About
   ========================================================= */

.about {
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.about-image {
  position: relative;
  min-width: 0;
}

.about-image::after {
  content: "";
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 55%;
  height: 55%;
  border-right: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);
  pointer-events: none;
}

.about-image img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.about-copy {
  min-width: 0;
  padding: 10px 0;
}

.about-copy .section-header {
  margin-bottom: 25px;
}

.about-copy > p {
  margin: 0 0 16px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 2;
}

.about-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.about-points li {
  position: relative;
  padding: 14px 12px 14px 30px;
  border-left: 2px solid var(--blue);
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
}

.about-points li::before {
  content: "✓";
  position: absolute;
  left: 13px;
  top: 50%;
  color: var(--blue);
  transform: translateY(-50%);
}


/* =========================================================
   Products / Facilities
   ========================================================= */

.cards-section {
  background: #fff;
}

.cards-section .section-header {
  margin-bottom: 35px;
}

.feature-card {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius);
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.feature-card img {
  position: absolute;
  z-index: -2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
}

.feature-card:hover img {
  transform: scale(1.035);
}

.feature-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(7, 26, 43, .92) 0%,
    rgba(7, 26, 43, .72) 48%,
    rgba(7, 26, 43, .16) 100%
  );
}

.feature-card-content {
  width: min(560px, 100%);
  padding: 55px;
  box-sizing: border-box;
}

.feature-card h3 {
  margin: 0 0 18px;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.3;
  letter-spacing: -.025em;
}

.feature-card p {
  margin: 0;
  color: rgba(255, 255, 255, .84);
  font-size: 14px;
  line-height: 2;
}

.feature-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}

.feature-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 11px;
  text-decoration: none;
  transition: background .25s ease, border-color .25s ease;
}

.feature-links a:hover {
  border-color: rgba(255, 255, 255, .6);
  background: rgba(255, 255, 255, .2);
}


/* =========================================================
   Recruitment
   ========================================================= */

.recruit {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(36, 182, 212, .18),
      transparent 30%
    ),
    var(--navy);
}

.recruit::before {
  content: "RECRUIT";
  position: absolute;
  right: -25px;
  bottom: -35px;
  color: rgba(255, 255, 255, .035);
  font-size: clamp(100px, 16vw, 220px);
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.recruit-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 60px;
  align-items: center;
}

.recruit h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1.35;
  letter-spacing: -.04em;
}

.recruit p {
  max-width: 500px;
  margin: 22px 0 28px;
  color: rgba(255, 255, 255, .75);
  font-size: 14px;
  line-height: 2;
}

.recruit-video {
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .28);
}

.recruit-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}


/* =========================================================
   Company Profile：会社情報＋マップ横並び
   ========================================================= */

.profile {
  background: var(--bg);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: stretch;
}

/* 左側：会社情報 */
.profile-grid > div:first-child {
  min-width: 0;
  padding: 30px;
  box-sizing: border-box;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

/* 会社情報テーブル */
.profile-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.profile-table tr {
  border-bottom: 1px solid var(--border);
}

.profile-table tr:last-child {
  border-bottom: none;
}

.profile-table th,
.profile-table td {
  padding: 15px 0;
  text-align: left;
  vertical-align: top;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.profile-table th {
  width: 110px;
  padding-right: 15px;
  box-sizing: content-box;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-table td {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.profile-table p {
  margin: 0 0 8px;
}

.profile-table p:last-child {
  margin-bottom: 0;
}

.profile-table a {
  color: var(--blue);
  text-decoration: none;
}

.profile-table a:hover {
  color: var(--navy);
  text-decoration: underline;
}

/* =========================================================
   TOP PAGE：Googleマップのサイズ調整
   ========================================================= */

.map-placeholder {
  width: 100%;
  height: 380px;
  min-height: 0;
  align-self: start;
  overflow: hidden;
  border-radius: var(--radius);
  background: #dfe8ec;
  box-shadow: var(--shadow);
}

.map-placeholder iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
}

/* タブレット */
@media (max-width: 900px) {
  .map-placeholder {
    height: 350px;
    min-height: 0;
  }

  .map-placeholder iframe {
    min-height: 0;
  }
}

/* スマートフォン */
@media (max-width: 600px) {
  .map-placeholder {
    height: 300px;
    min-height: 0;
  }

  .map-placeholder iframe {
    min-height: 0;
  }
}

/* =========================================================
   Responsive: Tablet
   ========================================================= */

@media (max-width: 1100px) {
  .section {
    padding-block: 75px;
  }

  .about-grid {
    gap: 45px;
  }

  .recruit-inner {
    gap: 35px;
  }

  .feature-card-content {
    padding: 45px;
  }
}


/* =========================================================
   Responsive: Mobile
   ========================================================= */

@media (max-width: 900px) {
  .hero {
    min-height: 560px;
  }

  .hero-content {
    width: min(100% - 40px, 720px);
  }

  .hero h1 {
    font-size: clamp(38px, 7vw, 58px);
  }

  .news-item {
    grid-template-columns: 110px minmax(0, 1fr) 22px;
    gap: 14px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    max-width: 680px;
  }

  .about-copy {
    padding-top: 0;
  }

  .recruit-inner {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .recruit-video {
    width: 100%;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .map-placeholder {
    min-height: 400px;
  }

  .map-placeholder iframe {
    min-height: 400px;
  }
}


/* =========================================================
   Responsive: Small Mobile
   ========================================================= */

@media (max-width: 600px) {
  .section {
    padding-block: 55px;
  }

  .section-header {
    margin-bottom: 25px;
  }

  .hero {
    min-height: 520px;
    margin-top: 70px; /* スマホのヘッダーに合わせて調整 */
  }

  .hero-content {
    width: calc(100% - 32px);
    padding-block: 35px;
  }

  .hero-label {
    gap: 8px;
    margin-bottom: 18px;
    font-size: 10px;
    letter-spacing: .16em;
  }

  .hero-label::before {
    width: 25px;
  }

  .hero h1 {
    font-size: clamp(34px, 9vw, 44px);
    line-height: 1.3;
  }

  .hero-lead {
    margin-top: 18px;
    font-size: 12px;
    line-height: 1.9;
  }

  .hero-buttons {
    gap: 10px;
    margin-top: 24px;
  }

  .hero-scroll {
    display: none;
  }

  .news-item {
    grid-template-columns: minmax(0, 1fr) 22px;
    gap: 6px 10px;
    padding: 15px 4px;
  }

  .news-date {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .news-title {
    font-size: 12px;
  }

  .news-tag {
    margin-right: 6px;
    padding: 3px 6px;
    font-size: 8px;
  }

  .about-grid {
    gap: 30px;
  }

  .about-image::after {
    right: -8px;
    bottom: -8px;
  }

  .about-points {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 22px 0;
  }

  .feature-card {
    min-height: 0;
  }

  .feature-card-content {
    width: 100%;
    padding: 35px 22px;
  }

  .feature-card h3 {
    font-size: 32px;
  }

  .feature-card p {
    font-size: 12px;
  }

  .feature-links {
    gap: 7px;
    margin: 20px 0;
  }

  .feature-links a {
    padding: 7px 10px;
    font-size: 10px;
  }

  .recruit h2 {
    font-size: 34px;
  }

  .recruit p {
    font-size: 13px;
  }

  .profile-grid > div:first-child {
    padding: 20px 16px;
  }

  .profile-table th,
  .profile-table td {
    padding-block: 12px;
    font-size: 12px;
  }

  .profile-table th {
    width: 95px;
    padding-right: 10px;
  }

  .map-placeholder,
  .map-placeholder iframe {
    min-height: 320px;
  }
}


/* =========================================================
   Motion / Accessibility
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    animation: none;
  }

  .hero-slide:first-child {
    opacity: 1;
    transform: none;
  }

  .feature-card img,
  .news-arrow,
  .news-item,
  .feature-links a {
    transition: none;
  }
}

/* トップページ専用：会社情報テーブルの列崩れ防止 */
.profile-grid > div:first-child {
  display: block;
  min-width: 0;
}

.profile-table {
  display: table;
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.profile-table tbody {
  display: table-row-group;
}

.profile-table tr {
  display: table-row;
}

.profile-table th,
.profile-table td {
  display: table-cell;
  box-sizing: border-box;
  vertical-align: top;
  text-align: left;
  line-height: 1.8;
}

.profile-table th {
  width: 115px;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.profile-table td {
  width: auto;
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .profile-table th {
    width: 95px;
  }
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}

.hero-buttons .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 15px 30px;
  border: 2px solid #ffffff;
  border-radius: 50px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

/* 製品を見る：青色 */
.hero-buttons .btn-primary {
  background-color: #174a78;
  color: #ffffff;
  border-color: #174a78;
}

/* 私たちについて：白色 */
.hero-buttons .btn-outline {
  background-color: #ffffff;
  color: #174a78;
  border-color: #ffffff;
}

/* ホバー時 */
.hero-buttons .btn-primary:hover {
  background-color: #ffffff;
  color: #174a78;
  border-color: #ffffff;
}

.hero-buttons .btn-outline:hover {
  background-color: #eaf2f8;
  color: #174a78;
  border-color: #eaf2f8;
}

/* スマートフォン対応 */
@media screen and (max-width: 600px) {
  .hero-buttons {
    gap: 12px;
  }

  .hero-buttons .btn {
    width: 100%;
    min-width: 0;
  }
}

.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background-color: #174a78;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* マウスを乗せたとき */
.btn-primary:hover {
  background-color: #ffffff;
  color: #174a78;
  border-color: #174a78;
}