/* Look of the original "tzeni-bones" WordPress theme, made responsive.
   Headings use Segoe Script where installed (as the old site did), else Playpen Sans. */
@font-face {
  font-family: "Playpen Sans";
  src: url("fonts/playpen-greek.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Playpen Sans";
  src: url("fonts/playpen-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --text: #484848;
  --muted: #999;
  --red: #c2251e;
  --red-dark: #9a1d18;
  --olive: #787830;
  --brown: #993300;
  --script: "Segoe Script", "Playpen Sans", cursive;
  --shadow: 0 2px 10px #333;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font: 100%/1.5 Georgia, Cambria, "Times New Roman", Times, serif;
  color: var(--text);
  background: #c9c8b5 url("theme/main-bg.jpg");
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--red);
}
a:hover,
a:focus {
  color: var(--red-dark);
}
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--script);
  font-weight: 600;
  line-height: 1.35;
}
h1 {
  font-size: 2em;
  margin: 0 0 0.25em;
}
h2 {
  font-size: 1.6em;
  margin: 1.5em 0 0.5em;
}
h3 {
  font-size: 1.2em;
  margin: 1.5em 0 0.5em;
}
h4 {
  font-size: 1.1em;
  margin: 1.5em 0 0.5em;
  color: var(--brown);
}
h1 a,
h2 a,
h3 a,
h4 a {
  text-decoration: none;
}
h4 a {
  color: var(--brown);
}
@media (max-width: 900px) {
  .paper .gallery {
    grid-template-columns: repeat(min(var(--cols, 4), 4), minmax(0, 1fr));
  }
}
p {
  margin: 0 0 1em;
}

/* Layout */
.site-header,
main,
.site-footer {
  width: min(980px, 100% - 32px);
  margin-inline: auto;
}

/* Header: logo, the handwritten section list and the main menu */
.site-header {
  display: flex;
  gap: 10px;
  padding-top: 30px;
  margin-bottom: 48px;
}
.logo {
  flex: none;
  line-height: 0;
}
.logo img {
  width: 129px;
}
.menus {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sections {
  display: flex;
  flex-direction: column;
}
.sections a {
  font-family: var(--script);
  line-height: 1.3;
  text-decoration: none;
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}
.main-nav a {
  font-family: var(--script);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.main-nav a:hover,
.sections a:hover,
.main-nav a[aria-current],
.sections a[aria-current] {
  color: var(--red);
}

/* The woven frame around the slideshow and the content, and the paper inside it */
.fancy {
  background: url("theme/fancy-bg.jpg") center;
  padding: 20px;
  box-shadow: var(--shadow);
}
.paper {
  background: #e9e9ea url("theme/inner-bg.png") center;
  padding: 25px;
  box-shadow: var(--shadow);
  overflow-wrap: break-word;
}

.site-footer {
  margin-top: 40px;
  margin-bottom: 40px;
  padding: 6px 10px;
  background: #e9e9ea url("theme/inner-bg.png") center;
  box-shadow: var(--shadow);
}

/* Home */
.slideshow {
  display: grid;
  aspect-ratio: 940 / 300;
  border: 1px solid #333;
  box-shadow: 0 0 10px #333;
  background: #333;
}
.slideshow img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: slide 30s infinite;
}
.slideshow img:nth-child(1) { animation-delay: 0s; }
.slideshow img:nth-child(2) { animation-delay: 6s; }
.slideshow img:nth-child(3) { animation-delay: 12s; }
.slideshow img:nth-child(4) { animation-delay: 18s; }
.slideshow img:nth-child(5) { animation-delay: 24s; }
@keyframes slide {
  0%, 18%  { opacity: 1; }
  22%, 96% { opacity: 0; }
  100%     { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .slideshow img { animation: none; }
  .slideshow img:first-child { opacity: 1; }
}
.boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 34px;
  margin-top: 2.2em;
}
.boxes h2 {
  margin: 0 0 0.3em;
}
.boxes .latest {
  font-weight: bold;
  text-decoration: none;
}

/* Inner pages */
.breadcrumbs {
  margin-bottom: 1.5em;
}
.byline {
  color: var(--muted);
}
.lead {
  font-weight: bold;
  text-align: center;
}
.content > p:first-child {
  text-align: justify;
}
.content img {
  display: block;
  margin: 0 auto 1.5em;
}
address {
  font-style: normal;
  margin-bottom: 1em;
}
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em 1.5em;
  justify-content: center;
  font-family: var(--script);
  margin-bottom: 1.5em;
}
.services li {
  margin: 0.3em 0;
}
.services span {
  color: var(--muted);
}

/* Galleries: 150px thumbnails in the gallery's own number of columns, as in the old site */
.gallery {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 20px 10px;
  margin: 1.5em 0 2em;
  justify-items: center;
}
.gallery figure {
  margin: 0;
  width: 150px;
  max-width: 100%;
}
.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin: 0;
  transition: opacity 0.15s;
}
.gallery a:hover img {
  opacity: 0.85;
}
.gallery figcaption {
  font-size: 0.85em;
  color: #787878;
  line-height: 1.3;
  margin-top: 0.3em;
  text-align: center;
}

/* News list */
.cards {
  display: grid;
}
.card {
  display: flex;
  gap: 20px;
  padding: 1.25em 0;
  border-bottom: 1px solid #ccc;
}
.card:last-child {
  border-bottom: 0;
}
.card > a {
  flex: none;
  line-height: 0;
}
.card img {
  width: 150px;
  height: 150px;
  object-fit: cover;
}
.card h3 {
  margin: 0;
  font-size: 1.4em;
}
.card time {
  color: var(--muted);
}
.card p {
  margin: 0.4em 0 0;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid #ccc;
}
.pager .newer {
  text-align: right;
}

/* Mobile */
@media (max-width: 760px) {
  .boxes {
    grid-template-columns: 1fr;
    gap: 1.5em;
  }
}
@media (max-width: 600px) {
  body {
    font-size: 95%;
  }
  .site-header,
  main,
  .site-footer {
    width: calc(100% - 20px);
  }
  .site-header {
    padding-top: 16px;
    margin-bottom: 24px;
  }
  .logo img {
    width: 96px;
  }
  .sections a {
    font-size: 0.9em;
  }
  .main-nav {
    gap: 0 14px;
  }
  .main-nav a {
    font-size: 16px;
  }
  .fancy {
    padding: 8px;
  }
  .paper {
    padding: 16px 14px;
  }
  h1 {
    font-size: 1.6em;
  }
  .paper .gallery {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
  }
  .card {
    gap: 12px;
  }
  .card img {
    width: 80px;
    height: 80px;
  }
  .card h3 {
    font-size: 1.15em;
  }
}

/* Lightbox */
.lightbox {
  border: 0;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  background: rgb(0 0 0 / 0.92);
  color: #fff;
}
.lightbox::backdrop {
  background: transparent;
}
.lightbox figure {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem 1rem;
}
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  object-fit: contain;
}
.lightbox figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  min-height: 1.2em;
}
.lightbox button {
  position: absolute;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  border: 0;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox button:hover {
  background: rgb(255 255 255 / 0.25);
}
.lightbox .close {
  top: 12px;
  right: 12px;
}
.lightbox .prev,
.lightbox .next {
  top: 50%;
  transform: translateY(-50%);
}
.lightbox .prev {
  left: 12px;
}
.lightbox .next {
  right: 12px;
}
