/*
Theme Name: Karaite Jews of America
Theme URI: https://www.karaites.org/
Author: The Karaite Jews of America
Description: Block theme for karaites.org, with the colors, fonts and home page of the original Weebly site. Menu, header and footer are edited in Appearance > Editor.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: karaite-jews-of-america
*/

/* ---------- header: site name, then the menu in a ruled bar ---------- */
.site-header { background: #fff; padding: 0 !important; }
.site-header__bar { padding: 1rem 2.75rem; }
.kja-site-title { margin: 0; }
.kja-site-title a { text-decoration: none; }
.kja-menu { border-top: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; padding: 0 1rem; margin: 0 !important; gap: 0 2.6rem; }
.kja-menu .wp-block-navigation__container { gap: 0 2.6rem; }
.kja-menu .wp-block-navigation-item__content { padding: .8rem 0 .75rem; text-decoration: none; }
.kja-menu .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--tan-text); }
.kja-menu .menu-donate > .wp-block-navigation-item__content { color: var(--wp--preset--color--tan-text); }
.kja-menu .wp-block-navigation__submenu-container { border: 1px solid #e8e8e8 !important; box-shadow: 0 6px 14px rgba(0,0,0,.08);
  text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .9rem; min-width: 15rem !important; padding: .4rem 0; }
.kja-menu .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .4rem 1rem; }
.kja-menu .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--wash); color: var(--wp--preset--color--navy); }
.kja-menu .wp-block-navigation__submenu-icon { display: none; }
.wp-block-navigation__responsive-container.is-menu-open { font-size: 1rem; }

/* ---------- inner pages ---------- */
.site-main { padding-top: 3rem; padding-bottom: 4rem; }
.site-main.is-home { padding-top: 0; padding-bottom: 0; }
.page-title { margin-bottom: .3rem; }
.title-he { font-family: var(--wp--preset--font-family--frank-ruhl-libre); font-size: clamp(1.6rem, 3.6vw, 2.2rem) !important;
  line-height: 1.3; color: var(--wp--preset--color--royal); text-align: left; margin-top: 0 !important; }
p[dir="rtl"], .is-rtl, [lang="he"] { font-family: var(--wp--preset--font-family--frank-ruhl-libre); }
.entry-content p[dir="rtl"]:not(.title-he) { font-size: 1.3em; line-height: 1.8; }
.lead { font-size: 1.12rem; color: var(--wp--preset--color--ink-soft); }
.note { color: var(--wp--preset--color--ink-soft); font-size: .93rem; }
.listen { font-size: .95rem; color: var(--wp--preset--color--ink-soft); }
.wp-block-quote { border-left: 3px solid var(--wp--preset--color--tan); padding-left: 1.25rem; color: var(--wp--preset--color--ink-soft); }
.wp-block-table td, .wp-block-table th { border: 0; border-bottom: 1px solid #e8e8e8; padding: .45rem .9rem .45rem 0; vertical-align: top; }
.wp-block-audio { margin: 0 0 1rem; padding: .6rem 0 .8rem; border-bottom: 1px solid #e8e8e8; }
.wp-block-audio figcaption { text-align: left; margin: 0 0 .35rem; color: var(--wp--preset--color--ink); font-size: .98rem; order: -1; }
.wp-block-audio { display: flex; flex-direction: column; }
.wp-block-audio audio { width: 100%; }
.download a::before { content: ""; display: inline-block; width: .9em; height: 1.1em; margin-right: .45em; vertical-align: -.15em;
  border: 1.5px solid currentColor; border-radius: 2px; }
.callout { background: var(--wp--preset--color--wash); border-left: 3px solid var(--wp--preset--color--tan); padding: 1rem 1.25rem; }

/* galleries: a grid of cropped thumbnails, each linking to the full photo */
.kja-gallery { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem !important; }
.kja-gallery > * { margin: 0 !important; max-width: none !important; }
.kja-gallery .wp-block-image a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #eee; }
.kja-gallery .wp-block-image img { width: 100%; height: 100%; object-fit: cover; }
.kja-days { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1.25rem 1rem !important; }
.kja-days > * { margin: 0 !important; max-width: none !important; }
.kja-days figcaption { font-weight: 700; text-align: left; }

/* lists of pages */
.index, .merged { margin-top: 3rem !important; padding-top: 1.25rem; border-top: 1px solid #e8e8e8; }
.index h2 { font-size: 1.4rem; margin-top: 0; }
.links { list-style: none; padding-left: 0; columns: 2 16rem; column-gap: 2.5rem; }
.links li { break-inside: avoid; margin: 0 0 .45rem; }

/* Torah portions */
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem !important; padding-top: 1rem; border-top: 1px solid #e8e8e8; }
.pager a { text-decoration: none; font-weight: 700; }
.pager a[rel="prev"]::before { content: "\2039\00a0"; }
.pager a[rel="next"]::after { content: "\00a0\203A"; }
.book { margin-top: 2.5rem !important; }
.book > h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 2px solid var(--wp--preset--color--tan);
  padding-bottom: .4rem; margin-bottom: .4rem; }
.portions { list-style: none; padding-left: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); column-gap: 2.5rem; }
.portions li { margin: 0; border-bottom: 1px solid #e8e8e8; }
.portions a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem 0; text-decoration: none; color: var(--wp--preset--color--ink); }
.portions a:hover .en { color: var(--wp--preset--color--tan-text); text-decoration: underline; }
.portions .he { font-family: var(--wp--preset--font-family--frank-ruhl-libre); font-size: 1.3rem; color: var(--wp--preset--color--navy); }
.button { display: inline-block; background: var(--wp--preset--color--tan); color: #fff !important; text-decoration: none; font-weight: 700;
  font-size: .82rem; letter-spacing: .07em; text-transform: uppercase; padding: .85rem 1.4rem; }
.button.light { background: #fff; color: var(--wp--preset--color--tan-text) !important; }

/* embedded forms, maps, calendar */
.embed iframe { border: 0; width: 100%; display: block; }
.embed-video iframe { aspect-ratio: 16 / 9; height: auto; }
.embed-map iframe { height: 320px; }
.embed-calendar iframe { height: 640px; }
.embed-form iframe { height: 1400px; }
.embed-book iframe { height: 620px; }

/* ---------- home: the original page's colour bands ---------- */
.band { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); margin-top: 0 !important; margin-bottom: 0 !important; }
.is-home > .band + .band { margin-top: 0 !important; }
.band h2, .band h3 { font-family: var(--wp--preset--font-family--lato); font-size: 1.05rem; font-weight: 400; line-height: 1.6; color: var(--wp--preset--color--ink); }
.band-white:first-child .wp-block-columns { text-align: center; align-items: center; }
.band-white:first-child .wp-block-image img { max-height: 150px; width: auto; margin: 0 auto; }
.band-white:first-child .wp-block-image { margin-bottom: .75rem; }
.band-coral { background: var(--wp--preset--color--coral); text-align: center; }
.band-royal { background: var(--wp--preset--color--royal); text-align: center; }
.band-royal .wp-block-image img { margin: 0 auto; }
.band-sky { background: linear-gradient(180deg, var(--wp--preset--color--sky) 0%, #ffffff 100%); }
.band-bright { background: var(--wp--preset--color--bright); color: #fff; }
.band-bright a { color: #fff; }
.band-bright h2, .band-bright h3 { color: #fff; font-weight: 700; }
.band-bright p { font-weight: 700; font-size: 1.05rem; }
.band-paths { background: var(--wp--preset--color--wash); padding-top: 0; padding-bottom: 0; }
.band-paths .wp-block-columns { gap: 0; margin: 0; }
.band-paths .wp-block-column { padding: 2rem 1.75rem 1.75rem 0; }
.band-paths .wp-block-column + .wp-block-column { padding-left: 1.75rem; border-left: 1px solid #e6dcc6; }
.band-paths h2 { font-family: var(--wp--preset--font-family--crimson-text); font-size: 1.6rem; font-weight: 700; color: var(--wp--preset--color--navy); margin: 0 0 .35rem; }
.band-paths h2 a { color: var(--wp--preset--color--navy); text-decoration: none; }
.band-paths p { color: var(--wp--preset--color--ink-soft); margin: 0; }
.band .kja-gallery { grid-template-columns: repeat(3, 1fr); }
.more { font-weight: 700; }

/* ---------- footer: tan, seal on the left ---------- */
.site-footer { background: var(--wp--preset--color--tan); color: var(--wp--preset--color--navy); padding-top: 2.25rem; padding-bottom: 2.25rem; margin-top: 0 !important; }
.site-footer__seal, .site-footer__seal a { width: 110px; display: block; }
.site-footer__seal img { width: 110px !important; max-width: none; height: auto; }
.site-footer a { color: var(--wp--preset--color--navy); }
.site-footer p { margin: 0 0 .4rem; }
.site-footer__links a { font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__info { text-align: right; font-size: .9rem; }
.site-footer__copy { font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }

@media (max-width: 781px) {
  .site-header__bar { padding: .9rem 1.25rem; }
  .band-paths .wp-block-column, .band-paths .wp-block-column + .wp-block-column { padding: 1.25rem 0; border-left: 0; }
  .band-paths .wp-block-column + .wp-block-column { border-top: 1px solid #e6dcc6; }
  .site-footer__info { text-align: left; }
}

/* ---------- fixes after testing in WordPress ---------- */
.wp-site-blocks > * + * { margin-block-start: 0; }            /* no white strip between header, page and footer */
.ner-tamid, .ner-tamid a { width: 70px; display: block; margin: 0 !important; }
.ner-tamid img { width: 70px !important; max-width: none; height: auto; }
.band-bright strong > br:first-child { display: none; }
.band-bright p:last-child { margin-bottom: 0; }
.site-footer__cols { gap: 2.5rem !important; }
.site-footer__cols > .wp-block-column:first-child { flex: 0 0 150px !important; }
.site-header { position: relative; }
@media (max-width: 599px) {                                     /* phones: menu button beside the site name */
  .kja-menu { position: absolute; top: .55rem; right: 1rem; border: 0; padding: 0; }
  .kja-site-title { padding-right: 3rem; font-size: 1.25rem !important; }
}
