/*
Theme Name:media-fine-kagaku
*/


/* ========================================
   Variables
   ======================================== */
:root {
  --color-primary: #0869d3;
  --color-text: #262626;
  --color-text-muted: #7b7b7b;
  --color-border: #f2eeec;
  --color-white: #ffffff;
  --color-footer-bg: #e5f0ff;
  --font-family: "Lato", sans-serif;
  --content-width: 1140px;
  --header-height: 78px;
}

/* ========================================
   Base
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.75;
}

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

button {
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: top;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ========================================
   Header
   ======================================== */
.header {
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-white);
}

.header__inner {
  max-width: 1420px;
  margin: 0 auto;
  padding: 8px 70px;
}

.header__logo {
  margin: 0;
  width: 247px;
}

.header__logo img {
  display: block;
  width: 100%;
  height: auto;
}

/* ========================================
   Main
   ======================================== */
.main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb {
  padding: 15px 0;
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.breadcrumb__link {
  font-size: 13px;
  letter-spacing: 0.26px;
  transition: opacity 0.2s;
}

.breadcrumb__link:hover {
  opacity: 0.7;
}

.breadcrumb__item:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1px solid var(--color-text);
  border-bottom: 1px solid var(--color-text);
  transform: rotate(-45deg);
  vertical-align: middle;
}

.breadcrumb__item--current {
  font-size: 13px;
  letter-spacing: 0.26px;
  padding-top: 3px;
}

/* ========================================
   Page Heading
   ======================================== */
.page-heading {
  text-align: center;
  margin-bottom: 80px;
}

.page-heading__title {
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.735px;
  line-height: 1;
}

.page-heading__title-accent {
  color: var(--color-primary);
}

.page-heading__subtitle {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.28px;
}

/* ========================================
   Content Layout
   ======================================== */
.content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.content__main {
  flex: 1;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* ========================================
   Article List
   ======================================== */
.article-list {
  width: 100%;
}

.article-card {
  padding: 40px 0;
  border-bottom: 1px solid var(--color-border);
}

.article-card a {
  display: flex;
  gap: 57px;
  align-items: flex-start;
  transition: opacity 0.2s;
}

.article-card a:hover {
  opacity: 0.8;
}

.article-card img {
  flex-shrink: 0;
  width: 250px;
  aspect-ratio: 4 / 3;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
}

.article-card div {
  flex: 1;
  min-width: 0;
}

.article-card time {
  display: block;
  font-size: 14px;
  letter-spacing: 2.24px;
  margin-bottom: 16px;
}

.article-card h2 {
  margin: 0 0 32px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 1.75;
}

.article-card p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.7px;
  line-height: 1.75;
  max-height: 100px;
  overflow: hidden;
}

/* ========================================
   Pagination
   ======================================== */
.pagination__list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 50px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.8px;
  background-color: var(--color-white);
  transition: background-color 0.2s, color 0.2s;
}

.pagination__item:hover {
  background-color: var(--color-footer-bg);
}

.pagination__item--current {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.pagination__item--current:hover {
  background-color: var(--color-primary);
}

.pagination__prev,
.pagination__next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 50px;
}

.pagination__prev span,
.pagination__next span {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
}

.pagination__prev span {
  transform: rotate(135deg);
}

.pagination__next span {
  transform: rotate(-45deg);
}

.pagination__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 50px;
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
  flex-shrink: 0;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar h2 {
  margin: 0;
  padding-bottom: 4px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 1.2px;
  line-height: 1.75;
  border-bottom: 1px dashed var(--color-primary);
}

.ranking-card {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  transition: opacity 0.2s;
}

.ranking-card:hover {
  opacity: 0.8;
}

.ranking-card div {
  position: relative;
  flex-shrink: 0;
  width: 100px;
  aspect-ratio: 4 / 3;
  height: auto;
  border-radius: 4px;
  overflow: hidden;
}

.ranking-card div > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ranking-card div > img:nth-child(2) {
  position: absolute;
  top: 4px;
  left: 3px;
  width: 22px;
  height: 16px;
}

.ranking-card div > span {
  position: absolute;
  top: 4px;
  left: 3px;
  width: 22px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.75px;
}

.ranking-card p,
.ranking-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.7px;
  line-height: 1.75;
}

/* WPP plugin overrides */
.sidebar .wpp-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar .wpp-list li {
  overflow: visible;
  float: none;
  clear: none;
  margin: 0;
  padding: 0;
}

.sidebar .wpp-list li a.ranking-card {
  display: flex;
  float: none;
  clear: none;
  width: 100%;
  margin: 0;
  gap: 6px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.sidebar .wpp-list li a.ranking-card img {
  float: none;
  margin: 0;
}

.sidebar .ranking-card__title {
  flex: 1;
  min-width: 0;
}

.sidebar .wpp-list li:nth-child(1) .ranking-card div > span {
  background: url("./images/crown1.svg") center / 22px 16px no-repeat;
}

.sidebar .wpp-list li:nth-child(2) .ranking-card div > span {
  background: url("./images/crown2.svg") center / 22px 16px no-repeat;
}

.sidebar .wpp-list li:nth-child(3) .ranking-card div > span {
  background: url("./images/crown3.svg") center / 22px 16px no-repeat;
}

/* ========================================
   Page Top Button
   ======================================== */
.page-top {
  position: fixed;
  right: 40px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 71px;
  height: 71px;
  background-color: #fdfdfd;
  border: 1px solid var(--color-text-muted);
  border-radius: 8px;
  z-index: 100;
  transition: opacity 0.2s;
}

.page-top:hover {
  opacity: 0.8;
}

.page-top__arrow {
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--color-primary);
  border-right: 2px solid var(--color-primary);
  transform: rotate(-45deg);
  margin-top: 4px;
}

.page-top__text {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.5px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background-color: var(--color-footer-bg);
  padding: 64px 0;
}

.footer__inner {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 70px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer__left {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer__logo {
  width: 201px;
}

.footer__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.footer__newsletter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 218px;
  height: 42px;
  background-color: var(--color-primary);
  border-radius: 4px;
  color: var(--color-white);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer__newsletter:hover {
  opacity: 0.85;
}

.footer__nav {
  text-align: left;
}

.footer__nav-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.footer__nav-list a {
  font-size: 13px;
  letter-spacing: 0.42px;
  transition: opacity 0.2s;
}

.footer__nav-list a:hover {
  opacity: 0.7;
}

.footer__copyright {
  margin: 0;
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.42px;
}

/* ========================================
   Article Detail
   ======================================== */
.article-detail {
  align-items: stretch;
  gap: 0;
  padding-top: 80px;
}

.article-detail__hero {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.article-detail__hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.article-detail__share {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  padding-top: 24px;
}

.article-detail__share-label {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.article-detail__sns {
  display: flex;
  align-items: center;
  gap: 18px;
}

.article-detail__sns a {
  display: block;
  width: 25px;
  height: 25px;
  transition: opacity 0.2s;
}

.article-detail__sns a:hover {
  opacity: 0.7;
}

.article-detail__sns img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.article-detail__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-top: 60px;
}

.article-detail__date {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding-left: 20px;
  width: 99.5px;
  height: 54px;
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: left;
  clip-path: polygon(0 0, 100% 0, 71.36% 100%, 0 100%);
}

.article-detail__date-year {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.6px;
  line-height: 1;
}

.article-detail__date-day {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2.24px;
  line-height: 1;
}

.article-detail__title {
  margin: 0;
  flex: 1;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1.6px;
  line-height: 1.75;
}

.article-detail__lead {
  margin: 0;
  padding: 40px 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.8px;
  line-height: 1.75;
}

.article-detail__section {
  margin-bottom: 0;
}

.article-detail__body h2 {
  /* margin: 40px 0; */
  padding: 8px 4px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 1.2px;
  line-height: 1.75;
  border-top: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  margin-top: 40px;
  margin-bottom: 10px;
}


.article-detail__figure,
.article-detail__body figure {
  margin: 0;
  padding: 10px 0;
}

.article-detail__figure img,
.article-detail__body figure img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.article-detail__body {
  padding: 40px 0;
}

.article-detail__lead + .article-detail__body {
  padding-top: 0;
}

.article-detail__body p {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.8px;
  line-height: 1.75;
}

.article-detail__body p:last-child {
  margin-bottom: 0;
}

.article-detail__text-link,
.article-detail__body a {
  color: var(--color-primary);
  transition: opacity 0.2s;
}

.article-detail__text-link:hover,
.article-detail__body a:hover {
  opacity: 0.7;
}

.article-detail__body h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding-bottom: 12px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 1.75;
}

.article-detail__body h3::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  align-self: stretch;
  background-color: var(--color-primary);
}

.article-detail__list,
.article-detail__body ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.article-detail__list li,
.article-detail__body ul li {
  position: relative;
  padding-left: 12px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.8px;
  line-height: 1.75;
}

.article-detail__list li::before,
.article-detail__body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--color-text);
}

.article-detail__cta {
  display: flex;
  justify-content: center;
  padding-bottom: 80px;
}

.article-detail__cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 380px;
  margin-inline: auto;
  padding: 24px;
  background-color: var(--color-primary);
  border-radius: 4px;
  color: var(--color-white);
  font-size: 18px;
  font-weight: 700;
  transition: opacity 0.2s;
  margin-top: 40px;
}

.article-detail__cta-btn:hover {
  opacity: 0.85;
}

.article-detail__cta-icon {
  width: 20px;
  height: 17px;
}

.article-detail__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

.article-detail__nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.8px;
  line-height: 1.75;
  transition: opacity 0.2s;
}

.article-detail__nav-link:hover {
  opacity: 0.7;
}

.article-detail__nav-arrow {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
}

.article-detail__nav-link--prev .article-detail__nav-arrow {
  transform: rotate(135deg);
}

.article-detail__nav-link--next .article-detail__nav-arrow {
  transform: rotate(-45deg);
}

.article-summary {
  position: relative;
  margin: 40px 0;
  padding: 30px 20px 20px;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
}

.article-summary-title {
  position: absolute;
  top: 0;
  left: -1px;
  transform: translateY(-50%);
  margin: 0;
  padding: 5px 15px;
  background: var(--color-primary);
  color: #fff;
  font-weight: bold;
  border-radius: 4px;
}

/* .article-summary ul {
  margin: 0;
  padding-left: 20px;
} */

.article-summary li {
  margin: 10px 0;
}

/* ========================================
   Sidebar Detail
   ======================================== */
.sidebar--detail {
  gap: 47px;
}

.sidebar--detail > div {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.related-card {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  transition: opacity 0.2s;
}

.related-card:hover {
  opacity: 0.8;
}

.related-card img {
  flex-shrink: 0;
  width: 100px;
  aspect-ratio: 4 / 3;
  height: 75px;
  border-radius: 4px;
  object-fit: contain;
}

.related-card p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.7px;
  line-height: 1.75;
}

#ez-toc-container ul li {
  list-style: none !important;
}

#ez-toc-container ul li::before {
  content: none !important;
  display: none !important;
}

.ez-toc-title-container{
  text-align: center;
  margin-bottom: 16px;
}

div#ez-toc-container ul li, div#ez-toc-container ul li a, .ez-toc-split-section ul li, .ez-toc-split-section ul li a {
  font-size: 14px;
  margin-bottom: 8px;
}

div#ez-toc-container, .ez-toc-split-section {
  min-width: 320px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .content {
    flex-direction: column;
  }

  .content__main {
    max-width: 100%;
  }

  .sidebar {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .breadcrumb__list {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .breadcrumb__item {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .breadcrumb__item--current {
    flex: 0 1 max-content;
    max-width: 100%;
    white-space: normal;
  }

  .header__inner {
    padding: 8px 16px;
  }

  .header__logo {
    width: 180px;
  }

  .article-card a {
    flex-direction: column;
    gap: 24px;
  }

  .article-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .article-detail__header {
    flex-direction: column;
    gap: 24px;
  }

  .article-detail__title {
    font-size: 24px;
  }

  .article-detail__cta-btn {
    width: 100%;
    max-width: 380px;
  }

  .article-detail__nav {
    gap: 24px;
  }

  .page-heading__title {
    font-size: 32px;
  }

  .footer__inner {
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 0 16px;
  }

  .footer__left {
    align-items: center;
  }

  .footer__nav {
    width: 100%;
    text-align: center;
  }

  .footer__nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
  }

  .footer__nav-list a {
    font-size: 12px;
  }

  .footer__copyright {
    text-align: center;
  }

  .page-top {
    right: 16px;
    width: 56px;
    height: 56px;
  }

  .page-top__text {
    font-size: 12px;
  }
}

@media (max-width: 425px) {
  .header__logo {
    width: 138px;
  }

  .page-heading {
    margin-bottom: 48px;
  }

  .page-heading__title {
    font-size: 28px;
  }
}
