/* history.css - 会社沿革ページ */

/* ==================== Hero ==================== */
.history-hero {
  position: relative;
  width: 100%;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  overflow: hidden;
}

.history-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../images/profile/proj2.jpg") center center / cover no-repeat;
  opacity: 0.15;
}

.history-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 4rem 2rem;
}

.history-hero-content h2 {
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

.history-hero-content .history-lead {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.1em;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
}

/* ==================== Intro ==================== */
.history-intro {
  padding: 8rem 0;
  text-align: center;
  background: #fff;
}

.history-intro h3 {
  font-size: 3rem;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.1em;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.history-intro h3::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #c8a45c;
  margin: 1.5rem auto 0;
}

.history-intro .intro-text {
  font-size: 1.8rem;
  color: #555;
  line-height: 2;
  letter-spacing: 0.08em;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==================== Timeline ==================== */
.history-timeline-section {
  padding: 8rem 0;
  background: #f8f8f8;
}

.history-timeline-section .section-title {
  text-align: center;
  margin-bottom: 6rem;
}

.history-timeline-section .section-title h3 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.1em;
  display: inline-block;
  position: relative;
}

.history-timeline-section .section-title h3::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #c8a45c;
  margin: 1.5rem auto 0;
}

/* Timeline Container */
.timeline-vertical {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Center line */
.timeline-vertical::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, #c8a45c, #d4b86a, #c8a45c);
}

/* Timeline Item */
.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 40px 40px;
  box-sizing: border-box;
}

/* Left side items */
.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
  padding-right: 60px;
  padding-left: 0;
}

.timeline-item:nth-child(odd) p {
  text-align: left;
}

/* Right side items */
.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
  padding-left: 60px;
  padding-right: 0;
}

/* Node dot on the center line */
.timeline-item::before {
  content: "";
  position: absolute;
  top: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #c8a45c;
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px #c8a45c;
  z-index: 2;
}

.timeline-item:nth-child(odd)::before {
  right: -10px;
}

.timeline-item:nth-child(even)::before {
  left: -10px;
}

/* Connector line from dot to card */
.timeline-item::after {
  content: "";
  position: absolute;
  top: 17px;
  width: 30px;
  height: 2px;
  background: #c8a45c;
}

.timeline-item:nth-child(odd)::after {
  right: 10px;
}

.timeline-item:nth-child(even)::after {
  left: 10px;
}

/* Card */
.timeline-card {
  background: #fff;
  border-radius: 6px;
  padding: 2.5rem;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
}

.timeline-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Year badge */
.timeline-year {
  display: inline-block;
  font-size: 2.8rem;
  font-weight: 700;
  color: #c8a45c;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-style: italic;
}

/* Era / Phase label */
.timeline-era {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #c8a45c, #d4b86a);
  padding: 0.3rem 1.2rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}

/* Title */
.timeline-card h4 {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
}

/* Description */
.timeline-card p {
  font-size: 1.5rem;
  color: #666;
  line-height: 1.8;
  letter-spacing: 0.05em;
}

/* ==================== Closing Section ==================== */
.history-closing {
  position: relative;
  padding: 10rem 0;
  background: url("../images/profile/advantage8.jpg") center center / cover
    no-repeat;
  text-align: center;
}

.history-closing::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
}

.history-closing-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

.history-closing-content h3 {
  font-size: 2.8rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.history-closing-content p {
  font-size: 2rem;
  color: #fff;
  line-height: 2;
  letter-spacing: 0.1em;
  font-weight: 400;
}

/* ==================== Page Title Override ==================== */
.history-html section.page-title {
  background-image: url(../images/profile/proj2.jpg);
  background-position-y: 58%;
}

@media (min-width: 2400px) {
  .intro-text p {
    line-height: 40px;
  }
}

@media (min-width: 3500px) {
  .intro-text p {
    line-height: 60px;
  }
}

/* ==================== Large Screen (2K) ==================== */
@media (min-width: 1920px) {
  .timeline-vertical {
    max-width: 1800px;
  }
  .history-intro .intro-text {
    max-width: 1200px;
  }
  .history-closing-content {
    max-width: 1200px;
  }
}

/* ==================== Extra Large Screen (4K) ==================== */
@media (min-width: 3000px) {
  .timeline-vertical {
    max-width: 2600px;
  }
  .history-intro .intro-text {
    max-width: 1800px;
  }
  .history-closing-content {
    max-width: 1800px;
  }
  .timeline-card h4 {
    font-size: 2.4rem;
  }
  .timeline-card p {
    font-size: 1.8rem;
  }
  .timeline-year {
    font-size: 3.2rem;
  }
  .history-intro h3 {
    font-size: 3.6rem;
  }
  .history-closing-content h3 {
    font-size: 3.4rem;
  }
  .history-closing-content p {
    font-size: 2.4rem;
  }
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
  .history-html section.page-title {
    background-image: url("../images/contact/contact_bg.jpg");
    width: 100%;
    background-position-y: 58%;
  }
  .timeline-vertical::before {
    left: 40px;
  }

  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    text-align: left;
    padding-left: 80px;
    padding-right: 0;
  }

  .timeline-item::before,
  .timeline-item:nth-child(odd)::before,
  .timeline-item:nth-child(even)::before {
    left: 30px;
    right: auto;
  }

  .timeline-item::after,
  .timeline-item:nth-child(odd)::after,
  .timeline-item:nth-child(even)::after {
    left: 50px;
    right: auto;
    width: 20px;
  }
}

@media (max-width: 767px) {
  .history-html section.page-title {
    background-image: url("../images/contact/contact_bg.jpg");
    width: 100%;
    background-position-y: 58%;
    background-size: 130%;
  }
  .history-hero-content h2 {
    font-size: 2.8rem;
  }
  .history-hero-content .history-lead {
    font-size: 1.6rem;
  }
  .history-intro {
    padding: 5rem 0;
  }
  .history-intro h3 {
    font-size: var(--phone-fs-md);
  }
  .history-intro .intro-text {
    font-size: 1.5rem;
  }
  .history-timeline-section {
    padding: 5rem 0;
  }

  .timeline-vertical::before {
    left: 20px;
  }

  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    padding-left: 55px;
  }

  .timeline-item::before,
  .timeline-item:nth-child(odd)::before,
  .timeline-item:nth-child(even)::before {
    left: 10px;
    width: 16px;
    height: 16px;
  }

  .timeline-item::after,
  .timeline-item:nth-child(odd)::after,
  .timeline-item:nth-child(even)::after {
    left: 26px;
    width: 18px;
    top: 15px;
  }

  .timeline-card {
    padding: 2rem;
  }
  .timeline-year {
    font-size: var(--phone-fs-md);
  }
  .timeline-card h4 {
    font-size: var(--phone-fs-md);
  }
  .timeline-card p {
    font-size: var(--phone-fs-sm);
  }

  .history-closing {
    padding: 6rem 0;
  }
  .history-closing-content h3 {
    font-size: var(--phone-fs-md);
    text-align: left;
  }
  .history-closing-content p {
    font-size: 1.6rem;
  }
  .font17 {
    font-size: var(--phone-fs-sm) !important;
    text-align: left;
  }

  .history-timeline-section .section-title h3 {
    font-size: var(--phone-fs-md);
  }

  .history-timeline-section .section-title {
    margin-bottom: 3rem;
  }
}
