/*
Theme Name: Foxiz Child
Theme URI: https://axonews.org
Description: Child theme for axo.news
Author: RG1
Template: foxiz
Version: 1.1.2
*/

/* Author header avatar: Foxiz only paints border-top — force a full ring */
.author-header .bio-avatar,
.bio-info.bio-avatar {
  overflow: visible !important;
  box-sizing: border-box;
}

.author-header .bio-avatar::before,
.bio-info.bio-avatar::before {
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, 0.55) !important;
  border-top: 2px solid rgba(255, 255, 255, 0.55) !important;
  pointer-events: none;
}

.author-header .bio-avatar img,
.bio-info.bio-avatar img {
  display: block;
  border-radius: 50%;
  object-fit: cover;
}

.footer-columns.footer-5c .footer-col:first-child,
.footer-columns.footer-5c .footer-col:last-child {
  flex-basis: 30%;
  width: 30%;
}

.footer-columns.footer-5c .widget.widget_nav_menu ul.menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
  margin: 0;
  padding: 0;
}

.footer-columns.footer-5c .widget.widget_nav_menu .menu-item {
  margin-bottom: 0;
}

.footer-columns.footer-5c .widget.widget_nav_menu a {
  padding-top: 6px;
  padding-bottom: 6px;
}

@media (max-width: 1024px) {
  .footer-columns.footer-5c .footer-col:first-child,
  .footer-columns.footer-5c .footer-col:last-child {
    flex-basis: 50%;
    width: 50%;
  }
}

@media (max-width: 767px) {
  .footer-columns.footer-5c .block-inner {
    row-gap: 24px;
  }

  .footer-columns.footer-5c .footer-col:first-child,
  .footer-columns.footer-5c .footer-col:last-child {
    flex-basis: 100%;
    width: 100%;
  }
}

/* Overlay cards: keep titles inside the media frame */
.p-overlay .overlay-wrap,
.p-overlay .overlay-inner {
  overflow: hidden;
}

.p-overlay .overlay-inner {
  box-sizing: border-box;
  max-height: 100%;
}

.p-overlay .entry-title,
.p-overlay .p-content {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Tighten custom-gap overlay rows so cards do not collide */
.block-overlay.is-gap-custom .block-inner {
  row-gap: 12px;
}

.block-overlay.is-gap-7 .block-inner {
  row-gap: 10px;
}

/* Keep heading decorations from colliding with content */
.heading-layout-1 .heading-title {
  overflow: visible;
}

/* Hide Foxiz social icon lists (header / mobile / footer) */
.header-social-list,
.mobile-socials,
.footer-social-list,
.footer-social,
.fb-social,
.social-list-wrap {
  display: none !important;
}

/* Hide Foxiz Facebook / X share buttons on posts */
.share-facebook,
.share-twitter,
.t-share.share-facebook,
.t-share.share-twitter,
a[class*="share-facebook"],
a[class*="share-twitter"],
.sbar-wrap .share-facebook,
.sbar-wrap .share-twitter,
.rbb-share .share-facebook,
.rbb-share .share-twitter {
  display: none !important;
}

/* Foxiz Highlights section disabled sitewide */
.s-hl,
.s-hl-1,
.s-hl-2 {
  display: none !important;
}
/* Dek / first graf: no accidental mark-style line boxes */
.s-tagline,
.fw-tagline,
.entry-content > p {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-box-decoration-break: slice;
  box-decoration-break: slice;
}

/* ===== Core Web Vitals: CLS fixes ===== */

/* Swiper pre-layout: reserve space for slider containers before JS initializes.
   Prevents layout shift when Swiper transforms slides. */
.swiper-container.pre-load {
  overflow: hidden;
  position: relative;
}
.post-slider.swiper-container.pre-load .swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
}
.post-slider.swiper-container.pre-load .swiper-slide {
  flex: 0 0 100%;
  max-width: 100%;
  position: relative;
}
.breaking-news-slider.swiper-container.pre-load .swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
}
.breaking-news-slider.swiper-container.pre-load .swiper-slide {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Explicit aspect-ratios on p-featured containers to prevent CLS.
   Foxiz uses ratio-v1 but default_ratio is empty, so images cause reflow. */
.p-featured {
  position: relative;
  overflow: hidden;
  background: var(--dark-accent-bg, #1a1d23);
}
.p-featured img.featured-img {
  width: 100%;
  height: auto;
  display: block;
}
.p-featured.ratio-v1 {
  aspect-ratio: 16 / 9;
}
.p-featured.ratio-v1 img.featured-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Reserve space for Complianz cookie banner to prevent CLS.
   Banner is bottom-right; reserve ~120px height at bottom on mobile. */
.cmplz-cookiebanner {
  position: fixed !important;
  z-index: 99999;
}
@media (max-width: 768px) {
  .cmplz-cookiebanner.cmplz-bottom-right {
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 120px;
    overflow-y: auto;
  }
}

/* Prevent dark-mode FOUC / CLS: reserve body min-height before theme script runs */
body[data-theme] {
  min-height: 100vh;
}

/* ===== Membership login page: narrow centered card =====
   The Foxiz login-form Elementor widget stretches to the full content width
   by default. Constrain it to a centered card so it no longer takes the
   entire page. Scoped to the membership-login page (page-id-299725). */
.page-id-299725 .elementor-widget-foxiz-login-form .user-login-form {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 480px) {
  .page-id-299725 .elementor-widget-foxiz-login-form .user-login-form {
    max-width: 100%;
  }
}
