/*
 Theme Name:   WBC Astra Child
 Theme URI:    https://woodstockbiblechurch.org/
 Description:  Child theme for Woodstock Bible Church. Holds the site's custom CSS so it lives in a file, separate from Astra.
 Author:       Woodstock Bible Church
 Template:     astra
 Version:      1.1.0
 Text Domain:  wbc-astra-child
*/

/* ------------------------------------------------------------
   Colors reference the Astra global palette.
   Customizer "Color 1" = --ast-global-color-0, and so on.
   ------------------------------------------------------------ */

/* Desktop dropdown menu */
@media (min-width: 922px) {
  .main-header-menu .sub-menu {
    background: #FFFFFF;
    border: 1px solid var(--ast-global-color-6); /* Color 7 border */
    border-radius: 6px;
  }
  .main-header-menu .sub-menu .menu-link {
    color: var(--ast-global-color-2) !important;  /* Color 3 ink */
    font-size: 15px;
    font-weight: 400;
    padding: 10px 16px;
  }
  .main-header-menu .sub-menu .menu-item:hover > .menu-link,
  .main-header-menu .sub-menu .menu-item.focus > .menu-link,
  .main-header-menu .sub-menu .current-menu-item > .menu-link {
    background: var(--ast-global-color-4);        /* Color 5 pale blue */
    color: var(--ast-global-color-0) !important;  /* Color 1 brand blue */
  }
}
/* Wheat underline under top-level menu links: hover, focus, and current page.
   Uses ::before because Astra draws the dropdown arrow with ::after. */
@media (min-width: 922px) {
  .main-header-menu > .menu-item > .menu-link {
    position: relative;
  }
  .main-header-menu > .menu-item > .menu-link::before {
    content: "";
    position: absolute;
    left: 16px;   /* matches the link's side padding */
    right: 16px;
    top: calc(50% + 0.75em);
    height: 2px;
    background: var(--ast-global-color-7); /* Color 8 wheat */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 200ms cubic-bezier(.4,0,.2,1);
  }
  .main-header-menu > .menu-item:hover > .menu-link::before,
  .main-header-menu > .menu-item.focus > .menu-link::before,
  .main-header-menu > .menu-item > .menu-link:focus-visible::before,
  .main-header-menu > .current-menu-item > .menu-link::before,
  .main-header-menu > .current-menu-ancestor > .menu-link::before {
    transform: scaleX(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .main-header-menu > .menu-item > .menu-link::before { transition: none; }
}

/* Arrow on info box text links (long arrow) */
a.uagb-infobox-cta-link::after {
  content: "";
  display: inline-block;
  width: 1.25em;
  height: 0.9em;
  margin-left: 0.4em;
  vertical-align: -0.1em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 8h20M16 3l5 5-5 5'/%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 22 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 8h20M16 3l5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 200ms cubic-bezier(.4,0,.2,1);
}
a.uagb-infobox-cta-link:hover::after,
a.uagb-infobox-cta-link:focus-visible::after {
  transform: translateX(4px);
}
@media (prefers-reduced-motion: reduce) {
  a.uagb-infobox-cta-link::after { transition: none; }
}

/* Opt out: add the class "no-arrow" to an info box that uses a button-style CTA */
.no-arrow a.uagb-infobox-cta-link::after { content: none; }

/* Info box text links: underline fades in under the words on hover.
   Colors are set in each block. The underline targets the inner span,
   because Spectra's link is a flex container and won't pass the underline down. */
a.uagb-infobox-cta-link .uagb-inline-editing {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 200ms cubic-bezier(.4,0,.2,1);
}
a.uagb-infobox-cta-link:hover .uagb-inline-editing,
a.uagb-infobox-cta-link:focus-visible .uagb-inline-editing {
  text-decoration-color: currentColor;
}
	
	/* Events Calendar pages: solid brand-blue header */
body.post-type-archive-tribe_events .ast-primary-header-bar,
body.single-tribe_events .ast-primary-header-bar,
body.tax-tribe_events_cat .ast-primary-header-bar {
  background-color: var(--ast-global-color-0) !important;
}

/* Single events: stop the header overlapping the content */
body.single-tribe_events #masthead {
  position: relative;
}

/* Calendar: full-width blue title band, matching the hero blocks on other pages.
   ".tribe-common" is needed to beat the plugin's own resets. */
.tribe-common .tribe-events-before-html {
  margin: 0;
  padding: 0;
}
body.post-type-archive-tribe_events .tribe-events .tribe-events-l-container {
  padding-top: 0 !important; /* removes the wheat gap under the header */
}
body.post-type-archive-tribe_events .tribe-events {
  overflow-x: clip; /* stops a sideways scrollbar from the full-width band */
}
.tribe-common .wbc-events-hero {
  background: var(--ast-global-color-0);
  color: #fff;
  box-sizing: border-box;
  width: 100vw;
  margin: 0 0 2.5em calc(50% - 50vw);
  padding: 100px max(40px, calc((100vw - 1200px) / 2)) 70px;
  text-align: left;
}
.tribe-common .wbc-events-hero h1 {
  font-family: Georgia, Times, serif;
  font-size: 54px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  margin: 0 0 20px;
}
.tribe-common .wbc-events-hero p {
  font-family: Inter, sans-serif;
  font-size: 16px;
  line-height: 1.86;
  color: #fff;
  margin: 0;
}
.tribe-common .wbc-events-hero a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.tribe-common .wbc-events-hero a:hover {
  opacity: 0.85;
}
@media (max-width: 921px) {
  .tribe-common .wbc-events-hero {
    padding: 60px 20px 50px;
  }
  .tribe-common .wbc-events-hero h1 {
    font-size: 32px; /* same size your other pages use on phones */
  }
}

/* ============================================================
   Sermons plugin pages: match the rest of the site
   ============================================================ */

/* Blue header on sermon list, series, speaker and topic pages */
body:has(.sermon-title-holder) .ast-primary-header-bar {
  background-color: var(--ast-global-color-0) !important;
}

/* Hide Astra's extra dark banner; the plugin's band replaces it */
body:has(.sermon-title-holder) .ast-archive-entry-banner,
body:has(.sermon-title-holder) .ast-single-entry-banner {
  display: none;
}

/* Wheat page background instead of white */
body .sermon-wrapper {
  background: transparent !important;
}

/* Title band: full-width blue, like the hero blocks on other pages */
.sermon-wrapper .sermon-title-holder {
  background-color: var(--ast-global-color-0) !important;
  background-image: none !important;
  padding: 87px max(40px, calc((100vw - 1200px) / 2)) 36px !important;
}
.single-sermons .sermon-wrapper .sermon-title-holder {
  padding-top: 160px !important; /* clears the see-through header on single sermons */
}
body .sermon-title-holder .sermon-featured-image::after {
  display: none !important; /* hides the plugin's dark overlay */
}
body .sermon-title-holder .sermon-featured-image {
  padding: 0 !important;
  margin: 0 !important;        /* cancels the plugin's negative margins */
  background: none !important;
}
body .sermon-title-holder .sermon-title {
  padding: 0 !important;
  text-align: left !important;
}
.sermon-title-holder .sermon-title h1 {
  font-family: Georgia, Times, serif !important;
  font-size: 54px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: #fff !important;
  margin: 0 !important;
}

/* Page-number buttons in brand blue */
.asp-sermon-pagination li a {
  background: transparent;
  color: var(--ast-global-color-0);
  border: 1px solid var(--ast-global-color-0);
}
.asp-sermon-pagination li.active a,
.asp-sermon-pagination li a:hover {
  background: var(--ast-global-color-0);
  color: #fff;
}

@media (max-width: 921px) {
  .sermon-wrapper .sermon-title-holder {
    padding: 74px 20px 36px !important;
  }
  .single-sermons .sermon-wrapper .sermon-title-holder {
    padding-top: 160px !important;
  }
  .sermon-title-holder .sermon-title h1 {
    font-size: 32px !important;
  }
}

/* Phones: use the small logo on plugin pages, like everywhere else */
@media (max-width: 921px) {
  body:not(.ast-theme-transparent-header) .site-branding .custom-logo-link img {
    width: 54px !important;
    max-width: 54px !important;
    height: auto !important;
  }
}

/* Sermons list: short description under the heading */
.post-type-archive-sermons .sermon-title-holder .sermon-title::after {
  content: "Every Sunday message from Woodstock Bible Church, in one place. Missed a week or want to hear one again? Search by series, speaker or topic below.";
  display: block;
  max-width: none;
  margin-top: 20px;
  font-family: Inter, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.86;
  color: #fff;
}