/* ========================================
   Archive Page Styles (News Archive)
   Based on TABATA theme design
======================================== */

/* ----------------------------------------
   Hero Section
---------------------------------------- */
.p-archive__hero {
  position: relative;
  width: 100%;
  height: calc(547 / 1920 * 100vw);
}

.p-archive__hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.p-archive__hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-archive__hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.p-archive__hero-title-en {
  font-family: 'Roboto', 'Noto Sans JP', sans-serif;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
  font-size: calc(60 / 1920 * 100vw);
  margin-bottom: calc(10 / 1920 * 100vw);
}

.p-archive__hero-title-ja {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  color: #FFFFFF;
  font-size: calc(20 / 1920 * 100vw);
}

/* ----------------------------------------
   Breadcrumbs
---------------------------------------- */
.p-archive__breadcrumbs {
  padding: calc(24 / 1920 * 100vw) 0 0;
  width: 100%;
  margin: 0 auto;
}

.p-archive__breadcrumbs .p-archive__content-inner {
  padding: 0 calc(140 / 1920 * 100vw);
  width: 100%;
}

/* ----------------------------------------
   Archive Content Section
---------------------------------------- */
.p-archive {
  padding: calc(200 / 1920 * 100vw) 0 calc(210 / 1920 * 100vw);
}

.p-archive__content-inner {
  width: 100%;
  margin: 0 auto;
  padding: 0 calc(262 / 1920 * 100vw);
}

/* ----------------------------------------
   Archive List (Card Grid)
---------------------------------------- */
.p-archive__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, calc(452 / 1920 * 100vw));
  gap: calc(40 / 1920 * 100vw) calc(20 / 1920 * 100vw);
  justify-content: center;
}

.p-archive__item {
  width: calc(452 / 1920 * 100vw);
  height: calc(415 / 1920 * 100vw);
}

.p-archive__link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
  height: 100%;
  background-color: #FFFFFF;
  border-radius: calc(20 / 1920 * 100vw);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .p-archive__link:hover {
    opacity: 0.8;
  }
}

.p-archive__image {
  overflow: hidden;
  flex-shrink: 0;
  width: calc(382 / 1920 * 100vw);
  height: calc(205 / 1920 * 100vw);
  margin: calc(35 / 1920 * 100vw) auto 0;
  border-radius: calc(11 / 1920 * 100vw);
}

.p-archive__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.p-archive__content {
  padding: calc(15 / 1920 * 100vw) calc(35 / 1920 * 100vw) 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.p-archive__date {
  font-family: 'Roboto', sans-serif;
  color: #59D8F6;
  display: block;
  font-size: calc(18 / 1920 * 100vw);
  letter-spacing: 0.01em;
  font-weight: 700;
  margin-bottom: 0;
}

.p-archive__title {
  font-weight: 700;
  color: #3B3B3B;
  line-height: 1.6;
  font-size: calc(20 / 1920 * 100vw);
  letter-spacing: 0.1em;
  margin-bottom: calc(8 / 1920 * 100vw);
}

.p-archive__excerpt {
  color: #3B3B3B;
  font-size: calc(16 / 1920 * 100vw);
  letter-spacing: 0.05em;
  line-height: 2.1;
  font-weight: 500;
  margin-top: 0;
}

.p-archive__no-posts {
  text-align: center;
  color: #666666;
  padding: calc(60 / 1920 * 100vw) 0;
  font-size: calc(16 / 1920 * 100vw);
}

/* ----------------------------------------
   Pagination
---------------------------------------- */
.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(10 / 1920 * 100vw);
  margin-top: calc(60 / 1920 * 100vw);
}

.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(50 / 1920 * 100vw);
  height: calc(50 / 1920 * 100vw);
  font-family: 'Roboto', sans-serif;
  font-size: calc(18 / 1920 * 100vw);
  font-weight: 500;
  color: #3B3B3B;
  text-decoration: none;
  border: 1px solid #D0D0D0;
  border-radius: calc(5 / 1920 * 100vw);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links .page-numbers.current {
  background-color: #59D8F6;
  color: #fff;
  border-color: #59D8F6;
}

.nav-links .page-numbers:hover:not(.current) {
  background-color: #EAF2F4;
}

.nav-links .prev.page-numbers,
.nav-links .next.page-numbers {
  width: auto;
  padding: 0 calc(16 / 1920 * 100vw);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: calc(15 / 1920 * 100vw);
}

/* ----------------------------------------
   Breadcrumbs Component
---------------------------------------- */
.p-breadcrumbs__list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: calc(14 / 1920 * 100vw);
  font-weight: 500;
  color: #3B3B3B;
}

.p-breadcrumbs__item {
  display: flex;
  align-items: center;
}


.p-breadcrumbs__link {
  color: #3B3B3B;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.p-breadcrumbs__link:hover {
  opacity: 0.7;
}

.p-breadcrumbs__current {
  color: #59D8F6;
}

/* ----------------------------------------
   Archive Page Body Overrides
---------------------------------------- */
body.post-type-archive-news .l-main,
body.post-type-archive .l-main {
  padding-top: 0 !important;
  background-color: #EAF2F4;
}

/* Header transparent on archive pages */
body.post-type-archive-news .header,
body.post-type-archive .header {
  box-shadow: none;
  background-color: #fff;
}

body.post-type-archive-news .header.is-scrolled,
body.post-type-archive .header.is-scrolled {
  background-color: #fff;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* ========================================
   SP RESPONSIVE (max-width: 768px)
======================================== */
@media screen and (max-width: 768px) {

  .p-archive__hero {
    height: calc(547 / 390 * 100vw);
  }

  .p-archive__hero-title-en {
    font-size: calc(40 / 390 * 100vw);
    margin-bottom: calc(8 / 390 * 100vw);
  }

  .p-archive__hero-title-ja {
    font-size: calc(16 / 390 * 100vw);
  }

  .p-archive__breadcrumbs {
    padding: calc(19 / 390 * 100vw) 0 0;
    width: calc(360 / 390 * 100vw);
  }

  .p-archive {
    padding: calc(40 / 390 * 100vw) 0 calc(60 / 390 * 100vw);
  }

  .p-archive__content-inner {
    width: auto;
    padding: 0 calc(15 / 390 * 100vw);
  }

  .p-archive__list {
    display: flex;
    flex-direction: column;
    gap: calc(40 / 390 * 100vw);
  }

  .p-archive__item {
    width: calc(360 / 390 * 100vw);
    height: calc(405 / 390 * 100vw);
    margin: 0 auto;
  }

  .p-archive__link {
    border-radius: calc(10 / 390 * 100vw);
  }

  .p-archive__image {
    width: calc(320 / 390 * 100vw);
    height: calc(205 / 390 * 100vw);
    margin: calc(20 / 390 * 100vw) auto calc(20 / 390 * 100vw);
    border-radius: calc(11 / 390 * 100vw);
  }

  .p-archive__content {
    padding: 0 calc(20 / 390 * 100vw) calc(20 / 390 * 100vw);
  }

  .p-archive__date {
    font-size: calc(18 / 390 * 100vw);
  }

  .p-archive__title {
    font-size: calc(20 / 390 * 100vw);
    margin-bottom: calc(9 / 390 * 100vw);
  }

  .p-archive__excerpt {
    font-size: calc(15 / 390 * 100vw);
    line-height: 2.0;
  }

  .p-archive__no-posts {
    font-size: calc(14 / 390 * 100vw);
    padding: calc(40 / 390 * 100vw) 0;
  }

  /* Pagination SP */
  .nav-links {
    gap: calc(8 / 390 * 100vw);
    margin-top: calc(40 / 390 * 100vw);
  }

  .nav-links .page-numbers {
    width: calc(40 / 390 * 100vw);
    height: calc(40 / 390 * 100vw);
    font-size: calc(14 / 390 * 100vw);
    border-radius: calc(5 / 390 * 100vw);
  }

  .nav-links .prev.page-numbers,
  .nav-links .next.page-numbers {
    padding: 0 calc(12 / 390 * 100vw);
    font-size: calc(13 / 390 * 100vw);
  }

  /* Breadcrumbs SP */
  .p-breadcrumbs__list {
    font-size: calc(12 / 390 * 100vw);
  }

  .p-breadcrumbs__item + .p-breadcrumbs__item::before {
    margin: 0 calc(8 / 390 * 100vw);
  }

  /* Header SP on archive */
  body.post-type-archive-news .header,
  body.post-type-archive .header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
  }
}
