@media screen and (max-width: 767px) {
  #masthead .site-branding,
  .site-header .site-branding {
    padding: 10px 8px !important;
    margin: 0 auto !important;
  }

  #masthead img.custom-logo,
  .site-header img.custom-logo {
    width: 85px !important;
    max-width: 85px !important;
    height: auto !important;
  }

  #masthead .site-title,
  .site-header .site-title {
    font-size: 22px !important;
    line-height: 1.15 !important;
    margin: 5px 0 !important;
  }

  #masthead .site-description,
  .site-header .site-description {
    font-size: 12px !important;
    line-height: 1.3 !important;
    margin: 0 auto !important;
  }

  #masthead .af-middle-header,
  .site-header .af-middle-header {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    min-height: 0 !important;
  }
}
/* MAGA Viral News - readable headlines */
.grid-design-texts-over-image .read-details {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.96) 0%,
    rgba(0,0,0,0.88) 60%,
    rgba(0,0,0,0.60) 100%
  ) !important;
  padding: 16px !important;
  box-sizing: border-box;
}

.grid-design-texts-over-image .read-title a {
  color: #ffffff !important;
  text-shadow: 0 2px 5px #000000;
}

.grid-design-texts-over-image .post-item-metadata {
  color: #eeeeee !important;
  text-shadow: 0 1px 3px #000000;
}

@media (max-width: 767px) {
  .grid-design-texts-over-image .read-details {
    padding: 10px !important;
  }
}

/* MAGA Viral — Fix Latest/Popular date clipping */

#aft-main-banner-latest-trending-popular-recent > ul > li {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    display: flow-root;
    margin-bottom: 14px !important;
}

#aft-main-banner-latest-trending-popular-recent .read-details,
#aft-main-banner-latest-trending-popular-recent .read-title {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

#aft-main-banner-latest-trending-popular-recent .post-item-metadata {
    display: block !important;
    margin-top: 6px !important;
    line-height: 1.5 !important;
    overflow: visible !important;
}

/* MAGA Viral News — Replace DarkNews footer credit */

footer div:has(> a[href*="afthemes.com/products/darknews"]) {
    font-size: 0 !important;
}

footer div:has(> a[href*="afthemes.com/products/darknews"]) > a,
footer div:has(> a[href*="afthemes.com/products/darknews"]) > .sep {
    display: none !important;
}

footer div:has(> a[href*="afthemes.com/products/darknews"])::before {
    content: "© 2026 MAGA Viral™ News. All Rights Reserved.";
    font-size: 14px;
    line-height: 1.6;
    color: #ffffff;
}

/* MAGA Viral newsletter subscribe box */
.maga-viral-newsletter-inline {
  max-width: 100%;
}

.maga-viral-newsletter-inline .wp-block-heading,
.maga-viral-newsletter-inline p {
  text-align: center;
}

.maga-viral-newsletter-inline .wp-block-jetpack-subscriptions__form-elements {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.maga-viral-newsletter-inline #subscribe-email,
.maga-viral-newsletter-inline p#subscribe-email {
  flex: 1 1 520px;
  margin: 0 !important;
}

.maga-viral-newsletter-inline #subscribe-submit,
.maga-viral-newsletter-inline p#subscribe-submit {
  flex: 0 0 auto;
  margin: 0 auto !important;
  text-align: center !important;
}

.maga-viral-newsletter-inline input[type="email"] {
  width: 100% !important;
  min-height: 50px;
  padding: 0 16px !important;
  border: 1px solid #2a3550 !important;
  background: #16213a !important;
  color: #ffffff !important;
  border-radius: 0 !important;
  box-sizing: border-box;
}

.maga-viral-newsletter-inline input[type="email"]::placeholder {
  color: #b8c2d3 !important;
}

.maga-viral-newsletter-inline input[type="submit"],
.maga-viral-newsletter-inline button,
.maga-viral-newsletter-inline .wp-block-button__link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 50px;
  padding: 0 24px !important;
  background: #e32730 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 0 !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  line-height: 1 !important;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: none !important;
}

.maga-viral-newsletter-inline input[type="submit"]:hover,
.maga-viral-newsletter-inline button:hover,
.maga-viral-newsletter-inline .wp-block-button__link:hover {
  background: #c91e27 !important;
  color: #ffffff !important;
}

@media (max-width: 782px) {
  .maga-viral-newsletter-inline .wp-block-jetpack-subscriptions__form-elements {
    flex-direction: column;
    align-items: stretch;
  }

  .maga-viral-newsletter-inline #subscribe-email,
  .maga-viral-newsletter-inline p#subscribe-email,
  .maga-viral-newsletter-inline #subscribe-submit,
  .maga-viral-newsletter-inline p#subscribe-submit {
    width: 100%;
    flex: 1 1 100%;
  }

  .maga-viral-newsletter-inline input[type="submit"],
  .maga-viral-newsletter-inline button,
  .maga-viral-newsletter-inline .wp-block-button__link {
    width: 100% !important;
    min-width: 100% !important;
  }
}

/* MAGA Viral News: Jetpack sharing icon contrast */

.sharedaddy .sd-sharing .share-more a.sd-button,
.sharedaddy .sd-sharing .share-email a.sd-button,
.sharedaddy .sd-sharing .share-print a.sd-button {
    background: #111827 !important;
    border: 1px solid #374151 !important;
    color: #ffffff !important;
}

.sharedaddy .sd-sharing .share-more a.sd-button span,
.sharedaddy .sd-sharing .share-email a.sd-button span,
.sharedaddy .sd-sharing .share-print a.sd-button span {
    color: #ffffff !important;
}

.sharedaddy .sd-sharing .share-more a.sd-button::before,
.sharedaddy .sd-sharing .share-email a.sd-button::before,
.sharedaddy .sd-sharing .share-print a.sd-button::before {
    color: #ffffff !important;
}

.sharedaddy .sd-sharing .share-more a.sd-button:hover,
.sharedaddy .sd-sharing .share-email a.sd-button:hover,
.sharedaddy .sd-sharing .share-print a.sd-button:hover {
    background: #e32730 !important;
}
  

/* MAGA Viral: Fix blank white More sharing button */
.sharedaddy .sd-sharing .share-more,
.sharedaddy .sd-sharing .share-more a,
.sharedaddy .sd-sharing .share-more a.sd-button {
    background: #111827 !important;
    color: #ffffff !important;
    border-color: #374151 !important;
}

.sharedaddy .sd-sharing .share-more a::before,
.sharedaddy .sd-sharing .share-more a::after,
.sharedaddy .sd-sharing .share-more a span {
    color: #ffffff !important;
    opacity: 1 !important;
}


/* MAGA Viral: Align More with other sharing buttons */

.sharedaddy .sd-sharing .sd-content ul li:has(> a.sharing-anchor.share-more) {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    vertical-align: top !important;
}

.sharedaddy .sd-sharing a.sharing-anchor.share-more {
    box-sizing: border-box !important;
    width: 43px !important;
    height: 43px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: top !important;
    line-height: 1 !important;
}

.sharedaddy .sd-sharing a.sharing-anchor.share-more::before {
    position: static !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}


/* MAGA Viral: Final More button alignment */
.sharedaddy .sd-sharing a.sharing-anchor.share-more {
    transform: translateY(-2px) !important;
}
