/* Work Detail Page Styles */
body {
  margin: 0;
  padding: 0;
  background-color: #fafafa;
}

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

a:focus {
  outline: none;
}

/* Header */
header {
  position: fixed;
  width: 100%;
  height: auto;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo-link {
  position: absolute;
  left: 40px;
  top: 30px;
  transition: transform 0.3s ease;
}

.header-logo {
  width: 40px;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.logo-link:hover .header-logo {
  transform: scale(1.1);
}

.menu ul {
  position: absolute;
  right: 40px;
  top: 30px;
  padding: 0;
  display: flex;
  gap: 40px;
  list-style: none;
}

.menu li a {
  color: #333333;
  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 2px;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}

.menu li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: #333333;
  transition: width 0.3s ease;
}

.menu li a:hover::after {
  width: 100%;
}

/* Main Content */
main {
  padding-top: 120px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 100px;
  padding-right: 100px;
  padding-bottom: 100px;
}

/* Back Button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  color: #2c1810;
  text-decoration: none;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.back-button:hover {
  transform: translateX(-5px);
}

.back-button svg {
  width: 20px;
  height: 20px;
}

/* Project Header */
.project-header {
  text-align: center;
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(44, 24, 16, 0.1);
}

.project-title {
  font-family: "Noto Serif JP", serif;
  font-size: 36px;
  font-weight: 400;
  color: #2c1810;
  margin-bottom: 15px;
  letter-spacing: 2px;
}

.project-subtitle {
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  color: #666;
  letter-spacing: 1px;
}

/* Project Content - Two Column Layout */
.project-content {
  display: flex;
  gap: 80px;
  margin-bottom: 80px;
}

/* Left Sidebar - Project Info */
.project-info-sidebar {
  flex: 0 0 280px;
}

.info-section {
  margin-bottom: 40px;
}

.info-title {
  font-family: "Noto Serif JP", serif;
  font-size: 14px;
  font-weight: 600;
  color: #2c1810;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.info-content {
  font-family: "Noto Serif JP", serif;
  font-size: 14px;
  line-height: 1.8;
  color: #666;
  letter-spacing: 0.5px;
}

/* Right Content - Main Details */
.project-main-content {
  flex: 1;
}

.detail-section {
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.detail-section:nth-child(1) { animation-delay: 0.1s; }
.detail-section:nth-child(2) { animation-delay: 0.2s; }
.detail-section:nth-child(3) { animation-delay: 0.3s; }
.detail-section:nth-child(4) { animation-delay: 0.4s; }
.detail-section:nth-child(5) { animation-delay: 0.5s; }

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

.detail-label {
  font-family: "Noto Serif JP", serif;
  font-size: 18px;
  font-weight: 600;
  color: #2c1810;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.detail-content {
  font-family: "Noto Serif JP", serif;
  font-size: 15px;
  line-height: 2;
  color: #333;
  letter-spacing: 0.5px;
}

.detail-content a.external-link {
  color: #C48A00;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.3s ease;
}

.detail-content a.external-link:hover {
  opacity: 0.7;
}

/* Image Gallery */
.image-gallery {
  margin-top: 80px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.lang-link {
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #C48A00;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.lang-link:hover {
  opacity: 0.7;
}

.lang-link.active {
  font-weight: 600;
  border-bottom: 1px solid #2c1810;
}

.lang-separator {
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  font-weight: 600;
  color: #2c1810;
}

/* PDF Links - Consistent across all devices */
.mobile-pdf-link {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 35px;
  background-color: transparent;
  color: #2c1810;
  border: 1px solid #2c1810;
  border-radius: 2px;
  font-family: "Cormorant Garamond", serif;
  font-size: 15px;
  letter-spacing: 2px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.mobile-pdf-link:hover {
  background-color: #2c1810;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 24, 16, 0.1);
}


/* Responsive Design */

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  main {
    padding-left: 60px;
    padding-right: 60px;
    padding-top: 140px;
  }
  

  .project-content {
    gap: 50px;
  }
  
  .project-info-sidebar {
    flex: 0 0 240px;
  }
}

/* Tablet Small (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  main {
    padding-left: 40px;
    padding-right: 40px;
    padding-top: 120px;
  }

  .project-title {
    font-size: 28px;
  }

  .project-subtitle {
    font-size: 14px;
  }

  .project-content {
    flex-direction: column;
    gap: 40px;
  }

  .project-info-sidebar {
    flex: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .logo-link {
    left: 30px;
    top: 30px;
  }
  

  .header-logo {
    width: 35px;
  }

  .menu ul {
    right: 30px;
    top: 30px;
    gap: 25px;
  }

  .menu li a {
    font-size: 12px;
  }
  
  iframe {
    height: 500px; /* タブレットでは高さを少し抑える */
  }

  .mobile-pdf-link {
    font-size: 14px;
    padding: 10px 25px;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  main {
    padding: 100px 20px 60px;
  }

  .project-header {
    margin-bottom: 40px;
    text-align: left; /* スマホは左寄せが見やすい場合も */
  }

  .project-title {
    font-size: 24px;
    line-height: 1.4;
  }

  .project-subtitle {
    font-size: 13px;
  }
  
  .back-button {
    margin-bottom: 30px;
    font-size: 14px;
  }

  .project-content {
    flex-direction: column;
    gap: 40px;
    margin-bottom: 50px;
  }

  .project-info-sidebar {
    flex: none;
    background-color: #f5f5f5; /* 少し区別をつける */
    padding: 20px;
    border-radius: 8px;
  }
  
  .info-section {
    margin-bottom: 20px;
  }
  
  .info-section:last-child {
    margin-bottom: 0;
  }

  .info-title {
    font-size: 13px;
  }
  
  .info-content {
    font-size: 13px;
  }

  .detail-label {
    font-size: 16px;
    margin-bottom: 15px;
    border-left: 3px solid #2c1810;
    padding-left: 10px;
  }

  .detail-content {
    font-size: 14px;
    line-height: 1.8;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .logo-link {
    left: 20px;
    top: 20px;
  }
  
  
  .lang-link, .lang-separator {
    font-size: 14px;
    font-weight: 600;
  }

  .header-logo {
    width: 30px;
  }

  /* ハンバーガーメニューが必要かもしれませんが、今回は既存メニューを調整 */
  .menu {
    display: none; /* スペースがないため一旦非表示にするか、ハンバーガーメニューの実装が必要 */
  }
  
  /* PDFなどのiframe調整 */
  .pdf-container,
  .image-gallery div[style*="justify-content: center"] {
    margin-top: 40px !important;
    height: auto !important;
  }
  
  iframe {
    height: 400px; /* スマホではさらに高さを抑えて見やすくする */
  }
}

/* Video Modal Styles */
.video-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-modal.active {
  display: flex;
  opacity: 1;
}

.modal-content-wrapper {
  position: relative;
  width: auto;
  height: 85vh;
  aspect-ratio: 9/16;
  max-width: 90%;
}

.modal-video {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background-color: #000;
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.close-modal {
  position: absolute;
  top: 0;
  right: -50px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  transition: transform 0.3s ease;
}

.close-modal:hover {
  transform: scale(1.2);
}

.close-modal svg {
  width: 30px;
  height: 30px;
}

@media (max-width: 768px) {
  .modal-content-wrapper {
    height: 70vh;
  }
  .close-modal {
    right: 10px;
    top: -50px;
  }
}

.video-item {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.video-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
}

.video-item video {
  pointer-events: none; /* クリックイベントを親の video-item に任せる */
}


