/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  line-height: 1.75;
  color: #313131;
  background-color: #fff;
  font-size: 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.nowrap {
  display: inline-block;
  margin-left: 1em;
}

.sp-only {
  display: none;
}

/* Fade-in Animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero fade-in Animation */
.hero-content .main-title,
.hero-content .subtitle {
  opacity: 0;
  transform: translateY(30px);
}

.hero-content.hero-animate .main-title {
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.3s;
}

.hero-content.hero-animate .subtitle {
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.header {
  background-color: #fff;
  padding: 17px 0;
  height: 100px;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 110px;
  display: flex;
  justify-content: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: auto;
  width: 200px;
}

.logo-text {
  display: none;
}

/* Hero Section */
.hero {
  width: 100%;
  height: 550px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.23);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 1;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.main-title {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 25px;
  letter-spacing: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 2;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Main Content */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 110px;
}

/* Intro Section */
.intro-section {
  padding: 50px 0 60px;
}

.intro-text {
  font-size: 16px;
  color: #313131;
  line-height: 28px;
}

/* Section Styles */
.section {
  margin-bottom: 80px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  font-weight: 500;
  color: #6a6e8f;
  margin-bottom: 40px;
  display: flex;
  align-items: baseline;
  gap: 15px;
  letter-spacing: 1px;
}

.section-subtitle {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #313131;
}

.subsection-title {
  font-size: 18px;
  font-weight: 500;
  color: #313131;
  margin: 50px 0 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid #6a6e8f;
}

/* Map Section */
.map-container {
  display: flex;
  gap: 60px;
}

.map-box {
  flex: 1;
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.map-box img {
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
}

/* Station Description */
.station-description {
  display: flex;
  gap: 40px;
  margin-bottom: 50px;
}

.station-image {
  flex: 0 0 40%;
  min-width: 300px;
}

.station-image img {
  border-radius: 8px;
  width: 100%;
}

.station-text {
  flex: 1;
  font-size: 16px;
  color: #313131;
  line-height: 28px;
}

.station-text p {
  margin-bottom: 20px;
}

/* Photo Gallery */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.photo-gallery.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.photo-gallery.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.photo-gallery.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.photo-item {
  text-align: center;
}

.photo-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
}

.photo-caption {
  font-size: 13px;
  font-weight: 500;
  color: #6a6e8f;
  margin-top: 10px;
  line-height: 1.5;
}

/* 360 iframe */
.iframe-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
}

.iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Video Section */
.video-section {
  background-color: #f5f5f5;
  padding: 40px;
  border-radius: 8px;
  margin: 30px 0;
  text-align: center;
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 16/9;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

.video-caption {
  font-size: 14px;
  font-weight: 500;
  color: #6a6e8f;
  margin-top: 15px;
}

/* Popup enabled gallery */
.photo-gallery.popup-enabled .photo-item-image {
  overflow: hidden;
  border-radius: 8px;
}

.photo-gallery.popup-enabled .photo-item-image img {
  cursor: pointer;
  transition: transform 0.3s ease;
  border-radius: 0;
}

.photo-gallery.popup-enabled .photo-item-image img:hover {
  transform: scale(1.1);
}

/* Timeline Section */
.demolition-section {
  margin-top: 40px;
}

.timeline-item {
  position: relative;
  padding-left: 40px;
  margin-bottom: 50px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 25px;
  bottom: -50px;
  width: 2px;
  background-color: #ddd;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 8px;
  width: 22px;
  height: 22px;
  background-color: #fff;
  border: 3px solid #6a6e8f;
  border-radius: 50%;
}

.timeline-content {
  padding: 0;
}

.timeline-content h4 {
  font-size: 18px;
  font-weight: 500;
  color: #6a6e8f;
  margin-bottom: 15px;
}

.timeline-content p {
  font-size: 16px;
  color: #313131;
  line-height: 28px;
  margin-bottom: 15px;
}

.timeline-gallery {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.timeline-gallery img {
  width: calc(50% - 7.5px);
  max-width: 300px;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
}

/* After Demolition */
.after-demolition {
  margin-top: 30px;
  margin-bottom: 40px;
}

.after-demolition p {
  font-size: 16px;
  color: #313131;
  line-height: 28px;
  margin-bottom: 15px;
}

.after-demolition p:last-child {
  margin-bottom: 0;
}

/* History Section */
.history-section {
  background-color: #f9f9f9;
  padding: 40px;
  border-radius: 8px;
}

.history-category {
  font-size: 18px;
  font-weight: 500;
  color: #6a6e8f;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ddd;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table tr {
  border-bottom: 1px solid #eee;
}

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

.history-table td {
  padding: 15px 10px;
  font-size: 16px;
  vertical-align: top;
  line-height: 1.4;
}

.history-table .year {
  width: 160px;
  font-weight: 500;
  color: #313131;
  line-height: 1.4;
  white-space: nowrap;
}

.history-table .event {
  color: #313131;
}

/* Footer */
.footer {
  background-color: #6a6e8f;
  color: #fff;
  padding: 30px 0;
  margin-top: 80px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 110px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-logo img {
  height: auto;
  width: 180px;
  filter: brightness(0) invert(1);
}

.footer-logo-text {
  display: none;
}

.footer-info {
  font-size: 13px;
  line-height: 1.8;
  text-align: left;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  width: 80vw;
  height: 80vh;
  max-width: 1200px;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(80vh - 50px);
  object-fit: contain;
  cursor: grab;
  transition: opacity 0.2s ease;
}

.lightbox-image.fade-out {
  opacity: 0;
}

.lightbox-caption {
  color: #fff;
  margin-top: 15px;
  font-size: 14px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.lightbox-close:hover {
  color: #ccc;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: #313131;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background-color 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: #fff;
}

.lightbox-prev {
  left: -60px;
}

.lightbox-next {
  right: -60px;
}

/* Slider */
.demolition-slider {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin: 20px 0;
}

.slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.3s ease;
}

.slider-slide {
  min-width: 100%;
  position: relative;
  padding: 40px 20px;
  background-color: #f9f9f9;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slider-slide-inner {
  max-width: 1020px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.slider-slide-title {
  font-size: 18px;
  font-weight: 500;
  color: #6a6e8f;
  margin-top: 10px;
  margin-bottom: 5px;
  order: 2;
}

.slider-slide-images {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  order: 1;
}

.slider-slide-images img {
  flex: 1;
  width: calc(50% - 7.5px);
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
}

.slider-slide-text {
  font-size: 15px;
  color: #313131;
  line-height: 1.8;
  order: 3;
}

.slider-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  padding: 40px 20px 20px;
  font-size: 14px;
}

.slider-prev,
.slider-next {
  position: absolute;
  top: 35%;
  transform: translateY(-50%);
  background-color: #6a6e8f;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: #fff;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.slider-prev:hover,
.slider-next:hover {
  background-color: #5a5e7f;
}

.slider-prev {
  left: 20px;
}

.slider-next {
  right: 20px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 15px 0 20px;
  background-color: #f9f9f9;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ddd;
  cursor: pointer;
  transition: background-color 0.3s;
}

.slider-dot.active {
  background-color: #6a6e8f;
}

/* Responsive */
@media (max-width: 1200px) {
  .main-content,
  .header-inner,
  .footer-inner {
    padding-left: 40px;
    padding-right: 40px;
  }

  .map-container {
    flex-direction: column;
    gap: 20px;
  }

  .photo-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .photo-gallery.cols-5,
  .photo-gallery.cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    height: 300px;
  }

  .main-title {
    font-size: 32px;
    letter-spacing: 2px;
  }

  .subtitle {
    font-size: 16px;
    letter-spacing: 4px;
  }

  .section-title {
    font-size: 32px;
    flex-direction: row;
    gap: 10px;
  }

  .station-description {
    flex-direction: column;
  }

  .station-image {
    flex: none;
    width: 100%;
  }

  .photo-gallery,
  .photo-gallery.cols-5,
  .photo-gallery.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-gallery.gallery-360 {
    grid-template-columns: 1fr;
  }

  .timeline-gallery {
    flex-direction: column;
  }

  .timeline-gallery img {
    width: 100%;
    max-width: none;
  }

  .logo img {
    width: 180px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footer-logo {
    flex-direction: column;
  }

  .footer-logo img {
    width: 160px;
  }

  .footer-logo-text {
    align-items: center;
  }

  .footer-info {
    text-align: center;
    font-size: 12px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .slider-slide-images img {
    width: calc(50% - 7.5px);
  }
}

@media (max-width: 480px) {
  .main-content,
  .header-inner,
  .footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .main-title {
    font-size: 22px;
    letter-spacing: 1px;
  }

  .subtitle {
    font-size: 14px;
    letter-spacing: 3px;
  }

  .section-title {
    font-size: 30px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    margin-bottom: 30px;
  }

  .photo-gallery,
  .photo-gallery.cols-5,
  .photo-gallery.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-only {
    display: block;
  }

  .history-table .year {
    width: 70px;
    font-size: 13px;
  }

  .history-table .event {
    font-size: 13px;
  }

  .history-section {
    padding: 20px;
  }

  .after-demolition {
    padding: 20px;
  }

  .slider-slide-images {
    flex-direction: column;
  }

  .slider-slide-images img {
    width: 100%;
  }
}
