/*
Theme Name: ICWC
Theme URI: https://www.icwctn.org/
Author: Islamic Center of Williamson County
Description: Lightweight theme for the Islamic Center of Williamson County. One stylesheet, no page builder, no jQuery, no icon fonts. Pages are edited in the standard WordPress editor.
Version: 0.2.7
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: icwc
*/

/*
 * Sizes are in rem so the whole design steps down together on phones
 * (14px base on desktop, 13px on phones), the way the previous theme did.
 *
 * Rules that start with ".site-main" apply to the public page only. The editor shows
 * the same blocks without them, so that, for example, every slide of a slideshow can be seen and edited.
 */

:root {
  --text: #9d9087;
  --heading: #441a05;
  --gold: #db9e30;
  --orange: #e95823;
  --teal: #57a68f;
  --cream: #fafaf2;
  --white: #fff;
  --footer: #23201d;
  --footer-deep: #15110e;
  --footer-line: #2e2c33;

  --wrap: 1000px;
  --gutter: 60px;
  --title: 3rem;

  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Cinzel Decorative", "Cinzel", Georgia, serif;
  --font-slab: "Roboto Slab", Georgia, "Times New Roman", serif;

  /* Our own ornament: an eight-pointed star lattice, drawn here so nothing is loaded from outside. On cream, on gold and on the dark brown. */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon fill='%23f6f4e5' points='100,50 85.36,64.64 85.36,85.36 64.64,85.36 50,100 35.36,85.36 14.64,85.36 14.64,64.64 0,50 14.64,35.36 14.64,14.64 35.36,14.64 50,0 64.64,14.64 85.36,14.64 85.36,35.36'/%3E%3Cpolygon fill='%23fafaf2' points='80,50 71.22,58.78 71.22,71.22 58.78,71.22 50,80 41.22,71.22 28.78,71.22 28.78,58.78 20,50 28.78,41.22 28.78,28.78 41.22,28.78 50,20 58.78,28.78 71.22,28.78 71.22,41.22'/%3E%3Cpolygon fill='%23f6f4e5' points='65,50 60.61,54.39 60.61,60.61 54.39,60.61 50,65 45.61,60.61 39.39,60.61 39.39,54.39 35,50 39.39,45.61 39.39,39.39 45.61,39.39 50,35 54.39,39.39 60.61,39.39 60.61,45.61'/%3E%3C/svg%3E");
  --pattern-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon fill='%23d5962b' points='100,50 85.36,64.64 85.36,85.36 64.64,85.36 50,100 35.36,85.36 14.64,85.36 14.64,64.64 0,50 14.64,35.36 14.64,14.64 35.36,14.64 50,0 64.64,14.64 85.36,14.64 85.36,35.36'/%3E%3Cpolygon fill='%23db9e30' points='80,50 71.22,58.78 71.22,71.22 58.78,71.22 50,80 41.22,71.22 28.78,71.22 28.78,58.78 20,50 28.78,41.22 28.78,28.78 41.22,28.78 50,20 58.78,28.78 71.22,28.78 71.22,41.22'/%3E%3Cpolygon fill='%23d5962b' points='65,50 60.61,54.39 60.61,60.61 54.39,60.61 50,65 45.61,60.61 39.39,60.61 39.39,54.39 35,50 39.39,45.61 39.39,39.39 45.61,39.39 50,35 54.39,39.39 60.61,39.39 60.61,45.61'/%3E%3C/svg%3E");
  --pattern-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon fill='%231d1814' points='100,50 85.36,64.64 85.36,85.36 64.64,85.36 50,100 35.36,85.36 14.64,85.36 14.64,64.64 0,50 14.64,35.36 14.64,14.64 35.36,14.64 50,0 64.64,14.64 85.36,14.64 85.36,35.36'/%3E%3Cpolygon fill='%2315110e' points='80,50 71.22,58.78 71.22,71.22 58.78,71.22 50,80 41.22,71.22 28.78,71.22 28.78,58.78 20,50 28.78,41.22 28.78,28.78 41.22,28.78 50,20 58.78,28.78 71.22,28.78 71.22,41.22'/%3E%3Cpolygon fill='%231d1814' points='65,50 60.61,54.39 60.61,60.61 54.39,60.61 50,65 45.61,60.61 39.39,60.61 39.39,54.39 35,50 39.39,45.61 39.39,39.39 45.61,39.39 50,35 54.39,39.39 60.61,39.39 60.61,45.61'/%3E%3C/svg%3E");

  /* The small calligraphy above titles: the same drawing the site has always used, as an outline instead of an icon font. Made by redesign/tools/make-icons.mjs. */
  --ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'%3E%3Cpath transform='translate(0 850) scale(1 -1)' d='M991 583l-2 20-11 96-12-10c-7-6-13-11-19-16-88-77-89-79-71-209l1-5c16-116 16-236 16-352 0-28 0-56 1-84l0-22 14 16c113 125 94 401 83 566l0 0z m0 0m-230-173c0 10 0 19 0 29 2 102 4 199-22 247l-5 10-8-8c-12-13-22-23-32-31-45-45-55-58-37-141 10-45 37-241-18-310-13-16-29-24-50-24h0c-5 0-10 1-16 2-47 8-44 138-41 253 2 103 5 201-21 249l-6 10-8-8c-11-12-22-22-31-31-45-44-55-58-37-141 23-105 17-216 10-300-2-22-28-31-53-31-21 0-41 6-50 17-37 41-41 97-46 156-5 53-9 108-39 151l-5 8c0 0-34-6-40-39-5-32-4-88-106-150-12-7-24-14-35-22-72-49-69-102-60-129 16-52 74-92 132-92 48 0 86 28 107 77 28-65 103-122 165-122 24 0 65 9 88 65 16-42 50-65 95-65 79 0 170 74 170 169 1 35 1 87 0 124 0 52 0 70-1 77l0 0z m-570-205c-6-4-15-7-24-7-15 0-43 6-75 39 35 32 76 54 121 65 5-27-5-86-22-97l0 0z m0 0'/%3E%3C/svg%3E");
}

html {
  font-size: 87.5%; /* 14px */
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.688;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
  vertical-align: top;
}

/* Footnote numbers and the like do not make their line taller. */
sup,
sub {
  position: relative;
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline;
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: var(--heading);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.6em 1em;
  background: var(--heading);
  color: var(--white);
}

.skip-link:focus {
  left: 0;
}

/* Read out by screen readers, not shown. */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Headings ---------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
}

h1,
h2 {
  font-size: var(--title);
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.286rem;
}

h5,
h6 {
  font-size: 1.143rem;
}

/* ---------- Buttons (the standard Button block; gold unless another colour is picked in the editor) ---------- */

/* The small space under a row of buttons is the one the previous theme left there. */
.wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: calc(2rem + 7px) 1rem;
  margin: 2rem 0 0.543rem;
}

.wp-block-buttons > .wp-block-button {
  margin: 0;
}

.wp-block-button .wp-block-button__link {
  display: inline-block;
  padding: 1em 2.3em 1.1em;
  border: 0;
  border-radius: 0;
  background-color: var(--gold);
  font: 400 1rem / calc(1.5em + 0.6px) var(--font-body); /* a hair taller than the font's own line, as the buttons have always been */
  color: var(--white);
  text-align: center;
  text-decoration: none;
}

.wp-block-button .wp-block-button__link:hover {
  color: var(--white);
  filter: brightness(1.07);
}

/* ---------- Forms ---------- */

input:is([type="text"], [type="email"], [type="tel"], [type="url"], [type="number"], [type="search"], [type="password"], [type="date"]),
select,
textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 1.2em 1.4em;
  border: 1px solid var(--cream);
  border-radius: 0;
  background-color: var(--cream);
  font: 400 1rem/normal var(--font-body);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}

/* The small arrow of a drop-down list is drawn here, so it needs neither a script nor an icon font. */
select {
  height: 4.371em;
  padding: 0 3em 0 1.4em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='none' stroke='%239d9087' stroke-width='1.4' d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
}

textarea {
  height: 10em;
  resize: none;
}

::placeholder {
  color: var(--text);
  opacity: 1;
}

:is(input, select, textarea):focus {
  border-color: var(--gold);
  outline: none;
}

input[type="checkbox"],
input[type="radio"] {
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
  accent-color: var(--gold);
}

input[type="submit"],
button[type="submit"] {
  display: inline-block;
  padding: 1em 2.3em 1.1em;
  border: 0;
  border-radius: 0;
  background-color: var(--gold);
  font: 400 1rem/1.5 var(--font-body);
  color: var(--white);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
  filter: brightness(1.07);
}

/* Switched off until the form may be sent (for example until the agreement box is ticked). */
input[type="submit"]:disabled,
button[type="submit"]:disabled {
  background-color: var(--text);
  color: #000;
  opacity: 0.7;
  cursor: default;
  filter: none;
}

/* The contact form plugin's own markup: one field per row. */
.wpcf7 {
  margin-top: 3.9rem;
}

.wpcf7 p {
  margin: 0 0 1.7rem;
}

.wpcf7 .row {
  padding-bottom: 1.7rem;
}

.wpcf7-form-control-wrap {
  display: block;
}

.wpcf7 .wpcf7-list-item {
  display: block;
  margin: 0.5em 0 0;
}

.wpcf7 .wpcf7-list-item label {
  display: flex;
  gap: 0.6em;
  align-items: flex-start;
  line-height: 1.5;
}

.wpcf7 .wpcf7-list-item input {
  flex: none;
  margin-top: 0.3em;
}

.wpcf7 input[type="submit"] {
  margin-top: 1.7rem;
}

/* The same space under the button on every screen size. */
.wpcf7 p:has(input[type="submit"]) {
  margin-bottom: 1.7rem;
}

/* The plugin's message under the form after sending (its thanks, or what needs correcting). The coloured outline is the
   plugin's own; the rounded corners are what the site has always given it. */
.wpcf7 form .wpcf7-response-output {
  border-radius: 6px;
}

/* ---------- Header ---------- */

.site-header {
  padding: 1.3rem 0;
  background-color: var(--cream);
  background-image: var(--pattern);
  background-size: 70px 70px;
  background-position: 50% 50%;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 99px;
  padding-inline: 15px 5.25rem;
}

.site-logo {
  flex: none;
  margin: 0 21px;
  line-height: 0;
}

.site-logo img {
  display: block;
  width: auto;
  height: 85px;
}

.site-logo--text {
  font: 700 2rem/1.2 var(--font-display);
  color: var(--heading);
}

.nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 0.25em 1.253em;
  font: 700 0.998rem/1.688 var(--font-display);
  color: var(--heading);
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--gold);
}

.nav a[aria-current="page"] span {
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 -13px 0 3px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  display: block;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}

.menu-toggle__bars {
  position: relative;
}

.menu-toggle__bars::before,
.menu-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle__bars::before {
  top: -6px;
}

.menu-toggle__bars::after {
  top: 6px;
}

/* Full-screen menu for phones and tablets */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: var(--footer);
  color: var(--white);
  text-align: center;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--white);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.mobile-menu__brand {
  display: block;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.mobile-menu__brand strong {
  display: block;
  font: 700 2rem/1.2 var(--font-display);
}

.mobile-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-menu nav a {
  display: block;
  padding: 0.35em 1em;
  font: 700 18px/1.5 var(--font-display);
  color: var(--white);
}

.mobile-menu nav a:hover,
.mobile-menu nav a[aria-current="page"] {
  color: var(--gold);
}

/* ---------- Photo slideshow (a Group with the class "icwc-slideshow" that holds Cover blocks) ---------- */

.icwc-slideshow {
  margin: 0;
  background: var(--footer-deep);
}

/*
 * One slide: a photo with a title, a sentence and a button on it.
 * Everything inside is sized with --u, one "slide pixel": 1px on wide screens, shrinking
 * together with the screen below 1240px, the way the previous slider scaled.
 */
.icwc-slideshow > .wp-block-cover {
  --u: 1px;
  width: 100%;
  aspect-ratio: 1240 / 750;
  max-height: 750px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--white);
}

.icwc-slideshow .wp-block-cover__inner-container {
  display: grid;
  grid-template-rows: auto minmax(calc(108 * var(--u)), auto) auto;
  justify-items: center;
  width: 100%;
  padding: 0 16px;
  translate: 0 calc(15px - 10 * var(--u));
  text-align: center;
}

.icwc-slideshow :is(h1, h2, h3) {
  position: relative;
  grid-row: 1;
  max-width: 100%;
  margin: 0 0 calc(3 * var(--u));
  font: 700 calc(62 * var(--u)) / calc(80 * var(--u)) var(--font-display);
  color: var(--white);
  text-wrap: balance;
}

/* The gold calligraphy above a slide's title. */
.icwc-slideshow :is(h1, h2, h3)::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 62 * var(--u) - 14.8px);
  width: 30.8px;
  height: 30.8px;
  margin-left: -15.4px;
  background-color: var(--gold);
  -webkit-mask: var(--ornament) 50% 50% / contain no-repeat;
  mask: var(--ornament) 50% 50% / contain no-repeat;
}

.icwc-slideshow p {
  grid-row: 2;
  align-self: center;
  max-width: 100%;
  margin: 0;
  font: 400 calc(22 * var(--u)) / calc(27 * var(--u)) var(--font-slab);
}

.icwc-slideshow .wp-block-buttons {
  grid-row: 3;
  margin: calc(59 * var(--u) - 30px) 0 0;
}

.icwc-slideshow .wp-block-button .wp-block-button__link {
  padding: 12px 32px 15px;
  border: 3px solid transparent;
  border-radius: 6px;
  font: 400 16px/27px var(--font-slab);
}

.icwc-slideshow .wp-block-button .wp-block-button__link:hover {
  border-color: var(--gold);
  background-color: var(--teal);
  filter: none;
}

@media (max-width: 1239px) {
  .icwc-slideshow > .wp-block-cover {
    --u: calc(100vw / 1240);
  }
}

/* Small screens: a lower picture with only the title and the button, as before. */
@media (max-width: 1024px) {
  .icwc-slideshow > .wp-block-cover {
    --u: calc(100vw / 1024);
    aspect-ratio: 1024 / 450;
  }

  .icwc-slideshow p,
  .icwc-slideshow :is(h1, h2, h3)::before {
    display: none;
  }
}

/* Where the browser can measure the slideshow itself, use its width instead of the window's (exact with a scrollbar, and in the editor). */
@supports (width: 1cqw) {
  .icwc-slideshow {
    container-type: inline-size;
  }

  @media (max-width: 1239px) {
    .icwc-slideshow > .wp-block-cover {
      --u: calc(100cqw / 1240);
    }
  }

  @media (max-width: 1024px) {
    .icwc-slideshow > .wp-block-cover {
      --u: calc(100cqw / 1024);
    }
  }
}

/* On the public page the slides lie on top of each other and only one shows. Before the script starts (or without it), that is the first. */
.site-main .icwc-slideshow {
  display: grid;
  overflow: hidden;
}

.site-main .icwc-slideshow > .wp-block-cover {
  display: none;
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.site-main .icwc-slideshow:not(.is-running) > .wp-block-cover:first-child,
.site-main .icwc-slideshow > .wp-block-cover:is(.is-next, .is-active, .is-leaving) {
  display: flex;
}

.site-main .icwc-slideshow:not(.is-running) > .wp-block-cover:first-child,
.site-main .icwc-slideshow > .wp-block-cover:is(.is-active, .is-leaving) {
  opacity: 1;
}

.site-main .icwc-slideshow > .is-active {
  z-index: 2;
}

/* The slide being replaced stays in place underneath while the next one fades in over it. */
.site-main .icwc-slideshow > .is-leaving {
  z-index: 1;
  transition: none;
}

.icwc-slideshow__dots {
  z-index: 3;
  display: flex;
  grid-area: 1 / 1;
  gap: 13px;
  align-self: end;
  justify-self: center;
  margin-bottom: 40px;
}

.icwc-slideshow__dots button {
  position: relative;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

/* A larger area to click or tap than the dot itself. */
.icwc-slideshow__dots button::after {
  content: "";
  position: absolute;
  inset: -6px;
}

.icwc-slideshow__dots button:hover,
.icwc-slideshow__dots button[aria-current="true"] {
  background: var(--white);
}

@media (max-width: 999px) {
  .icwc-slideshow__dots {
    display: none;
  }
}

@keyframes icwc-zoom {
  from {
    scale: 1;
  }

  to {
    scale: 1.15;
  }
}

@keyframes icwc-rise {
  from {
    opacity: 0;
    translate: 0 18px;
  }
}

/* Movement only for visitors who have not asked their device to reduce it. */
@media (prefers-reduced-motion: no-preference) {
  .site-main .icwc-slideshow:not(.is-running) > .wp-block-cover:first-child .wp-block-cover__image-background,
  .site-main .icwc-slideshow > :is(.is-active, .is-leaving) .wp-block-cover__image-background {
    animation: icwc-zoom 10s linear both;
  }

  .site-main .icwc-slideshow > :nth-child(even):is(.is-active, .is-leaving) .wp-block-cover__image-background {
    animation-direction: reverse;
  }

  .site-main .icwc-slideshow.is-running:not(.is-first) > .is-active :is(h1, h2, h3, p, .wp-block-buttons) {
    animation: icwc-rise 0.9s ease both;
  }

  .site-main .icwc-slideshow.is-running:not(.is-first) > .is-active p {
    animation-delay: 0.3s;
  }

  .site-main .icwc-slideshow.is-running:not(.is-first) > .is-active .wp-block-buttons {
    animation-delay: 0.6s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-main .icwc-slideshow > .wp-block-cover {
    transition: none;
  }
}

/* ---------- Sections (Group block styles "Section", "Section, cream with ornament" and "Section, dark") ---------- */

.is-style-icwc-section,
.is-style-icwc-section-cream {
  position: relative;
  margin: 0;
  padding: 8.4rem 0;
}

.is-style-icwc-section-cream {
  background-color: var(--cream);
}

/* Everything directly inside a section is held to the page width and centred. */
.is-style-icwc-section > *,
.is-style-icwc-section-cream > * {
  position: relative;
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  max-width: none;
  margin-inline: auto;
}

/* A section that ends with a button stops slightly sooner, as before. */
.is-style-icwc-section > .wp-block-buttons:last-child {
  margin-bottom: 0.143rem;
}

/* Our own ornament behind each section title, fading out to the sides and downwards. */
.is-style-icwc-section-cream::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(960px, 100%);
  height: min(24rem, 100%);
  transform: translateX(-50%);
  background: var(--pattern) 50% 0 / 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse 50% 100% at 50% 0, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 100% at 50% 0, #000 30%, transparent 100%);
  pointer-events: none;
}

/* Dark section: the text sits in the right half, a drawing of the Qur'an on its stand in the left. */
.is-style-icwc-section-dark {
  position: relative;
  margin: 0;
  padding: 9rem 0 9.286rem;
  overflow: hidden;
  background-color: var(--footer-deep);
  color: rgba(255, 255, 255, 0.5);
}

.is-style-icwc-section-dark > * {
  position: relative;
  width: calc(min(var(--wrap), 100% - 2 * var(--gutter)) / 2 - 15px);
  max-width: none;
  margin-inline: calc(50% + 15px) 0;
}

.is-style-icwc-section-dark::before {
  content: "";
  position: absolute;
  inset: 0 50% 0 0;
  background: var(--pattern-dark) 50% 50% / 80px 80px;
  -webkit-mask-image: linear-gradient(to right, #000 55%, transparent);
  mask-image: linear-gradient(to right, #000 55%, transparent);
  pointer-events: none;
}

.is-style-icwc-section-dark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 25%;
  width: 26rem;
  height: 26rem;
  margin: -13rem 0 0 -13rem;
  background-color: var(--gold);
  opacity: 0.3;
  -webkit-mask: url(assets/icons.svg) 0 0 / 800% 100% no-repeat;
  mask: url(assets/icons.svg) 0 0 / 800% 100% no-repeat;
  pointer-events: none;
}

.is-style-icwc-section-dark :is(h1, h2, h3) {
  margin-block: 0;
  color: var(--white);
  text-align: left;
}

.is-style-icwc-section-dark .is-style-icwc-ornament::before {
  margin-bottom: 0.7rem;
}

.is-style-icwc-section-dark p {
  margin-block: 2.8rem 0;
}

.is-style-icwc-section-dark .wp-block-separator {
  height: 0;
  margin-block: 2.1rem 0;
  border: 0;
  border-top: 1px solid var(--footer-line);
}

.is-style-icwc-section-dark .wp-block-buttons {
  margin-top: 4.9rem;
}

/*
 * A dark section with a photo instead of the drawing (class "icwc-has-photo", its first block a picture with the class
 * "icwc-section-photo"): the photo covers the whole section, centred, under the text, as on the old homepage. Phones
 * get the plain dark section (see the 767px rules), as the old homepage has done since 22 Nov 2026. In the editor the
 * photo stays an ordinary picture block, so it is easy to replace.
 */
.is-style-icwc-section-dark.icwc-has-photo::before,
.is-style-icwc-section-dark.icwc-has-photo::after {
  display: none;
}

.site-main .is-style-icwc-section-dark > .icwc-section-photo {
  position: absolute;
  inset: 0;
  width: auto;
  margin: 0;
}

.site-main .icwc-section-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* ---------- Titles (Heading block style "Title with ornament") ---------- */

.is-style-icwc-ornament {
  margin-block: 0;
  font: 700 var(--title) / 1.2 var(--font-display);
  color: var(--heading);
  text-align: center;
}

/* The small gold calligraphy above a title. */
.is-style-icwc-ornament::before {
  content: "";
  display: block;
  width: 2.2rem;
  height: 2.33rem;
  margin: 0 auto 1rem;
  background-color: var(--gold);
  -webkit-mask: var(--ornament) 50% 0 / 2.2rem 2.2rem no-repeat;
  mask: var(--ornament) 50% 0 / 2.2rem 2.2rem no-repeat;
}

/* First title of a page: sits a touch closer to its ornament and has room below it. */
.is-style-icwc-ornament.icwc-title-intro {
  margin-bottom: 3.3rem;
}

.is-style-icwc-ornament.icwc-title-intro::before {
  margin-bottom: calc(1rem - 0.2 * var(--title));
}

/* The title above a row of cards also sits a little closer. */
.is-style-icwc-ornament:has(+ .icwc-cards)::before {
  margin-bottom: 0.607rem;
}

/* A page's main title when it stands at the top by itself (class "icwc-title-page"), and a title set to the left (class "icwc-title-left"). */
.is-style-icwc-ornament.icwc-title-page::before {
  margin-bottom: calc(1.3rem - 0.2 * var(--title));
}

.is-style-icwc-section > .icwc-title-page:last-child {
  margin-bottom: -1.7rem;
}

.is-style-icwc-ornament.icwc-title-left {
  text-align: left;
}

.is-style-icwc-ornament.icwc-title-left::before {
  margin-inline: 0;
}

/* ---------- Titles with a line icon (Heading block styles "Icon: ...") ---------- */

/* All the icons lie side by side in one small file; "--icon" says which one a style shows. The icon takes the colour of the title. */
[class*="is-style-icwc-icon-"] {
  --icon: 0;
  position: relative;
}

[class*="is-style-icwc-icon-"]::before {
  content: "";
  display: block;
  width: 4.6rem;
  height: 4.6rem;
  margin: 0 auto 2.35rem;
  background-color: currentColor;
  -webkit-mask: url(assets/icons.svg) calc(var(--icon) * 100% / 7) 0 / 800% 100% no-repeat;
  mask: url(assets/icons.svg) calc(var(--icon) * 100% / 7) 0 / 800% 100% no-repeat;
}

.is-style-icwc-icon-spirituality {
  --icon: 1;
}

.is-style-icwc-icon-community {
  --icon: 2;
}

.is-style-icwc-icon-service {
  --icon: 3;
}

.is-style-icwc-icon-islam101 {
  --icon: 4;
}

.is-style-icwc-icon-funeral {
  --icon: 5;
}

.is-style-icwc-icon-marriage {
  --icon: 6;
}

.is-style-icwc-icon-counseling {
  --icon: 7;
}

[class*="is-style-icwc-icon-"] a,
[class*="is-style-icwc-icon-"] a:hover {
  color: inherit;
}

/* A link in such a title covers its icon too. */
[class*="is-style-icwc-icon-"] a::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* ---------- Gold panel beside text (Group block style "Gold panel beside text": the first block inside is the panel, the second the text) ---------- */

.is-style-icwc-split {
  position: relative;
  display: grid;
  grid-template-columns: 5fr 7fr;
  margin: 0;
  padding: 6.057rem 0;
  background-color: var(--cream);
}

.is-style-icwc-split::before {
  content: "";
  position: absolute;
  inset: 0 0 0 40%;
  background: var(--pattern) 100% 0 / 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 100% 0, #000 25%, transparent 100%);
  mask-image: radial-gradient(ellipse 100% 100% at 100% 0, #000 25%, transparent 100%);
  pointer-events: none;
}

.is-style-icwc-split > * {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 7rem 6rem 8rem 5.3rem;
}

.is-style-icwc-split > :first-child {
  align-self: start;
  border-radius: 0 3px 3px 0;
  background: var(--gold) var(--pattern-gold) 50% 50% / 80px 80px;
}

.is-style-icwc-split :is(h1, h2) {
  margin: 0 0 calc(2rem + 0.8px);
}

.is-style-icwc-split :is(ul, ol) {
  margin: 0 0 1.7rem;
  padding-left: 1.5rem;
}

.is-style-icwc-split :is(ul, ol) :is(ul, ol) {
  margin: 0;
}

.is-style-icwc-split p {
  margin: 0 0 1.7rem;
}

.is-style-icwc-split .wp-block-buttons {
  margin-top: 3.7rem;
}

/* The prayer-times frame (a Custom HTML block with this class around the iframe). */
.icwc-prayer-times {
  padding: 3px;
  background: #1a1a1a;
}

.icwc-prayer-times iframe {
  display: block;
  width: 100%;
  height: 500px;
  border: 0;
}

/* ---------- Plain page (Group block style "Page"): the usual space above and below, everything held to the page width ---------- */

/* The space grows with the width of the screen, as it always has on these pages. */
.is-style-icwc-page {
  margin: 0;
  padding: calc(6.66vw + 1px) 0 7vw;
}

.is-style-icwc-page > * {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  max-width: none;
  margin-inline: auto;
}

.is-style-icwc-page :is(p, ul, ol) {
  margin-block: 0 1.7rem;
}

.is-style-icwc-page :is(h1, h2) {
  margin-block: -0.2em 3.3rem;
}

.is-style-icwc-page > :last-child,
.is-style-icwc-page .wp-block-column > :last-child,
.is-style-icwc-page .wp-block-tab-panel > :last-child {
  margin-bottom: 0;
}

.icwc-title-center {
  text-align: center;
}

/* A small title in the slab font (Heading block style "Small title"). */
.is-style-icwc-small {
  margin-block: -0.2em 0.9412em;
  font: 700 1.125rem/1.25 var(--font-slab);
  color: var(--heading);
}

/* Two equal columns side by side (Columns block with class "icwc-halves"). */
.wp-block-columns.icwc-halves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin-block: 0;
}

.icwc-halves > .wp-block-column {
  min-width: 0;
  margin: 0;
}

/* A map (a Custom HTML block with this class around the frame). */
.icwc-map {
  margin-top: 2rem;
}

.icwc-map iframe {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
}

/* ---------- Tabs (the standard Tabs block): teal tabs, the open one gold, on a gold line ---------- */

/* One line of space above, as there has always been between the text and the tabs. */
.wp-block-tabs {
  margin-top: 1.688rem;
  padding-bottom: 21.74px;
}

.wp-block-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  border-bottom: 3px solid var(--gold);
}

.wp-block-tab-list button {
  padding: 0.7em 1.3em;
  border-radius: 5px 5px 0 0;
  background-color: var(--teal);
  font: 700 1.125rem/1.688 var(--font-body);
  color: var(--white);
}

.wp-block-tab-list button:hover,
.wp-block-tab-list button[aria-selected="true"] {
  background-color: var(--gold);
}

.wp-block-tab-list button[aria-selected="true"]::before {
  content: none;
}

.wp-block-tab-panel {
  padding-top: 2rem;
}

/* ---------- Picture band with text on one side (Cover block, styles "Band, text on the left" and "Band, text on the right") ---------- */

/* Space above and below is 11.5% of the page width, as before. Without a picture, the band shows our pattern on its empty side. */
.wp-block-cover[class*="is-style-icwc-band-"] {
  min-height: 0;
  margin: 0;
  padding: calc(0.115 * min(var(--wrap), 100% - 2 * var(--gutter))) 0;
  color: var(--white);
}

.wp-block-cover[class*="is-style-icwc-band-"].is-light {
  color: var(--text);
}

.wp-block-cover[class*="is-style-icwc-band-"] .wp-block-cover__inner-container {
  position: relative;
  z-index: 1;
  width: min(var(--wrap), 100% - 2 * var(--gutter));
}

[class*="is-style-icwc-band-"] .wp-block-cover__inner-container > * {
  width: calc(50% - 15px);
  max-width: none;
  margin-inline: 0;
}

.is-style-icwc-band-right .wp-block-cover__inner-container > * {
  margin-left: calc(50% + 15px);
}

[class*="is-style-icwc-band-"] :is(h1, h2, h3) {
  margin-block: 0;
  color: inherit;
  text-align: left;
}

.is-light[class*="is-style-icwc-band-"] :is(h1, h2, h3, strong, b) {
  color: var(--heading);
}

[class*="is-style-icwc-band-"] .is-style-icwc-ornament::before {
  margin: 0 0 1.3rem;
}

[class*="is-style-icwc-band-"] p {
  margin-block: 0 1.7rem;
}

[class*="is-style-icwc-band-"] :is(h1, h2, h3) + p {
  margin-top: 2rem;
}

[class*="is-style-icwc-band-"] .wp-block-buttons {
  margin-top: 2.7rem;
}

[class*="is-style-icwc-band-"] > .wp-block-cover__background:first-child::before {
  content: "";
  position: absolute;
  inset: 0 0 0 50%;
  background: var(--pattern-dark) 100% 50% / 80px 80px;
  -webkit-mask-image: linear-gradient(to left, #000 45%, transparent);
  mask-image: linear-gradient(to left, #000 45%, transparent);
}

.is-light[class*="is-style-icwc-band-"] > .wp-block-cover__background:first-child::before {
  background-image: var(--pattern);
}

.is-style-icwc-band-right > .wp-block-cover__background:first-child::before {
  inset: 0 50% 0 0;
  -webkit-mask-image: linear-gradient(to right, #000 45%, transparent);
  mask-image: linear-gradient(to right, #000 45%, transparent);
}

/* ---------- A row of services along a dotted line (Columns block with class "icwc-timeline") ---------- */

/* The space below it grows with the page width, as the space above the footer did on this kind of page. */
.wp-block-columns.icwc-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-block: 4.9rem calc(7vw - 1.9rem);
}

.icwc-timeline > .wp-block-column {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 5.4rem 1.5rem calc(1.5rem + 5px) 0;
}

.icwc-timeline > .wp-block-column::before {
  content: "";
  position: absolute;
  top: 2.5rem;
  right: 0;
  left: 0;
  border-top: 1px dashed #e5e5e5;
}

.icwc-timeline :is(h2, h3, h4) {
  margin: calc(1.5rem - 0.2em) 0 0;
  font: 700 1.5rem/1.25 var(--font-display);
}

/* Here the icon is small and sits in a cream circle on the line. */
.icwc-timeline [class*="is-style-icwc-icon-"] {
  position: static;
}

.icwc-timeline [class*="is-style-icwc-icon-"]::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4.6875rem;
  height: 4.6875rem;
  margin: 0;
  border-radius: 50%;
  background-color: var(--cream);
  -webkit-mask: none;
  mask: none;
}

.icwc-timeline [class*="is-style-icwc-icon-"]::after {
  content: "";
  position: absolute;
  top: 1.14375rem;
  left: 1.14375rem;
  width: 2.4rem;
  height: 2.4rem;
  background-color: currentColor;
  -webkit-mask: url(assets/icons.svg) calc(var(--icon) * 100% / 7) 0 / 800% 100% no-repeat;
  mask: url(assets/icons.svg) calc(var(--icon) * 100% / 7) 0 / 800% 100% no-repeat;
}

.icwc-timeline [class*="is-style-icwc-icon-"] a::after {
  inset: 0 auto auto 0;
  width: 4.6875rem;
  height: 4.6875rem;
  border-radius: 50%;
}

.icwc-timeline p {
  margin: 1rem 0 0;
}

/* A coloured line of text with a link in it ("Learn more") keeps its colour. */
.icwc-timeline p.has-text-color a {
  color: inherit;
}

.icwc-timeline p.has-text-color a:hover {
  text-decoration: underline;
}

/* ---------- Welcome block: two photos beside text (Columns block with class "icwc-intro") ---------- */

.wp-block-columns.icwc-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin-block: 0;
}

.icwc-intro > .wp-block-column {
  min-width: 0;
  margin: 0;
}

.icwc-intro .wp-block-image {
  margin: 0;
}

.icwc-intro .wp-block-image + .wp-block-image {
  margin-top: 2rem;
}

.icwc-intro .wp-block-image img {
  display: block;
  width: 100%;
}

/* ---------- Running text ---------- */

.icwc-intro p,
.is-style-icwc-card > p,
.is-style-icwc-card > ul,
.is-style-icwc-card > ol {
  margin: 0 0 1.7rem;
}

.is-style-icwc-card > ul,
.is-style-icwc-card > ol {
  padding-left: 1.5rem;
}

.icwc-intro .wp-block-column > :last-child,
.is-style-icwc-card > :last-child {
  margin-bottom: 0;
}

/* ---------- Three coloured tiles (Buttons block with class "icwc-tiles") ---------- */

.wp-block-buttons.icwc-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin: 2.5rem 0 0;
}

.icwc-tiles > .wp-block-button {
  width: auto;
  margin: 0;
}

.wp-block-buttons.icwc-tiles .wp-block-button__link {
  display: block;
  width: 100%;
  padding: calc(3.5rem - 0.2em) 0 3rem;
  border: 0;
  border-radius: 0;
  font: 700 1.5rem/1.3 var(--font-display);
  color: var(--white);
  text-align: center;
}

.wp-block-buttons.icwc-tiles .wp-block-button__link:hover {
  color: var(--white);
  filter: brightness(1.06);
}

/* ---------- A row of short points, each under an icon (Columns block with class "icwc-features") ---------- */

.wp-block-columns.icwc-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 30px;
  margin-block: 4.9rem 0;
  text-align: center;
}

.icwc-features > .wp-block-column {
  min-width: 0;
  margin: 0;
}

.icwc-features :is(h2, h3, h4) {
  margin: 0 0 0.85em;
  font: 700 1.5rem/1.25 var(--font-display);
}

.icwc-features p {
  margin: 0 0 1.7rem;
}

.icwc-features + .wp-block-buttons {
  margin-top: 2.9rem;
}

/* ---------- A row of cream cards, each with an icon, a few words and a button (Columns block with class "icwc-cards") ---------- */

.wp-block-columns.icwc-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin-block: 1.5rem 2.486rem;
  text-align: center;
}

.icwc-cards > .wp-block-column {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 3.8rem 2rem;
  background-color: var(--cream);
}

.icwc-cards > .wp-block-column::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: min(15rem, 100%);
  background: var(--pattern) 50% 0 / 80px 80px;
  -webkit-mask-image: linear-gradient(#000 10%, transparent);
  mask-image: linear-gradient(#000 10%, transparent);
  pointer-events: none;
}

.icwc-cards > .wp-block-column > * {
  position: relative;
}

.icwc-cards :is(h2, h3, h4) {
  margin: 0;
  font: 700 1.5rem/1.3043 var(--font-display);
}

.icwc-cards [class*="is-style-icwc-icon-"]::before {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1.1rem;
}

.icwc-cards p {
  max-width: 15.75rem;
  margin: 1.2rem 0 0;
}

/* Buttons line up along the bottom when the cards hold different amounts of text. */
.icwc-cards .wp-block-buttons {
  margin-top: auto;
}

.icwc-cards .wp-block-button .wp-block-button__link {
  line-height: 1.5;
}

/* ---------- Cards and people (Group block style "White card"; Group with class "icwc-people") ---------- */

/* Side padding is 11.7% of the card's own width (117px on a 1000px card). */
.is-style-icwc-card {
  padding: 3.7rem min(0.117 * var(--wrap), (100% - 2 * var(--gutter)) * 0.117);
  background: var(--white);
}

.is-style-icwc-card.icwc-card-roomy {
  padding-block: 6rem calc(6rem + 10px);
}

.icwc-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 30px;
  margin: 0;
  text-align: center;
}

.icwc-people > .icwc-person {
  margin: 0;
  padding-bottom: 30px;
}

.icwc-people.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.icwc-people.is-single > .icwc-person {
  padding-bottom: 0;
}

.icwc-person :is(h2, h3, h4) {
  margin: 0 0 0.675rem;
  font: 700 1.5rem/1.3043 var(--font-display);
  color: var(--heading);
}

.icwc-person :is(h2, h3, h4) a {
  color: inherit;
}

.icwc-person :is(h2, h3, h4) a:hover {
  color: var(--gold);
}

.icwc-person p {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.6;
}

/* ---------- Posts: the Events list, a single post, and the sidebar beside them ---------- */

/* The same space above and below as an ordinary page. (Class "icwc-page-space" gives it to a Group in a page, without
   limiting the width of what is inside, as on the Announcements page.) */
.icwc-blog,
.icwc-entry-page,
.icwc-page-space {
  padding: calc(6.66vw + 1px) 0 7vw;
}

.wp-block-group.icwc-page-space {
  margin: 0;
}

.icwc-blog__inner {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.icwc-blog__main {
  flex: 1 1 0;
  min-width: 0;
}

.icwc-blog__main > :last-child,
.icwc-post__content > :last-child,
.icwc-entry__content > :last-child {
  margin-bottom: 0;
}

.icwc-post + .icwc-post {
  margin-top: 8.4rem;
}

.icwc-post__image {
  display: block;
  margin-bottom: 2.6rem;
}

/* An announcement's flyer is part of its text already, so its featured copy is not shown a second time. */
.single-announcement .icwc-post__image {
  display: none;
}

.icwc-post__image img {
  display: block;
  width: 100%;
  aspect-ratio: 760 / 428;
  object-fit: cover;
}

.icwc-post__header {
  margin-bottom: 0.65rem;
}

.icwc-post__title {
  margin: 0;
  font: 700 2.25rem / 1.111 var(--font-display);
  color: var(--heading);
}

.icwc-post__title a {
  color: inherit;
}

.icwc-post__title a:hover {
  color: var(--gold);
}

/* Categories | date | comments, with a thin bar between them. */
.icwc-post__meta {
  margin: 1.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
}

.icwc-post__meta > * + *::before {
  content: "|";
  margin: 0 0.5em;
  color: var(--text);
}

.icwc-post__meta a {
  color: var(--text);
}

.icwc-post__categories a {
  color: var(--heading);
}

.icwc-post__meta a:hover {
  color: var(--gold);
}

.icwc-post__content {
  margin-top: 2.55rem;
}

/*
 * Spectra adds a post's own block styles only on that post's page. In lists of posts (Events, categories, tags,
 * search) its containers would keep their side-by-side default and run past the edge of a phone screen (the Sheikh
 * Okasha post on Events, seen after the switch on 27 Nov 2026). There they wrap and stay inside the column.
 */
.icwc-blog:not(.icwc-blog--single) .icwc-post__content :is(.wp-block-uagb-container, .uagb-container-inner-blocks-wrap) {
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
}

/* A single post: a slightly taller title, the details line closer under it, and no gap before the text. */
.icwc-post--single .icwc-post__header {
  margin-bottom: 2.5rem;
}

.icwc-post--single .icwc-post__title {
  margin-top: -0.2em;
  line-height: 1.1515;
}

.icwc-post--single .icwc-post__meta {
  margin: 0.35rem 0 1.75rem;
}

.icwc-post--single .icwc-post__categories a {
  color: var(--text);
}

.icwc-post--single .icwc-post__content {
  margin-top: 0;
}

.icwc-post--single .icwc-post__content > :is(h1, h2, h3, h4, h5, h6):first-child,
.icwc-blog--page .icwc-entry__content > :is(h1, h2, h3, h4, h5, h6):first-child {
  margin-top: -0.2em;
}

.icwc-blog--page .icwc-entry__content > :first-child:not(h1, h2, h3, h4, h5, h6) {
  margin-top: 0;
}

/* Under a post: its tags, when it has any, and the share buttons (drawings in assets/share.svg). */
.icwc-post__footer {
  margin-bottom: 2rem;
  padding-top: 2.8rem;
}

.icwc-post__tags {
  margin: 0 0 1rem;
  line-height: 1.5;
}

.icwc-post__tags-label {
  color: var(--heading);
}

.icwc-share {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-bottom: 7px;
}

.icwc-share a {
  position: relative;
  width: 2.8rem;
  height: 2.8rem;
  background-color: var(--gold);
}

.icwc-share a::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 1rem;
  height: 1rem;
  margin: auto;
  background-color: var(--white);
  -webkit-mask: url("assets/share.svg") calc(var(--i, 0) * 25%) 0 / 500% 100% no-repeat;
  mask: url("assets/share.svg") calc(var(--i, 0) * 25%) 0 / 500% 100% no-repeat;
}

.icwc-share a:hover {
  background-color: var(--heading);
}

.icwc-share__facebook {
  --i: 1;
}

.icwc-share__tumblr {
  --i: 2;
}

.icwc-share__mail {
  --i: 3;
}

/* Comments under a post that has them switched on: a line, the title, then name and e-mail side by side,
   the comment, the agreement box and the button. */
.icwc-comments {
  margin-top: 4rem;
  padding-top: 4.3rem;
  border-top: 1px solid #e5e5e5;
}

.icwc-comments__title,
.icwc-comments .comment-reply-title {
  margin: 0 0 1.5em;
  font: 700 2.25rem / 1.1515 var(--font-display);
}

.icwc-comments .comment-reply-title small {
  margin-left: 0.5em;
  font: 400 1rem / 1 var(--font-body);
}

.icwc-comments__list {
  margin: 0 0 3rem;
  padding: 0;
  list-style: none;
}

.icwc-comments__list .children {
  margin: 0;
  padding-left: 2.5rem;
  list-style: none;
}

.icwc-comments__list .comment-body {
  margin-bottom: 2rem;
  overflow: hidden;
}

.icwc-comments__list .avatar {
  float: left;
  margin: 0.2rem 1rem 0.5rem 0;
}

.icwc-comments__list .fn {
  color: var(--heading);
}

.icwc-comments__list .comment-metadata {
  font-size: 0.875rem;
}

.icwc-comments__list .comment-metadata a {
  color: var(--text);
}

.icwc-comments__list .comment-awaiting-moderation {
  display: block;
  clear: left;
}

.icwc-comments__list .comment-content {
  clear: left;
}

.icwc-comments__list .comment-content p {
  margin: 0 0 0.6rem;
}

.icwc-comments .comment-form {
  display: grid;
  grid-template-columns: 48% 48%;
  justify-content: space-between;
}

.icwc-comments .comment-form p {
  grid-column: 1 / -1;
  margin: 0 0 7px;
}

.icwc-comments .comment-form :is(.comment-form-author, .comment-form-email) {
  grid-column: auto;
}

.icwc-comments .comment-form :is(input[type="text"], input[type="email"], textarea) {
  display: block;
  width: 100%;
}

.icwc-comments .comment-form textarea {
  height: 11rem;
}

.icwc-comments .comment-form .comment-form-cookies-consent {
  margin-bottom: 1.7rem;
}

/* The box sits at the start of the first line and the text continues under it, as it always has. */
.icwc-comments .comment-form :is(.comment-form-cookies-consent, .comment-form-agree) input {
  width: 13px;
  height: 13px;
  margin: 0 calc(1.4em - 13px) 0 0;
  vertical-align: -1px;
}

.icwc-comments .comment-form .form-submit {
  margin: calc(3.3rem - 7px) 0 0;
}

/* The button looks switched off until the agreement box is ticked, as it always has. */
.icwc-comments .comment-form:has(input[name="i_agree_privacy_policy"]:not(:checked)) [type="submit"] {
  background-color: var(--text);
  color: #000;
  opacity: 0.7;
}

/* ---------- Sidebar (the widgets in "Sidebar Widgets") ---------- */

.icwc-sidebar {
  flex: 0 0 320px;
  padding: 4.1rem 0;
  background-color: var(--cream);
}

.icwc-sidebar .widget {
  padding: 0 4.4rem;
}

.icwc-sidebar .widget + .widget {
  margin-top: 3.8rem;
  padding-top: 4.2rem;
  border-top: 1px solid #e5e5e5;
}

.icwc-sidebar .widget-title {
  margin: 0 0 1.15em;
  font: 700 1.5rem / 1.35 var(--font-display);
  color: var(--heading);
}

.icwc-sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.icwc-sidebar a {
  color: var(--text);
}

.icwc-sidebar a:hover {
  color: var(--gold);
}

.widget_categories li + li {
  margin-top: 0.1rem;
}

/* Recent posts: the title in the slab font, the date under it. */
.widget_recent_entries li + li {
  margin-top: 2rem;
}

.widget_recent_entries li > a {
  display: block;
  margin: -2px 0 4px;
  font: 700 1.125rem / 1.25 var(--font-slab);
  color: var(--heading);
}

.widget_recent_entries .post-date {
  display: block;
  line-height: 1.5;
}

/* Search: a cream box with a magnifier. */
.widget_search .search-form {
  position: relative;
}

.widget_search .search-field {
  display: block;
  width: 100%;
  padding: 1rem 3rem 1rem 1.2rem;
  border: 1px solid #efefe6;
  border-radius: 0;
  background-color: #efefe6;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
}

.widget_search .search-submit {
  position: absolute;
  top: 0;
  right: 0;
  width: 4rem;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.widget_search .search-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0.9rem;
  height: 0.9rem;
  margin: auto;
  background-color: var(--text);
  -webkit-mask: url("assets/share.svg") 100% 0 / 500% 100% no-repeat;
  mask: url("assets/share.svg") 100% 0 / 500% 100% no-repeat;
}

.widget_search .search-submit:hover::before {
  background-color: var(--gold);
}

/* Calendar: today on a teal square, days with a post marked by a small gold dot. */
.widget_calendar table {
  width: 100%;
  border-collapse: collapse;
  isolation: isolate;
}

.widget_calendar caption {
  margin-bottom: 0.7em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid #e5e5e5;
  font: 700 1.125rem / 1.688 var(--font-body);
  color: var(--heading);
  text-align: center;
}

.widget_calendar :is(th, td) {
  padding: 0;
  font-size: 1.0238rem;
  text-align: center;
}

.widget_calendar th {
  padding: 2px 2px 0.6em;
  font-weight: 400;
  line-height: 1.5;
  color: var(--heading);
  text-transform: uppercase;
}

.widget_calendar td {
  line-height: 2;
}

.widget_calendar td#today {
  position: relative;
  color: var(--white);
}

.widget_calendar td#today::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--teal);
}

.widget_calendar td a {
  position: relative;
  display: block;
  color: var(--heading);
}

.widget_calendar td a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 3px;
  height: 3px;
  margin-left: -1px;
  background-color: var(--gold);
}

.widget_calendar .wp-calendar-nav {
  display: flex;
  justify-content: space-between;
}

.widget_calendar .wp-calendar-nav a {
  color: var(--gold);
}

/* Tags: teal labels of equal size. */
.tagcloud {
  display: flex;
  flex-wrap: wrap;
  column-gap: 6px;
}

.tagcloud a {
  display: block;
  margin-bottom: 6px;
  padding: 0.3em 0.8em;
  font-size: 0.873rem;
  line-height: normal;
  color: var(--white);
  background-color: var(--teal);
}

.icwc-sidebar .tagcloud a:hover {
  color: var(--white);
  background-color: var(--gold);
}

/* ---------- Services and Team: a title above the content, at the page width ---------- */

.icwc-entry {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.icwc-entry__title {
  margin: 0 0 0.76em;
  font: 700 var(--title) / 1.111 var(--font-display);
  color: var(--heading);
}

.icwc-entry-page--team .icwc-entry__title {
  margin-bottom: 0;
}

/* A team member's role, under the name. */
.icwc-entry__role {
  margin: 0;
  font: 700 1.125rem / 1.25 var(--font-slab);
  color: var(--heading);
}

.icwc-entry-page--team .icwc-entry__content {
  margin-top: 1.7rem;
}

/* ---------- Text of posts, services and team members ---------- */

/* A word too long for a narrow phone breaks instead of pushing the page sideways. */
.icwc-post__content,
.icwc-entry__content {
  overflow-wrap: break-word;
}

:is(.icwc-post__content, .icwc-entry__content) :is(p, ul, ol, pre, table) {
  margin: 0 0 1.7em;
}

/* In posts, paragraphs follow each other without a gap, as they always have on this site. */
.icwc-post .icwc-post__content p {
  margin: 0;
}

:is(.icwc-post__content, .icwc-entry__content) :is(ul, ol) {
  padding-left: 1.5rem;
}

:is(.icwc-post__content, .icwc-entry__content) li :is(ul, ol) {
  margin-bottom: 0;
}

:is(.icwc-post__content, .icwc-entry__content) li > p {
  margin: 0;
}

:is(.icwc-post__content, .icwc-entry__content) :is(h1, h2, h3, h4, h5, h6) {
  margin: 1.3333em 0 0.7879em;
  line-height: 1.1515;
}

:is(.icwc-post__content, .icwc-entry__content) h1 {
  margin: 0.958em 0 0.583em;
  font-size: 3.901rem;
  line-height: 1.25;
}

:is(.icwc-post__content, .icwc-entry__content) h2 {
  margin: 1.0444em 0 0.76em;
  font-size: 3rem;
  line-height: 1.111;
}

:is(.icwc-post__content, .icwc-entry__content) h3 {
  font-size: 2.25rem;
}

:is(.icwc-post__content, .icwc-entry__content) h4 {
  font-size: 1.5rem;
}

:is(.icwc-post__content, .icwc-entry__content) :is(h5, h6) {
  font-size: 1.125rem;
}

:is(.icwc-post__content, .icwc-entry__content) :is(blockquote, .wp-block-quote) {
  position: relative;
  margin: 0 0 1.7rem;
  padding: 3.714rem 6.5rem 3.714rem 7.521rem;
  border: 0;
  background-color: var(--heading);
  color: var(--text);
}

:is(.icwc-post__content, .icwc-entry__content) :is(blockquote, .wp-block-quote)::before {
  content: "\201C";
  position: absolute;
  top: 2.4rem;
  left: 2.9rem;
  font: 700 7rem / 1.688 var(--font-display);
  color: var(--white);
}

:is(.icwc-post__content, .icwc-entry__content) :is(blockquote, .wp-block-quote) :is(p, cite) {
  margin: 0;
  line-height: 1.65;
  color: inherit;
}

:is(.icwc-post__content, .icwc-entry__content) .wp-block-separator,
:is(.icwc-post__content, .icwc-entry__content) > hr {
  width: 15%;
  margin: 6.786rem 0;
  border: 0;
  border-top: 2px solid #e5e5e5;
}

:is(.icwc-post__content, .icwc-entry__content) strong {
  font-weight: 700;
}

/* Pictures set beside the text float there, as before; text that follows wraps around them. */
:is(.icwc-post__content, .icwc-entry__content) :is(.alignleft, .wp-block-image.alignleft) {
  float: left;
  margin: 0 2rem 0 0;
}

:is(.icwc-post__content, .icwc-entry__content) :is(.alignright, .wp-block-image.alignright) {
  float: right;
  margin: 0 0 0 2rem;
}

:is(.icwc-post__content, .icwc-entry__content)::after {
  content: "";
  display: table;
  clear: both;
}

:is(.icwc-post__content, .icwc-entry__content) .wp-block-image {
  margin: 0 0 1.7rem;
}

:is(.icwc-post__content, .icwc-entry__content) .wp-block-image img {
  display: block;
}

:is(.icwc-post__content, .icwc-entry__content) .wp-block-image.aligncenter img {
  margin-inline: auto;
}

/* Buttons written with the previous theme's classes (in posts made by the repo's tool) look like our own. */
.sc_button {
  display: inline-block;
  padding: 1em 2.3em 1.1em;
  background-color: var(--gold);
  font: 400 1rem / calc(1.5em + 0.6px) var(--font-body);
  color: var(--white);
  text-align: center;
  text-decoration: none;
}

.sc_button:hover {
  color: var(--white);
  filter: brightness(1.07);
}

.sc_button .sc_button_text {
  display: inline-block;
  vertical-align: middle;
}

/* ---------- Programs pages (Children's and Adult Programs): tabs, then an accordion, then a gallery ---------- */

/* Each tab starts a little lower and leaves a line under its picture, as the page builder's tabs did. */
.icwc-entry__content .wp-block-tab-panel > :first-child {
  margin-top: 3.25rem;
}

.icwc-entry__content .wp-block-tab-panel > .wp-block-image {
  margin-bottom: 2.886rem;
}

/* The pictures in the tabs keep the wide shape the page has always shown them in, whatever shape the photo is. */
.icwc-entry__content .wp-block-tab-panel > .wp-block-image img {
  width: 100%;
  aspect-ratio: 2400 / 1237;
  object-fit: cover;
}

.icwc-entry__content .wp-block-tab-panel > h3 {
  margin: 0 0 2rem;
  line-height: 1.2;
}

.icwc-entry__content .wp-block-tab-panel > p {
  margin: 0;
}

.icwc-entry__content .wp-block-tab-panel > p + p {
  margin-top: 1rem;
}

.icwc-entry__content .wp-block-tab-panel > :last-child {
  margin-bottom: 1.7rem;
}

/* The accordion: cream panels with a line between them, a plus or minus before each title. */
.icwc-accordion {
  margin-top: 3.3rem;
}

.icwc-accordion .wp-block-details {
  padding: 0.3rem 1.8rem;
  background-color: var(--cream);
}

.icwc-accordion .wp-block-details + .wp-block-details {
  border-top: 1px solid #e5e5e5;
}

.icwc-accordion summary {
  position: relative;
  margin-block: -1px;
  padding: 14px 20px 14px 46px;
  font: 700 1rem / 1.5 var(--font-display);
  color: var(--heading);
  list-style: none;
  cursor: pointer;
}

.icwc-accordion summary::-webkit-details-marker {
  display: none;
}

.icwc-accordion details[open] > summary,
.icwc-accordion summary:hover {
  color: var(--gold);
}

/* Plus sign: two thin bars; the upright one goes away when the panel is open. */
.icwc-accordion summary::before,
.icwc-accordion summary::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 9px;
  height: 1px;
  background-color: var(--heading);
}

.icwc-accordion summary::after {
  left: 4px;
  width: 1px;
  height: 9px;
  margin-top: -4px;
}

.icwc-accordion details[open] > summary::after {
  display: none;
}

.icwc-accordion .wp-block-details > p {
  margin: 1.688rem 0 0;
  padding: 0 0 2.836rem;
}

.icwc-entry__content .icwc-gallery-title {
  margin: 5rem 0 3.3rem;
  line-height: 1.2;
}

.icwc-entry__content .wp-block-gallery.icwc-gallery {
  --wp--style--unstable-gallery-gap: 10px;
  gap: 10px;
  margin: 0;
}

/* Every picture keeps its square, also alone on the last row. */
.icwc-entry__content .wp-block-gallery.icwc-gallery figure.wp-block-image {
  flex-grow: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--footer);
  color: var(--white);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 2rem 0;
  list-style: none;
}

.footer-nav a {
  display: block;
  padding: 0.5em 1.4em;
  font: 700 11.988px/1.688 var(--font-display);
  color: var(--white);
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  color: var(--gold);
}

.footer-copy {
  padding: 2em 0;
  border-top: 1px solid var(--footer-line);
  background: var(--footer-deep);
  font-size: 0.9333rem;
  line-height: 1.688;
  text-align: center;
}

/* ---------- Back to top ---------- */

/* A gold square at the bottom right that appears once the page has been scrolled a little more than 100px, as the site
   has always had. No script: it sits in a column down the right edge of the page, starts one screen and 100px below
   the top, and sticks to the bottom of the window from there on. On a page too short to scroll that far it never shows. */
body {
  position: relative;
}

.to-top {
  position: absolute;
  top: 0;
  right: 2rem;
  bottom: 0;
  z-index: 40;
  width: 3rem;
  overflow: clip;
  pointer-events: none;
}

.to-top a {
  position: sticky;
  top: calc(100vh - 5rem);
  top: calc(100dvh - 5rem);
  display: block;
  margin-top: calc(100vh + 100px);
  width: 3rem;
  height: 3rem;
  background-color: var(--gold);
  pointer-events: auto;
}

.to-top a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin: -0.1rem 0 0 -0.3rem;
  border: solid var(--white);
  border-width: 2px 0 0 2px;
  transform: rotate(45deg);
}

.to-top a:hover {
  filter: brightness(1.07);
}

@media print {
  .to-top {
    display: none;
  }
}

/* The previous theme's add-on prints a "to top" link of its own while it is still switched on. One is enough. */
.trx_addons_scroll_to_top {
  display: none !important;
}

/* Lists of posts longer than one page: "Newer", page numbers, "Older". */
.icwc-blog .navigation.pagination {
  margin-top: 5rem;
}

.icwc-blog .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.icwc-blog .nav-links .page-numbers {
  min-width: 2.8rem;
  padding: 0.55em 0.9em;
  background-color: var(--cream);
  line-height: 1.5;
  color: var(--heading);
  text-align: center;
}

.icwc-blog .nav-links :is(a.page-numbers:hover, .page-numbers.current) {
  background-color: var(--gold);
  color: var(--white);
}

.icwc-blog .nav-links .page-numbers.dots {
  background: none;
}

/* ---------- Small laptops and tablets ---------- */

@media (max-width: 1279px) {
  :root {
    --title: 32px;
  }

  .to-top {
    right: 1rem;
  }

  .to-top a {
    top: calc(100vh - 4rem);
    top: calc(100dvh - 4rem);
  }

  .nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-logo {
    margin: 0;
  }

  .site-header {
    padding: 1rem 0;
  }

  .site-header__inner {
    min-height: 85px;
    padding-inline: 24px;
  }

  .is-style-icwc-split > * {
    padding: 5rem 3rem 5.5rem;
  }
}

@media (max-width: 1023px) {
  :root {
    --title: 28px;
  }

  .is-style-icwc-split {
    grid-template-columns: 1fr 1fr;
    padding-block: 3rem;
  }

  .is-style-icwc-split > * {
    padding: 3rem 2rem;
  }

  .is-style-icwc-section-dark::after {
    width: 18rem;
    height: 18rem;
    margin: -9rem 0 0 -9rem;
  }

  .icwc-cards > .wp-block-column {
    padding-inline: 1rem;
  }

  /* Picture bands: on narrower screens the words reach over the picture, so it is toned down to keep them readable.
     (The previous theme did this on phones only, which left tablets with white words on a bright photo.) */
  .wp-block-cover[class*="is-style-icwc-band-"]::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
  }

  .wp-block-cover[class*="is-style-icwc-band-"].is-light::after {
    background: rgba(255, 255, 255, 0.7);
  }

  /* Narrow columns: smaller titles, so that a long word stays in one piece. */
  .wp-block-columns.icwc-features {
    column-gap: 20px;
  }

  .icwc-features :is(h2, h3, h4),
  .icwc-cards :is(h2, h3, h4) {
    font-size: 1.2rem;
  }
}

/* On tablets the columns are too narrow for line breaks placed by hand; the text wraps by itself there. */
@media (min-width: 768px) and (max-width: 1023px) {
  .icwc-features br,
  .icwc-cards br {
    display: none;
  }

  .wp-block-columns.icwc-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1262px) {
  .icwc-timeline br {
    display: none;
  }
}

@media (max-width: 959px) {
  .wp-block-columns.icwc-timeline {
    margin-bottom: 4.1rem;
  }

  .is-style-icwc-page {
    padding: calc(6rem + 1px) 0 6rem;
  }
}

/* ---------- Phones ---------- */

@media (max-width: 767px) {
  html {
    font-size: 81.25%; /* 13px */
  }

  :root {
    --title: 24px;
  }

  .wp-block-button .wp-block-button__link {
    padding: 0.9em 2em 1em;
  }

  .is-style-icwc-ornament::before {
    height: 2.38rem;
  }

  .wp-block-columns.icwc-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .icwc-intro p,
  .is-style-icwc-card > p,
  .is-style-icwc-card > ul,
  .is-style-icwc-card > ol {
    margin-bottom: 1rem;
  }

  .icwc-intro .wp-block-column > :last-child,
  .is-style-icwc-card > :last-child {
    margin-bottom: 0;
  }

  .wp-block-buttons.icwc-tiles {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .wp-block-buttons.icwc-tiles .wp-block-button__link {
    font-size: 1.2rem;
  }

  .icwc-people {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Gold panel first, text below it, both the full width of the screen. */
  .is-style-icwc-split {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }

  .is-style-icwc-split::before {
    inset: 50% 0 0;
  }

  .is-style-icwc-split > * {
    padding: 4.5rem 1.5rem 5.1rem;
  }

  .is-style-icwc-split > :first-child {
    border-radius: 0;
  }

  .is-style-icwc-split :is(h1, h2) {
    margin-bottom: 1.5rem;
  }

  .is-style-icwc-split :is(ul, ol),
  .is-style-icwc-split p {
    margin-bottom: 1rem;
  }

  .is-style-icwc-split :is(ul, ol) :is(ul, ol) {
    margin-bottom: 0;
  }

  .is-style-icwc-split .wp-block-buttons {
    margin-top: 3rem;
  }

  .wp-block-columns.icwc-features {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 3rem;
  }

  .icwc-features :is(h2, h3, h4) {
    font-size: 1.2rem;
  }

  .icwc-features p {
    margin-bottom: 1rem;
  }

  [class*="is-style-icwc-icon-"]::before {
    width: 4rem;
    height: 4rem;
    margin-bottom: 2.27rem;
  }

  /* Cards shrink to the icon and the title, which stays a link. */
  .wp-block-columns.icwc-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 60px;
    margin-bottom: 2.823rem;
  }

  .icwc-cards > .wp-block-column {
    padding: 3.8rem 1.2rem 1.2rem;
  }

  .icwc-cards :is(h2, h3, h4) {
    font-size: 1.2rem;
  }

  .icwc-cards [class*="is-style-icwc-icon-"]::before {
    margin-bottom: 1.2rem;
  }

  .icwc-cards p,
  .icwc-cards .wp-block-buttons {
    display: none;
  }

  /* Plain pages and forms. */
  .is-style-icwc-page {
    padding: calc(4rem + 1px) 0 3rem;
  }

  .is-style-icwc-page :is(p, ul, ol),
  .wpcf7 p:not(:has(input[type="submit"])) {
    margin-bottom: 1rem;
  }

  .wp-block-columns.icwc-halves {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .is-style-icwc-small {
    font-size: 1rem;
  }

  input:is([type="text"], [type="email"], [type="tel"], [type="url"], [type="number"], [type="search"], [type="password"], [type="date"]),
  textarea {
    padding: 1em;
  }

  input[type="submit"],
  button[type="submit"] {
    padding: 0.9em 2em 1em;
  }

  /* Tabs become a list of headings, each followed by its own text, with one open at a time. */
  .wp-block-tabs {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .wp-block-tabs > .wp-block-tab-list,
  .wp-block-tabs > .wp-block-tab-panels {
    display: contents;
  }

  .wp-block-tab-list button {
    width: 100%;
    padding: 10.6px 20px 14px;
    border: 1px solid #f0f0f0;
    border-radius: 5px;
    background-color: #f8f8f8;
    font: 700 17px/17px var(--font-display);
    color: var(--heading);
    text-align: left;
    white-space: normal;
  }

  .wp-block-tab-list button:hover,
  .wp-block-tab-list button[aria-selected="true"] {
    background-color: #f8f8f8;
    color: var(--gold);
  }

  .wp-block-tab-list button[aria-selected="true"] {
    border-radius: 5px 5px 0 0;
  }

  .wp-block-tab-panel {
    padding-block: 2rem;
  }

  .wp-block-tab-list button:nth-child(1) { order: 1; }
  .wp-block-tab-panel:nth-child(1) { order: 2; }
  .wp-block-tab-list button:nth-child(2) { order: 3; }
  .wp-block-tab-panel:nth-child(2) { order: 4; }
  .wp-block-tab-list button:nth-child(3) { order: 5; }
  .wp-block-tab-panel:nth-child(3) { order: 6; }
  .wp-block-tab-list button:nth-child(4) { order: 7; }
  .wp-block-tab-panel:nth-child(4) { order: 8; }
  .wp-block-tab-list button:nth-child(5) { order: 9; }
  .wp-block-tab-panel:nth-child(5) { order: 10; }
  .wp-block-tab-list button:nth-child(6) { order: 11; }
  .wp-block-tab-panel:nth-child(6) { order: 12; }

  /* Picture bands: text across the width, over the picture. */
  [class*="is-style-icwc-band-"] .wp-block-cover__inner-container > * {
    width: auto;
    margin-left: 0;
  }

  [class*="is-style-icwc-band-"] p {
    margin-bottom: 1rem;
  }

  [class*="is-style-icwc-band-"] :is(h1, h2, h3) + p {
    margin-top: 1.5rem;
  }

  [class*="is-style-icwc-band-"] .wp-block-buttons {
    margin-top: 2rem;
  }

  [class*="is-style-icwc-band-"] br {
    display: none;
  }

  /* Services on the dotted line: one under the other, text wrapping by itself. */
  .wp-block-columns.icwc-timeline {
    grid-template-columns: minmax(0, 1fr);
    margin-block: 3rem -1.9rem;
  }

  /* Dark section: text across the width, no drawing. */
  .is-style-icwc-section-dark {
    padding: 2.615rem 0 2.7rem;
  }

  .is-style-icwc-section-dark > * {
    width: min(var(--wrap), 100% - 2 * var(--gutter));
    margin-inline: auto;
  }

  .is-style-icwc-section-dark::before,
  .is-style-icwc-section-dark::after {
    display: none;
  }

  /* No photo either: a hidden picture that waits to be scrolled to is never fetched. */
  .site-main .is-style-icwc-section-dark > .icwc-section-photo {
    display: none;
  }
}

@media (max-width: 639px) {
  .icwc-timeline :is(h2, h3, h4) {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .wp-block-button__link,
  .nav a,
  .footer-nav a,
  .icwc-person a,
  .icwc-slideshow__dots button {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
  }
}

/* ---------- Posts, services and team on smaller screens ---------- */

@media (max-width: 1262px) {
  .icwc-sidebar {
    flex-basis: 270px;
  }
}

@media (max-width: 1135px) {
  .icwc-sidebar .widget {
    padding-inline: 15%;
  }
}

/* The sidebar moves under the posts, its widgets side by side: three, then two, then one per row. */
@media (max-width: 959px) {
  .icwc-blog,
  .icwc-entry-page,
  .icwc-page-space {
    padding: calc(6rem + 1px) 0 6rem;
  }

  .icwc-blog__inner {
    display: block;
  }

  .icwc-post + .icwc-post {
    margin-top: 5rem;
  }

  .icwc-sidebar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 4rem;
    padding: 30px 0;
  }

  .icwc-sidebar .widget,
  .icwc-sidebar .widget + .widget {
    min-width: 0;
    margin: 0;
    padding: 0 15px;
    border: 0;
  }
}

@media (max-width: 767px) {
  .icwc-blog,
  .icwc-entry-page,
  .icwc-page-space {
    padding: calc(4rem + 1px) 0 3rem;
  }

  .icwc-post__title {
    font-size: 1.5rem;
  }

  .icwc-post--single .icwc-post__title {
    font-size: 1.538rem;
  }

  .icwc-post--single .icwc-post__header {
    margin-bottom: 2rem;
  }

  .icwc-sidebar .widget-title {
    font-size: 1.1538rem;
  }

  .sc_button {
    padding: 0.9em 2em 1em;
  }

  .widget_recent_entries li > a {
    font-size: 1rem;
  }

  .icwc-comments .comment-reply-title {
    font-size: 1.1538rem;
  }

  .icwc-comments .comment-form .comment-form-cookies-consent {
    margin-bottom: 1rem;
  }

  .tagcloud a {
    font-size: 1rem;
  }

  .widget_calendar :is(th, td) {
    font-size: 0.91rem;
  }

  .icwc-post__meta {
    margin-top: 2rem;
    font-size: 1rem;
    line-height: 1.3;
  }

  .icwc-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 3rem;
    padding: 20px 0;
  }

  .icwc-sidebar .widget,
  .icwc-sidebar .widget + .widget {
    padding: 0 10%;
  }

  :is(.icwc-post__content, .icwc-entry__content) :is(p, ul, ol, pre, table, .wp-block-image) {
    margin-bottom: 1em;
  }

  .icwc-post .icwc-post__content p {
    margin-bottom: 0;
  }

  :is(.icwc-post__content, .icwc-entry__content) h1 {
    font-size: 2.6rem;
  }

  :is(.icwc-post__content, .icwc-entry__content) h2 {
    font-size: 1.85rem;
  }

  :is(.icwc-post__content, .icwc-entry__content) h3 {
    font-size: 1.538rem;
  }

  :is(.icwc-post__content, .icwc-entry__content) :is(blockquote, .wp-block-quote) {
    padding: 3rem 1.5rem 2rem 4.5rem;
  }

  :is(.icwc-post__content, .icwc-entry__content) :is(blockquote, .wp-block-quote)::before {
    top: 1rem;
    left: 1rem;
    font-size: 4.5rem;
  }

  /* Pictures stop floating beside the text and take the full width. */
  :is(.icwc-post__content, .icwc-entry__content) :is(.alignleft, .alignright, .wp-block-image.alignleft, .wp-block-image.alignright) {
    float: none;
    margin: 1rem 0;
  }

  :is(.icwc-post__content, .icwc-entry__content) :is(.alignleft, .alignright) img {
    width: 100% !important; /* the editor writes the desktop width onto the picture itself */
  }

  .icwc-entry__content .wp-block-tab-panel > h3 {
    margin-bottom: 1.5rem;
  }

  .icwc-accordion .wp-block-details {
    padding-inline: 1.8em;
  }

}

/* From here down the share buttons sit a little lower under a post. */
@media (max-width: 639px) {
  .icwc-share {
    margin-top: 2rem;
  }
}

@media (max-width: 479px) {
  .icwc-sidebar {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 2.5rem;
  }

  .icwc-sidebar .widget,
  .icwc-sidebar .widget + .widget {
    padding-inline: 15%;
  }

  .icwc-sidebar .widget + .widget {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
  }

  .icwc-sidebar .widget:nth-child(2) {
    margin-top: 20px;
    padding-top: 20px;
  }

  .icwc-sidebar .widget:nth-child(n + 4) {
    border-top: 0;
  }

  /* One photo per row on a phone, as the gallery has always been shown there. */
  .icwc-entry__content .wp-block-gallery.icwc-gallery figure.wp-block-image:not(#individual-image) {
    width: 100%;
  }
}

/* ---------- Become a Member (a Group with the class "icwc-join") ----------
 *
 * The page opens with its title and text beside the list of what membership pays for. Then come three numbered
 * steps, each a Group with the class "icwc-step" that starts with a Heading with the class "icwc-step__title":
 * 1 choose a membership, 2 pay, 3 register. The numbers are counted here, so steps can be moved in the editor.
 *
 * Step 2 has the class "icwc-step--pay" as well. From tablets up, the payment form set into the page
 * ("icwc-join__embed") is shown; it needs 370 px. Phones get a button to the payment page instead, and do not
 * fetch the form. "icwc-join__phone" marks what only phones show, "icwc-join__wide" what only the others show.
 */

.icwc-join {
  counter-reset: icwc-step;
}

/* The opening: title and text on the left, the list on the right in a cream box. */
.wp-block-columns.icwc-join__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  margin-bottom: 3.6rem;
}

.is-style-icwc-page .icwc-join__intro h1 {
  margin-block: -0.15em 1.5rem;
}

.icwc-join__intro > .wp-block-column:last-child {
  padding: 1.9rem 2.1rem 2rem;
  border-radius: 6px;
  background-color: var(--cream);
}

.is-style-icwc-page .icwc-join__intro > .wp-block-column:last-child > p {
  margin-bottom: 0.8rem;
  font-weight: 600;
  color: var(--heading);
}

/* A list with gold ticks (List block with the class "icwc-checks"). */
.wp-block-list.icwc-checks {
  padding: 0;
  list-style: none;
}

.icwc-checks li {
  position: relative;
  padding-left: 1.7em;
}

.icwc-checks li + li {
  margin-top: 0.35em;
}

.icwc-checks li::before {
  content: "";
  position: absolute;
  top: 0.42em;
  left: 0;
  width: 0.95em;
  height: 0.95em;
  background-color: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M2.5 8.6l3.6 3.6 7.4-8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M2.5 8.6l3.6 3.6 7.4-8'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* A step: a line above, its number in a gold circle on the left, the title and everything else beside it. */
.icwc-step {
  position: relative;
  padding: 2.9rem 0 3.1rem 68px;
  border-top: 1px solid #e9e5d6;
  counter-increment: icwc-step;
}

.icwc-join > .icwc-step:last-child {
  padding-bottom: 0;
}

.is-style-icwc-page .icwc-step__title {
  margin: 0 0 1.1rem;
  font: 600 1.714rem/1.3 var(--font-body);
  color: var(--heading);
}

.icwc-step__title::before {
  content: counter(icwc-step);
  position: absolute;
  top: calc(2.9rem - 5px);
  left: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--gold);
  font: 700 1.429rem/44px var(--font-body);
  color: var(--heading);
  text-align: center;
}

/* Step 1: the membership options as cards (Columns block with the class "icwc-plans"), a name and a price each. */
.wp-block-columns.icwc-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 1.7rem;
}

.icwc-plans > .wp-block-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.6rem 1.6rem;
  border-top: 3px solid var(--gold);
  border-radius: 0 0 6px 6px;
  background-color: var(--cream);
}

.icwc-plans h3 {
  margin: 0;
  font: 600 1.143rem/1.4 var(--font-body);
  color: var(--heading);
}

.is-style-icwc-page .icwc-plans .icwc-plan__price {
  margin: 0;
  line-height: 1.2;
}

.icwc-plan__price strong {
  margin-right: 0.12em;
  font: 700 2.2rem/1 var(--font-slab);
  color: var(--heading);
}

/* Step 2: the text on the left, the payment form on the right in a frame. The form's own page pins a small badge to
   its right edge, which lies over the end of its button when the frame is narrower than 576 px (measured 29 Nov
   2026), so the frame is 580 px wide. The last row takes up the form's extra height. */
.icwc-step--pay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 580px;
  grid-template-rows: auto auto auto 1fr;
  column-gap: 44px;
}

.icwc-step--pay > * {
  grid-column: 1;
}

.icwc-step--pay > .icwc-join__embed {
  grid-column: 2;
  grid-row: 1 / 5;
}

.icwc-join__embed {
  overflow: hidden;
  border: 1px solid #e9e5d6;
  border-radius: 8px;
}

.icwc-join__embed iframe {
  display: block;
  height: 740px; /* the form's first screen without its lower edge cut off */
}

.is-style-icwc-page .icwc-join__small {
  font-size: 0.929rem;
}

.icwc-join__phone,
.wp-block-buttons.icwc-join__phone {
  display: none;
}

/* Step 3: the form. A name above each field, fields with a visible edge, the four short fields two by two,
   and the agreement box in a frame of its own (the button stays switched off until it is ticked, so it must not be missed). */
.icwc-join .wpcf7 {
  margin-top: 1.6rem;
}

.icwc-join .wpcf7 .flex {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}

.icwc-join .wpcf7 .row {
  padding-bottom: 1.2rem;
}

.icwc-join .wpcf7 p {
  margin: 0;
}

.icwc-join .wpcf7 :is(input[type="text"], input[type="email"], input[type="tel"], select, textarea) {
  padding: 0.95em 1.1em;
  border: 1px solid #d9d4c2;
  border-radius: 6px;
  color: var(--heading);
}

.icwc-join .wpcf7 select {
  height: 3.45em;
  padding-block: 0;
  padding-right: 3em;
}

.icwc-join .wpcf7 textarea {
  height: 8em;
}

.icwc-join .wpcf7 :is(input, select, textarea):focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(219, 158, 48, 0.3);
}

.icwc-join .wpcf7 .wpcf7-list-item {
  margin-top: 0.3rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid #d9d4c2;
  border-radius: 6px;
}

.icwc-join .wpcf7 .wpcf7-list-item label {
  gap: 0.75em;
  color: #6b6058;
}

.icwc-join .wpcf7 input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1em;
}

.icwc-join .wpcf7 input[type="submit"] {
  margin-top: 0.5rem;
  padding: 1em 2.6em;
  border-radius: 6px;
  font-weight: 600;
  color: var(--heading);
}

.icwc-join .wpcf7 input[type="submit"]:disabled {
  background-color: #e4e0d6;
  color: #6b6058;
  opacity: 1;
}

.icwc-join .wpcf7 p:has(input[type="submit"]) {
  margin-bottom: 0;
}

/* The names of the form's fields (a span with the class "icwc-label" inside each field's label). Screen readers read
   them wherever the form is used. This page shows them above the fields, in place of the grey hints inside the fields. */
.icwc-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icwc-join .wpcf7 .icwc-label {
  position: static;
  display: block;
  width: auto;
  height: auto;
  margin: 0 0 0.45rem;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  font: 600 0.929rem/1.4 var(--font-body);
  color: var(--heading);
}

.icwc-join .wpcf7 label:has(.icwc-label) :is(input, textarea)::placeholder {
  color: transparent;
}

/* Tablets and narrow windows: the payment form under the text. */
@media (min-width: 768px) and (max-width: 1099px) {
  .wp-block-columns.icwc-join__intro {
    gap: 36px;
  }

  .icwc-step--pay {
    display: block;
  }

  .icwc-join__embed {
    max-width: 580px;
    margin-top: 1.6rem;
  }
}

@media (max-width: 767px) {
  /* A wider column than the site's other pages have on phones, larger and darker text. */
  .icwc-join {
    --gutter: 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #6b6058;
  }

  .is-style-icwc-page.icwc-join {
    padding-top: 34px;
  }

  /* The opening in one column, the list as plain text under it. */
  .wp-block-columns.icwc-join__intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 26px;
  }

  .is-style-icwc-page .icwc-join__intro h1 {
    margin-block: 0 14px;
    font-size: 27px;
  }

  .icwc-join__intro > .wp-block-column:last-child {
    padding: 0;
    background-color: transparent;
  }

  .is-style-icwc-page .icwc-join__intro > .wp-block-column:last-child > p {
    margin-bottom: 0.3rem;
    font-weight: 400;
    color: inherit;
  }

  .icwc-checks li + li {
    margin-top: 6px;
  }

  /* The steps: the number stands in the title's line, everything else uses the full width. */
  .icwc-step {
    padding: 26px 0 30px;
  }

  .is-style-icwc-page .icwc-step__title {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0 0 14px;
    font-size: 20px;
  }

  .icwc-step__title::before {
    position: static;
    flex: none;
    width: 34px;
    height: 34px;
    font: 700 16px/34px var(--font-body);
  }

  /* Step 1: one option per row, its name on the left and its price on the right. */
  .wp-block-columns.icwc-plans {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 18px;
  }

  .icwc-plans > .wp-block-column {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-top: 0;
    border-left: 4px solid var(--gold);
    border-radius: 0 6px 6px 0;
  }

  .icwc-plans h3 {
    font-size: 16px;
  }

  .is-style-icwc-page .icwc-plans .icwc-plan__price {
    flex: none;
    font-size: 13px;
    white-space: nowrap;
  }

  .icwc-plan__price strong {
    font-size: 24px;
  }

  /* Step 2: a button to the payment page; the payment form set into the page stays out (and is not fetched). */
  .icwc-step--pay {
    display: block;
  }

  .icwc-join__embed,
  .icwc-join__wide {
    display: none;
  }

  .icwc-join__phone {
    display: block;
  }

  .wp-block-buttons.icwc-join__phone {
    display: block;
    margin: 18px 0 12px;
  }

  .icwc-join__pay .wp-block-button,
  .icwc-join__pay .wp-block-button .wp-block-button__link {
    display: block;
    width: 100%;
  }

  .icwc-join__pay .wp-block-button .wp-block-button__link {
    padding: 15px 20px;
    border-radius: 6px;
    font: 600 16px/1.4 var(--font-body);
    color: var(--heading);
  }

  .is-style-icwc-page .icwc-join__small {
    font-size: 13px;
  }

  /* Step 3: one field per row, text large enough that iPhones do not zoom in on a field, the button across the width. */
  .icwc-join .wpcf7 {
    margin-top: 18px;
  }

  .icwc-join .wpcf7 .flex {
    grid-template-columns: minmax(0, 1fr);
  }

  .icwc-join .wpcf7 .row {
    padding-bottom: 14px;
  }

  .icwc-join .wpcf7 :is(input[type="text"], input[type="email"], input[type="tel"], select, textarea) {
    padding: 13px 14px;
    font-size: 16px;
  }

  .icwc-join .wpcf7 select {
    height: 52px;
    padding-block: 0;
    padding-right: 40px;
  }

  .icwc-join .wpcf7 textarea {
    height: 7.5em;
  }

  .icwc-join .wpcf7 .icwc-label {
    margin-bottom: 6px;
    font-size: 14px;
  }

  .icwc-join .wpcf7 .wpcf7-list-item {
    margin-top: 4px;
    padding: 12px 14px;
  }

  .icwc-join .wpcf7 .wpcf7-list-item label {
    gap: 10px;
  }

  .icwc-join .wpcf7 input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
  }

  .icwc-join .wpcf7 input[type="submit"] {
    width: 100%;
    margin-top: 6px;
    padding: 15px 20px;
    font: 600 16px/1.4 var(--font-body);
  }

  /* The "back to top" square would lie over the text here, now that the column reaches near the screen's edge. */
  body:has(.icwc-join) .to-top {
    display: none;
  }

  /* So would the chat widget's four suggestion bubbles, which open over the first step. Its round button stays. */
  body:has(.icwc-join) #icwc-faq-chips {
    display: none !important; /* the widget shows them with a style of its own */
  }
}
