/**
 * Progresif Editorial - Content & Layout Repair Stylesheet
 * 
 * Specifically repairs legacy Soledad content anomalies on internal pages:
 * - /dawuh-kyai/
 * - /khutbah/
 * - /tentang-progresifeditorial/
 *
 * Scoped strictly to content containers (.pe-entry-content, .entry-content, .pe-page-article, .pe-layout-no-sidebar).
 * ZERO global overrides. No interference with header, sticky navigation, homepage, or footer.
 */

/* ==========================================================================
   1. PAGE LAYOUT ARCHITECTURE (NO PHANTOM SIDEBAR ON FULLWIDTH PAGES)
   ========================================================================== */
.pe-layout-no-sidebar {
  width: 100%;
  margin-top: 24px;
  margin-bottom: 60px;
}

.pe-layout-no-sidebar .pe-content-column--full {
  width: 100%;
  max-width: 100%;
  flex: 1 1 100%;
}

.pe-layout-no-sidebar .pe-page-article {
  width: 100%;
}

/* ==========================================================================
   2. ISOLATED SVG ICON SIZING (TARGET A: INSTAGRAM & TARGET B: CLONE TWO-BOX)
   ========================================================================== */

/* Scoped strictly inside entry content to prevent touching site logos or core icons */
.pe-entry-content svg[data-icon="instagram"],
.entry-content svg[data-icon="instagram"],
.pe-entry-content svg[data-icon="clone"],
.entry-content svg[data-icon="clone"],
.pe-entry-content svg[data-icon="play"],
.entry-content svg[data-icon="play"],
.pe-entry-content svg[data-prefix="fab"],
.entry-content svg[data-prefix="fab"],
.pe-entry-content svg[data-prefix="far"],
.entry-content svg[data-prefix="far"],
.pe-entry-content svg[data-prefix="fa"],
.entry-content svg[data-prefix="fa"],
.pe-entry-content aside#block-2 svg,
.entry-content aside#block-2 svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  max-width: 20px;
  max-height: 20px;
  vertical-align: -0.125em;
  fill: currentColor;
  box-sizing: content-box;
}

/* Specific styling for the Instagram button inside content */
.pe-entry-content a[href*="instagram.com"] svg[data-icon="instagram"],
.entry-content a[href*="instagram.com"] svg[data-icon="instagram"] {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Instagram Follow button presentation */
.pe-entry-content aside#block-2 > a[href*="instagram.com"][style*="background"],
.entry-content aside#block-2 > a[href*="instagram.com"][style*="background"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 10px 22px !important;
  background-color: var(--pe-color-primary, #208447) !important;
  color: #ffffff !important;
  font-family: var(--pe-font-base);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--pe-radius-sm, 4px);
  margin-top: 20px;
  margin-bottom: 24px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.pe-entry-content aside#block-2 > a[href*="instagram.com"][style*="background"]:hover,
.entry-content aside#block-2 > a[href*="instagram.com"][style*="background"]:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Overlay badge icons on Instagram thumbnail items (play video, clone carousel) */
.pe-entry-content aside#block-2 a > svg[data-icon="play"],
.entry-content aside#block-2 a > svg[data-icon="play"],
.pe-entry-content aside#block-2 a > svg[data-icon="clone"],
.entry-content aside#block-2 a > svg[data-icon="clone"] {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  max-width: 18px;
  max-height: 18px;
  color: #ffffff !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
  z-index: 3;
  pointer-events: none;
}

/* ==========================================================================
   3. WHITESPACE REPAIR & SUPPRESSION OF EMPTY HEADING TAGS
   ========================================================================== */
.pe-entry-content h1:empty,
.entry-content h1:empty,
.pe-entry-content h2:empty,
.entry-content h2:empty,
.pe-entry-content h3:empty,
.entry-content h3:empty,
.pe-entry-content h4:empty,
.entry-content h4:empty,
.pe-entry-content h5:empty,
.entry-content h5:empty,
.pe-entry-content h6:empty,
.entry-content h6:empty,
.pe-entry-content p:empty,
.entry-content p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  line-height: 0 !important;
}

/* Suppress excess line breaks copied from legacy wysiwyg */
.pe-entry-content > br,
.entry-content > br,
.pe-entry-content article > br,
.entry-content article > br,
.pe-entry-content aside > br,
.entry-content aside > br {
  display: none;
}

/* ==========================================================================
   4. THUMBNAIL RESTORATION (COLLAPSED A[DATA-BGSET] & A[STYLE*="BACKGROUND-IMAGE"])
   ========================================================================== */
.pe-entry-content a[data-bgset],
.entry-content a[data-bgset],
.pe-entry-content a[style*="background-image"],
.entry-content a[style*="background-image"] {
  display: block;
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--pe-color-bg-alt, #f5f5f5);
  border-radius: var(--pe-radius-xs, 2px);
  margin-bottom: 12px;
  text-decoration: none;
  overflow: hidden;
  position: relative;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.pe-entry-content a[data-bgset]:hover,
.entry-content a[data-bgset]:hover,
.pe-entry-content a[style*="background-image"]:hover,
.entry-content a[style*="background-image"]:hover {
  opacity: 0.92;
}

/* Headline article thumbnail at top of Khutbah page */
.pe-entry-content > p:first-of-type > a[style*="background-image"],
.entry-content > p:first-of-type > a[style*="background-image"] {
  height: 380px;
  border-radius: var(--pe-radius-sm, 4px);
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .pe-entry-content > p:first-of-type > a[style*="background-image"],
  .entry-content > p:first-of-type > a[style*="background-image"] {
    height: 220px;
  }
}

/* ==========================================================================
   5. ARTICLE GRID & TYPOGRAPHY (DAWUH KYAI & KHUTBAH)
   ========================================================================== */

/* Section Headings inside content */
.pe-entry-content > h3,
.entry-content > h3 {
  font-family: var(--pe-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pe-color-text-main, #313131);
  margin-top: 2.25rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 8px;
}

.pe-entry-content > h3::after,
.entry-content > h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 45px;
  height: 2px;
  background-color: var(--pe-color-primary, #208447);
}

/* Grid presentation for legacy <ul> article lists */
.pe-entry-content > ul:not(.page-numbers):not(#penci-latestwg-4013),
.entry-content > ul:not(.page-numbers):not(#penci-latestwg-4013) {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 24px;
  list-style: none;
  padding-left: 0;
  margin-top: 20px;
  margin-bottom: 36px;
}

@media (max-width: 768px) {
  .pe-entry-content > ul:not(.page-numbers):not(#penci-latestwg-4013),
  .entry-content > ul:not(.page-numbers):not(#penci-latestwg-4013) {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.pe-entry-content > ul:not(.page-numbers) > li,
.entry-content > ul:not(.page-numbers) > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pe-entry-content > ul:not(.page-numbers) > li > article,
.entry-content > ul:not(.page-numbers) > li > article {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: transparent;
}

/* Category Badge above title */
.pe-entry-content article a[rel="category tag"],
.entry-content article a[rel="category tag"] {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pe-color-primary, #208447);
  margin-bottom: 6px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.pe-entry-content article a[rel="category tag"]:hover,
.entry-content article a[rel="category tag"]:hover {
  color: var(--pe-color-primary-hover, #388e3c);
}

/* Article Title */
.pe-entry-content article h2,
.entry-content article h2 {
  font-family: var(--pe-font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 0;
  margin-bottom: 8px;
}

.pe-entry-content article h2 a,
.entry-content article h2 a {
  color: var(--pe-color-text-main, #313131);
  text-decoration: none;
  transition: color 0.2s ease;
}

.pe-entry-content article h2 a:hover,
.entry-content article h2 a:hover {
  color: var(--pe-color-primary, #208447);
}

/* Article Meta (Author & Date) */
.pe-entry-content article p,
.entry-content article p {
  font-size: 12px;
  color: var(--pe-color-text-muted, #888888);
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1.5;
}

.pe-entry-content article p a,
.entry-content article p a {
  color: var(--pe-color-text-muted, #888888);
  font-weight: 500;
}

.pe-entry-content article p a:hover,
.entry-content article p a:hover {
  color: var(--pe-color-primary, #208447);
}

.pe-entry-content article time,
.entry-content article time {
  margin-left: 6px;
}

/* ==========================================================================
   6. PAGINATION STYLING (UL.PAGE-NUMBERS)
   ========================================================================== */
.pe-entry-content ul.page-numbers,
.entry-content ul.page-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 36px 0 48px 0;
}

.pe-entry-content ul.page-numbers li,
.entry-content ul.page-numbers li {
  display: inline-block;
  margin: 0;
  list-style: none;
}

.pe-entry-content ul.page-numbers li span.current,
.entry-content ul.page-numbers li span.current,
.pe-entry-content ul.page-numbers li a,
.entry-content ul.page-numbers li a,
.pe-entry-content ul.page-numbers li:first-child:not(:has(a)),
.entry-content ul.page-numbers li:first-child:not(:has(a)) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--pe-color-border, #dedede);
  border-radius: var(--pe-radius-xs, 2px);
  font-family: var(--pe-font-base);
  font-size: 13px;
  font-weight: 600;
  color: var(--pe-color-text-main, #313131);
  text-decoration: none;
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.pe-entry-content ul.page-numbers li span.current,
.entry-content ul.page-numbers li span.current,
.pe-entry-content ul.page-numbers li:first-child:not(:has(a)),
.entry-content ul.page-numbers li:first-child:not(:has(a)) {
  background-color: var(--pe-color-primary, #208447);
  border-color: var(--pe-color-primary, #208447);
  color: #ffffff;
}

.pe-entry-content ul.page-numbers li a:hover,
.entry-content ul.page-numbers li a:hover {
  background-color: var(--pe-color-primary, #208447);
  border-color: var(--pe-color-primary, #208447);
  color: #ffffff;
}

/* ==========================================================================
   7. EMBEDDED ASIDE & WIDGET CONTAINERS IN CONTENT
   ========================================================================== */
.pe-entry-content aside,
.entry-content aside {
  margin-top: 36px;
  margin-bottom: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--pe-color-border-light, #ededed);
}

.pe-entry-content aside h3,
.entry-content aside h3 {
  font-family: var(--pe-font-heading);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pe-color-text-main, #313131);
  margin-top: 0;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

.pe-entry-content aside h3::after,
.entry-content aside h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background-color: var(--pe-color-primary, #208447);
}

/* Aside: Text-2 Promo Banners */
.pe-entry-content aside#text-2 p img,
.entry-content aside#text-2 p img {
  max-width: 100%;
  height: auto;
  border-radius: var(--pe-radius-sm, 4px);
  margin-bottom: 16px;
  display: block;
}

/* Aside: Block-2 Instagram Feed Grid */
.pe-entry-content aside#block-2,
.entry-content aside#block-2 {
  position: relative;
}

.pe-entry-content aside#block-2 > a[data-img-src-set],
.entry-content aside#block-2 > a[data-img-src-set] {
  position: relative;
  display: inline-block;
  width: calc(25% - 12px);
  margin: 6px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--pe-radius-xs, 2px);
  background-color: var(--pe-color-bg-alt, #f5f5f5);
  vertical-align: top;
  text-decoration: none;
}

@media (max-width: 768px) {
  .pe-entry-content aside#block-2 > a[data-img-src-set],
  .entry-content aside#block-2 > a[data-img-src-set] {
    width: calc(50% - 10px);
    margin: 5px;
  }
}

.pe-entry-content aside#block-2 > a[data-img-src-set] img,
.entry-content aside#block-2 > a[data-img-src-set] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.pe-entry-content aside#block-2 > a[data-img-src-set]:hover img,
.entry-content aside#block-2 > a[data-img-src-set]:hover img {
  transform: scale(1.05);
}

/* Aside: Social Widget (Penci Social) */
.pe-entry-content aside#penci_social_widget-1 p,
.entry-content aside#penci_social_widget-1 p {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pe-entry-content aside#penci_social_widget-1 a,
.entry-content aside#penci_social_widget-1 a {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background-color: var(--pe-color-bg-alt, #f5f5f5);
  border: 1px solid var(--pe-color-border-light, #ededed);
  border-radius: var(--pe-radius-xs, 2px);
  font-size: 13px;
  font-weight: 500;
  color: var(--pe-color-text-main, #313131);
  text-decoration: none;
  transition: all 0.2s ease;
}

.pe-entry-content aside#penci_social_widget-1 a:hover,
.entry-content aside#penci_social_widget-1 a:hover {
  background-color: var(--pe-color-primary, #208447);
  border-color: var(--pe-color-primary, #208447);
  color: #ffffff;
}

/* Aside: Search Widget */
.pe-entry-content aside#search-1 form,
.entry-content aside#search-1 form {
  display: flex;
  gap: 8px;
  max-width: 480px;
}

.pe-entry-content aside#search-1 input[type="text"],
.entry-content aside#search-1 input[type="text"] {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--pe-color-border, #dedede);
  border-radius: var(--pe-radius-xs, 2px);
  font-family: var(--pe-font-base);
  font-size: 14px;
  outline: none;
}

.pe-entry-content aside#search-1 input[type="text"]:focus,
.entry-content aside#search-1 input[type="text"]:focus {
  border-color: var(--pe-color-primary, #208447);
}

.pe-entry-content aside#search-1 input[type="submit"],
.entry-content aside#search-1 input[type="submit"] {
  height: 42px;
  padding: 0 20px;
  background-color: var(--pe-color-primary, #208447);
  border: none;
  border-radius: var(--pe-radius-xs, 2px);
  color: #ffffff;
  font-family: var(--pe-font-base);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.pe-entry-content aside#search-1 input[type="submit"]:hover,
.entry-content aside#search-1 input[type="submit"]:hover {
  background-color: var(--pe-color-primary-hover, #388e3c);
}

/* Aside: Latest News Widget */
.pe-entry-content aside#penci_latest_news_widget-1 ul,
.entry-content aside#penci_latest_news_widget-1 ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pe-entry-content aside#penci_latest_news_widget-1 li,
.entry-content aside#penci_latest_news_widget-1 li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid var(--pe-color-border-soft, #f0f0f0);
  padding-bottom: 14px;
}

.pe-entry-content aside#penci_latest_news_widget-1 a[data-bgset],
.entry-content aside#penci_latest_news_widget-1 a[data-bgset] {
  width: 95px !important;
  height: 65px !important;
  flex-shrink: 0;
  margin-bottom: 0 !important;
  border-radius: var(--pe-radius-xs, 2px);
}

.pe-entry-content aside#penci_latest_news_widget-1 h4,
.entry-content aside#penci_latest_news_widget-1 h4 {
  font-family: var(--pe-font-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 4px 0;
}

.pe-entry-content aside#penci_latest_news_widget-1 h4 a,
.entry-content aside#penci_latest_news_widget-1 h4 a {
  color: var(--pe-color-text-main, #313131);
  text-decoration: none;
}

.pe-entry-content aside#penci_latest_news_widget-1 h4 a:hover,
.entry-content aside#penci_latest_news_widget-1 h4 a:hover {
  color: var(--pe-color-primary, #208447);
}

/* ==========================================================================
   8. TENTANG KAMI PAGE STYLING (/TENTANG-PROGRESIFEDITORIAL/)
   ========================================================================== */

/* Top Editorial Banner */
.pe-entry-content > p > img[src*="Banner-Progresif-Editorial"],
.entry-content > p > img[src*="Banner-Progresif-Editorial"] {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--pe-radius-sm, 4px);
  margin-bottom: 28px;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Company Overview Headings */
.pe-entry-content h2[data-v-6b88f378]:not(:empty),
.entry-content h2[data-v-6b88f378]:not(:empty) {
  font-family: var(--pe-font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pe-color-text-main, #313131);
  margin-top: 2rem;
  margin-bottom: 1.25rem;
  padding-bottom: 8px;
  position: relative;
  display: inline-block;
}

.pe-entry-content h2[data-v-6b88f378]:not(:empty)::after,
.entry-content h2[data-v-6b88f378]:not(:empty)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--pe-color-primary, #208447);
}

/* Editorial Body Text */
.pe-entry-content p,
.entry-content p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--pe-color-text-body, #25332d);
  margin-bottom: 1.5rem;
  text-align: left;
}

@media (max-width: 768px) {
  .pe-entry-content p,
  .entry-content p {
    font-size: 17px;
    line-height: 1.78;
    margin-bottom: 1.35rem;
  }
}

/* Editorial Team Section: clean hierarchy for Role + Name */
.pe-entry-content h3 ~ p:has(+ h5),
.entry-content h3 ~ p:has(+ h5),
.pe-entry-content h3 ~ p:has(+ p strong),
.entry-content h3 ~ p:has(+ p strong) {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pe-color-primary, #208447);
  margin-top: 18px;
  margin-bottom: 2px;
}

.pe-entry-content h3 ~ h5,
.entry-content h3 ~ h5,
.pe-entry-content h3 ~ p > strong,
.entry-content h3 ~ p > strong {
  font-family: var(--pe-font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--pe-color-text-main, #313131);
  margin-top: 0;
  margin-bottom: 14px;
  line-height: 1.4;
  display: block;
}

/* Fallback for browsers that do not support :has() */
@supports not (selector(:has(p))) {
  .pe-entry-content h5,
  .entry-content h5 {
    font-size: 15px;
    font-weight: 600;
    color: var(--pe-color-text-main, #313131);
    margin-top: 2px;
    margin-bottom: 16px;
  }
}

/* ==========================================================================
   9. RESPONSIVE REFINEMENTS & OVERFLOW CONTAINMENT
   ========================================================================== */
@media (max-width: 960px) {
  .pe-layout-no-sidebar {
    margin-top: 16px;
    margin-bottom: 40px;
  }
}

@media (max-width: 768px) {
  .pe-entry-content,
  .entry-content {
    overflow-x: hidden;
  }

  .pe-entry-content a[data-bgset],
  .entry-content a[data-bgset],
  .pe-entry-content a[style*="background-image"],
  .entry-content a[style*="background-image"] {
    height: 190px;
  }

  .pe-entry-content aside#search-1 form,
  .entry-content aside#search-1 form {
    flex-direction: column;
  }

  .pe-entry-content aside#search-1 input[type="submit"],
  .entry-content aside#search-1 input[type="submit"] {
    width: 100%;
  }
}
