/*
Theme Name: Sakai Times Home
Theme URI: https://sakai-times.com
Author: Sakai Times
Description: Custom WordPress theme for Sakai Times local news home.
Version: 1.5.6
Requires at least: 6.0
Tested up to: 6.5
Text Domain: sakai-times-home
*/
:root {
  --content: 1224px;
  --orange: #f7bb5d;
  --text: #1d262a;
  --muted: #575757;
  --line: #e6e6e6;
  --font-main: "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: var(--font-main);
  line-height: 1.55;
}

body,
button,
input,
textarea,
select,
.wp-block,
.entry-content,
.entry-title,
.post-title,
.site-title,
.site-description,
.main-navigation,
.site-header,
.site-footer,
.article-card,
.article-card h2,
.article-card .category,
.section-head,
.category-band,
.header-nav,
.bottom-links,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-main);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.site-header {
  background: rgba(255, 255, 255, 0.96);
}

.header-inner {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
  min-height: 154px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 26px;
}

.site-logo {
  display: block;
  width: 370px;
  max-width: 38vw;
}

.site-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.header-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 24px;
  padding-top: 22px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 16px;
  font-weight: 500;
}

.header-nav a,
.header-nav button {
  padding: 0 0 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.header-nav .is-active {
  color: var(--orange);
  border-bottom: 1px solid var(--orange);
}

.nav-folder {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 20;
  display: none;
  width: 230px;
  padding: 8px 0;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}

.nav-folder:hover .nav-dropdown,
.nav-folder:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 9px 16px;
  font-size: 14px;
  white-space: nowrap;
}

.nav-dropdown a:hover {
  color: var(--orange);
}

.search-rank {
  display: block;
  width: 412px;
  height: auto;
}

body.single-post .header-inner {
  min-height: 124px;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 14px;
}

body.single-post .header-side {
  padding-top: 0;
  gap: 0;
}

.orange-rule {
  width: min(var(--content), calc(100% - 48px));
  height: 10px;
  margin: 0 auto;
  background: var(--orange);
}

.page-head {
  background: #fff;
}

.page-head-inner {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.page-title p {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 700;
}

.page-title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.home-feature-strip {
  display: none;
}

.home-feature-card {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  width: auto;
  max-width: 100%;
  color: #2457a6;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.home-feature-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 48px;
  object-fit: contain;
  background: #fff;
}

.home-feature-title {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  text-align: right;
}

.home-feature-title-line {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.home-feature-card:hover .home-feature-title,
.home-feature-card:focus .home-feature-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 901px) {
  .home-feature-strip {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 412px;
    max-width: 48%;
    margin-left: auto;
  }
}

.info-mini {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 8px;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
}

.category-band {
  position: relative;
  min-height: 87px;
  overflow: hidden;
  background: #336e33;
}

.category-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(21, 49, 35, 0.5);
}

.category-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

.category-band-inner {
  position: relative;
  z-index: 1;
  width: min(var(--content), calc(100% - 48px));
  min-height: 87px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.category-band a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
  padding: 9px 6px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.category-band a:hover,
.category-band a:focus,
.category-band a:active {
  background: var(--orange);
  border-radius: 8px;
}

.category-band .submit-link {
  background: #000;
  border-radius: 8px;
  min-width: 112px;
  text-align: center;
  padding-left: 18px;
  padding-right: 18px;
}

.content-section {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto 46px;
}

.home-preview-notice {
  width: min(var(--content), calc(100% - 48px));
  margin: 18px auto;
  padding: 14px 16px;
  border: 2px solid #111;
  background: #fff7df;
  color: #111;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-size: 14px;
}

.home-preview-notice strong {
  font-size: 16px;
}

.home-preview-notice a {
  display: inline-flex;
  align-items: center;
  border: 1px solid #111;
  border-radius: 999px;
  padding: 4px 12px;
  background: #fff;
  font-weight: 700;
}

.latest-section {
  margin-top: 12px;
  margin-bottom: 60px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 6px solid var(--orange);
  padding-top: 16px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.section-head > a {
  color: #333;
  font-size: 14px;
  border: 1px solid #bbb;
  border-radius: 999px;
  padding: 5px 14px;
}

.article-grid {
  display: grid;
  gap: 34px 32px;
}

.article-grid--large {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-card {
  position: relative;
}

.article-card .article-image-link {
  display: block;
  width: 100%;
  aspect-ratio: 1.6 / 1;
  overflow: hidden;
  background: #eee;
}

.article-card .article-image-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-card-tools {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  pointer-events: none;
}

.admin-card-tools span,
.admin-card-tools a {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.84);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.admin-card-tools a {
  background: var(--orange);
  color: #111;
  pointer-events: auto;
}

.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #eee;
  color: #bbb;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.empty-message {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.post-categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  min-width: 0;
}

.article-card .post-categories {
  margin-top: 12px;
}

.article-card .category {
  display: inline-block;
  color: #1d262a;
  font-size: 14px;
  line-height: 1.3;
}

.category-separator {
  color: var(--muted);
  line-height: 1.3;
}

.article-card h2 {
  margin: 12px 0 9px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

.article-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  max-height: 2.9em;
  overflow: hidden;
}

.article-card time {
  color: #333;
  font-size: 15px;
}

.spotlight {
  padding: 60px 0;
  width: 100%;
  max-width: none;
  background: rgb(219, 226, 236);
}

.spotlight .section-head,
.spotlight .article-grid {
  width: min(var(--content), calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

.bottom-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  border-top: 6px solid var(--orange);
  padding-top: 24px;
}

.bottom-links a {
  display: block;
  border: 1px solid var(--line);
  padding: 18px;
  min-height: 112px;
  background: #fff;
}

.bottom-links strong {
  display: block;
  font-size: 18px;
  margin-bottom: 10px;
}

.bottom-links span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.site-footer {
  margin-top: 60px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  background: #f7f7f7;
}

.footer-inner {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner img {
  width: 240px;
  height: auto;
}

.footer-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-policy-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 13px;
}

.footer-policy-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.standard-page-main {
  padding: 42px 0 64px;
}

.standard-page {
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
}

.standard-page-header {
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 4px solid var(--orange);
}

.standard-page-header h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.35;
}

.standard-page-content {
  width: 100%;
  max-width: none;
  margin: 0;
}

.standard-page-content a,
.standard-page-content a:visited {
  color: #0066cc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.standard-page-content a:hover,
.standard-page-content a:focus {
  color: #004f99;
}

.standard-page-content img {
  max-width: 100%;
  height: auto;
}

.archive-list {
  margin-top: 34px;
}

.archive-list .section-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.archive-description {
  margin: -8px 0 22px;
  color: var(--muted);
}

.special-embed-page {
  margin-top: 34px;
}

.sakai-event-calendar-embed iframe,
.sakai-security-map-embed iframe {
  width: 100%;
  border: 0;
  display: block;
  overflow: hidden;
}

.sakai-event-calendar-embed iframe {
  height: 760px;
}

.sakai-security-map-embed iframe {
  height: 460px;
}

.pagination-nav {
  margin-top: 34px;
}

.pagination-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pagination-nav a,
.pagination-nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
}

.pagination-nav .current {
  background: var(--orange);
  border-color: var(--orange);
}

.home-section-footer {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.home-section-footer .pagination-nav {
  grid-column: 2;
  margin-top: 0;
}

.home-section-special-link {
  grid-column: 3;
  justify-self: end;
  color: #2457a6;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-links {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-links a,
.nav-links span {
  border: 1px solid var(--line);
  padding: 6px 10px;
}

.single-post,
.single-post.content-section {
  width: min(980px, calc(100vw - 64px));
  max-width: none;
  margin: 34px auto 46px;
  padding: 0;
}

.single-header {
  text-align: center;
  margin-bottom: 34px;
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.single-meta .post-categories {
  justify-content: center;
}

.single-meta .category {
  color: var(--orange);
  font-weight: 700;
}

.single-post h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.35;
}

.single-excerpt {
  max-width: 640px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.entry-content {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.9;
}

.entry-content img {
  height: auto;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 34px;
  line-height: 1.45;
}

.entry-content p {
  margin: 0 0 1.2em;
}

.single-post .entry-content a,
.single-post .entry-content a:visited,
.single-post .entry-content .st-article a,
.single-post .entry-content .st-article a:visited {
  color: #0066cc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-post .entry-content a:hover,
.single-post .entry-content a:focus,
.single-post .entry-content .st-article a:hover,
.single-post .entry-content .st-article a:focus {
  color: #004f99;
  text-decoration: underline;
}

.entry-content .alignright {
  float: right;
  max-width: 42%;
  margin: 0 0 22px 34px;
}

.entry-content .alignleft {
  float: left;
  max-width: 42%;
  margin: 0 34px 22px 0;
}

.entry-content .aligncenter {
  display: block;
  margin: 24px auto;
}

.single-after-content {
  width: 100%;
  margin-top: 42px;
}

.single-after-content .category-band {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.single-after-latest {
  width: 100%;
  margin-top: 54px;
  margin-bottom: 58px;
}

.single-after-latest-inner {
  width: min(var(--content), calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
  padding-left: 6px;
  box-sizing: border-box;
}

.single-after-latest-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .header-inner,
  .orange-rule,
  .page-head-inner,
  .category-band-inner,
  .content-section,
  .spotlight .section-head,
  .spotlight .article-grid,
  .footer-inner {
    width: min(100% - 32px, 680px);
  }

  .header-inner {
    min-height: 118px;
    align-items: center;
    padding-top: 14px;
    padding-bottom: 10px;
  }

  .site-logo {
    width: 255px;
    max-width: calc(100% - 62px);
  }

  .header-side {
    padding-top: 0;
    gap: 8px;
  }

  .header-nav {
    display: none;
  }

  .search-rank {
    display: block;
    width: 150px;
    max-width: 38vw;
    margin-top: 8px;
  }

  .header-side::before {
    content: "☰";
    font-size: 38px;
    line-height: 1;
  }

  .page-head-inner {
    min-height: 62px;
    display: flex;
    align-items: flex-end;
    padding: 10px 0 8px;
  }

  .page-title p {
    font-size: 15px;
  }

  .page-title h1 {
    font-size: 24px;
  }

  .info-mini {
    display: inline-flex;
    min-width: auto;
    padding: 5px 9px;
    border-radius: 6px;
    background: #777;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    margin-bottom: 2px;
  }

  .category-band {
    min-height: 52px;
  }

  .category-band-inner {
    min-height: 52px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px 6px;
    align-content: center;
    justify-content: initial;
    padding: 4px 0;
  }

  .category-band .submit-link {
    display: none;
  }

  .category-band a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 2px 3px;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
  }

  .latest-section {
    margin-top: 18px;
  }

  .content-section {
    margin-bottom: 34px;
  }

  .section-head {
    border-top-width: 5px;
    padding-top: 12px;
    margin-bottom: 18px;
  }

  .section-head h2 {
    font-size: 21px;
  }

  .article-grid--large,
  .article-grid--three,
  .article-grid--two,
  .bottom-links {
    grid-template-columns: 1fr;
  }

  .article-grid {
    gap: 30px;
  }

  .article-card .post-categories {
    margin-top: 12px;
  }

  .article-card .category {
    font-size: 15px;
  }

  .article-card h2 {
    margin: 12px 0 10px;
    font-size: 22px;
    line-height: 1.38;
  }

  .article-card p {
    font-size: 17px;
    line-height: 1.45;
    max-height: 2.9em;
  }

  .article-card time {
    font-size: 16px;
  }

  .spotlight {
    padding: 22px 0 30px;
  }

  .bottom-links {
    gap: 12px;
  }

  .bottom-links a {
    min-height: 0;
    padding: 15px;
  }

  .footer-inner {
    display: block;
  }

  .footer-brand p {
    margin-top: 14px;
  }

  .footer-policy-links {
    justify-content: flex-start;
    margin-top: 20px;
  }

  .standard-page-main {
    padding: 28px 0 44px;
  }

  .standard-page {
    width: min(100% - 32px, 680px);
  }

  .standard-page-header {
    margin-bottom: 22px;
  }

  .single-post h1 {
    font-size: 24px;
  }

  .single-post,
  .single-post.content-section {
    width: calc(100% - 32px);
    margin-top: 26px;
  }

  .single-after-content {
    margin-top: 30px;
  }

  .single-after-content .single-after-latest {
    width: 100%;
    margin-top: 34px;
  }

  .single-after-content .single-after-latest-inner {
    width: min(100% - 32px, 680px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
  }

  .single-after-content .single-after-latest-grid {
    grid-template-columns: 1fr;
  }

  .entry-content {
    font-size: 16px;
  }

  .entry-content .alignright,
  .entry-content .alignleft {
    float: none;
    display: block;
    max-width: 100%;
    margin: 18px auto;
  }

  .sakai-event-calendar-embed iframe {
    height: 900px;
  }

  .sakai-security-map-embed iframe {
    height: 560px;
  }

  .pagination-nav ul {
    justify-content: flex-start;
  }

  .home-section-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .home-section-footer .pagination-nav {
    width: 100%;
  }

  .home-section-footer .pagination-nav ul {
    justify-content: center;
  }

  .home-section-special-link {
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  .search-rank {
    margin-top: 22px;
  }
}

@media (max-width: 400px) {
  .header-inner,
  .orange-rule,
  .page-head-inner,
  .category-band-inner,
  .content-section,
  .spotlight .section-head,
  .spotlight .article-grid,
  .footer-inner {
    width: calc(100% - 28px);
  }

  .site-logo {
    width: 240px;
  }

  .search-rank {
    width: 136px;
  }

  .category-band-inner {
    gap: 3px 5px;
  }

  .category-band a {
    font-size: 10.5px;
    min-height: 20px;
  }

  .single-after-content .single-after-latest-inner {
    width: calc(100% - 28px);
  }
}

