/* Footer + yearbook/scrapbook singles */
/* =====================
   FOOTER
   ===================== */

.site-footer {
    width: 100%;
    max-width: 100%;
    background-color: #FFFFFF;
    padding: 20px var(--jt-page-gutter);
    box-sizing: border-box;
    border-top: 1px solid #eee;
    text-align: center;
    gap: 10px;
    overflow-x: hidden;
    position: relative;
    z-index: 2;
}

.site-footer > * {
    margin: 0;
    max-width: 100%;
}

.footer-logo {
    margin-bottom: 0;
}

.footer-logo img {
    width: auto !important;
    height: 61px !important;
    max-width: 100% !important;
    transition: transform 0.3s ease;
}

.footer-logo a:hover img {
    transform: scale(1.05);
}

.footer-social {
    gap: 35px;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.footer-social-link {
    color: #002A54;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 0 8px;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.footer-social-link i {
    font-size: 22px;
    line-height: 1;
}

.footer-social-link[title="Instagram"] i,
.footer-social-link[href*="instagram"] i {
    font-size: 22px;
}

.footer-social-link span {
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
}

.footer-social-ch,
a.footer-social-link[href*="commonhistory"] {
    position: relative;
}

.footer-social-ch-logo,
.footer-social-ch img,
a.footer-social-link[href*="commonhistory"] img {
    width: 32px;
    height: 32px;
    display: block;
    opacity: 0;
}

.footer-social-ch::before,
a.footer-social-link[href*="commonhistory"]::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 36px;
    height: 36px;
    background-color: #002A54;
    -webkit-mask-image: url('https://jenkintownalumni.org/wp-content/uploads/2022/10/common-history.svg');
    mask-image: url('https://jenkintownalumni.org/wp-content/uploads/2022/10/common-history.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: background-color 0.2s ease;
    pointer-events: none;
}

.footer-social-ch:hover::before,
a.footer-social-link[href*="commonhistory"]:hover::before {
    background-color: var(--jt-red, #C8102E);
}

.footer-social-link:hover {
    color: var(--jt-red, #C8102E);
    transform: scale(1.2);
}

.footer-social-link:hover i {
    color: var(--jt-red, #C8102E);
}

.site-footer .footer-credit {
    font-size: 18px;
    color: #002A54;
    margin-top: 5px;
    font-weight: 500;
    padding: 0 12px;
    box-sizing: border-box;
}

.footer-credit a {
    color: #002A54;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-credit a:hover {
    color: var(--jt-red, #C8102E);
}

@media (max-width: 767px) {
  .site-footer {
    padding: 11px var(--jt-page-gutter) 10px;
    gap: 0 !important;
    row-gap: 0 !important;
    --wp--style--block-gap: 0px;
  }

  .site-footer > *,
  .site-footer .footer-logo,
  .site-footer .wp-block-image,
  .site-footer .wp-block-image figure,
  .site-footer figure.footer-logo,
  .site-footer .footer-social,
  .site-footer .wp-block-group.footer-social {
    margin: 0 !important;
    margin-block: 0 !important;
  }

  .site-footer .footer-logo,
  .site-footer figure.footer-logo,
  .site-footer .wp-block-image.footer-logo {
    margin-bottom: 10px !important;
  }

  .site-footer .footer-social,
  .site-footer .wp-block-group.footer-social {
    margin-bottom: 10px !important;
  }

  .footer-logo img {
    height: 41px !important;
    display: block;
  }

  .footer-social {
    gap: 10px 14px;
    padding: 0 4px !important;
  }

  .footer-social-link {
    padding: 0 6px;
  }

  .footer-social-link i,
  .footer-social-link span {
    font-size: 20px;
  }

  .footer-social-link[title="Instagram"] i,
  .footer-social-link[href*="instagram"] i {
    font-size: 20px;
  }

  .footer-social-ch-logo,
  .footer-social-ch img,
  a.footer-social-link[href*="commonhistory"] img,
  .footer-social-ch::before,
  a.footer-social-link[href*="commonhistory"]::before {
    width: 30px;
    height: 30px;
  }

  .site-footer .footer-credit {
    font-size: 14px;
    line-height: 1.4;
    margin-top: 0 !important;
  }
}

@media (max-width: 380px) {
  .footer-social {
    gap: 8px 10px;
  }

  .footer-social-link {
    padding: 4px;
  }

  .footer-social-link i,
  .footer-social-link span {
    font-size: 18px;
  }

  .footer-social-link[title="Instagram"] i,
  .footer-social-link[href*="instagram"] i {
    font-size: 18px;
  }
}

/* Yearbook / scrapbook single pages */
.yearbooks-wrapper,
.scrapbooks-directory,
.class-pages-directory {
    padding-top: 0 !important;
}

.yearbooks-header-title {
    text-align: left;
    margin-bottom: 20px;
    padding-top: 0;
    padding-bottom: 0;
}

/* Yearbooks / Scrapbooks / Class Pages archives + yearbook/scrapbook singles */
.yearbooks-header-title h1,
.yearbook-single-title h1,
.yearbook-single h1 {
    text-transform: none;
    text-align: left;
    font-family: Charter, Georgia, serif !important;
    font-style: normal !important;
    font-weight: 700 !important;
    font-size: 30px !important;
    line-height: 38px !important;
    color: #002a54 !important;
}

.yearbooks-intro,
.yearbooks-intro p,
.yearbook-single-content > p,
.scrapbook-single-content > p,
.yearbook-single > .jt-container > p {
    font-family: Avenir, "Avenir Next", Helvetica, Arial, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-size: 20px !important;
    line-height: 29px !important;
    color: #002a54 !important;
}

.yearbooks-intro,
.yearbooks-intro p {
    text-align: left !important;
}

@media (max-width: 768px) {
  .yearbooks-header-title {
    margin-bottom: 15px;
  }

  .yearbooks-header-title h1,
  .yearbook-single-title h1,
  .yearbook-single h1 {
    font-size: 22px !important;
    line-height: 38px !important;
  }

  .yearbooks-intro,
  .yearbooks-intro p,
  .yearbook-single-content > p,
  .scrapbook-single-content > p,
  .yearbook-single > .jt-container > p {
    font-size: 18px !important;
    line-height: 29px !important;
  }
}

.directory-card-caption h3 {
    color: #fff !important;
}

.yearbook-single-title {
    text-align: left;
    margin-bottom: 20px;
}

.yearbook-single {
    --yearbook-btn-gap: 20px;
    background: #EEF0F3;
    padding: 0;
    margin: 0;
}

.yearbook-single-content,
.scrapbook-single-content {
    margin-bottom: 10px;
}

.yearbook-single-actions {
    margin: 0 0 var(--yearbook-btn-gap);
}

/* Editor block wrappers use negative bottom margin; reset on flipbook singles */
.single-yearbooks .wp-block-post-content > .wp-block-group.has-background,
.single-yearbooks .wp-block-post-content > .has-background:has(.yearbook-single),
.single-scrapbooks .wp-block-post-content > .wp-block-group.has-background,
.single-scrapbooks .wp-block-post-content > .has-background:has(.yearbook-single) {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/*
 * Mobile/tablet header only: keep L+R inset at top and while scrolled.
 * Pages are untouched — content still uses --jt-page-gutter (0 on mobile).
 * Also keep header size constant on scroll (no shrink).
 */
@media (max-width: 1100px) {
  header.site-header.sticky-header > .header-inner,
  header.sticky-header > .header-inner,
  header.sticky-header.elementor-sticky--effects > .header-inner,
  .site-header .header-inner {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 1100px) and (min-width: 768px) {
  header.sticky-header.elementor-sticky--effects > div.header-inner {
    min-height: 72px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    gap: 12px !important;
  }

  header.sticky-header.elementor-sticky--effects .wp-block-site-logo img {
    transform: none !important;
    max-width: min(200px, 42vw) !important;
  }
}