/* reduce large font size a little */

:root {
  --font-size-l: clamp(1.2rem, calc(1vw + (1rem)), 1.56rem);
}


/* add more spacing to study blocks */

article .question:not(:first-child),
article .text:not(:first-child),
article .bible:not(:first-child) {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xxl);
}

article .question > * {
  margin-bottom: 0;
}


/* make intermediate headings in studies larger */
.tpl_discuss article > h2,
.tpl_discuss article > h3 {
  font-size: var(--font-size-xl);
}


/* adjust intro sections
  - remove background
  - center text
  - increase spacing
  - add icon, hide heading
  - hide question numbers
*/

article [class*="intro"]::before {
  background: none;
}

article [class*="intro"] {
  text-align: center;
  margin-bottom: 0;
  padding-top: 0;
}

article [class*="intro"] > .question:not(:first-child),
article [class*="intro"] > .text:not(:first-child),
article [class*="intro"] > .bible:not(:first-child),
article [class*="intro"] > .video:not(:first-child),
article [class*="intro"] > .link:not(:first-child),
article [class*="intro"] > blockquote:not(:first-child) {
  margin-top: calc(2 * var(--space-xxl));
}

article [class*="intro"] > .question,
article [class*="intro"] > .text,
article [class*="intro"] > .bible,
article [class*="intro"] > .video,
article [class*="intro"] > .link,
article [class*="intro"] > blockquote {
  margin-bottom: calc(2 * var(--space-xxl));
}



article [class*="intro"] h1 {
  font-size: var(--font-size-l);
}

article [class*="intro"] h1 .icon {
  height: 2.5em;
  width: 2em;
}

article [class*="intro"] h1 span {
  display: none;
}

article [class*="intro"] > .question h3 {
  display: none;
}


/* thumbnail links within pages */

.link a:has(> img):hover {
  background: none;
}

.link a:has(> img):hover img {
  outline: solid 1px #fff;
  transition: outline 0.1s ease-out;
}


/* adjust bible blocks */

.bible {
  border: none;
}

:root {
 --bible-bg:
      radial-gradient(100% 60% at 120% -20%, #F1A258AA 0%, #F1A25800 100%),
      radial-gradient(100% 60% at -20% 120%, #586ab1EE 0%, #586ab100 100%),
      radial-gradient(140% 90% at 110%  85%, #FFFFFFFF 0%, #CAF2FFFF 100%);
  --bible-ref-bg: var(--col-theme5);
}

.bible .reference::before {
  content: '';
}


/* increase padding on highlight blocks */

.highlight {
  padding: var(--space-xl);
}


/* stacking buttons */

:is( button.button, input[type="submit"].button, a.button, label.button ) {
  margin-bottom: 4px;
}


/* historical context blocks on older studies
   (image followed by highlight block)
  - remove spacing between the two
  - reduce the font size and add space between paragraphs
*/

img:has(+ .highlight) {
  margin-bottom: 0;
}

img + .highlight {
  margin-top: -4px;
}

img + .highlight p {
  font-size: calc(0.9*var(--font-size));
  margin-bottom: 1em;
}


/* cookie bar */

.cookie-bar {
  position: fixed;
  bottom: 0;
  z-index: 999;
  width: 100%;
  background-color: rgba(0,0,0,0.8);
  display: none;
}

.cookie-bar.active {
  display: flex;
}


/* force columns to wrap on medium screens */

@container columns (width < 700px) {
  .width--wrapm:has(> .column) > * {
    --cols-max: 1;
    /* width: 100%; */
    min-width: 100%;
    max-width: 100%;
    -ms-flex-negative: 0;
    flex-shrink: 0;
  }
}


/* secondary nav placing */

.sectionHeading--with_nav {
  flex-wrap: wrap-reverse;
  align-items: normal;
}

.nav--secondary.nav--secondary__with_heading {
  justify-content: flex-end;
  margin-bottom: var(--space-xl);
}

.nav--secondary.nav--secondary__with_heading,
.nav--secondary.nav--secondary__with_heading .nav__group {
  container-type: normal;
}

@media screen and (max-width: 767px) {
  /* when main nav collapses, move to center */
  .nav--secondary.nav--secondary__with_heading {
    justify-content: flex-start;
  }
}


/* header spacing fix */

.site-header + div > .row {
  padding-top: var(--space-l);
}


/* lines */

hr {
  border: solid white;
  border-width: 2px 0 0;
  margin: var(--space-xxl) 0;
}


/* content on plain pages */

.content--page :is(h2,h3,h4,h5,h5) {
  margin-top: var(--space-xxl);
}

.content--page table {
  border-collapse: collapse;
  margin: var(--space-m);
}

.content--page table td {
  border: solid 1px;
  padding: 4px 8px;
}


/* background gradient */

:root {
  --bg-cloud-dreamy:
      radial-gradient(  40%  20%  at    5%  100%,  #B8BCD2BB 0%,  #00000000 100% ),
      radial-gradient(  40%  40%  at   -5%    0%,  #6F628988 4%,  #073AFF00 100% ),
      radial-gradient(  50% 100%  at   65%   11%,  #EC5632CC 5%,  #073AFF00 100% ),
      radial-gradient( 110%  90%  at  -30%   95%,  #F19236FF 0%,  #00000000 100% ),
      radial-gradient(  40% 200%  at    0%    0%,  #EC4233FF 0%,  #00000000 100% ),
      radial-gradient(  30% 120%  at   34%   75%,  #EC4233FF 0%,  #00000000 100% ),
      radial-gradient(  75%  75%  at  151%   80%,  #FFDB00FF 0%,  #00000000 100% ),
      radial-gradient( 140%  90%  at  110%   85%,  #FF7000FF 0%,  #EF6B34FF 100% );
  --bg-cloud: var(--bg-cloud-dreamy);
}


/* remove border from videos */

.video > :is(iframe, lite-youtube) {
  border: none;
}


/* spacing between video and text */

.video + p {
  margin-top: var(--space-xxl);
}


/* add icon for podcast section (duplicate 'watch' for now) */

.icon.icon--podcast {
  --mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' viewBox='0 0 310 310'%3E%3Cpath d='M297.917 64.645c-11.19-13.302-31.85-18.728-71.306-18.728H83.386c-40.359 0-61.369 5.776-72.517 19.938C0 79.663 0 100.008 0 128.166v53.669c0 54.551 12.896 82.248 83.386 82.248h143.226c34.216 0 53.176-4.788 65.442-16.527C304.633 235.518 310 215.863 310 181.835v-53.669c0-29.695-.841-50.16-12.083-63.521zm-98.896 97.765-65.038 33.991c-1.454.76-3.044 1.137-4.632 1.137-1.798 0-3.592-.484-5.181-1.446-2.992-1.813-4.819-5.056-4.819-8.554v-67.764c0-3.492 1.822-6.732 4.808-8.546 2.987-1.814 6.702-1.938 9.801-.328l65.038 33.772c3.309 1.718 5.387 5.134 5.392 8.861.004 3.73-2.065 7.151-5.369 8.877z'/%3E%3C/svg%3E");
}
