/* nuritb.com: the old site's look (its tiles, logo, bordered menu, Arial, black text, blue
   links), made for phones and fast. Right to left throughout. */
:root {
  --ink: #000;
  --link: #0a2fb8;
  --line: #6b5a3a;
  --panel: rgba(255, 255, 255, .62);
  --menu: rgba(255, 252, 240, .85);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.65 Arial, Helvetica, sans-serif;
  background: #e9dcc0 url(bk-tile.webp) repeat;
}
a { color: var(--link); }
a:hover, a:focus-visible { color: #000; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; right: -999px; top: 0; background: #fff; padding: .5rem; z-index: 10; }
.skip:focus { right: .5rem; }

/* The header: the old top band and corners, the title and the bordered menu. */
.top {
  position: relative;
  background: url(bk-top.webp) repeat-x top;
  padding: 1rem 1rem .75rem;
}
.top::before, .top::after { content: ""; position: absolute; top: 0; z-index: -1; pointer-events: none; }
@media (min-width: 1000px) {
  .top::before { left: 0; width: 211px; height: 528px; background: url(bk-left.webp) no-repeat; }
  .top::after { right: 0; width: 521px; height: 529px; background: url(bk-right.webp) no-repeat; }
}
.brand {
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  color: #000; text-decoration: none; font-weight: bold;
  font-size: clamp(1.45rem, 4.2vw, 2.1rem); line-height: 1.2; text-align: center;
  margin: .25rem 0 1rem;
}
.menu ul {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1100px;
  display: flex; flex-wrap: wrap; border: 1px solid var(--line); background: var(--menu);
}
.menu li { flex: 1 1 auto; border: 1px solid var(--line); margin: -1px 0 0 -1px; }
.menu a {
  display: block; padding: .55rem .6rem; text-align: center; font-weight: bold;
  color: #000; text-decoration: none; white-space: nowrap;
}
.menu a:hover, .menu a[aria-current] { background: #fff3c8; }
.menu a[aria-current] { text-decoration: underline; }
@media (max-width: 640px) {
  body { font-size: 16px; }
  .menu li { flex: 1 1 50%; }
  .menu a { white-space: normal; }
}

/* The page. */
main {
  max-width: 1100px; margin: 1rem auto 2rem; padding: 1rem 1.25rem 1.5rem;
  background: var(--panel); border-radius: 6px;
}
.home main { background: transparent; min-height: 480px; }
@media (min-width: 1000px) {
  .home main { padding-left: 330px; background: url(flower.webp) no-repeat left 1rem top 0 / 294px auto; }
}
h1 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.25; margin: .25rem 0 1rem; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 1.5rem 0 .5rem; }
h3 { font-size: 1.15rem; margin: 1.25rem 0 .4rem; }
p { margin: 0 0 1rem; }
.home p { text-align: center; font-size: 1.12rem; }
.path { font-size: .9rem; margin: 0 0 .5rem; color: #333; }
.path a { color: #333; }

/* The old layout tables, as rows of cells side by side, stacked on a phone. */
.grid { display: block; }
.row { display: flex; gap: 1.25rem; align-items: flex-start; margin: 0 0 1rem; }
.cell { flex: 1 1 0; min-width: 0; }
.cell.head { font-weight: bold; }
@media (max-width: 700px) {
  .row { flex-direction: column; gap: .5rem; }
  .cell { width: 100%; }
}

/* Pictures beside the text (the old float left) and every picture that opens. */
figure.side { float: left; max-width: 44%; margin: .25rem 0 1rem 1.25rem; font-size: .92rem; }
figure.side img { display: block; margin: 0 auto .35rem; }
@media (max-width: 700px) { figure.side { float: none; max-width: 100%; margin: 0 0 1rem; } }
main img { border-radius: 4px; }
a.lb { display: inline-block; cursor: zoom-in; }
a:has(> img), a:has(> picture) { text-decoration: none; }

/* The calendar's tables. */
.table-wrap { overflow-x: auto; margin: 0 0 1rem; }
table { border-collapse: collapse; background: rgba(255, 255, 255, .7); }
td, th { border: 1px solid var(--line); padding: .35rem .6rem; vertical-align: top; }

/* Videos: a picture until played. */
.video { position: relative; max-width: 560px; aspect-ratio: 16 / 9; margin: 0 0 1rem;
  background: #000 center / cover no-repeat; border-radius: 6px; cursor: pointer; }
.video button { position: absolute; inset: 0; margin: auto; width: 72px; height: 50px;
  border: 0; border-radius: 12px; background: rgba(200, 0, 0, .9); color: #fff; font-size: 1.4rem; cursor: pointer; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }

/* Galleries. */
.lead { color: #222; }
.gallery { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery a { display: block; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 480px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* The viewer: the arrows beside the picture (over its edges on a phone). */
.lbx { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .92); display: none;
  align-items: center; justify-content: center; flex-direction: column; touch-action: pan-y; }
.lbx.open { display: flex; }
.lbx .stage { display: flex; align-items: center; gap: .75rem; max-width: 100vw; }
.lbx img { max-width: calc(100vw - 9rem); max-height: 82vh; object-fit: contain; border-radius: 0; }
.lbx p { color: #eee; margin: .6rem 1rem 0; text-align: center; font-size: .95rem; }
.lbx button { background: rgba(255, 255, 255, .16); color: #fff; border: 0; cursor: pointer;
  width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; flex: none; }
.lbx button:hover, .lbx button:focus-visible { background: rgba(255, 255, 255, .35); }
.lbx .x { position: absolute; top: .75rem; left: .75rem; font-size: 1.5rem; }
.lbx .n { position: absolute; top: 1.1rem; right: 1rem; color: #ccc; font-size: .9rem; }
@media (max-width: 640px) {
  .lbx .stage { position: relative; }
  .lbx img { max-width: 100vw; }
  .lbx .stage button { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, .45); }
  .lbx .prev { right: .4rem; }
  .lbx .next { left: .4rem; }
}

.foot { max-width: 1100px; margin: 0 auto 2rem; padding: 0 1.25rem; text-align: center; font-size: .95rem; }
.foot p { margin: .25rem 0; }

/* A link to another page around a picture: a card (the old site's thumbnail links). */
a.card { display: block; text-decoration: none; color: #000; text-align: center; margin: 0 0 .75rem; }
a.card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 0 .35rem; }
a.card span { display: block; font-weight: bold; font-size: .95rem; line-height: 1.35; }
a.card:hover span, a.card:focus-visible span { text-decoration: underline; color: var(--link); }
.albums { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 480px) { .albums { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* The calendar: upcoming tours, and the registration form. */
.event { border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, .7);
  padding: .75rem 1rem; margin: 0 0 1rem; }
.event h2 { margin: 0 0 .25rem; }
.event .when { font-weight: bold; margin: 0 0 .5rem; }
.event dl { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .75rem; margin: 0 0 .5rem; }
.event dt { font-weight: bold; }
.event dd { margin: 0; }
.left { color: #444; font-size: .95rem; }
a.button, button { display: inline-block; background: #7a5a2e; color: #fff; border: 0; border-radius: 6px;
  padding: .45rem 1rem; font: inherit; font-weight: bold; text-decoration: none; cursor: pointer; }
a.button:hover, button:hover, a.button:focus-visible, button:focus-visible { background: #5c4220; color: #fff; }
.register, .box { border: 2px solid var(--line); border-radius: 6px; background: #fffdf6; padding: .75rem 1rem; margin: 0 0 1.25rem; }
.register label, .box label { display: block; font-weight: bold; }
.register input, .register textarea, .box input, .box select { display: block; width: 100%; max-width: 28rem;
  font: inherit; padding: .4rem .5rem; margin-top: .2rem; border: 1px solid #8a7a5a; border-radius: 4px; background: #fff; }
.box label.check { display: flex; gap: .5rem; align-items: center; }
.box label.check input { width: auto; margin: 0; }
.register .hp { position: absolute; right: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { color: #a00000; font-weight: bold; }
.flash { color: #1d5e1d; font-weight: bold; }
.done h2 { color: #1d5e1d; }

/* The admin panel. */
body.admin main { max-width: 1000px; }
form.inline { display: inline; }
form.inline button { padding: .2rem .6rem; font-size: .9rem; background: #8a2c2c; }
.acts a { margin-left: .5rem; }
.who { font-size: .95rem; }
details { margin: 1rem 0; }
