/* ==========================================================================
   TMI News Section - Extracted & adapted from original site
   Font sizes scaled down ~80% from original, with 3 responsive breakpoints:
     Desktop: > 999px
     Tablet:  744px – 999px
     Mobile:  < 743px
   ========================================================================== */

/* ── Base / Reset (scoped to #page_news) ─────────────────────────────── */
#page_news {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  color: #313440;
  line-height: 180%;
}
#page_news *, #page_news *::before, #page_news *::after {
  box-sizing: border-box;
}
#page_news ul, #page_news li {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Restore list styles inside article content */
#blockeditor ul {
  list-style: disc;
  margin: 0.8rem 0 2rem 1.5rem;
  padding: 0;
}
#blockeditor ul li {
  list-style: disc;
  margin-bottom: 0.4rem;
  padding: 0;
}
#blockeditor ul ul {
  list-style: circle;
  margin: 0.4rem 0 0.4rem 1.5rem;
}
#blockeditor ul ul ul {
  list-style: square;
}
#page_news a {
  color: #2164E6;
}
#page_news img {
  border: 0;
  vertical-align: bottom;
  height: auto !important;
  max-width: 100%;
}

/* ── ttl_style01 (section heading with top line) ─────────────────────── */
.ttl_style01 {
  font-size: 26px;
  line-height: 130%;
  position: relative;
  padding-top: 1.6rem;
}
.ttl_style01::before {
  content: "";
  width: 60px;
  height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='73' height='9'%3E%3Crect width='73' height='9' rx='4.5' fill='%2318D064'/%3E%3C/svg%3E") 0 0 no-repeat;
  background-size: 100% auto;
  position: absolute;
  top: 0;
  left: 0;
}
.ttl_style01.center { text-align: center; }
.ttl_style01.center::before { left: calc((100% - 60px) / 2); }

/* ── btn_style01 (red CTA button) ────────────────────────────────────── */
.btn_style01 a {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 0.8rem 0;
  background-color: #ec191b;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn_style01 a:hover { background-color: #c3005a; }

/* ── News Listing Page (#page_news #news) ────────────────────────────── */
#page_news #news {
  width: 1080px;
  margin: 0 auto 3rem;
  overflow: hidden;
}
/* When used inside a shortcode / Elementor column, fit the container */
#page_news #news.tmi-shortcode {
  width: 100%;
  margin-bottom: 1.5rem;
}

#page_news #news .flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* Index area (left column) */
#page_news #news .index_area {
  flex: 1 1 auto;
  margin-right: 3rem;
}
#page_news #news .index_area .ttl_style01 { margin-bottom: 2rem; }

/* Category filter dropdown */
#page_news #news .index_area .category_list_box {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}
#page_news #news .index_area .category_list_box .ttl {
  margin-right: 1rem;
  font-size: 13px;
  font-weight: 500;
}
#page_news #news .index_area .category_list_box select {
  font-size: 12px;
  border: 1px solid #C6CFDE;
  background-color: #fff;
  color: #313440;
  border-radius: 5px;
  padding: 0.3rem 0.5rem;
}

/* News index list */
#page_news #news .index { margin-bottom: 2.5rem; overflow: hidden; }

#news .index > li {
  border-bottom: 1px solid #E3EAF6;
  overflow: hidden;
}
#news .index > li a {
  position: relative;
  display: block;
  padding: 0.6rem 2rem 0.6rem 0;
  color: #303139;
  text-decoration: none;
}
#news .index > li a:hover { opacity: 0.8; }

#news .index > li a::after {
  transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='10'%3E%3Cpath d='M1 1l4 4-4 4' stroke='%232164E6' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") right center no-repeat;
  background-size: 100% auto;
}
#news .index > li a:hover::after {
  transform: translateX(-5px);
}

/* Meta row (date + category badges) */
#news .index > li a .meta {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}
#news .index > li a .meta .data {
  font-size: 13px;
  font-weight: 500;
  color: #58616E;
  margin-right: 0.8rem;
}
#news .index > li a .meta .category {
  display: flex;
  flex-wrap: wrap;
}

/* Category badge colors — shared between listing & single */
#news .index > li a .meta .category li,
#single_news .category li {
  background-color: #eee;
  font-size: 11px;
  font-weight: 700;
  line-height: 100%;
  margin-right: 0.6rem;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
}
#news .index > li a .meta .category li.info,
#single_news .category li.info {
  background-color: #A4E6BF;
}
#news .index > li a .meta .category li.pressrelease,
#single_news .category li.pressrelease {
  background-color: #B2DDFF;
}
#news .index > li a .meta .category li.event,
#single_news .category li.event {
  background-color: #F8F484;
}

/* News item title (truncated) */
#news .index > li a .ttl {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Pagination ──────────────────────────────────────────────────────── */
#page_news .paging {
  display: flex;
  align-items: center;
  justify-content: center;
}
#page_news .paging .paging_lists {
  display: flex;
  justify-content: center;
  margin: 0 0.5rem;
}
#page_news .paging .link_page {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2164E6;
  width: 32px;
  height: 32px;
  text-decoration: none;
  margin: 0 0.3rem;
  color: #2164E6;
  transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
}
#page_news .paging .link_page:hover {
  background-color: #2164E6;
  color: #fff;
}
#page_news .paging .current_page {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2164E6;
  background-color: #2164E6;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  width: 32px;
  height: 32px;
  margin: 0 0.3rem;
  border-radius: 4px;
}
#page_news .paging .paging_next a {
  font-size: 0;
  display: block;
  width: 32px;
  height: 32px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='14'%3E%3Cpath d='M1 1l6 6-6 6' stroke='%23313440' stroke-width='2' fill='none'/%3E%3C/svg%3E") center center no-repeat;
  background-size: 30% auto;
  transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#page_news .paging .paging_next a:hover {
  transform: translateX(5px);
}

/* ── Archive Sidebar (right column) ──────────────────────────────────── */
#page_news #news .archive_list {
  flex: 0 0 180px;
  box-sizing: border-box;
  background-color: #E3EAF6;
  padding: 1rem;
}
#page_news #news .archive_list h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 0.8rem;
}
#page_news #news .archive_list ul li {
  margin-bottom: 1px;
}
#page_news #news .archive_list ul li a {
  display: block;
  color: #313440;
  font-size: 13px;
  font-weight: 700;
  padding: 0.6rem;
  text-decoration: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Ccircle cx='8' cy='8' r='7' stroke='%23313440' stroke-width='1' fill='none'/%3E%3Cpath d='M6.5 5l3 3-3 3' stroke='%23313440' stroke-width='1.2' fill='none'/%3E%3C/svg%3E");
  background-position: right 0.6rem top 50%;
  background-repeat: no-repeat;
  background-size: 14px;
  transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#page_news #news .archive_list ul li a:hover {
  background-position: right 0.9rem top 50%;
}

/* ── Single News Post (#single_news) ─────────────────────────────────── */
#page_news #single_news {
  width: 1080px;
  margin: 0 auto 5rem;
}
#page_news #single_news .ttl_style01 {
  margin-bottom: 1.5rem;
  font-size: 24px;
}
#page_news #single_news .meta {
  display: flex;
  align-items: center;
  margin-bottom: 3.5rem;
}
#page_news #single_news .category {
  display: flex;
  flex-wrap: wrap;
  margin-right: 0.5rem;
  position: relative;
  top: -0.2rem;
}
#page_news #single_news .meta .updata {
  font-size: 13px;
  position: relative;
  top: -0.2rem;
}
#page_news #single_news .btn_style01.back {
  width: 260px;
  margin: 0 auto 4rem;
}
#page_news #single_news .btn_style01.back a {
  color: #fff;
}

/* ── Block Editor Content Area (#blockeditor) ────────────────────────── */
#blockeditor {
  font-size: 14px;
  line-height: 180%;
  margin-bottom: 3.5rem;
}
#blockeditor a {
  color: #2164E6;
  font-weight: 700;
}
#blockeditor div {
  margin-bottom: 3rem;
  line-height: 180%;
}
#blockeditor div:last-child { margin-bottom: 0; }
#blockeditor p {
  margin-bottom: 3rem;
  line-height: 180%;
}
#blockeditor p:last-child { margin-bottom: 0; }

#blockeditor h1 {
  font-size: 22px;
  line-height: 160%;
  font-weight: 600;
  margin-bottom: 2rem;
}
#blockeditor h2 {
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 1.2rem;
  margin-bottom: 2.5rem;
  position: relative;
}
#blockeditor h2::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background-color: #E3EAF6;
}
#blockeditor h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100px;
  height: 3px;
  background-color: #18D064;
}

#blockeditor h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 150%;
  padding: 0 0 0.8rem 22px;
  border-bottom: 1px solid #E3EAF6;
  margin-bottom: 2rem;
  position: relative;
}
#blockeditor h3::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 100px;
  background-color: #18D064;
  position: absolute;
  top: 0.4rem;
  left: 0;
}

#blockeditor h4 {
  font-size: 15px;
  padding-left: 1.2rem;
  border-left: 3px solid #18D064;
  margin-bottom: 1.5rem;
}
#blockeditor h5 {
  font-size: 14px;
  padding-left: 1.2rem;
  border-left: 2px solid #999;
  margin-bottom: 1.2rem;
}
#blockeditor h6 {
  font-size: 13px;
  margin-bottom: 1.2rem;
}

/* Tables inside blockeditor */
#blockeditor table {
  width: 100%;
  font-size: 13px;
  margin-bottom: 3rem;
  border-collapse: collapse;
  border: none;
}
#blockeditor table th {
  border: 1px solid #5395CE;
  background-color: #DBEEFF;
  padding: 0.8rem 1rem;
  line-height: 150%;
}
#blockeditor table td {
  border: 1px solid #5395CE;
  padding: 0.8rem 1rem;
  line-height: 150%;
}
#blockeditor table td a { word-break: break-all; }

#blockeditor ol {
  margin: 0.8rem 0 2rem 1.5rem;
  padding: 0;
}
#blockeditor ol li {
  margin-bottom: 0.4rem;
  list-style: decimal;
}

/* ==========================================================================
   TABLET (744px – 999px)
   ========================================================================== */
@media screen and (max-width: 999px) {
  #page_news { font-size: 13px; }

  .ttl_style01 { font-size: 22px; padding-top: 1.4rem; }
  .ttl_style01::before { width: 50px; height: 6px; }

  .btn_style01 a { font-size: 15px; padding: 0.7rem 0; }

  #page_news #news { width: 95%; margin-bottom: 3rem; }

  #page_news #news .index_area { margin-right: 2rem; }

  #news .index > li a .meta .data { font-size: 12px; }
  #news .index > li a .meta .category li,
  #single_news .category li { font-size: 10px; padding: 0.35rem 0.6rem; }
  #news .index > li a .ttl { font-size: 13px; }

  #page_news #news .archive_list { flex: 0 0 160px; }
  #page_news #news .archive_list h3 { font-size: 13px; }
  #page_news #news .archive_list ul li a { font-size: 12px; }

  #page_news #single_news { width: 95%; }
  #page_news #single_news .ttl_style01 { font-size: 20px; }
  #page_news #single_news .meta .updata { font-size: 12px; }
  #page_news #single_news .meta { margin-bottom: 2.5rem; }

  #blockeditor { font-size: 13px; }
  #blockeditor h1 { font-size: 19px; }
  #blockeditor h2 { font-size: 16px; margin-bottom: 2rem; }
  #blockeditor h3 { font-size: 15px; }
  #blockeditor h4 { font-size: 14px; }
  #blockeditor h5 { font-size: 13px; }
  #blockeditor h6 { font-size: 12px; }
  #blockeditor table { font-size: 12px; }
}

/* ==========================================================================
   MOBILE (< 743px)
   ========================================================================== */
@media screen and (max-width: 743px) {
  #page_news { font-size: 12px; }

  .ttl_style01 { font-size: 20px; padding-top: 1.2rem; }
  .ttl_style01::before { width: 45px; height: 5px; }
  .ttl_style01.sp_center { text-align: center; }
  .ttl_style01.sp_center::before { left: calc((100% - 45px) / 2); }

  .btn_style01 a { font-size: 14px; padding: 0.6rem 0; }

  #page_news #news { margin-bottom: 2rem; }
  #page_news #news .flex { display: block; }
  #page_news #news .index_area { margin: 0 0 3rem 0; }
  #page_news #news .index_area .category_list_box { justify-content: center; }
  #page_news #news .index_area .category_list_box .ttl { font-size: 12px; }
  #page_news #news .index { margin-bottom: 1.5rem; }

  #news .index > li a .meta { margin-bottom: 0.3rem; }
  #news .index > li a .meta .data { font-size: 11px; }
  #news .index > li a .meta .category li,
  #single_news .category li { font-size: 9px; padding: 0.3rem 0.5rem; margin-right: 0.4rem; }
  #news .index > li a .ttl { font-size: 12px; }

  #page_news .paging { margin-top: 1.5rem; }
  #page_news .paging .link_page,
  #page_news .paging .current_page { width: 28px; height: 28px; font-size: 11px; }
  #page_news .paging .paging_next a { width: 28px; height: 28px; }
  #page_news .paging .paging_prev a { width: 28px; height: 28px; }
  #page_news .paging .paging_first a,
  #page_news .paging .paging_last a { width: 28px; height: 28px; font-size: 14px; }
  #page_news .paging .paging_ellipsis { width: 24px; height: 28px; font-size: 12px; }

  #page_news #news .archive_list { flex: none; width: 100%; }
  #page_news #news .archive_list h3 { font-size: 13px; }
  #page_news #news .archive_list ul li a { font-size: 12px; padding: 0.5rem; }

  #page_news #single_news { width: 90%; margin-bottom: 4rem; }
  #page_news #single_news .ttl_style01 { font-size: 18px; margin-bottom: 1.2rem; }
  #page_news #single_news .meta { margin-bottom: 2rem; }
  #page_news #single_news .meta .updata { font-size: 11px; }
  #page_news #single_news .btn_style01.back { width: 220px; margin-bottom: 3rem; }

  #blockeditor { font-size: 12px; margin-bottom: 2.5rem; }
  #blockeditor p { margin-bottom: 2rem; }
  #blockeditor div { margin-bottom: 2rem; }
  #blockeditor h1 { font-size: 17px; margin-bottom: 1.5rem; }
  #blockeditor h2 { font-size: 15px; padding-bottom: 1rem; margin-bottom: 1.8rem; }
  #blockeditor h2::after { width: 80px; }
  #blockeditor h3 { font-size: 14px; padding: 0 0 0.7rem 20px; margin-bottom: 1.5rem; }
  #blockeditor h3::before { width: 12px; height: 12px; top: 0.3rem; }
  #blockeditor h4 { font-size: 13px; margin-bottom: 1.2rem; }
  #blockeditor h5 { font-size: 12px; margin-bottom: 1rem; }
  #blockeditor h6 { font-size: 11px; margin-bottom: 1rem; }
  #blockeditor table { font-size: 11px; }
  #blockeditor table th,
  #blockeditor table td { padding: 0.5rem 0.7rem; }
}

/* ── Breadcrumbs responsive ──────────────────────────────────────────── */
#page_news .topicpath-nav { margin: 0.5rem 5%; }
#page_news .topicpath-nav ul { display: flex; flex-wrap: wrap; }
#page_news .topicpath-nav ul li { margin: 0.2rem 0.6rem 0.2rem 0; font-size: 12px; }
#page_news .topicpath-nav ul li a { padding-right: 14px; color: #2164E6; }
@media screen and (max-width: 743px) {
  #page_news .topicpath-nav ul li { font-size: 10px; }
}

/* ── Gallery images inside news articles ─────────────────────────────── */
#blockeditor .wp-block-gallery {
  margin-bottom: 2rem;
}
#blockeditor .wp-block-gallery .wp-block-image {
  margin-bottom: 0;
}
#blockeditor .wp-block-gallery .wp-block-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
/* Control gallery image max height — adjust this value as needed */
#blockeditor .wp-block-gallery.columns-2 .wp-block-image img,
#blockeditor .wp-block-gallery.columns-3 .wp-block-image img {
  max-height: 300px;
  object-fit: cover;
}
#blockeditor .wp-block-gallery.columns-4 .wp-block-image img {
  max-height: 220px;
  object-fit: cover;
}
/* Single images in content */
#blockeditor img {
  max-width: 100%;
  height: auto;
}
#blockeditor .wp-block-image {
  margin-bottom: 2rem;
}
#blockeditor .wp-block-image img {
  border-radius: 4px;
}

/* ── Shortcode-specific compact overrides ────────────────────────────── */
#news.tmi-shortcode .index_area .ttl_style01 { margin-bottom: 1.2rem; }
#news.tmi-shortcode .index_area .category_list_box { margin-bottom: 1rem; }
#news.tmi-shortcode .archive_list { display: none; }
#news.tmi-shortcode .paging { margin-top: 1rem; }

/* AJAX pagination wrapper transition */
.tmi-news-ajax-wrap {
  transition: opacity 0.2s ease;
}

/* Prev button (mirrors Next button styling) */
#page_news .paging .paging_prev a {
  font-size: 0;
  display: block;
  width: 32px;
  height: 32px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='14'%3E%3Cpath d='M7 1l-6 6 6 6' stroke='%23313440' stroke-width='2' fill='none'/%3E%3C/svg%3E") center center no-repeat;
  background-size: 30% auto;
  transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#page_news .paging .paging_prev a:hover {
  transform: translateX(-5px);
}

/* First «  and Last » buttons */
#page_news .paging .paging_first a,
#page_news .paging .paging_last a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  text-decoration: none;
  color: #313440;
  font-size: 16px;
  font-weight: 700;
  transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#page_news .paging .paging_first a:hover {
  transform: translateX(-5px);
}
#page_news .paging .paging_last a:hover {
  transform: translateX(5px);
}

/* Ellipsis between page numbers */
#page_news .paging .paging_ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 14px;
  color: #58616E;
  user-select: none;
}

/* ── Archive sidebar "Older" toggle ──────────────────────────────────── */
.archive-older-toggle > a {
  display: block;
  color: #313440;
  font-size: 13px;
  font-weight: 700;
  padding: 0.6rem;
  text-decoration: none;
  background-color: #d4dded;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23313440' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-position: right 0.7rem top 50%;
  background-repeat: no-repeat;
  background-size: 10px;
  transition: 0.2s ease;
}
.archive-older-toggle > a.open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 5l4-4 4 4' stroke='%23313440' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
}
.archive-older-toggle > a:hover { background-color: #c6cfde; }
#tmi-older-years { padding: 0; margin: 0; }
#tmi-older-years li { margin-bottom: 1px; }