/*
  Optional modern visual theme for the ZBO website.

  This file is intentionally loaded after style.css and contains presentation
  overrides only. Remove its <link> element to restore the previous design.
*/

:root {
  --zbo-ink: #19312f;
  --zbo-muted: #5d706d;
  --zbo-deep: #123b38;
  --zbo-deep-hover: #1b4c48;
  --zbo-green: #668b38;
  --zbo-green-bright: #a7cc68;
  --zbo-mint: #e5eee8;
  --zbo-paper: #f4f6f2;
  --zbo-surface: #ffffff;
  --zbo-line: #d9e3dc;
  --zbo-radius-large: 22px;
  --zbo-radius: 15px;
  --zbo-page-width: 1120px;
}

html {
  height: auto;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 4%, rgba(167, 204, 104, 0.24), transparent 25rem),
    radial-gradient(circle at 92% 18%, rgba(83, 160, 153, 0.18), transparent 30rem),
    linear-gradient(145deg, #edf2eb 0%, #f8f8f4 45%, #e7efeb 100%);
  color: var(--zbo-ink);
  font-family: Inter, Manrope, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.36;
  background-image: radial-gradient(rgba(18, 59, 56, 0.17) 0.8px, transparent 0.8px);
  background-size: 22px 22px;
  content: "";
  pointer-events: none;
}

p {
  padding-bottom: 1.25rem;
  color: var(--zbo-ink);
  font-size: 1rem;
  line-height: 1.72;
}

a,
a:hover {
  color: #286a3f;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #174f31;
}

a:focus-visible,
button:focus-visible,
.slideshow:focus-visible {
  outline: 3px solid #96bd55;
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--zbo-ink);
  font-family: Manrope, Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: -0.025em;
}

h2 {
  margin: 0 0 1rem;
  padding: 0 0 0.55rem;
  border-bottom: 1px solid var(--zbo-line);
  font-size: clamp(1.4rem, 2.3vw, 1.75rem);
  font-weight: 650;
}

h2::after {
  display: block;
  width: 52px;
  height: 3px;
  margin-top: 0.55rem;
  border-radius: 2px;
  background: var(--zbo-green);
  content: "";
}

h3 {
  margin-top: 0.4rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.012em;
}

#header {
  width: min(var(--zbo-page-width), calc(100% - 32px));
  padding: 28px 0 20px;
}

#banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  gap: 14px;
  width: 100%;
  height: auto;
  padding: 0;
  text-align: left;
}

#banner h1 {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0 4px 10px;
  color: var(--zbo-deep);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

#banner h1 span {
  color: var(--zbo-green);
  font-weight: 580;
}

#menubar {
  float: none;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
}

ul#menu {
  display: flex;
  float: none;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--zbo-radius);
  background: var(--zbo-deep);
}

ul#menu li {
  display: flex;
  flex: 1 1 auto;
  margin: 0;
}

ul#menu li a {
  display: flex;
  align-items: center;
  justify-content: center;
  float: none;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #f8fbf8;
  font-size: 0.94rem;
  font-weight: 590;
  letter-spacing: -0.01em;
  transition: background-color 160ms ease, color 160ms ease;
}

ul#menu li a:hover {
  background: var(--zbo-deep-hover);
  color: #fff;
  text-decoration: none;
}

ul#menu li a[aria-current="page"] {
  background: var(--zbo-green-bright);
  color: #17302e;
}

#contact {
  display: flex;
  align-items: center;
  justify-content: center;
  float: none;
  width: 126px;
  height: 58px;
  margin: 0;
  border: 1px solid var(--zbo-line);
  border-radius: var(--zbo-radius);
  background: rgba(255, 255, 255, 0.82);
}

#contact a {
  display: flex;
  align-items: center;
  justify-content: center;
}

#contact img {
  width: 100px;
  height: 50px;
  object-fit: contain;
}

#site_content {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 24px;
  align-items: start;
  box-sizing: border-box;
  width: min(var(--zbo-page-width), calc(100% - 32px));
  overflow: visible;
  padding: 24px;
  border: 1px solid rgba(18, 59, 56, 0.1);
  border-radius: var(--zbo-radius-large);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
}

.sidebar_container {
  grid-column: 1;
  grid-row: 1 / span 2;
  float: none;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid #b9cdbd;
  border-radius: var(--zbo-radius);
  background: #edf3ee;
}

.hot-news-frame {
  display: block;
  width: 100%;
  height: 1000px;
  border: 0;
  background: #edf3ee;
}

body.hot-news-page {
  width: auto;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #edf3ee;
}

body.hot-news-page::before {
  display: none;
}

.hot-news-page .sidebar {
  float: none;
  box-sizing: border-box;
  width: auto;
  margin: 0;
  padding: 22px 20px;
}

.hot-news-page .sidebar_item {
  width: auto;
  padding: 0;
}

.sidebar > h1 {
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 2px solid #adc49f;
  color: #102f2c;
  font-size: 1.6rem;
  font-weight: 750;
  line-height: 1.2;
}

.sidebar article {
  position: relative;
  padding: 2px 0 18px;
}

.sidebar article + article {
  padding-top: 17px;
  border-top: 1px solid #cbd9ce;
}

.sidebar h3,
.sidebar h4 {
  margin-bottom: 0.45rem;
  color: #102f2c;
  font-size: 1.18rem;
  font-weight: 750;
  line-height: 1.3;
}

.sidebar p {
  padding-bottom: 0.8rem;
  color: #263b38;
  font-size: 1.06rem;
  line-height: 1.62;
}

.sidebar a {
  color: #174f31;
  font-size: 1.02rem;
  font-weight: 700;
}

.sidebar .button_small {
  min-height: 38px;
  color: #fff;
  font-size: 0.98rem;
}

ul.slideshow {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 13 / 6;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(18, 59, 56, 0.14);
  border-radius: 18px;
  background: var(--zbo-deep);
}

ul.slideshow li {
  top: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 700ms ease;
}

ul.slideshow li.show,
ul.slideshow li#slideshow-caption,
ul.slideshow li.slideshow-accessibility-controls {
  opacity: 1;
}

.slideshow img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

#slideshow-caption {
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(7, 31, 29, 0.78) 0%, rgba(7, 31, 29, 0.12) 43%, transparent 64%);
  pointer-events: none;
}

#slideshow-caption .slideshow-caption-container {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: clamp(18px, 3vw, 30px);
}

#slideshow-caption p {
  max-width: 80%;
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 720;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.slideshow-pause {
  border-color: #d7e9c0;
  border-radius: 9px;
  color: var(--zbo-deep);
  font: 650 0.86rem Inter, "Segoe UI", sans-serif;
}

#content {
  grid-column: 2;
  grid-row: 2;
  float: none;
  box-sizing: border-box;
  width: 100%;
  margin: 16px 0 0;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--zbo-line);
  border-radius: 18px;
  background: var(--zbo-surface);
}

.content_item {
  width: auto;
  max-width: 100%;
  margin: 0;
}

.content_item > p:last-child,
.content_item > ul:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
}

.content-logo,
.member-photo,
.item-icon {
  padding-right: 12px;
}

.content-logo {
  margin: 4px 5px 8px 0;
}

.member-photo {
  margin-bottom: 8px;
}

.member-photo img {
  border: 2px solid #dce7df;
  border-radius: 14px;
  background: var(--zbo-mint);
}

.former-members {
  display: flow-root;
  clear: both;
  margin: 34px -18px -18px;
  padding: 28px 22px 22px;
  border: 1px solid #d5dcda;
  border-radius: 15px;
  background: #f0f2f1;
}

.former-members h2 {
  color: #394b48;
}

.former-members h2::after {
  background: #899894;
}

.former-members h3 {
  clear: both;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #d4dcda;
}

.former-members h2 + h3 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.former-members p:last-child {
  padding-bottom: 0;
}

.item-icon {
  width: 58px;
}

.item-icon img {
  width: 46px;
  height: 46px;
  padding: 8px;
  border: 1px solid #d6e4d9;
  border-radius: 13px;
  background: var(--zbo-mint);
  object-fit: contain;
}

.news-photo {
  margin: 0 0 24px 58px;
}

.news-photo img {
  display: block;
  max-width: 100%;
  border-radius: 14px;
}

#content iframe:not(.hot-news-frame) {
  display: block;
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--zbo-line);
  border-radius: 12px;
  background: var(--zbo-paper);
}

.sheet-table-card {
  width: 100%;
  margin: 16px 0 30px;
  overflow: hidden;
  border: 1px solid #b9cdbd;
  border-radius: var(--zbo-radius);
  background: #fff;
}

.sheet-table-scroll {
  max-width: 100%;
  max-height: min(520px, 70vh);
  overflow-x: auto;
  overflow-y: scroll;
  scrollbar-color: var(--zbo-deep) #e6eee7;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.sheet-table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.sheet-table-scroll::-webkit-scrollbar-track {
  background: #e6eee7;
}

.sheet-table-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #e6eee7;
  border-radius: 999px;
  background: var(--zbo-deep);
}

.sheet-table-scroll:focus-visible {
  outline: 3px solid rgba(113, 151, 67, 0.42);
  outline-offset: -3px;
}

.schedule-table {
  width: 100%;
  min-width: 560px;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  color: var(--zbo-text);
  font-size: 0.9rem;
  line-height: 1.42;
}

.schedule-table th,
.schedule-table td {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #d6e1d8;
  text-align: left;
  vertical-align: top;
  white-space: normal;
}

.schedule-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--zbo-deep);
  color: #fff;
  font-weight: 700;
}

.schedule-table .schedule-year-row th {
  position: static;
  padding-top: 9px;
  padding-bottom: 9px;
  border-top: 2px solid #8da487;
  border-bottom: 2px solid #8da487;
  background: #abc0a5;
  color: #000;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.schedule-table thead th:first-child,
.schedule-table tbody td:first-child {
  width: 12%;
  white-space: nowrap;
}

.schedule-table thead th:nth-child(2),
.schedule-table tbody td:nth-child(2) {
  width: 28%;
}

.schedule-table thead th:nth-child(3),
.schedule-table tbody td:nth-child(3) {
  width: 60%;
}

.schedule-table tbody tr:nth-child(even) {
  background: #f2f6f2;
}

.schedule-table tbody tr:hover {
  background: #e8f0e8;
}

.schedule-table tbody tr:last-child td {
  border-bottom: 0;
}

.schedule-table a {
  overflow-wrap: anywhere;
}

.sheet-table-status {
  margin: 0;
  padding: 24px;
  color: var(--zbo-muted);
  text-align: center;
}

.sheet-table-error {
  color: #4f5f5c;
}

.sheet-table-fallback {
  display: block;
  width: 100%;
  height: 350px;
  border: 0;
  background: #fff;
}

#content ul {
  margin-left: 1.25rem;
}

#content li {
  padding-left: 0.25rem;
  margin-bottom: 0.5rem;
}

.button_small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 130px;
  height: 36px;
  margin-bottom: 10px;
  padding: 0 16px;
  border-radius: 9px;
  background: var(--zbo-deep);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 650;
}

.button_small:hover {
  background: var(--zbo-deep-hover);
  color: #fff;
  text-decoration: none;
}

.menu-toggle {
  border: 0;
  border-radius: 10px;
  background: var(--zbo-deep);
  color: #fff;
  font-weight: 650;
}

#footer {
  box-sizing: border-box;
  width: min(var(--zbo-page-width), calc(100% - 32px));
  height: auto;
  margin-top: 20px;
  padding: 22px 16px 30px;
  border-top: 1px solid rgba(18, 59, 56, 0.2);
  color: var(--zbo-muted);
  font-size: 0.95rem;
  letter-spacing: 0;
}

#footer a,
#footer a:hover {
  color: var(--zbo-deep);
  font-weight: 620;
}

.footer-updated {
  display: block;
  margin-top: 8px;
  color: var(--zbo-muted);
  font-size: 0.85rem;
}

@media (max-width: 1000px) {
  #site_content {
    grid-template-columns: 230px minmax(0, 1fr);
    column-gap: 18px;
    padding: 18px;
  }

  ul#menu li a {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0.86rem;
  }
}

@media (max-width: 820px) {
  #header {
    padding: 18px 0 14px;
  }

  #banner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #banner h1 {
    grid-column: 1;
    align-self: center;
    padding: 0;
    font-size: clamp(1.2rem, 4.5vw, 1.7rem);
  }

  #contact {
    display: none;
  }

  .menu-toggle {
    display: block;
    grid-column: 2;
    grid-row: 1;
    min-height: 44px;
    margin: 0;
    padding: 0 16px;
  }

  #menubar {
    grid-column: 1 / -1;
    width: 100%;
  }

  .menu-toggle[aria-expanded="false"] + #menubar #menu {
    display: none;
  }

  ul#menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
  }

  ul#menu li {
    display: block;
  }

  ul#menu li a {
    min-height: 44px;
    height: auto;
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  #site_content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    width: min(720px, calc(100% - 24px));
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
  }

  ul.slideshow {
    grid-column: 1;
    grid-row: 1;
  }

  #content {
    grid-column: 1;
    grid-row: 2;
    margin-top: 14px;
  }

  .sidebar_container {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    margin: 14px 0 0;
  }

  .hot-news-frame {
    width: 100%;
  }
}

@media (max-width: 520px) {
  #header,
  #footer {
    width: calc(100% - 24px);
  }

  #banner h1 {
    font-size: 1.18rem;
    line-height: 1.2;
  }

  ul#menu {
    grid-template-columns: 1fr;
  }

  ul.slideshow {
    min-height: 190px;
    aspect-ratio: 13 / 7.5;
  }

  #slideshow-caption p {
    max-width: 100%;
    font-size: 1.3rem;
  }

  #content {
    padding: 20px;
    overflow-wrap: anywhere;
  }

  .former-members {
    margin-right: -10px;
    margin-left: -10px;
    padding: 22px 16px 18px;
  }

  #content iframe:not(.hot-news-frame) {
    height: 320px;
  }

  .news-photo {
    margin-left: 0;
  }

  #footer {
    line-height: 1.9;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
