/* ===========================
   UnZend Neon Theme — v2.0
   Blog + Single (responsive)
   =========================== */

/* ---------- Design Tokens ---------- */
:root{
  --uz-bg: #0b1110;
  --uz-panel: #0e1615;
  --uz-grid: rgba(0,255,170,.06);

  --uz-border: rgba(0,255,170,.16);
  --uz-border-soft: rgba(0,255,170,.10);

  --uz-accent: #00ffa6;
  --uz-accent-2: #33ff88;

  --uz-text: #eafef7;
  --uz-text-dim: #a6e8cf;

  --uz-gap: clamp(.9rem, 1.6vw, 1.25rem);
  --uz-radius: 18px;
  --uz-max: 1240px;

  --uz-shadow: 0 10px 30px rgba(0,255,170,.08), inset 0 0 0 1px rgba(0,255,170,.06);
}

/* ---------- Base ---------- */
.uz-dark{ background:var(--uz-bg); color:var(--uz-text); position:relative; }
.uz-bg-grid{
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 1px 1px, var(--uz-grid) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(180deg, transparent, rgba(0,255,170,.04), transparent);
  pointer-events:none; z-index:0;
}
.uz-container{ width:min(100% - 2rem, var(--uz-max)); margin-inline:auto; position:relative; z-index:1; }

/* ---------- Language / tiny utils ---------- */
.uz-lang{ display:flex; justify-content:flex-end; margin:.75rem 0 .25rem; }

/* ---------- Page Header (Blog/Archive/Page) ---------- */
.uz-page-header{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:var(--uz-gap); margin: 1.5rem 0 1rem;
}
.uz-page-title{
  margin:0; letter-spacing:.3px;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  text-shadow: 0 0 14px rgba(0,255,170,.22);
}

/* View toggle */
.uz-view-toggle{ display:inline-flex; gap:.6rem; }
.uz-toggle-btn{
  border:1px solid var(--uz-border-soft);
  background:linear-gradient(180deg, #0c1413, #0a1211);
  color:var(--uz-text); padding:.5rem .8rem; border-radius:999px;
  font-size:.85rem; cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.uz-toggle-btn.is-active{ box-shadow:0 0 0 2px rgba(0,255,170,.18) inset, 0 0 16px rgba(0,255,170,.12); border-color:var(--uz-accent); transform:translateY(-1px); }

/* =======================================================
   BLOG INDEX / ARCHIVES
   ======================================================= */

/* Responsive grid: prevents over-wide cards on large screens */
.uz-posts{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--uz-gap);
}

/* List view */
.uz-posts--list{ grid-template-columns: 1fr; }
.uz-posts--list > .uz-card{
  display:grid; grid-template-columns: 320px 1fr; gap: var(--uz-gap);
}
@media (max-width: 820px){
  .uz-posts--list > .uz-card{ grid-template-columns: 1fr; }
}

/* Card */
.uz-card{
  background: linear-gradient(180deg, rgba(15,25,24,.75), rgba(14,22,21,.6));
  border:1px solid var(--uz-border);
  border-radius:var(--uz-radius);
  overflow:hidden; display:flex; flex-direction:column;
  box-shadow: var(--uz-shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  backdrop-filter: blur(6px);
  position:relative;
}
.uz-card:hover{ transform: translateY(-4px); border-color: var(--uz-accent); box-shadow: 0 18px 40px rgba(0,255,170,.12), inset 0 0 0 1px rgba(0,255,170,.18); }

/* Standardized featured image (never breaks layout) */
.uz-card__media,
.uz-card__placeholder{
  display:block;
  aspect-ratio: 16 / 9;
  max-height: clamp(200px, 28vw, 320px);     /* hard cap to avoid giant images */
  background: rgba(0,255,170,.05);
  position:relative; z-index:1;
}
.uz-card__media img{ width:100%; height:100%; object-fit:cover; display:block; }
.uz-posts--list .uz-card__media,
.uz-posts--list .uz-card__placeholder{ aspect-ratio: 4 / 3; }

/* Subtle glow under media */
.uz-card__glow{
  position:absolute; inset:auto -15% -15% -15%; height:60%;
  filter:blur(32px); background:radial-gradient(ellipse at bottom, rgba(0,255,170,.18), transparent 60%);
  pointer-events:none; z-index:0; opacity:.75;
}

.uz-card__body{ padding: 1rem; display:grid; gap:.6rem; position:relative; z-index:2; }
.uz-card__meta{ color:var(--uz-text-dim); font-size:.83rem; display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
.uz-card__title{ font-size: clamp(1.15rem, 2.2vw, 1.35rem); margin:.1rem 0; line-height:1.35; }
.uz-card__title a{ color:var(--uz-text); text-decoration:none; }
.uz-card__title a:hover{ text-shadow:0 0 10px rgba(0,255,170,.35); }
.uz-card__excerpt{ color:#b9ffea; margin:0; opacity:.95; }

.uz-chip{
  display:inline-flex; align-items:center; gap:.35rem; padding:.25rem .5rem; border-radius:999px;
  border:1px solid var(--uz-border-soft); background:rgba(0,255,170,.06);
  font-size:.74rem; color:var(--uz-text-dim); text-decoration:none;
}
.uz-chip:hover{ border-color:var(--uz-accent); color:var(--uz-text); box-shadow:0 0 0 1px rgba(0,255,170,.2) inset; }

.uz-button{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  padding:.6rem .9rem; border-radius:10px; text-decoration:none; font-weight:700; font-size:.9rem;
  border:1px solid var(--uz-border); color:var(--uz-text); position:relative; z-index:3;
}
.uz-button--neon{ background:linear-gradient(180deg, rgba(0,255,170,.18), rgba(0,255,170,.12)); box-shadow:0 0 24px rgba(0,255,170,.18); }
.uz-button--neon:hover{ border-color:var(--uz-accent); box-shadow:0 0 36px rgba(0,255,170,.26); }

/* Pagination */
.uz-pagination{ margin: 1.6rem 0 2.2rem; }
.uz-pagination__list{ list-style:none; display:flex; gap:.6rem; padding:0; margin:0; flex-wrap:wrap; }
.uz-pagination__item a, .uz-pagination__item span{
  display:inline-block; padding:.55rem .8rem; border:1px solid var(--uz-border);
  border-radius:10px; background:rgba(0,255,170,.05); color:var(--uz-text);
}
.uz-pagination__item .current{ background: rgba(0,255,170,.2); border-color:var(--uz-accent); }

/* Empty state */
.uz-empty{ text-align:center; padding:2rem; border:1px dashed var(--uz-border-soft); border-radius:var(--uz-radius); background:rgba(0,255,170,.03); color:var(--uz-text-dim); }

/* =======================================================
   SINGLE POST
   ======================================================= */

/* Breadcrumbs */
.uz-breadcrumbs{ font-size:.9rem; color:var(--uz-text-dim); display:flex; align-items:center; gap:.4rem; }
.uz-breadcrumbs a{ color:var(--uz-text-dim); text-decoration:none; }
.uz-breadcrumbs a:hover{ color:var(--uz-accent-2); text-decoration:underline; }
.uz-breadcrumbs .sep{ opacity:.6; }

/* Compact split hero */
.uz-hero--compact{ padding:1rem 0 0; }
.uz-hero__grid{
  display:grid; align-items:center;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: clamp(1rem, 3vw, 2rem);
}
@media (max-width: 900px){ .uz-hero__grid{ grid-template-columns: 1fr; } }
.uz-hero__text{ display:grid; gap:.6rem; }
.uz-hero__meta{ color:var(--uz-text-dim); display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }

/* Tamed title size + placement */
.uz-hero__title{
  margin:.1rem 0; letter-spacing:.25px;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  text-shadow: 0 0 14px rgba(0,255,170,.20);
}
.uz-hero__excerpt{ font-size:1rem; color:#caffec; opacity:.95; }

/* Featured image frame — safe for any size */
.uz-hero__media--frame{ padding: clamp(10px, 2vw, 16px); }
.uz-hero__aspect{
  position:relative; overflow:hidden; border-radius:20px;
  background: linear-gradient(180deg, rgba(0,255,170,.06), rgba(0,255,170,.02));
  border:1px solid var(--uz-border); box-shadow:var(--uz-shadow);
  aspect-ratio: 4 / 3; width: 100%;
  max-height: min(52vh, 480px);    /* hard cap prevents giant hero images */
  display:grid; place-items:center;
}
.uz-hero__img{ width:100%; height:100%; object-fit:contain; display:block; }
.uz-hero__scanline{
  position:absolute; inset:0;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,0) 0, rgba(0,0,0,0) 8px, rgba(0,255,170,.06) 9px, rgba(0,255,170,.06) 10px);
  opacity:.25; mix-blend:screen; pointer-events:none;
}
.uz-hero__corner{ position:absolute; width:24px; height:24px; border:2px solid var(--uz-accent); opacity:.7; filter:drop-shadow(0 0 8px rgba(0,255,170,.45)); }
.uz-hero__corner.tl{ top:10px; left:10px; border-right:0; border-bottom:0; border-radius:10px 0 0 0; }
.uz-hero__corner.tr{ top:10px; right:10px; border-left:0; border-bottom:0; border-radius:0 10px 0 0; }
.uz-hero__corner.bl{ bottom:10px; left:10px; border-right:0; border-top:0; border-radius:0 0 0 10px; }
.uz-hero__corner.br{ bottom:10px; right:10px; border-left:0; border-top:0; border-radius:0 0 10px 0; }
.uz-hero__caption{ margin-top:.5rem; font-size:.85rem; color:var(--uz-text-dim); text-align:right; }

/* Content area: glass card + tidy layout */
.uz-article__layout{
  display:grid; gap: clamp(1rem, 3vw, 2rem); margin-top:1.25rem;
  grid-template-columns: minmax(0, 1fr) 300px;
}
@media (max-width: 1100px){ .uz-article__layout{ grid-template-columns: 1fr; } .uz-article__aside{ order:2; } }

.uz-article__card{
  background: linear-gradient(180deg, rgba(0,255,170,.05), rgba(0,255,170,.02));
  border:1px solid var(--uz-border); border-radius:18px;
  padding: clamp(1rem, 2vw, 1.25rem); box-shadow: var(--uz-shadow);
}

.uz-article__body{ font-size:1.06rem; line-height:1.9; color:#d8fff1; display:grid; gap:1.05rem; }
.uz-article__body > *{ max-width: 72ch; }
.uz-article__body .alignwide{ max-width:none; width:min(1200px, 100%); }
.uz-article__body .alignfull{ max-width:none; width:100%; }

/* Article HTML elements (full support) */
.uz-article__body img{ max-width:100%; height:auto; border-radius:12px; border:1px solid var(--uz-border); box-shadow:var(--uz-shadow); }
.uz-article__body figure{ margin:1rem 0; text-align:center; }
.uz-article__body figcaption{ font-size:.9rem; color:var(--uz-text-dim); margin-top:.35rem; }

.uz-article__body h2, .uz-article__body h3, .uz-article__body h4{
  margin-top:2rem; margin-bottom:.75rem; letter-spacing:.2px;
}
.uz-article__body h2{ font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
.uz-article__body h3{ font-size: clamp(1.2rem, 2.2vw, 1.45rem); }

.uz-article__body blockquote{
  margin:1rem 0; padding:1rem 1.25rem; border-left:3px solid var(--uz-accent);
  background:rgba(0,255,170,.06); border-radius:10px;
}
.uz-article__body pre,
.uz-article__body code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.uz-article__body pre{
  background:#08110f; border:1px solid var(--uz-border); border-radius:12px;
  padding:1rem; overflow:auto; box-shadow: inset 0 0 24px rgba(0,255,170,.06);
}
.uz-article__body table{ width:100%; border-collapse:collapse; overflow:hidden; border-radius:12px; border:1px solid var(--uz-border); }
.uz-article__body table th, .uz-article__body table td{ padding:.7rem .8rem; border-bottom:1px solid var(--uz-border); }
.uz-article__body ul, .uz-article__body ol{ padding-left:1.2rem; }
.uz-article__body a{ color:var(--uz-accent-2); text-decoration:underline; }
.uz-article__body hr{ border:0; height:1px; background:linear-gradient(90deg, transparent, var(--uz-border), transparent); margin:2rem 0; }

/* WP alignleft/alignright support */
.uz-article__body .alignleft{ float:left; margin: .2rem 1rem .6rem 0; max-width:50%; }
.uz-article__body .alignright{ float:right; margin: .2rem 0 .6rem 1rem; max-width:50%; }
@media (max-width: 700px){
  .uz-article__body .alignleft,
  .uz-article__body .alignright{ float:none; margin: .6rem 0; max-width:100%; }
}

/* Aside */
.uz-article__aside{ position:sticky; top:90px; height:fit-content; }
.uz-aside__box{
  background:linear-gradient(180deg, rgba(0,255,170,.05), rgba(0,255,170,.02));
  border:1px solid var(--uz-border); border-radius:16px; padding:1rem; box-shadow:var(--uz-shadow);
}
.uz-aside__row{ display:flex; justify-content:space-between; gap:.75rem; padding:.35rem 0; border-bottom:1px dashed var(--uz-border-soft); }
.uz-aside__row:last-child{ border-bottom:0; }
.uz-aside__label{ color:var(--uz-text-dim); }

/* Footer / share */
.uz-article__footer{ display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:1.1rem; flex-wrap:wrap; }
.uz-tags__label{ margin-right:.25rem; color:var(--uz-text-dim); }
.uz-share{ display:flex; align-items:center; gap:.5rem; }
.uz-share__label{ color:var(--uz-text-dim); margin-right:.25rem; }
.uz-share__btn{ display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:50%; border:1px solid var(--uz-border); background:rgba(0,255,170,.06); color:var(--uz-text); text-decoration:none; }
.uz-share__btn:hover{ border-color:var(--uz-accent); box-shadow:0 0 14px rgba(0,255,170,.2); }

/* Post navigation */
.uz-post-nav{ margin:1.2rem 0 2.2rem; }
.uz-post-nav__inner{ display:flex; justify-content:space-between; gap:1rem; border-top:1px solid var(--uz-border); padding-top:1rem; }
.uz-post-nav__prev a, .uz-post-nav__next a{ color:var(--uz-text); text-decoration:none; }
.uz-post-nav__prev a:hover, .uz-post-nav__next a:hover{ color:var(--uz-accent-2); text-shadow:0 0 10px rgba(0,255,170,.35); }

/* ---------- Comments ---------- */
.comments-area{ margin:2rem 0 0; }
.comments-title{ font-size:clamp(1.2rem, 2.2vw, 1.5rem); margin:0 0 .75rem; text-shadow:0 0 12px rgba(0,255,170,.18); }
.comment-list{ list-style:none; padding:0; margin:0; display:grid; gap:1rem; }
.comment-body{
  background:linear-gradient(180deg, rgba(0,255,170,.06), rgba(0,255,170,.03));
  border:1px solid var(--uz-border); border-radius:16px; padding:1rem;
  display:grid; grid-template-columns:auto 1fr; gap:1rem; box-shadow:var(--uz-shadow);
}
.uz-comment__avatar img{ border-radius:50%; box-shadow:0 0 0 2px rgba(0,255,170,.15); }
.uz-comment__author{ font-weight:700; }
.uz-comment__time{ color:var(--uz-text-dim); font-size:.85rem; margin-left:.5rem; }
.uz-comment__text{ margin:.25rem 0 .5rem; }
.uz-comment__actions{ display:flex; gap:.6rem; font-size:.9rem; }
.uz-comment__reply a, .uz-comment__edit a{ color:var(--uz-accent-2); text-decoration:none; }
.uz-comment__reply a:hover, .uz-comment__edit a:hover{ text-decoration:underline; }
.comment-navigation{ display:flex; justify-content:space-between; margin-top:1rem; }
.no-comments{ color:var(--uz-text-dim); margin-top:.75rem; }

/* Comment form */
.uz-form{
  margin-top:1.1rem; display:grid; gap:.9rem;
  background:linear-gradient(180deg, rgba(0,255,170,.05), rgba(0,255,170,.02));
  border:1px solid var(--uz-border); border-radius:16px; padding:1rem; box-shadow:var(--uz-shadow);
}
.uz-field{ display:grid; gap:.4rem; }
.uz-input, .uz-textarea{
  width:100%; padding:.7rem .9rem; border-radius:12px;
  border:1px solid var(--uz-border); background:#0a1412; color:var(--uz-text);
}
.uz-textarea{ min-height:140px; }
.uz-input:focus, .uz-textarea:focus{
  outline:none; border-color:var(--uz-accent);
  box-shadow:0 0 0 3px rgba(0,255,170,.12), inset 0 0 12px rgba(0,255,170,.06);
}

/* ---------- Buttons ---------- */
.uz-button{ display:inline-flex; align-items:center; justify-content:center; gap:.5rem; padding:.65rem 1rem; border-radius:10px; text-decoration:none; font-weight:700; font-size:.95rem; border:1px solid var(--uz-border); color:var(--uz-text); }
.uz-button--neon{ background:linear-gradient(180deg, rgba(0,255,170,.18), rgba(0,255,170,.12)); box-shadow:0 0 24px rgba(0,255,170,.18); }
.uz-button--neon:hover{ border-color:var(--uz-accent); box-shadow:0 0 36px rgba(0,255,170,.26); }



/* === Single: centered hero variant === */
.uz-hero--article{ padding: 1.1rem 0 .5rem; }
.uz-hero--article .uz-breadcrumbs{ margin-bottom:.65rem; }
.uz-hero--article .uz-hero__media--frame{ margin: 0 auto .75rem; max-width: 860px; }
.uz-hero--article .uz-hero__aspect{ aspect-ratio: 16 / 9; max-height: min(54vh, 520px); }
.uz-hero--article .uz-hero__text--center{ text-align:center; }
.uz-hero--article .uz-hero__meta{ justify-content:center; }
.uz-hero--article .uz-hero__title--compact{
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  margin:.15rem 0 .35rem;
  text-shadow: 0 0 14px rgba(0,255,170,.18);
}
.uz-hero--article .uz-hero__excerpt{ max-width: 70ch; margin: 0 auto; }

/* Article card spacing tweaks */
.uz-article__card{ padding: clamp(1.1rem, 2.4vw, 1.35rem); }
.uz-article__body > * + *{ margin-top:.15rem; }

/* Gutenberg embeds & galleries */
.uz-article__body .wp-block-embed{ border:1px solid var(--uz-border); border-radius:12px; overflow:hidden; background:#08110f; }
.uz-article__body .wp-block-gallery{ gap:.6rem; }
.uz-article__body .wp-block-gallery .wp-block-image img{ border-radius:10px; }


/* ===== Centered layout fixes (v2.1) ===== */

/* Hero: keep everything in a centered column */
.uz-hero--article .uz-hero__wrap{
  width: min(100%, 980px);
  margin-inline: auto;
}
.uz-hero--article .uz-hero__media--frame{ margin-inline:auto; }
.uz-hero--article .uz-hero__aspect{
  aspect-ratio: 16/9;
  max-height: min(54vh, 520px);
}
.uz-hero--article .uz-hero__text{
  max-width: 980px;
  margin: .6rem auto 0;
  text-align: left;            /* readable, professional */
}
.uz-hero--article .uz-hero__meta{ justify-content:flex-start; }
.uz-hero--article .uz-hero__title--compact{
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin:.2rem 0 .35rem;
}

/* Article: centered two-column grid */
.uz-article__wrap{
  display: grid;
  grid-template-columns: minmax(0, 860px) 300px; /* main + aside */
  gap: clamp(1rem, 3vw, 2rem);
  justify-content: center; /* centers the whole grid inside container */
}
.uz-article__card{ max-width: 860px; margin-inline:auto; }
.uz-article__aside{ position: sticky; top: 90px; height: fit-content; }

@media (max-width: 1200px){
  .uz-article__wrap{ grid-template-columns: 1fr; }
  .uz-article__aside{ order: 2; max-width: 860px; margin: 0 auto; }
}

/* Slightly reduce giant H1 feeling on Single */
.uz-hero__title{ text-shadow: 0 0 12px rgba(0,255,170,.16); }
