/*
 Theme Name:   Clearer Child
 Theme URI:    
 Description:  Child Theme of Clearer, a flexible blog and magazine theme with plenty of options. Optimized for all devices, this theme will stand out with a unique design, including dark/light mode.
 Author:       PJ Max
 Author URI:   https://popcornjedi.com
 Template:     clearer
 Version:      1.0
*/

/* =========================
   GLOBAL TYPOGRAPHY & LINKS
   ========================= */

p.site-description {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #FFD700 !important;
  text-shadow: 2px 2px 4px #000 !important;
  margin-top: 10px !important;
  letter-spacing: 1px !important;
}

ul#nav-header.menu {
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #FFD700 !important;
  text-shadow: 2px 2px 4px #000 !important;
  margin-top: 10px !important;
  letter-spacing: 1px !important;
}

ul#nav-header.menu a {
  color: #FFD700 !important;
}

h1 {
  text-shadow: .1em .1em lightgray;
}

a:hover {
  text-shadow: .1em .1em #C0C0FF;
}

/* =========================
   TITLE IMAGE STYLING
   ========================= */

img.titlesw.size-full,
img.titlesw {
  border-radius: 0px;
  box-shadow: none !important;
}

/* YouTube Circular Thumbnails */
img.titleyt,
img.titleyt.size-full {
  border-radius: 90px;
  box-shadow: 0px 0px 20px 0px #000000;
}

/* =========================
   IMAGE STYLING (CENTER, LEFT, RIGHT)
   ========================= */

img.aligncenter,
img.alignleft,
img.alignright {
  border-radius: 20px;
  box-shadow: 0px 0px 10px 0px #000000 !important;
}

/* PNG transparency */
img.alignnone {
  border-radius: 0px;
  box-shadow: none !important;
}

/* Expand medium images */
img.aligncenter.size-medium {
  width: 100% !important;
  height: auto !important;
}

/* =========================
   VIDEO EMBEDS
   ========================= */

iframe {
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 20px;
  box-shadow: 0px 0px 10px 0px #000000 !important;
  max-width: 100% !important;
}

/* Jetpack Likes widget */
iframe.jetpack-likes-widget {
  border-radius: 0px;
  box-shadow: 0px 0px 0px 0px #000000 !important;
}

/* =========================
   TITLE BACKGROUND WIDTH
   ========================= */

div.inner {
  max-height: 200px;
}

a.more-link-custom {
  box-shadow: 0px 0px 10px 0px #000000 !important;
}

/* =========================
   CAPTION BOXES
   ========================= */

.wp-caption {
  border-radius: 20px;
  box-shadow: 0px 0px 10px 0px #000000 !important;
}

/* =========================
   WIDGETS (LIGHT & DARK MODE)
   ========================= */

body:not(.dark-mode) .widget {
  background-color: #fafafa;
  color: #000;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

body.dark-mode .widget {
  background-color: #111;
  color: #fff;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

/* Gap between widgets */
.widget {
  margin-bottom: 25px;
}

/* =========================
   INTRO CARD THUMB
   ========================= */

div.intro-card-thumb {
  border-radius: 90px;
  box-shadow: 0px 0px 20px 0px #000000;
}

/* =========================
   JETPACK SUBSCRIBE WIDGET SPACING
   ========================= */

.widget_blog_subscription,
.widget_wpcom_subscribe,
.jetpack_subscription_widget {
  margin-top: 30px !important;
}

div.wrapper-inner.group {
  margin-bottom: 30px !important;
}

/* =========================
   LIGHTBOX
   ========================= */

.pj-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: zoom-out;
  opacity: 0;
  animation: pjFadeIn 0.25s forwards;
}

@keyframes pjFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pj-lightbox-overlay.pj-fade-out {
  animation: pjFadeOut 0.25s forwards;
}

@keyframes pjFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.pj-lightbox-image {
  max-width: 95%;
  max-height: 95%;
  border-radius: 6px;
  box-shadow:
    0 0 20px rgba(0,191,255,0.6),
    0 0 40px rgba(0,191,255,0.4),
    0 0 60px rgba(0,191,255,0.2);
  transform: scale(0.95);
  animation: pjZoomIn 0.25s forwards;
}

@keyframes pjZoomIn {
  from { transform: scale(0.95); }
  to   { transform: scale(1); }
}

.pj-lightbox-inner {
  text-align: center;
}

.pj-lightbox-caption {
  margin-top: 12px;
  font-size: 15px;
  color: #ddd;
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 0 6px rgba(0,0,0,0.7);
}

/* Hide inline images inside post content ONLY */
.single .entry.themeform p:first-of-type img {
  display: none !important;
}

/* =========================
   FRONT-PAGE IMAGE HEIGHT (GRID ALIGNMENT)
   ========================= */

img.attachment-pj-featured.size-pj-featured.wp-post-image {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.link-div p {
  min-height: 60px;
}

img.attachment-pj-featured.size-pj-featured.wp-post-image {
  object-position: top;
}

.pj-crop-top img.attachment-pj-featured.size-pj-featured.wp-post-image {
  object-position: top;
}

.pj-crop-bottom img.attachment-pj-featured.size-pj-featured.wp-post-image {
  object-position: bottom;
}

.pj-crop-left img.attachment-pj-featured.size-pj-featured.wp-post-image {
  object-position: left;
}

.pj-crop-right img.attachment-pj-featured.size-pj-featured.wp-post-image {
  object-position: right;
}

.pj-crop-custom img.attachment-pj-featured.size-pj-featured.wp-post-image {
  object-position: var(--pj-crop);
}

/* So Featured & Highlights Show Up in Light Mode */
h3.stickywrap-heading {
  color: aquamarine !important;
}

/* =========================
   DATABANK META GRID
   ========================= */

#pj-databank-meta-grid {
  background: #000;
  border: 1px solid #ffe27a;
  border-radius: 6px;
  padding: 8px 14px;
  margin: 16px 0;
  font-family: "Orbitron", sans-serif;
  font-size: 0.8rem;
  line-height: 1.3;
  color: #ffe27a;
  box-shadow: 0 0 10px rgba(255, 226, 122, 0.2);
}

#pj-databank-meta-grid .pj-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

#pj-databank-meta-grid .pj-meta-label {
  font-weight: 500;
  opacity: 0.8;
  font-size: 0.78rem;
}

#pj-databank-meta-grid .pj-meta-value {
  font-weight: 600;
  font-size: 0.78rem;
}

#pj-databank-meta-grid .pj-meta-holo {
  margin-top: 6px;
  height: 2px;
  background: linear-gradient(90deg, #00aaff, #005577);
  box-shadow: 0 0 6px rgba(0, 170, 255, 0.6);
}

/* =========================
   UNIVERSAL TRANSMISSION INTERFERENCE EFFECT
   ========================= */

#pj-databank-footer,
#pj-databank-header,
#pj-databank-breadcrumbs,
#pj-databank-sidebar,
#pj-databank-meta-grid {
  position: relative;
  overflow: hidden;
}

#pj-databank-footer::after,
#pj-databank-header::after,
#pj-databank-breadcrumbs::after,
#pj-databank-sidebar::after,
#pj-databank-meta-grid::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 170, 255, 0.05) 0px,
    rgba(0, 170, 255, 0.05) 2px,
    rgba(0, 170, 255, 0.15) 3px,
    rgba(0, 170, 255, 0.05) 5px
  );
  animation: pj-signal-scan 3.5s linear infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}

#pj-databank-footer *,
#pj-databank-header *,
#pj-databank-breadcrumbs *,
#pj-databank-sidebar *,
#pj-databank-meta-grid .pj-meta-row {
  animation: pj-flicker 6s infinite;
}

@keyframes pj-signal-scan {
  0% { transform: translateX(0); opacity: 0.4; }
  50% { opacity: 0.2; }
  100% { transform: translateX(-50%); opacity: 0.4; }
}

@keyframes pj-flicker {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: 0.6; }
  94% { opacity: 0.3; }
  95% { opacity: 0.8; }
}

/* =========================
   BLUE HOLOGRAM EFFECT FOR FEATURED IMAGES
   ========================= */

.post-thumbnail img,
.entry-thumbnail img,
.featured-image img,
.single-post .wp-post-image {
  position: relative;
  display: block;
  filter: hue-rotate(200deg) saturate(1.4) brightness(1.2);
  opacity: 0.9;
}

.post-thumbnail img::after,
.entry-thumbnail img::after,
.featured-image img::after,
.single-post .wp-post-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 170, 255, 0.08) 0px,
    rgba(0, 170, 255, 0.08) 2px,
    rgba(0, 170, 255, 0.02) 3px,
    rgba(0, 170, 255, 0.02) 4px
  );
  animation: pj-holo-flicker 2.8s infinite linear;
  mix-blend-mode: screen;
}

@keyframes pj-holo-flicker {
  0%   { opacity: 0.9; }
  45%  { opacity: 0.7; }
  50%  { opacity: 0.4; }
  55%  { opacity: 0.7; }
  100% { opacity: 0.9; }
}

/* =========================
   TOP BANNER
   ========================= */

div#pj-top-banner {
  text-shadow: 1px 1px 2px black, 0 0 25px blue, 0 0 5px red;
}

/* =========================
   SINGLE FEATURED THUMB OVERLAY
   ========================= */

.single-featured-thumb {
  position: relative;
  display: inline-block;
}

.single-featured-thumb::after {
  content: "\f00e";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: #fff;
  font-size: 32px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.single-featured-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.single-featured-thumb:hover::before,
.single-featured-thumb:hover::after {
  opacity: 1;
}

/* =========================
   DATABANK META GRID EXTRA
   ========================= */

#pj-databank-meta-grid {
  margin-top: 20px;
  border-top: 2px solid #00bfff;
  padding-top: 10px;
  box-shadow: 0 -2px 10px rgba(0,191,255,0.3);
}

/* =========================
   FEATURED IMAGE OBJECT POSITION
   ========================= */

img.attachment-pj-featured.size-pj-featured.wp-post-image {
  object-fit: cover;
  object-position: 50% 65%;
}

/* =========================
   LIGHTBOX GLOW ENGINE (MEOW / PHOTOSWIPE)
   ========================= */

.mwlb-container,
.mwlb-wrapper,
.pswp,
.pswp__wrapper,
.pswp__zoom-wrap,
.pswp__img--placeholder {
  overflow: visible !important;
}

.mwlb-container img,
.mwlb-slide img,
img.pswp__img {
  box-shadow:
    0 0 20px rgba(0,191,255,0.6),
    0 0 40px rgba(0,191,255,0.4),
    0 0 60px rgba(0,191,255,0.2);
  border: 1px solid rgba(0, 225, 255, 0.3) !important;
}

/* =========================
   SINGLE POST FEATURED IMAGE CINEMATIC
   ========================= */

.single-post img.attachment-pj-featured {
  box-shadow: 0px 0px 10px 0px #000000 !important;
  height: 520px !important;
  width: 750px;
  height: auto;
  transform: perspective(330px) rotateY(-10deg) scaleX(1.4);
  transform-origin: center right;
  transition: transform 0.4s ease;
  animation: flicker 2.6s infinite;
}

@keyframes flicker {
  0%   { opacity: 1; }
  5%   { opacity: 0.92; }
  10%  { opacity: 0.97; }
  15%  { opacity: 0.90; }
  20%  { opacity: 0.98; }
  25%  { opacity: 0.94; }
  30%  { opacity: 1; }
  40%  { opacity: 0.93; }
  50%  { opacity: 0.99; }
  60%  { opacity: 0.91; }
  70%  { opacity: 0.96; }
  80%  { opacity: 0.93; }
  90%  { opacity: 0.99; }
  100% { opacity: 1; }
}

/* =========================
   DARK MODE SIDEBAR (STRUCTURAL)
   ========================= */

body.dark .sidebar {
  background-color: transparent !important;
}

body.dark .sidebar .widget,
body.dark .sidebar .widget-area,
body.dark .sidebar .wp-block-group {
  background-color: rgba(20, 20, 20, 0.85) !important;
  color: #eee !important;
  border: 1px solid rgba(60, 60, 60, 0.6);
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* =========================
   MGL BOX / GALLERY
   ========================= */

div.mgl-box {
  padding: 16px;
  border-radius: 20px;
  background: rgba(0,0,0,0.35);
  border: 2px solid rgba(138,43,226,0.4);
  box-shadow: 0 0 20px rgba(138,43,226,0.5);
}

div.mgl-box .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

div.mgl-box .gallery-item img {
  border-radius: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

div.mgl-box .gallery-item img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(138,43,226,0.6);
}

/* =========================
   DARK MODE DROPDOWN FIX (STRUCTURAL)
   ========================= */

ul.sub-menu {
  background-color: #111 !important;
  border: 1px solid #333;
}

/* =========================
   POPCORN JEDI CINEMATIC CARD PACKAGE
   ========================= */

.link-div {
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

img.attachment-pj-featured.size-pj-featured.wp-post-image {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.link-div:hover img.attachment-pj-featured.size-pj-featured.wp-post-image {
  transform: scale(1.03);
  filter: brightness(1.08) contrast(1.05);
}

.blog-card-left {
  box-shadow: 0 0 12px rgba(0,150,255,0.25), 0 6px 14px rgba(0,0,0,0.35);
}

.blog-card-left:hover {
  box-shadow: 0 0 18px rgba(0,150,255,0.35), 0 14px 26px rgba(0,0,0,0.45);
}

/* =========================
   POPCORN JEDI AUTO-EXCERPT WIDGET
   ========================= */

.pj-excerpt-box {
  position: relative;
  overflow: hidden;
  padding: 12px 10px 10px 10px;
  border: 2px solid #4aa3ff;
  border-radius: 8px;
  background: #000;
  box-shadow:
    0 0 12px rgba(74,163,255,0.4),
    inset 0 0 8px rgba(0,0,0,0.6);
  margin: 12px 0;
  animation: holo-pulse 6s ease-in-out infinite;
}

.pj-excerpt-box::before,
.pj-excerpt-box::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #4aa3ff;
}

.pj-excerpt-box::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
}

.pj-excerpt-box::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
}

.pj-excerpt-title {
  font-family: 'Aurebesh', sans-serif;
  font-size: 16px;
  color: #4aa3ff;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.pj-excerpt-title a.pj-excerpt-link,
.pj-excerpt-title a.pj-excerpt-link:visited {
  color: #4aa3ff !important;
  text-decoration: none;
}

.pj-excerpt-title a.pj-excerpt-link:hover {
  opacity: 0.7;
}

.pj-excerpt-prefix {
  font-family: 'Aurebesh', sans-serif;
  font-size: 11px;
  color: #4aa3ff;
  margin-bottom: 4px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.pj-excerpt-category {
  font-family: 'Aurebesh', sans-serif;
  font-size: 12px;
  color: #d4af37;
  margin-bottom: 6px;
  letter-spacing: 1.2;
  border-bottom: 1px solid #d4af37;
  padding-bottom: 4px;
}

.pj-excerpt-date {
  font-family: 'Aurebesh', sans-serif;
  font-size: 10px;
  color: #d4af37;
  margin-bottom: 6px;
  letter-spacing: 0.85px;
  opacity: 0.9;
}

.pj-excerpt-text {
  font-family: 'Aurebesh', sans-serif;
  font-size: 13px;
  color: #fff;
  line-height: 1.45;
  letter-spacing: 1px;
}

.pj-excerpt-more {
  text-align: right;
  margin-top: 6px;
  margin-right: 8px;
}

.pj-excerpt-more a {
  font-family: 'Aurebesh', sans-serif;
  font-size: 13px;
  color: #4aa3ff;
  text-decoration: none;
  letter-spacing: 1px;
}

.pj-excerpt-more a:hover {
  opacity: 0.7;
}

.pj-excerpt-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.10) 0%,
    rgba(255,255,255,0.00) 40%,
    rgba(255,255,255,0.10) 100%
  );
  opacity: 0.06;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.pj-excerpt-box:hover::after {
  opacity: 0.12;
}

@keyframes holo-pulse {
  0%   { box-shadow: 0 0 12px rgba(74,163,255,0.35); }
  50%  { box-shadow: 0 0 16px rgba(74,163,255,0.55); }
  100% { box-shadow: 0 0 12px rgba(74,163,255,0.35); }
}

.pj-excerpt-box::before {
  content: "PJ";
  position: absolute;
  top: 4px;
  right: 6px;
  font-family: 'Aurebesh', sans-serif;
  font-size: 10px;
  color: #4aa3ff;
  opacity: 0.6;
  letter-spacing: 1px;
}

.pj-scanline {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(74,163,255,0.08);
  animation: holo-scan 5s linear infinite;
  pointer-events: none;
  top: -100%;
}

@keyframes holo-scan {
  0% { top: -100%; }
  100% { top: 100%; }
}

/* Sidebar variant */

.sidebar .pj-excerpt-box {
  border: 2px solid #4aa3ff;
  border-left-width: 4px;
  border-radius: 6px;
  padding: 14px 12px 12px 12px;
  background: #000;
  box-shadow:
    0 0 16px rgba(74,163,255,0.6),
    inset 0 0 10px rgba(0,0,0,0.7);
  position: relative;
  animation: sidebar-pulse 7s ease-in-out infinite;
}

@keyframes sidebar-pulse {
  0%   { box-shadow: 0 0 12px rgba(74,163,255,0.35); }
  50%  { box-shadow: 0 0 18px rgba(74,163,255,0.55); }
  100% { box-shadow: 0 0 12px rgba(74,163,255,0.35); }
}

.sidebar .pj-excerpt-box::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 6px;
  height: 6px;
  background: #4aa3ff;
  border-radius: 50%;
  animation: power-pulse 3s ease-in-out infinite;
}

@keyframes power-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.sidebar .pj-excerpt-box::after {
  content: "CHANNEL: PJ‑01";
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-family: 'Aurebesh', sans-serif;
  font-size: 10px;
  color: #4aa3ff;
  opacity: 0.6;
  letter-spacing: 1px;
}

.sidebar .pj-excerpt-title {
  font-size: 17px;
  letter-spacing: 2px;
  color: #4aa3ff;
}

.sidebar .pj-excerpt-prefix {
  font-size: 11px;
  letter-spacing: 1.3px;
}

.sidebar .pj-excerpt-category {
  font-size: 12px;
  letter-spacing: 1.2px;
}

.sidebar .pj-excerpt-date {
  font-size: 10px;
  letter-spacing: 1.2px;
}

.sidebar .pj-excerpt-text {
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 1.2px;
  color: #cfdfff;
  opacity: 0.9;
}

.sidebar .pj-excerpt-more a {
  font-size: 13px;
  letter-spacing: 1.4px;
}

/* -----------------------------------------------------------
   Popcorn Jedi — Transmission Block Gradient Sync
   Matches sidebar widget colors, keeps transmission effect
----------------------------------------------------------- */
#pj-databank-meta-grid {
  background: linear-gradient(to right, #00bcd4 0%, #4dd0e1 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 0 12px rgba(0, 188, 212, 0.4),
    inset 0 0 8px rgba(77, 208, 225, 0.3);
  color: #f5f5f5;
  padding: 14px 18px;
  border-radius: 6px;
  transition: box-shadow 0.3s ease-in-out;
}

#pj-databank-meta-grid:hover {
  box-shadow:
    0 0 18px rgba(0, 188, 212, 0.6),
    inset 0 0 10px rgba(77, 208, 225, 0.5);
}

#pj-databank-meta-grid strong {
  color: #00bcd4;
}

#pj-databank-meta-header {
  color: #00bcd4;
  border-top: 1px solid #00bcd4;
}

#pj-databank-meta-grid {
  background: linear-gradient(
    90deg,
    var(--theme-accent) 0%,
    var(--theme-accent-alt) 100%
  );
}