/* =========================================================
   ARTICLE DETAIL (CLEAN) — Glass layout + hero + accordion
   CTA removed, tabs removed, close-panel removed
   Smaller typography, narrower centered layout
   ========================================================= */

:root{
  --bg0:#020617;
  --card:rgba(2,6,23,.42);
  --stroke:rgba(255,255,255,.10);
  --text:#e2e8f0;
  --muted:rgba(226,232,240,.70);
  --muted2:rgba(226,232,240,.55);
  --purple:#a855f7;
  --shadow:0 18px 60px rgba(0,0,0,.45);
  --r:22px;
}

/* Unified Dark Gradient Background for DARK mode only */
html[data-theme="dark"] body.article-detail-page {
  background: radial-gradient(1200px 600px at 15% 10%, rgba(168,85,247,.22), transparent 45%),
              radial-gradient(900px 500px at 60% 0%, rgba(59,130,246,.10), transparent 55%),
              var(--bg0);
  background-attachment: fixed;
  color: var(--text);
}

/* Light Mode (Default) */
body.article-detail-page {
  background: #f8fafc;
  color: #1e293b;
  font-family: Manrope, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  min-height: 100vh;
}


/* ====== TOP HERO (text left / image right) ====== */

.blog-hero{
  padding: 32px 28px 24px;
}

.blog-hero__inner{
  max-width: 1320px;              /* narrower + centered */
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 40px;
  align-items: center;
}

.blog-hero__meta{
  display:flex;
  align-items:center;
  gap: 14px;
  margin-bottom: 14px;
}

.blog-hero__pill{
  display:inline-flex;
  align-items:center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,.1);
  background: rgba(17,24,39,.05);
  color: rgba(17,24,39,0.95);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-shadow: none;
  box-shadow: none;
}

html[data-theme="dark"] .blog-hero__pill {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.blog-hero__date{
  color: rgba(17,24,39,0.8);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-shadow: none;
}

html[data-theme="dark"] .blog-hero__date {
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.blog-hero__left{
  position: relative;
  z-index: 1;
}

/* Page Transition State */
body.is-transitioning .page-wrap {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-wrap {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.blog-hero__left::before{
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(148, 163, 184, 0.4) 0%, rgba(148, 163, 184, 0.15) 50%, transparent 70%);
  transform: translate(-50%, -50%);
  filter: blur(80px);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: -1;
  opacity: 0.8;
}

.blog-hero__title{
  margin: 0;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: .92;
  font-family: 'Impact', 'Anton', 'Oswald', system-ui, sans-serif;
  font-size: clamp(44px, 4.7vw, 86px);
  color: rgba(17,24,39,.98);
}

html[data-theme="dark"] .blog-hero__title {
  color: rgba(241,245,249,.98);
}

/* Alternating title colors for different articles */
/* Default is WHITE (set in .blog-hero__title) */

/* BLACK TITLES (2nd, 4th, 6th, 8th) */
body[data-article="brzina-web-stranice"] .blog-hero__title,
body[data-article="interno-linkanje"] .blog-hero__title,
body[data-article="najcesce-seo-pogreske"] .blog-hero__title,
body[data-article="tehnicka-seo-optimizacija"] .blog-hero__title {
  color: rgba(17,24,39,.98);
}

.blog-hero__subtitle{
  margin: 16px 0 0;
  max-width: 58ch;
  font-size: 16px;                /* smaller */
  line-height: 1.7;
  color: rgba(51,65,85,0.95);
  text-shadow: none;
}

html[data-theme="dark"] .blog-hero__subtitle {
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.5);
}

.blog-hero__actions{
  margin-top: 22px;
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-hero__chip,
.blog-hero__share{
  display:inline-flex;
  align-items:center;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,.1);
  background: rgba(17,24,39,.05);
  color: rgba(17,24,39,0.95);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: none;
  box-shadow: none;
}

html[data-theme="dark"] .blog-hero__chip,
html[data-theme="dark"] .blog-hero__share {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.blog-hero__chip--ghost{
  background: rgba(255,255,255,.02);
}

.blog-hero__share{
  background: rgba(255,255,255,.02);
  color: var(--purple);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  text-shadow: none;
}

.blog-hero__share:hover{
  background: rgba(168,85,247,.12);
  border-color: rgba(168,85,247,.5);
  transform: translateY(-1px);
}

.blog-hero__right{
  display:flex;
  justify-content:flex-end;
}

.blog-hero__image{
  width: min(640px, 100%);         /* slightly smaller */
  height: auto;
  display:block;
  object-fit: cover;
  filter: drop-shadow(0 22px 70px rgba(0,0,0,.55));
  border-radius: 22px;
}

@media (max-width: 1024px){
  .blog-hero{ padding: 28px 18px 18px; }
  .blog-hero__inner{ grid-template-columns: 1fr; gap: 22px; }
  .blog-hero__right{ justify-content:flex-start; order: -1; }
}

/* ====== MAIN GRID (accordion + right nav) ====== */

.ad-page{
  padding: 18px 28px 110px;
}

.ad-shell{
  max-width: 1320px;              /* centered + narrower */
  margin: 0 auto;
  display:grid;
  grid-template-columns: minmax(0, 1fr) 360px; /* narrower right column */
  gap: 18px;
  align-items:start;
}

@media (max-width: 980px){
  .ad-page{ padding: 14px 18px 90px; }
  .ad-shell{ grid-template-columns: 1fr; }
}

/* ====== Glass Card Container ====== */
.ad-card{
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--r);
  box-shadow: 0 10px 40px rgba(0,0,0,0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html[data-theme="dark"] .ad-card {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

/* ====== Accordion (left) ====== */

.ad-accordion{
  padding: 12px;
}

.ad-acc{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

html[data-theme="dark"] .ad-acc {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}

.ad-acc[open]{
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.25);
}

.ad-acc + .ad-acc{
  margin-top: 12px;
}

.ad-acc__summary{
  list-style: none;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px;
  color: rgba(17,24,39,.94);
  font-weight: 850;
  font-size: 18px;
}

.ad-acc__summary::-webkit-details-marker{ display:none; }

.ad-acc__chev{
  position: relative;
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.ad-acc__chev::before,
.ad-acc__chev::after{
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background-color: rgba(168, 85, 247, 0.85);
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
}

.ad-acc__chev::after{
  transform: translate(-50%, -50%) rotate(90deg);
}

details[open] .ad-acc__chev::after{
  transform: translate(-50%, -50%) rotate(0deg);
}

.ad-acc__body{
  padding: 0 18px 0 18px;
  color: #1e293b;
  font-size: 15px;               /* smaller body */
  line-height: 1.85;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out, opacity 0.3s ease;
  text-shadow: none;
}

html[data-theme="dark"] .ad-acc__body {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.5);
}

.ad-acc__body p,
.ad-acc__body li,
.ad-acc__body h3,
.ad-acc__body a {
  color: #334155;
  text-shadow: none;
}

html[data-theme="dark"] .ad-acc__body p,
html[data-theme="dark"] .ad-acc__body li,
html[data-theme="dark"] .ad-acc__body h3,
html[data-theme="dark"] .ad-acc__body a {
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.5);
}

.ad-acc[open] .ad-acc__body{
  padding: 0 18px 18px 18px;
  opacity: 1;
  max-height: 2000px;
}

.ad-acc__body p{
  margin: 12px 0 0;
}

.ad-acc__body h3{
  margin: 16px 0 6px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

html[data-theme="dark"] .ad-acc__body h3 {
  color: rgba(226,232,240,.90) !important;
}

.ad-acc__body ul{
  margin: 10px 0 0 18px;
  padding: 0;
}

.ad-acc__body li{
  margin: 6px 0;
}

.ad-acc__body a{
  color: #a855f7 !important;
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  text-shadow: none;
}

html[data-theme="dark"] .ad-acc__body a {
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.5);
}

.ad-acc__body a::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.9); /* Enhanced glow */
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.ad-acc__body a:hover::after{
  background: #d8b4fe;
  box-shadow: 0 0 12px rgba(168, 85, 247, 1);
}

/* ====== Right column sticky ====== */

.ad-aside{
  position: sticky;
  top: 18px;
}

@media (max-width: 980px){
  .ad-aside{ position: static; }
}

/* ====== Članci card (right nav) ====== */

.ad-articles{
  padding: 12px 12px 14px;
  position: relative;
  --progress-ratio: 0;
}

/* top grey progress bar with animated fill */
.ad-articles::before{
  content:"";
  position:absolute;
  top: 10px; left: 12px; right: 12px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  z-index: 1;
}

.ad-articles::after{
  content:"";
  position:absolute;
  top: 10px; left: 12px;
  height: 6px;
  width: calc((100% - 24px) * var(--progress-ratio, 0));
  border-radius: 999px;
  background: #c084fc !important;
  box-shadow: 
    0 0 6px rgba(168, 85, 247, 0.6),
    0 0 12px rgba(168, 85, 247, 0.4) !important;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
}


.ad-articles__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 8px 10px;
}

.ad-articles__title{
  margin: 0;
  font-size: 20px;              /* smaller */
  font-weight: 900;
  color: #1e293b;
  letter-spacing: -0.01em;
}

html[data-theme="dark"] .ad-articles__title {
  color: rgba(226,232,240,.95);
}



/* inner box */
.ad-articles__box{
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.06);
  background: #ffffff;
  padding: 10px;
}

html[data-theme="dark"] .ad-articles__box {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
}

.ad-articles__nav{
  display:flex;
  flex-direction: column;
  gap: 7px;                     /* ~25% tighter than 10px */
}

/* Link row */
.ad-article-link{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 10px;           /* tighter */
  border-radius: 14px;
  text-decoration:none;
  color: #64748b;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
  font-weight: 750;
  font-size: 13.5px;            /* smaller */
}

html[data-theme="dark"] .ad-article-link {
  color: rgba(226,232,240,.78);
}

.ad-article-link:hover{
  background: rgba(0,0,0,.04);
  transform: translateY(-1px);
}

html[data-theme="dark"] .ad-article-link:hover {
  background: rgba(255,255,255,.03);
}

/* circles 20% smaller */
.ad-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 2px solid rgba(100, 116, 139, 0.4);
  background: transparent;
  box-shadow: none;
  flex: 0 0 auto;
}

html[data-theme="dark"] .ad-dot {
  border: 2px solid rgba(226,232,240,.24);
  box-shadow: 0 0 0 4px rgba(0,0,0,.10);
}

/* active */
.ad-article-link.is-active{
  background: rgba(168,85,247,.1) !important;
  border-color: rgba(168,85,247,.3) !important;
  color: #7e22ce !important;
}

html[data-theme="dark"] .ad-article-link.is-active {
  background: rgba(168,85,247,.18) !important;
  border-color: rgba(168,85,247,.35) !important;
  color: rgba(226,232,240,.95) !important;
}

.ad-article-link.is-active .ad-dot{
  border-color: #a855f7 !important;
  background: #a855f7 !important;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.25), 0 0 16px rgba(168, 85, 247, 0.7) !important;
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse{
  0%, 100% { box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.25), 0 0 12px rgba(168, 85, 247, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(168, 85, 247, 0.35), 0 0 16px rgba(168, 85, 247, 0.8); }
}


/* =========================================================
   DARK MODE FIXES
   ========================================================= */

html[data-theme="dark"] .blog-hero__title,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
  color: #ffffff !important;
}

html[data-theme="dark"] .ad-acc__summary {
  color: #ffffff !important;
}
