/*
 * YHT Topix Panel - yahatazushiOS
 * DESIGN LOCK: values below mirror the supplied stable topix_panel.css.
 * Only pagination colors are driven by CSS variables from the saved settings.
 */
.yht-yos-topix-panel,
.yht-yos-topix-panel .yht-yos-topix-panel__topics,
.yht-yos-topix-panel > div:first-child {
  border-left: none !important;
}

.yht-yos-topix-panel {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  max-width: 1100px;
  margin: 50px auto;
  padding: 0 15px;
  box-sizing: border-box;
  position: relative;
}

.yht-yos-topix-panel__topics {
  width: 50%;
  box-sizing: border-box;
  padding-left: 0 !important;
  margin-left: 0 !important;
  position: relative;
}

.yht-yos-topix-panel__news {
  width: 50%;
  box-sizing: border-box;
  padding-left: 20px;
  position: relative;
  border-left: none !important;
}

.yht-yos-topix-panel__section-label {
  font-size: 1.3em;
  font-weight: normal;
  margin-bottom: 15px;
}

.yht-yos-topix-panel__img-wrapper,
.yht-yos-topix-panel__news-img-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.yht-yos-topix-panel__img-wrapper img,
.yht-yos-topix-panel__news-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  display: block;
}

.yht-yos-topix-panel__img-wrapper:hover img,
.yht-yos-topix-panel__news-img-box:hover img {
  transform: scale(1.05);
}

.yht-yos-topix-panel__slide-text {
  font-size: 0.85em;
  font-weight: bold;
  margin-top: 10px;
  color: #000;
  text-align: left;
}

.yht-yos-topix-panel__slide-description {
  font-size: 0.75em;
  color: #444;
  line-height: 1.6;
  margin-bottom: 20px;
}

.yht-yos-topix-panel__news-date {
  font-size: 0.65em;
  color: #666;
  margin-top: 10px;
  text-align: left;
}

.yht-yos-topix-panel__news-title {
  font-size: 0.75em;
  font-weight: normal;
  padding: 5px 0 0;
  line-height: 1.6;
  color: #000;
  text-align: left;
}

.yht-yos-topix-panel__news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  position: relative;
  align-items: start;
}

.yht-yos-topix-panel__news-grid::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background-color: #ccc;
  z-index: 1;
  pointer-events: none;
}

.yht-yos-topix-panel__news-grid > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.yht-yos-topix-panel__meta-overlay {
  position: absolute;
  top: 0;
  left: 0;
  background: black;
  color: white;
  display: flex;
  align-items: center;
  padding: 5px 10px;
  z-index: 10;
}

.yht-yos-topix-panel__date {
  margin-right: 10px;
  font-size: 14px;
}

.yht-yos-topix-panel__page {
  background: var(--yht-topix-page-bg, #333333);
  color: var(--yht-topix-page-text, #FFFFFF);
  border: none;
  margin-left: 5px;
  padding: 10px 14px 10px;
  font-size: 0.7em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.yht-yos-topix-panel__page.active {
  background: var(--yht-topix-page-active, #C0E4DA);
}

.yht-yos-topix-panel__slider-wrapper {
  position: relative;
}

.yht-yos-topix-panel__slide {
  display: none;
}

.yht-yos-topix-panel__slide.active {
  display: block;
  animation: yht-yos-topix-fadeIn 0.5s ease-in-out;
}

@keyframes yht-yos-topix-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.yht-yos-topix-panel__slide-link,
.yht-yos-topix-panel__news-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Fixed current NEW badge design. It is owned by this module so it no longer
   depends on another global blog-card stylesheet. */
.yht-yos-topix-panel__new {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e60023;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 3px;
  z-index: 10;
  letter-spacing: .5px;
}

@media (min-width: 769px) {
  .yht-yos-topix-panel {
    gap: 30px !important;
  }
}

@media screen and (max-width: 768px) {
  .yht-yos-topix-panel {
    flex-direction: column;
    padding: 0 10px;
  }

  .yht-yos-topix-panel__topics,
  .yht-yos-topix-panel__news {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
  }

  .yht-yos-topix-panel__news-grid {
    grid-template-columns: 1fr;
  }

  .yht-yos-topix-panel__news-grid::before {
    display: none;
  }
}
