/*
Theme Name: JNews Child
Theme URI: https://chicessences.com/
Description: Child theme for JNews with performance tweaks.
Author: ChicEssences
Template: jnews
Version: 1.0.0
*/

/* Keep child CSS minimal; add targeted tweaks as needed. */

/* Stabilize Hero 7 height on mobile to reduce CLS. */
@media (max-width: 767px) {
  .jeg_heroblock_7 .jeg_thumb .thumbnail-container {
    aspect-ratio: 3 / 4;
    height: auto;
    min-height: 220px;
  }
}

/* Reserve space for ads only when they actually load to avoid blank gaps. */
:root {
  --ad-header-min-height: 90px;
  --ad-footer-min-height: 250px;
  --ad-sticky-min-height: 50px;
  --ad-wrapper-min-height: 250px;
}

@media (max-width: 1024px) {
  :root {
    --ad-header-min-height: 90px;
    --ad-footer-min-height: 200px;
    --ad-wrapper-min-height: 200px;
  }
}

@media (max-width: 768px) {
  :root {
    --ad-header-min-height: 50px;
    --ad-footer-min-height: 200px;
    --ad-wrapper-min-height: 200px;
  }
}

.jeg_ad,
.jnews_mobile_sticky_ads,
.ads-wrapper {
  min-height: 0;
}

.jeg_ad.ad-loaded.jnews_header_top_ads,
.jeg_ad.ad-loaded.jnews_header_bottom_ads {
  min-height: var(--ad-header-min-height);
}

.jeg_ad.ad-loaded.jnews_above_footer_ads {
  min-height: var(--ad-footer-min-height);
}

.jnews_mobile_sticky_ads.ad-loaded {
  min-height: var(--ad-sticky-min-height);
}

.ads-wrapper.ad-loaded {
  min-height: var(--ad-wrapper-min-height);
}

/* Hide WPBakery rows marked as hidden */
.vc_hidden {
  display: none !important;
}

/* Pinterest button on images (bottom center) */
.pin-image-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.pin-image-wrap .pin-image {
  display: block;
  width: 100%;
  height: auto;
}

.pin-image-wrap .pin-image-btn {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  background: #e60023;
  color: #fff;
  padding: 6px 12px 6px 10px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.3s;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.pin-image-wrap .pin-image-btn:hover {
  opacity: 1;
  transform: translateX(-50%) scale(1.05);
}
