/* ============================================
   Project Detail Page - Scoped Styles
   Root class: .project-detail-page
   ============================================ */

body {
  margin: 0;
  padding: 0;
}

.project-detail-page {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: #f5f5f7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
.project-detail-page *,
.project-detail-page *::before,
.project-detail-page *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

/* --- Hide Salient parent theme header/footer --- */
body.page-template-new-project-detail #header-outer,
body.page-template-new-project-detail #header-space,
body.page-template-new-project-detail #footer-outer,
body.page-template-new-project-detail #slide-out-widget-area,
body.page-template-new-project-detail #to-top,
body.page-template-new-project-osaka #header-outer,
body.page-template-new-project-osaka #header-space,
body.page-template-new-project-osaka #footer-outer,
body.page-template-new-project-osaka #slide-out-widget-area,
body.page-template-new-project-osaka #to-top,
body.page-template-new-project-elnido #header-outer,
body.page-template-new-project-elnido #header-space,
body.page-template-new-project-elnido #footer-outer,
body.page-template-new-project-elnido #slide-out-widget-area,
body.page-template-new-project-elnido #to-top,
body.page-template-new-project-sapporo #header-outer,
body.page-template-new-project-sapporo #header-space,
body.page-template-new-project-sapporo #footer-outer,
body.page-template-new-project-sapporo #slide-out-widget-area,
body.page-template-new-project-sapporo #to-top,
body.page-template-new-project-tokyo #header-outer,
body.page-template-new-project-tokyo #header-space,
body.page-template-new-project-tokyo #footer-outer,
body.page-template-new-project-tokyo #slide-out-widget-area,
body.page-template-new-project-tokyo #to-top {
  display: none !important;
}

/* --- Logo filter reset (prevent pollution from other pages) --- */
.project-detail-header__logo-icon,
.project-detail-header__logo-text {
  filter: none !important;
}

/* --- Header (same pattern) --- */
.project-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
}
.project-detail-header__logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
  width: 160px;
}
.project-detail-header__logo-icon {
  height: 40px;
  width: auto;
  filter: none;
}
.project-detail-header__logo-text {
  height: 30px;
  width: auto;
  margin-top: 4px;
  filter: none;
}
.project-detail-header__nav {
  display: flex;
  align-items: center;
  gap: 54px;
}
.project-detail-header__nav-link {
  font-family: "Futura", "Century Gothic", "Trebuchet MS", Arial, sans-serif !important;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  color: #003057;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.3s ease;
  position: relative;
  padding-bottom: 4px;
}
.project-detail-header__nav-link:hover {
  opacity: 0.7;
}
.project-detail-header__nav-link.is-active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: #bda600;
}
.project-detail-header__lang {
  flex-shrink: 0;
}
.project-detail-header__lang-btn {
  font-family: "Futura", "Century Gothic", "Trebuchet MS", Arial, sans-serif !important;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  color: #003057;
  background: none;
  border: none;
  cursor: pointer;
}

/* --- Intro (Title + Meta) --- */
.project-detail-intro {
  padding: 40px 204px 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.project-detail-intro__title-row {
  display: flex;
  align-items: center;
  gap: 40px;
  color: #003057;
}
.project-detail-intro__name {
  font-family: "Futura", "Century Gothic", "Trebuchet MS", Arial, sans-serif !important;
  font-weight: 500;
  font-size: 54px;
  line-height: 1;
}
.project-detail-intro__year {
  font-family: "Montserrat", sans-serif !important;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
}

.project-detail-intro__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 30px;
  width: 400px;
}
.project-detail-intro__meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 106px;
}
.project-detail-intro__meta-label {
  font-family: "Futura", "Century Gothic", "Trebuchet MS", Arial, sans-serif !important;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  color: #003057;
}
.project-detail-intro__meta-value {
  font-family: "Montserrat", sans-serif !important;
  font-weight: 400;
  font-size: 14px;
  line-height: 1;
  color: #999;
}

/* --- Hero Banner --- */
.project-detail-hero {
  width: 100%;
  height: 800px;
  overflow: hidden;
}
.project-detail-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Description --- */
.project-detail-desc {
  max-width: 824px;
  margin: 0 auto;
  padding: 80px 40px 60px;
}
.project-detail-desc p {
  font-family: "Montserrat", sans-serif !important;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: #666;
  text-align: justify;
}
.project-detail-desc p + p {
  margin-top: 8px;
}

/* --- Photo Gallery --- */
.project-detail-gallery {
  padding: 0 204px 80px;
}
.project-detail-gallery__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  row-gap: 40px;
}
.project-detail-gallery__item {
  width: calc((100% - 46px) / 2);
  aspect-ratio: 733 / 991;
  overflow: hidden;
  border-radius: 8px;
}
.project-detail-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Footer --- */
.project-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
}
.project-detail-footer__left {
  display: flex;
  align-items: center;
  gap: 54px;
}
.project-detail-footer__text,
.project-detail-footer__link {
  font-family: "Futura", "Century Gothic", "Trebuchet MS", Arial, sans-serif !important;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  color: #003057;
  white-space: nowrap;
}
.project-detail-footer__link {
  text-decoration: none;
  transition: opacity 0.3s ease;
}
.project-detail-footer__link:hover {
  opacity: 0.7;
}

/* --- Mobile bar (hidden on desktop) --- */
.project-detail-header__mobile-bar {
  display: none;
}
.project-detail-header__hamburger {
  width: 72px;
  height: 20px;
  border: none;
  border-top: 2px solid #d0d0d0;
  border-bottom: 2px solid #d0d0d0;
  background: none;
  cursor: pointer;
  padding: 0;
}
.project-detail-header__mobile-lang {
  font-family: "Futura", "Century Gothic", "Trebuchet MS", Arial, sans-serif !important;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  color: #d0d0d0;
}

/* ============================================
   RWD
   ============================================ */

@media (max-width: 1440px) {
  .project-detail-intro {
    padding: 40px 100px 32px;
  }
  .project-detail-gallery {
    padding: 0 100px 80px;
  }
  .project-detail-hero {
    height: 600px;
  }
}

@media (max-width: 1024px) {
  .project-detail-header {
    padding: 20px 24px;
  }
  .project-detail-header__nav {
    gap: 32px;
  }
  .project-detail-intro {
    padding: 32px 40px;
  }
  .project-detail-intro__name {
    font-size: 40px;
  }
  .project-detail-gallery {
    padding: 0 40px 60px;
  }
  .project-detail-hero {
    height: 480px;
  }
  .project-detail-gallery__grid {
    row-gap: 24px;
  }
  .project-detail-gallery__item {
    width: calc((100% - 24px) / 2);
    aspect-ratio: 1 / 1.2;
  }
  .project-detail-desc {
    padding: 60px 40px 40px;
  }
  .project-detail-footer {
    padding: 20px 24px;
  }
  .project-detail-footer__left {
    gap: 32px;
  }
}

@media (max-width: 768px) {
  /* Header */
  .project-detail-header {
    padding: 12px 20px 0;
    gap: 22px;
    justify-content: flex-start;
  }
  .project-detail-header__nav {
    display: none;
  }
  .project-detail-header__lang {
    display: none;
  }
  .project-detail-header__logo {
    width: auto;
    gap: 4px;
  }
  .project-detail-header__logo-icon {
    height: 20px;
  }
  .project-detail-header__logo-text {
    height: 15px;
    margin-top: 3px;
  }
  .project-detail-header__mobile-bar {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    height: 67px;
    padding: 20px 20px 20px 10px;
    background: #1c1c1c;
  }

  /* Intro */
  .project-detail-intro {
    padding: 20px;
    gap: 24px;
  }
  .project-detail-intro__title-row {
    gap: 24px;
  }
  .project-detail-intro__name {
    font-size: 32px;
  }
  .project-detail-intro__year {
    font-size: 14px;
  }
  .project-detail-intro__meta {
    width: 100%;
    gap: 16px 8px;
  }
  .project-detail-intro__meta-item {
    width: 88px;
  }

  /* Hero */
  .project-detail-hero {
    height: auto;
    aspect-ratio: 375 / 240;
  }

  /* Description */
  .project-detail-desc {
    padding: 24px 20px;
  }
  .project-detail-desc p {
    font-size: 14px;
    color: #666;
    text-align: left;
  }

  /* Gallery: single column */
  .project-detail-gallery {
    padding: 0 20px 60px;
  }
  .project-detail-gallery__grid {
    flex-direction: column;
    row-gap: 12px;
  }
  .project-detail-gallery__item {
    width: 100%;
    aspect-ratio: 335 / 443;
    border-radius: 0;
  }

  /* Footer */
  .project-detail-footer {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
      "year linkedin"
      "privacy legal";
    justify-content: center;
    justify-items: center;
    align-items: center;
    gap: 24px 19px;
    padding: 16px 12px 32px;
  }
  .project-detail-footer__left {
    display: contents;
  }
  .project-detail-footer__right {
    display: contents;
  }
  .project-detail-footer__text {
    grid-area: year;
  }
  .project-detail-footer__right .project-detail-footer__link {
    grid-area: linkedin;
  }
  .project-detail-footer__left a:nth-of-type(1) {
    grid-area: privacy;
  }
  .project-detail-footer__left a:nth-of-type(2) {
    grid-area: legal;
  }

  .project-detail-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0 19px;
  }

  .project-detail-footer::after {
    content: "";
    flex-basis: 100%;
    height: 0;
    order: 3;
  }

  .project-detail-footer__text {
    order: 1;
  }
  .project-detail-footer__right .project-detail-footer__link {
    order: 2;
  }
  .project-detail-footer__left a:nth-of-type(1) {
    order: 4;
    margin-top: 24px;
  }
  .project-detail-footer__left a:nth-of-type(2) {
    order: 5;
    margin-top: 24px;
    margin-left: -7px;
  }
}
