/* Site options from the original WordPress theme. */
body,
html {
  background-image: url("/legacy-theme/images/body-backgrounds/low_contrast_linen.png") !important;
  background-repeat: repeat !important;
  background-position: left top !important;
}

#tt-boxed-layout {
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.5);
}

/*
 * Normalize body text to 16px (browser default). Karma uses html 62.5% + body
 * 1.2em (~12px), which is small for modern reading. Loaded after theme CSS via
 * layout.tsx link order so overrides win in production static export.
 */
html {
  font-size: 100%;
}

body {
  font-size: 16px;
  line-height: 1.65;
}

/*
 * Karma hides bare .sub-menu lists; dropdowns live inside .drop and are
 * revealed on hover via li:hover .drop in style.css.
 */
#menu-main-nav .drop .sub-menu {
  display: block;
}

/* Speaker schedule tables (TablePress markup from legacy site). */
.content_full_width table.tablepress {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.75em;
  font-size: 1em;
}

.content_full_width table.tablepress th,
.content_full_width table.tablepress td {
  border: 1px solid #c5c5c5;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.content_full_width table.tablepress thead th {
  background: #182947;
  color: #fff;
  font-weight: bold;
}

.content_full_width table.tablepress tbody tr:nth-child(even) {
  background: #ececea;
}

/* Speakers schedule: Date / Speaker / Topic column widths from legacy TablePress. */
.content_full_width table.tablepress th:nth-child(1),
.content_full_width table.tablepress td:nth-child(1) {
  width: 25%;
}

.content_full_width table.tablepress th:nth-child(2),
.content_full_width table.tablepress td:nth-child(2) {
  width: 25%;
}

.content_full_width table.tablepress th:nth-child(3),
.content_full_width table.tablepress td:nth-child(3) {
  width: 50%;
}

/* Home banner carousel (replaces jQuery cycle on static export). */
.big-banner #main .main-area {
  /* Tighter spacing below the slider on mobile/tablet. */
  padding-top: 16px;
}

/* Prev/next controls — all viewports (replaces dot pager). */
.big-banner #header {
  position: relative;
  z-index: 2;
}

.big-banner #main {
  position: relative;
  z-index: 1;
}

.home-banner-wrap {
  position: relative;
  z-index: 10;
}

/*
 * The slider sits in #header but extends into the #main band. #main’s padding
 * overlaps the slide text; without this, clicks hit #main instead of links.
 * Disable pointer events on all #main descendants, then re-enable only on
 * interactive elements in the page body (not the whole .main-holder surface).
 */
.big-banner #main,
.big-banner #main * {
  pointer-events: none;
}

.big-banner #main a,
.big-banner #main button,
.big-banner #main input,
.big-banner #main select,
.big-banner #main textarea,
.big-banner #main label,
.big-banner #main [role="button"] {
  pointer-events: auto;
}

.home-banner-main {
  z-index: 11;
}

.home-banner-main a,
.home-banner-main a[href^="mailto:"] {
  position: relative;
  z-index: 12;
  pointer-events: auto;
  cursor: pointer;
  text-decoration: underline;
}

.home-banner-main a:hover {
  text-decoration: underline;
}

.home-banner-wrap .jquery-pager {
  display: none !important;
}

/* Override Karma .jqslider { display:none } — visibility via .is-active only. */
.home-banner-wrap li.home-banner-slide {
  display: none !important;
}

.home-banner-wrap li.home-banner-slide.is-active {
  display: block !important;
}

.home-banner-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 32px;
  height: 48px;
  border: 1px solid #c5c5c5;
  border-radius: 2px;
  background: rgba(244, 244, 242, 0.92);
  color: #456793;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
}

.home-banner-nav-btn:hover,
.home-banner-nav-btn:focus {
  background: #f4f4f2;
  outline: none;
}

.home-banner-nav-btn-prev {
  left: 4px;
}

.home-banner-nav-btn-next {
  right: 4px;
}

/*
 * Symmetric CSS frame (replaces bg-home-banner.png crop). Theme positions
 * .home-banner-main / .home-banner-sub for a ~11px inset; padding matches that.
 * Desktop only — mobile/tablet use rules from _mobile.css.
 */
@media (min-width: 1024px) {
  /*
   * Keep the blue header band at Karma’s original height (rays 389px). The
   * slider extends into #main; pad main content so mission text clears it
   * without stretching the header background (which causes grey/blue banding).
   */
  .big-banner #header .header-holder {
    max-height: 438px;
  }

  .big-banner #main .main-area {
    padding-top: 105px;
  }

  .home-banner-wrap {
    width: 940px;
    margin: 87px auto 0;
    box-sizing: border-box;
    padding: 11px;
    border: 1px solid #c5c5c5;
    background: #e7e7e5 !important;
    background-image: none !important;
    height: auto;
    overflow: visible;
  }

  .home-banner-wrap ul {
    list-style: none;
    width: 100% !important;
    height: auto !important;
    background-image: none;
    margin: 0;
    padding: 0;
  }

  .home-banner-wrap li {
    width: 100% !important;
    height: 349px !important;
    position: relative;
  }
}

/* Mobile hamburger (mobile-nav-btn.gif is not bundled; draw icon in CSS). */
#tt-mobile-menu-button span {
  background: #000;
  background-image: none;
  position: relative;
}

#tt-mobile-menu-button span::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  height: 2px;
  background: #c8c8c8;
  box-shadow: 0 6px 0 #c8c8c8, 0 12px 0 #c8c8c8;
}

/*
 * Karma style.css sets #tt-mobile-menu-list { display: block } for all widths.
 * Legacy jQuery overrode that with inline styles; we hide/show the whole wrap.
 */
#tt-mobile-menu-wrap {
  display: none;
}

#tt-mobile-menu-wrap.is-open {
  display: block;
}

#tt-mobile-menu-wrap.is-open #tt-mobile-menu-list {
  display: block !important;
}

#tt-mobile-menu-list .sub-menu {
  display: block;
}

#tt-mobile-menu-list > .menu-item > a {
  color: #ffffff;
}

#tt-mobile-menu-list .sub-menu a {
  font-weight: normal;
}

/*
 * Mobile/tablet: Karma fixes slide height and hides #header overflow, which
 * clips lower hero copy (mailto links sit at the bottom of many slides).
 */
@media (max-width: 1023px) {
  .big-banner #header {
    overflow: visible !important;
  }

  .home-banner-wrap,
  .home-banner-wrap ul,
  .home-banner-wrap li.home-banner-slide.is-active {
    height: auto !important;
    min-height: 212px;
  }
}

/*
 * Mobile: rule above the mission line — marks the bottom of the hero slider,
 * before "Bendale Bible Chapel has been…" main content.
 */
@media (max-width: 767px) {
  .big-banner #main .home-main-area {
    padding-top: 0;
  }

  .big-banner .home-main-area .content_full_width > h5:first-of-type {
    border-top: 1px solid #c5c5c5;
    padding-top: 16px;
    margin-top: 1.65rem;
  }
}
