/**
 * Mobile responsive fixes for the gracethrufaith theme.
 */



.wp-block-embed-youtube {
  max-width: 700px;
  margin: 2.4rem auto;
}
.wp-block-embed-youtube .wp-block-embed__wrapper {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

ul.post-toc {
  list-style: none;
  background-color: #e8f2fa;
  border-radius: 8px;
  padding: 2rem 2rem 2rem 2.4rem;
  margin: 2.4rem 0;
}
ul.post-toc > li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
}
ul.post-toc > li:last-child {
  margin-bottom: 0;
}
ul.post-toc > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background-color: #2971B1;
}
ul.post-toc a {
  text-decoration: none;
  color: #2971B1;
  font-weight: 600;
  font-size: 1.7rem;
}
ul.post-toc a:hover {
  text-decoration: underline;
}
ul.post-toc li li a {
  font-size: 1.5rem;
}

@media (max-width: 767px) {
  .section-see-all {
    position: static !important;
    display: block;
    text-align: left !important;
    margin: 0 0 1.2rem;
  }
}

@media (max-width: 767px) {
  .section-qna .card__media:before {
    padding-bottom: 30%;
  }
    .section-qna .card__media .article-caption h2 {
    font-size: 1.6rem !important;
    white-space: normal;
    padding: 1.2rem 1.6rem;
  }
}

.section-headlines .section-content.-bg-dark {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.daily-psalm .article-caption .read-more {
  font-size: 2.0rem;
}

.section-teasers .card.-horizontal .card__media-wrap {
  display: none;

}


.section-qna .card__media .article-caption {
  width: 95%;
  max-width: 95%;
  max-height: none;
}
.section-qna .card__media .article-caption h2 {
  font-size: clamp(2.8rem, 5vw + 1.4rem, 4.4rem);
  padding: 2.4rem 3.2rem;
  margin: 0;
}




@media (max-width: 480px) {
  .section-see-all .see-all-btn {
    padding: 0.5rem 1.2rem;
    font-size: 1.9rem;
    text-decoration: none !important;
    text-align: left;
  
}

}

.section-see-all .see-all-btn {
    text-decoration: none !important;

}

.section-teasers .card.-horizontal .card__media-wrap {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.section-teasers .card.-horizontal {
  display: flex;
  width: 100%;
  min-width: 0;
}


.card-title__link {
  padding-top: 10px;
  font-size: 25px;
  text-decoration: none;
}

.article-caption {
  max-width: 100%;
  max-height: 90%;
}

.entry-header, .entry-title {
  font-size: clamp(1.8rem, 5vw + 1rem, 2.8rem) !important;
}

@media (min-width: 320px) and (max-width: 980px) {
  .entry-meta, .time-to-read {
    display: none;
  }
}

blockquote {
  background: #f9f9f9;
  border-left: 4px solid #2c6e8e;
}
blockquote p {
  font-size: 20px;
  font-family: sans-serif;
}

.btn.-cta {
  margin-bottom: 15px;
}

@media screen and (max-width: 600px) {
  /* 4+ photos keep the normal multi-column grid; fewer than 4 stack
     into a single column (extends the existing 1- and 2-photo rules
     above with the same pattern for exactly 3). */
  .galleryberg-gallery-container:has(> .galleryberg-image:nth-child(3)):not(:has(> .galleryberg-image:nth-child(4))) {
    display: flex !important;
    flex-direction: column !important;
  }
  .galleryberg-gallery-container:has(> .galleryberg-image:nth-child(3)):not(:has(> .galleryberg-image:nth-child(4))) .galleryberg-image {
    width: 100% !important;
    max-width: 100% !important;
  }

  .wp-block-gallery.has-nested-images {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}

 
.pagination-search-wrap {
  width: 100%;
  max-width: 400px;
  margin: 2.4rem auto 3.2rem;
  padding: 0 1.6rem;
  box-sizing: border-box;
}
.pagination-search-wrap .search-form {
  margin: 0;
}
.pagination-search-wrap .input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}
.pagination-search-wrap .form-control {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: auto;
  font-size: 1.3rem;
  padding: 0.8rem 1.2rem;
  box-sizing: border-box;
}
.pagination-search-wrap .input-group-btn {
  display: flex;
  flex: 0 0 auto;
}
.pagination-search-wrap .btn-search {
  flex: 0 0 auto;
  width: 4rem;
  height: auto;
  padding: 0;
  font-size: 1.3rem;
  line-height: 1;
  box-sizing: border-box;
}


/* Newsletter signup form (gracethrufaith_get_article_signup_form) —
   MC4WP's default output ships completely unstyled. */
.newsletter-signup {
  margin: 3.2rem auto;
  padding: 3.2rem 2.4rem;
  background-color: #e8f2fa;
  border-radius: 6px;
  text-align: center;
}
.newsletter-signup__heading {
  margin: 0 0 2rem;
  font-size: 2.2rem;
  color: #333;
}
.newsletter-signup .mc4wp-form-fields {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1.2rem;
  max-width: 560px;
  margin: 0 auto;
}
.newsletter-signup .mc4wp-form-fields p {
  margin: 0;
}
.newsletter-signup .mc4wp-form-fields p:first-child {
  flex: 1 1 320px;
}
.newsletter-signup .mc4wp-form-fields label {
  display: block;
  width: 100%;
  font-size: 0;
}
.newsletter-signup .mc4wp-form-fields label input {
  font-size: 1.7rem;
}
.newsletter-signup .mc4wp-form-fields input[type="email"] {
  width: 100%;
  padding: 1.2rem 1.4rem;
  font-size: 1.7rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
.newsletter-signup .mc4wp-form-fields input[type="submit"] {
  padding: 1.2rem 2.8rem;
  background-color: #2971B1;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1.7rem;
  cursor: pointer;
  white-space: nowrap;
}

.newsletter-signup .mc4wp-form-fields input[type="submit"]:hover {
  background-color: #235a8f;
}


/* Legacy [read more]/[/read] photo-collapse toggle (see functions.php:
   gracethrufaith_restore_legacy_read_more_tags) */
.legacy-read-more__toggle {
  display: block;
  width: 100%;
  margin: 1.2rem 0;
  padding: 1rem 1.6rem;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1.5rem;
  color: #2971B1;
  cursor: pointer;
  text-align: center;
}
.legacy-read-more__toggle:hover {
  background-color: #eee;
}
.legacy-read-more__toggle::after {
  content: " \25BC";
  font-size: 1.1rem;
}
.legacy-read-more__toggle[aria-expanded="true"]::after {
  content: " \25B2";
}

.yarpp-related {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Homepage "Latest Blog Post" banner — a clean, full-width stacked
   card built specifically for wide panoramic featured images, rather
   than reusing the horizontal image-left/text-right card pattern used
   elsewhere, which was never designed for this image shape. */
.card.-blog-banner {
  display: block;
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.card__banner-link {
  display: block;
}
.card__banner-image {
  width: 100%;
  aspect-ratio: 1690 / 601;
  background-size: cover;
  background-position: center;
  background-color: #f5f5f5;
}
.card__banner-content {
  padding: 1.4rem 2.4rem;
}

.card__banner-content {
  padding: 2rem 2.4rem;
}

.card__banner-content .card-subtitle {
  color: #888;
  font-size: 1.3rem;
  margin: 0 0 0.4rem;
  font-weight: 400;
}

.card__banner-content .card-title {
  margin: 0 0 1.6rem;
  font-size: 2rem;
  line-height: 1.3;
}

.card__banner-content .card-button {
  display: inline-block;
}

@media (max-width: 767px) {
  .card__banner-image {
  width: 100%;
  aspect-ratio: 3 / 1;
  background-size: cover;
  background-position: center;
  background-color: #f5f5f5;
  background-repeat: no-repeat;
}
  .card__banner-content {
    padding: 1.6rem;
  }
}


 /* Single-post tag display — clean pill/badge style, replacing the plain
   inline links from wp_tag_cloud()'s default output. */
.entry-tags {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2.4rem;
  margin-bottom: 3.2rem;
  padding-top: 2.4rem;
  padding-left: 1.6rem;
  padding-right: 1.6rem;
  box-sizing: border-box;
  border-top: 1px solid #e5e5e5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.entry-tags__label {
  font-weight: 700;
  color: #555;
  margin-right: 0.4rem;
}

.entry-tags a {
  display: inline-block;
  background: #2971B1;
  color: #fff !important;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  font-size: 1.3rem !important;
  text-decoration: none;
  transition: background 0.15s ease;
}

.entry-tags a:hover {
  background: #1f5687;
  text-decoration: none;
}

.navbar-brand {
  width: 290px;
  max-width: calc(100% - 60px);
  box-sizing: border-box;
  min-height: 90px;
}

.navbar-brand .icon-gracethrufaith-logo {
  right: 10px;
}

.social-share-links {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

.social-share-links .share-link {
  display: flex !important;
}

.social-share-links {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 2.4rem 0;
}

.social-share-links .social-site {
  display: block;
}

.social-share-links .share-link {
  position: relative;
  display: block;
  width: 4.4rem;
  height: 4.4rem;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: #f0f2f5;
  transition: background 0.2s ease, transform 0.15s ease;
}

.social-share-links .share-link::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}

.social-share-links .share-link:hover {
  transform: translateY(-2px);
}

/* Hide the original text labels — replaced with icon-only design */
.social-share-links .share-text,
.social-share-links .share-site-text {
  display: none;
}

.social-share-links .share-link::before {
  font-family: "FontAwesome" !important;
  font-size: 1.8rem;
  color: #666;
  transition: color 0.2s ease;
}

.social-share-links .share-link__facebook::before {
  content: "\f09a"; /* facebook icon */
}

.social-share-links .share-link__facebook:hover {
  background: #3b5998;
}

.social-share-links .share-link__facebook:hover::before {
  color: #fff;
}

.social-share-links .share-link__twitter::before {
  content: "\f099"; /* twitter icon */
}

.social-share-links .share-link__twitter:hover {
  background: #1da1f2;
}

.social-share-links .share-link__twitter:hover::before {
  color: #fff;
}

.social-share-links .share-link__email::before {
  content: "\f0e0"; /* envelope icon */
}

.social-share-links .share-link__email:hover {
  background: #6c5ce7;
}

.social-share-links .share-link__email:hover::before {
  color: #fff;
}

@media (max-width: 767px) {

  .section-qna .card.-horizontal .card__media-wrap {
  display: block !important;
  width: 100% !important;
  height: 200px !important;
  max-width: 100% !important;
  max-height: 200px !important;
}

.section-qna .card.-horizontal {
  flex-direction: column;
}

.section-qna .card.-horizontal .card__media {
  background-size: cover !important;
  background-position: center;
}

.section-qna .card.-horizontal .card__media {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.section-qna .card.-horizontal .article-caption {
  position: static !important;
  width: 85% !important;
  text-align: center;
}

.section-qna .card.-horizontal .article-caption h2 {
  font-size: 3.8rem !important;
  line-height: 1.3;
  margin: 0;
  padding: 1.6rem 2rem;
}

  .section-headlines .card__media-wrap {
  height: 180px !important;
  max-height: 180px !important;
}


.section-headlines .card__media {
  background-size: contain !important;
  background-color: #f5f5f5;
}

  .entry-tags {
  margin-bottom: 4.8rem !important;
}
  
  .card.-horizontal {
    display: block;
  }

  .card.-horizontal .card__media-wrap {
    max-width: 100%;
    width: 100%;
  }

  .card.-horizontal .card__content-wrap {
    max-width: 100%;
    width: 100%;
  }

  
  .card__media:before {
    padding-bottom: 56.25%; /* 16:9 */
  }

 
  .card__media-wrap.-square .card__media:before,
  .card__media-wrap.-tall .card__media:before {
    padding-bottom: 75%;
  }

 
  .card__media-wrap.-small {
    max-height: none;
  }

  
  .entry-header,
  .entry-header.-compact {
    max-height: none !important;
    overflow: visible !important;
  }

  .entry-header:before {
    display: none !important;
  }

  .article-caption {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    box-sizing: border-box;
  }

 
  .entry-meta,
  .time-to-read {
    display: block !important;
  }

  .article-caption .entry-meta {
    font-size: 1.3rem !important;
    padding: 0 1.6rem 1.6rem !important;
  }


  [class*="pps-series"],
  [class*="pps-post-"],
  [class*="pps-nav"] {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    box-sizing: border-box;
  }
}



@media (max-width: 767px) {
  /* Blog archive (/blog) mobile redesign — clean, standard card
     pattern: full-width image on top (fixed aspect ratio, always
     contained), then a consistent content block with clear
     typographic hierarchy below. Reorders visually via flex `order`
     only — the underlying HTML/PHP is untouched, so desktop is
     completely unaffected. */
  .section-blog .card {
    width: 100%;
    margin: 0 0 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
  }
  .section-blog .card__media-wrap {
    order: 1;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    box-sizing: border-box;
  }
    .section-blog .card__media {
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
  }
  .section-blog .card__content-wrap:first-of-type {
    order: 2;
    padding: 1.6rem 1.6rem 0;
  }
  .section-blog .card__content-wrap:first-of-type .card-title {
    font-size: 2rem;
    line-height: 1.3;
    margin: 0;
  }
  .section-blog .card__content-wrap:last-of-type {
    order: 3;
    padding: 0.8rem 1.6rem 1.6rem;
  }
  .section-blog .card-description {
    color: #555;
    font-size: 1.5rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
  }
  .section-blog .card__actions {
    padding: 0;
  }

  
/* Galleryberg galleries — single/double-photo galleries were forced
   into the same columns-3 grid as large galleries, making each photo
   render at roughly 1/3 width even when there's only one. Detect
   small galleries via :has() and let them display full-width;
   3+ photo galleries are untouched and keep their existing grid. */
@media (max-width: 767px) {
  /* Exactly 1 photo — full width, single column */
  .galleryberg-gallery-container:has(> .galleryberg-image:only-child) {
    display: block !important;
  }
  .galleryberg-gallery-container:has(> .galleryberg-image:only-child) .galleryberg-image {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Exactly 2 photos — stacked full width (not side-by-side, which
     would still squeeze each one down on a narrow screen) */
  .galleryberg-gallery-container:has(> .galleryberg-image:nth-child(2)):not(:has(> .galleryberg-image:nth-child(3))) {
    display: flex !important;
    flex-direction: column !important;
  }
  .galleryberg-gallery-container:has(> .galleryberg-image:nth-child(2)):not(:has(> .galleryberg-image:nth-child(3))) .galleryberg-image {
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* "See All" links above the homepage QnA and blog teaser sections */
.section-see-all {
  text-align: center;
  margin-bottom: 1.6rem;
}
.section-see-all .see-all-link {
  font-size: 1.3rem !important;
  font-weight: 400 !important;
}
.section-see-all .see-all-link:after {
  font-size: 1.2rem !important;
}


.donate-sidebar img {
  max-width: 100% !important;
  height: auto !important;
  width: auto !important;
}


/* Series prev/next navigation links (gracethrufaith_get_series_links())
   had no styling at all — long titles crushed together with no spacing
   on mobile. Give it real layout on all viewports, stacking cleanly on
   narrow screens. */
.series-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.6rem;
  margin: 2.4rem 0;
  padding: 1.6rem 0;
  border-top: 1px solid #e0e0e0;
}
.series-nav .series-previous,
.series-nav .series-next {
  flex: 1 1 0;
  font-size: 1.4rem;
  line-height: 1.4;
}
.series-nav .series-next {
  text-align: right;
}

@media (max-width: 767px) {
  .series-nav {
    gap: 1.2rem;
    align-items: flex-start;
  }
  .series-nav .series-previous,
  .series-nav .series-next {
    font-size: 1.3rem;
    word-break: break-word;
  }
}


/* Pagination (wp_pagenavi) had no dedicated link styling at all — on
   mobile the long row of page links (1 2 3 ... 10 20 30 ... Last »)
   just wrapped as plain inline text with no touch-friendly spacing. */
.wp-pagenavi {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
}
.wp-pagenavi > * {
  margin: 0;
}
.wp-pagenavi a,
.wp-pagenavi span.current {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 4px;
}
.wp-pagenavi span.current {
  background-color: #2971B1;
  color: #fff;
}
.wp-pagenavi span.pages {
  flex-basis: 100%;
  text-align: center;
  margin-bottom: 0.4rem;
}

@media (max-width: 600px) {
  .wp-pagenavi {
    font-size: 1.4rem;
    gap: 0.4rem;
  }
  .wp-pagenavi a,
  .wp-pagenavi span.current {
    padding: 0.5rem 0.8rem;
  }
}



}