/*
Theme Name: Volunteer Theme
Theme URI: https://volunteer.freemason.org
Author: Billy Purdy
Author URI: https://bpurdy.dev
Description: A theme for the Volunteer Freemason website.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: volunteer-theme
*/

/* Fonts */
@font-face {
  font-family: "Volunteer Avenir";
  src:
    url("assets/fonts/AvenirLT-Roman.woff2") format("woff2"),
    url("assets/fonts/avenirlt_roman.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Volunteer Roboto Slab";
  src: url("assets/fonts/RobotoSlab-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
}

/* Account for the WordPress admin toolbar when logged in. */
body.admin-bar {
  min-height: calc(100vh - 32px);
  min-height: calc(100dvh - 32px);
}

.site-header,
.site-footer {
  flex-shrink: 0;
}

.site-main {
  flex: 1 0 auto;
}

@media (max-width: 782px) {
  body.admin-bar {
    min-height: calc(100vh - 46px);
    min-height: calc(100dvh - 46px);
  }
}

/* Centered header logo */
.site-branding {
  display: flex;
  justify-content: center;
  padding: 28px 20px;
}

.site-branding a {
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}

.site-branding__logo {
  display: block;
  width: clamp(220px, 30vw, 340px);
  max-width: 100%;
  height: auto;
}

/* Icon, title, and divider */
.volunteer-page-title {
  max-width: 1040px;
  margin-inline: auto;
  padding: 40px 20px 32px;
  text-align: center;
}

.volunteer-page-title__icon {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  object-fit: contain;

}

.volunteer-page-title h1 {
  margin: 0;
  color: #25252b;
  font-family: "Volunteer Roboto Slab", Georgia, serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.volunteer-page-title::after {
  content: "";
  display: block;
  width: min(100%, 440px);
  height: 1px;
  margin: 28px auto 0;
  background: #8c1938;
  opacity: 0.4;
}

.page-content {
  max-width: 1060px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* Page foundation */
.volunteer-page {
  --vf-accent: #8c1938;
  --vf-accent-hover: #70142d;
  --vf-cream: #f3f2e4;
  --vf-text: #25252b;
  --vf-muted: #62616b;
  --vf-border: rgb(140 25 56 / 18%);

  color: var(--vf-text);
  background: var(--vf-cream);
  font-family: "Volunteer Avenir", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  padding: clamp(32px, 6vw, 80px) clamp(16px, 4vw, 48px);
}

.volunteer-page,
.volunteer-page * {
  box-sizing: border-box;
}

.volunteer-page :is(h1, h2, h3, h4) {
  font-family: "Volunteer Roboto Slab", Georgia, serif;
  color: var(--vf-text);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

/* Finder container and introduction */
.volunteer-page .volunteer-finder {
  --volunteer-accent: var(--vf-accent);
  --volunteer-border: var(--vf-border);

  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  font: inherit;
  color: inherit;
}

.volunteer-page .volunteer-finder > h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
}

.volunteer-page .volunteer-finder > p:not([class]) {
  max-width: 680px;
  margin: 0 0 32px;
  color: var(--vf-muted);
  font-size: 18px;
}

.volunteer-page .volunteer-finder label {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 400;
}

/* Lodge search */
.volunteer-page .volunteer-finder input[role="combobox"] {
  min-height: 56px;
  padding: 14px 18px;
  border: 1px solid var(--vf-border);
  border-radius: 8px;
  background: #fff;
  color: var(--vf-text);
  font: inherit;
  box-shadow: 0 3px 12px rgb(35 20 25 / 6%);
}

.volunteer-page .volunteer-finder input::placeholder {
  color: var(--vf-muted);
  opacity: 1;
}

.volunteer-page .volunteer-finder input[role="combobox"]:focus {
  border-color: var(--vf-accent);
}

.volunteer-page .volunteer-finder .volunteer-finder__options {
  margin-top: 8px;
  padding: 6px;
  border-color: var(--vf-border);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgb(35 20 25 / 12%);
}

.volunteer-page .volunteer-finder__options > li[role="option"] {
  margin: 0;
  padding: 12px;
  border-radius: 4px;
  font-size: 15px;
  list-style: none;
}

.volunteer-page .volunteer-finder__options > li::before {
  content: none;
  display: none;
}

.volunteer-page .volunteer-finder__options [aria-selected="true"],
.volunteer-page .volunteer-finder__options [role="option"]:hover {
  background: var(--vf-cream);
  color: var(--vf-accent);
}

.volunteer-page .volunteer-finder__help {
  margin-top: 10px;
  color: var(--vf-muted);
  font-size: 13px;
}

.volunteer-page .volunteer-finder__status {
  margin: 24px 0 16px;
  color: var(--vf-muted);
  font-size: 14px;
}

/* Organization cards */
.volunteer-page .volunteer-finder__results {
  gap: 20px;
  margin-top: 20px;
}

.volunteer-page .volunteer-finder .volunteer-finder__opportunity {
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--vf-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(35 20 25 / 5%);
}

.volunteer-page .volunteer-finder .volunteer-finder__logo {
  align-self: center;
  object-fit: contain;
}

.volunteer-page .volunteer-finder .volunteer-finder__title {
  margin-bottom: 10px;
  font-family: "Volunteer Roboto Slab", Georgia, serif;
  font-size: clamp(21px, 2.5vw, 25px);
  font-weight: 600;
  color: var(--vf-text);
}

.volunteer-page .volunteer-finder__summary,
.volunteer-page .volunteer-finder__body {
  color: var(--vf-muted);
  font-size: 16px;
  line-height: 1.7;
}

/* Buttons */
.volunteer-page .volunteer-finder .volunteer-finder__website,
.volunteer-page .volunteer-finder button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--vf-accent);
  border-radius: 6px;
  background: var(--vf-accent);
  color: #fff;
  font-family: "Volunteer Avenir", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}

.volunteer-finder__clear {
  align-self: stretch;
}

.volunteer-page .volunteer-finder .volunteer-finder__website:is(:hover, :focus, :active),
.volunteer-page .volunteer-finder button:hover {
  background: var(--vf-accent-hover);
  border-color: var(--vf-accent-hover);
  color: #fff;
}

/* Contact links and disclosure */
.volunteer-page .volunteer-finder .volunteer-finder__opportunity a.volunteer-finder__contact,
.volunteer-page .volunteer-finder .volunteer-finder__toggle,
.volunteer-page .volunteer-finder .volunteer-finder__body a {
  color: var(--vf-accent);
  font-weight: 400;
}

.volunteer-page .volunteer-finder .volunteer-finder__contact,
.volunteer-page .volunteer-finder .volunteer-finder__toggle {
  font-size: 14px;
}

.volunteer-page .volunteer-finder a,
.volunteer-page .volunteer-finder a:is(:hover, :focus, :active, :visited) {
  text-decoration: none !important;
}

.volunteer-page .volunteer-finder .volunteer-finder__icon {
  flex-basis: 18px;
  width: 18px;
  height: 18px;
}

.volunteer-page .volunteer-finder :is(input, button, summary, a):focus-visible {
  outline: 2px solid var(--vf-accent);
  outline-offset: 4px;
}

/* Mobile */
@media (max-width: 600px) {
  .volunteer-page .volunteer-finder .volunteer-finder__opportunity {
    gap: 20px;
    padding: 22px;
  }

  .volunteer-page .volunteer-finder .volunteer-finder__logo {
    align-self: flex-start;
  }
}

.volunteer-page {
  background: #fff;
}


.volunteer-page .volunteer-finder input[role="combobox"] {
  background: var(--vf-cream);
}

/* Keep hovered and keyboard-selected choices distinct. */
.volunteer-page .volunteer-finder__options [aria-selected="true"],
.volunteer-page .volunteer-finder__options [role="option"]:hover {
  background: #fff;
  color: var(--vf-accent);
}

.volunteer-page .volunteer-finder > h2 {
  font-size: clamp(24px, 2.5vw, 28px);
}

.intro-text {
  max-width: 960px;
  margin: 0 auto 32px;
  padding-inline: 20px;
  color: #000000;
  font-family: "Volunteer Avenir", Arial, sans-serif;
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 400;
  line-height: 1.75;
  text-align: center;
}

.divider::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin: 80px auto 0;
  background: #d9d9d9;
  opacity: 0.4;
}

.intro-text p {
  margin: 0 0 16px;
}

.intro-text > :last-child {
  margin-bottom: 0;
}

.intro-text a {
  color: #8c1938;
  text-decoration: none;
}

.intro-text a:hover {
  text-decoration: underline;
}

.intro-text a:focus-visible {
  outline: 2px solid #8c1938;
  outline-offset: 3px;
}

.site-footer {
  padding: 24px 20px;
  color: #6b7280;
  font-family: "Volunteer Avenir", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.volunteer-hero {
  max-width: 1040px;
  margin: 16px auto 0;
  padding-inline: 20px;
}

.volunteer-hero img {
  display: block;
  width: 100%;
  height: clamp(220px, 30vw, 380px);
  object-fit: cover;
  object-position: center 20%;
  border-radius: 8px;
}