/* Main styles (from legacy.css) */
.contentArea .contentBox .wp-caption,
.contentArea .contentBox img {
  max-width: 100%;
  height: auto;
}

/* Kaisei Opti is loaded via theme enqueue; utility class below */
.kaisei-opti-regular {
  font-family: "Kaisei Opti", serif;
  font-weight: 400;
  font-style: normal;
}

/* Global image rounding */
:root {
  --patio-image-radius: 12px;
  --patio-home-band-padding-x: 20px;
  --patio-news-label-width: 108px;
  --patio-news-label-min-height: 24px;
  --patio-news-label-padding-y: 4px;
  --patio-news-label-font-size: 13px;
  --patio-news-label-radius: 4px;
  --patio-linked-image-hover-shadow: 0 10px 22px rgba(25, 42, 61, 0.16);
}

img,
.wp-caption,
.wp-caption img,
iframe {
  border-radius: var(--patio-image-radius) !important;
}

@media (hover: hover) and (pointer: fine) {
  .entry-content a > img,
  .entry-content a > picture > img,
  .contentArea a > img,
  .contentArea a > picture > img,
  #sidebar a > img,
  #sidebar a > picture > img,
  .ct-footer .widget a > img,
  .ct-footer .widget a > picture > img {
    transition: transform 0.22s ease, filter 0.22s ease, box-shadow 0.22s ease;
    transform: translateY(0);
  }

  .entry-content a:hover > img,
  .entry-content a:focus-visible > img,
  .entry-content a:hover > picture > img,
  .entry-content a:focus-visible > picture > img,
  .contentArea a:hover > img,
  .contentArea a:focus-visible > img,
  .contentArea a:hover > picture > img,
  .contentArea a:focus-visible > picture > img,
  #sidebar a:hover > img,
  #sidebar a:focus-visible > img,
  #sidebar a:hover > picture > img,
  #sidebar a:focus-visible > picture > img,
  .ct-footer .widget a:hover > img,
  .ct-footer .widget a:focus-visible > img,
  .ct-footer .widget a:hover > picture > img,
  .ct-footer .widget a:focus-visible > picture > img {
    transform: translateY(-3px);
    filter: brightness(1.04);
    box-shadow: var(--patio-linked-image-hover-shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry-content a > img,
  .entry-content a > picture > img,
  .contentArea a > img,
  .contentArea a > picture > img,
  #sidebar a > img,
  #sidebar a > picture > img,
  .ct-footer .widget a > img,
  .ct-footer .widget a > picture > img {
    transition: none;
  }
}

#container img#mainImg {
  width: 100%;
  max-width: 100%;
}

.home #container > .patio-front-hero {
  width: 100%;
}

.home #container > .patio-front-hero .wp-block-kadence-rowlayout,
.home #container > .patio-front-hero .kb-row-layout-wrap {
  margin: 0;
}

.kb-gallery-wrap-id-36_5f3fa8-7c.wp-block-kadence-advancedgallery {
  margin-bottom: 2vw;
}

.home .kb-row-layout-id36_1737a8-1d > .kt-row-column-wrap {
  padding-bottom: 0;
}

/* Keep generated blog cards inside content width */
.contentArea .contentBox .entry-content .patio-blogcard {
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
}

.contentArea .contentBox .entry-content .patio-blogcard__body {
  min-width: 0;
}

/* Home top sections: fluid responsive width */
@media screen and (min-width: 811px) {
  .home #container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 0 4%;
    align-items: start;
  }

  .home #container > #mainImg {
    grid-column: 1 / -1;
  }

  .home #container > .patio-front-hero {
    grid-column: 1 / -1;
  }

  .home .contentArea {
    float: none;
    margin: 0;
    grid-column: 1;
  }

  .home .contentArea .contentBox {
    margin-right: 0;
    box-sizing: border-box;
  }

  .home .contentArea .contentBox #shisetsu {
    display: block;
    width: 100%;
    height: auto;
  }

  .home #sidebar {
    float: none;
    margin: 0;
    grid-column: 2;
    display: block;
  }

  .home #sidebar > div {
    margin: 0 0 15px;
  }

  .home #sidebar iframe {
    max-width: 100% !important;
  }
}

#sidebar > .patio-widget:first-child,
#sidebar > .widget:first-child {
  margin-top: 0;
}

@media screen and (max-width: 999.98px) {
  .home #container {
    display: block;
  }

  .home .contentArea,
  .home .contentArea .contentBox,
  .home #sidebar {
    float: none;
  }

  .home .contentArea {
    margin: 0;
  }

  .home .contentArea .contentBox {
    margin-right: 0;
  }

  .home .contentArea .contentBox #shisetsu {
    display: block;
    width: 100%;
    height: auto;
  }

  .home #sidebar {
    display: block;
    margin: 25px 0 0;
  }

}

@media screen and (max-width: 810px) {
  .home #sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }

  .home #sidebar > .patio-widget,
  .home #sidebar > .widget {
    margin: 0;
    min-width: 0;
  }

  .home #sidebar > .patio-widget:nth-child(n + 3),
  .home #sidebar > .widget:nth-child(n + 3) {
    grid-column: 1 / -1;
  }

  .home #sidebar > .patio-widget img,
  .home #sidebar > .widget img {
    display: block;
    width: 100%;
    height: auto;
  }
}

.tablenav.pagination-centered {
  clear: both;
  margin: 20px 0 0;
  text-align: center;
}

.tablenav.pagination-centered .page-numbers {
  display: inline-block;
  margin: 0 2px;
  padding: 4px 8px;
}

.nextprev {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 0;
}

.nextprev span {
  width: 49%;
}

.nextprev span.next {
  text-align: right;
}

.home .contentArea .contentBox:not(.patio-home-facility-box) {
  border: 1px solid #e8e2d5;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.home .contentArea .contentBox:not(.patio-home-facility-box) > .cf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding-right: 14px;
  border-radius: 12px 12px 0 0;
  background: #e98411;
}

.home .contentArea .contentBox:not(.patio-home-facility-box) > .cf > h2,
.home .contentArea .contentBox:not(.patio-home-facility-box) > .cf > h3 {
  margin: 0;
  padding: 12px var(--patio-home-band-padding-x) 10px;
  float: none;
  width: auto;
  margin-right: auto;
  text-align: left;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
}

.home .contentArea .contentBox:not(.patio-home-facility-box) > .cf > a {
  margin: 0;
  float: none;
  width: auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

.home .contentArea .contentBox:not(.patio-home-facility-box) > .newsBox {
  margin: 0;
  padding: 8px 20px 14px;
  background: #f4f4f4;
}

.newsBox li a {
  width: auto;
}

.home .newsBox li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dotted #ccc;
}

.home .newsBox li:last-child {
  border-bottom: 0;
}

.home .newsBox li.cf::before,
.home .newsBox li.cf::after {
  content: none;
  display: none;
}

.home .newsBox li > a {
  float: none;
  width: auto;
  margin: 0;
  padding: 11px 0 10px;
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  top: 0;
  font-size: 1.03em;
  line-height: 1.5;
  text-align: left;
  color: #6f6267;
  text-decoration: none;
}

.home .newsBox li > a:hover {
  color: #6f6267;
  background: #efefef;
}

.home .newsBox li > a:visited {
  color: #6f6267;
}

.home .newsBox li > span[class^="cate-"],
.home .newsBox li > span[class*=" cate-"] {
  float: none;
  margin: 0;
  width: var(--patio-news-label-width);
  flex: 0 0 var(--patio-news-label-width);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-align: center;
  padding: var(--patio-news-label-padding-y) 0;
  min-height: var(--patio-news-label-min-height);
  font-size: var(--patio-news-label-font-size);
  line-height: 1.3;
  color: #fff;
  font-weight: 700;
  border-radius: var(--patio-news-label-radius);
  letter-spacing: 0.01em;
}

.home .newsBox li > span[class^="cate-"] a,
.home .newsBox li > span[class*=" cate-"] a {
  display: block;
  width: 100%;
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.home .newsBox li > .cate-orange {
  background: #db7d17;
}

.home .newsBox li > .cate-topics {
  background: #db7d17;
}

.home .newsBox li > .cate-red {
  background: #da384b;
}

.home .newsBox li > .cate-important {
  background: #da384b;
}

.home .newsBox li > .cate-green {
  background: #7cbc34;
}

.home .newsBox li > .cate-event {
  background: #7cbc34;
}

.home .newsBox li > .cate-blue {
  background: #7ac6ea;
}

.home .newsBox li > .cate-yellow {
  background: #ffd200;
}

.home .newsBox li > .cate-news {
  background: #4c95e1;
}

.home .newsBox li .bnone {
  display: inline-block;
  margin-right: 14px;
  font-size: 0.92em;
  color: #7c7478;
  white-space: nowrap;
}

