/* ============================================================
   EcoReuse – blog.css  (shared across all Blog/ pages)
   ============================================================ */

/* ── HERO ── */
.blog-hero {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
  color: white;
  padding: 80px 0 70px;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

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

.blog-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.blog-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.blog-hero-date { color: rgba(255,255,255,0.75); font-size: 0.85rem; }

.blog-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
  max-width: 700px;
}

.blog-hero-lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.88);
  max-width: 620px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.blog-hero-author { display: flex; align-items: center; gap: 12px; }

.blog-hero-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,0.4);
}

.blog-hero-avatar .material-icons { font-size: 22px; color: white; }
.blog-hero-author-info strong { display: block; font-size: 0.88rem; color: white; }
.blog-hero-author-info span   { font-size: 0.78rem; color: rgba(255,255,255,0.7); }

/* ── READ PROGRESS BAR ── */
#read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #2ecc71, #27ae60);
  width: 0%;
  z-index: 2000;
  transition: width 0.1s linear;
}

/* ── LAYOUT ── */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
  padding: 64px 0 80px;
}

@media (max-width: 960px) {
  .blog-sidebar { display: none; }
  .blog-layout  { grid-template-columns: 1fr; gap: 40px; }
}

/* ── PROSE ── */
.blog-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 44px 0 14px;
  padding-top: 8px;
  letter-spacing: -0.3px;
}

.blog-content h3  { font-size: 1.1rem; font-weight: 700; color: #2e7d32; margin: 28px 0 10px; }
.blog-content p   { color: #444; font-size: 1rem; line-height: 1.8; margin-bottom: 18px; }
.blog-content strong { color: #222; }
.blog-content a   { color: #2e7d32; text-decoration: underline; text-decoration-color: rgba(46,125,50,0.4); }
.blog-content a:hover { text-decoration-color: #2e7d32; }

/* ── STEPS ── */
.steps-list { list-style: none; padding: 0; margin: 24px 0 36px; counter-reset: step; }

.step-item { display: flex; gap: 18px; margin-bottom: 20px; align-items: flex-start; }

.step-num {
  counter-increment: step;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #2e7d32;
  color: white;
  font-size: 0.85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}

.step-body strong { display: block; font-size: 0.95rem; font-weight: 700; color: #222; margin-bottom: 4px; }
.step-body p { font-size: 0.88rem !important; color: #666 !important; line-height: 1.6 !important; margin: 0 !important; }

/* ── CODE BLOCK ── */
.code-block {
  background: #1a1a2e;
  border-radius: 10px;
  padding: 20px 22px;
  margin: 20px 0 28px;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.85rem;
  color: #a8ff78;
  overflow-x: auto;
  position: relative;
  line-height: 1.7;
}

.code-block .code-label {
  position: absolute; top: 10px; right: 14px;
  font-size: 0.7rem; font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.8px;
}

.code-block span.cmd     { color: #78d1ff; }
.code-block span.comment { color: rgba(255,255,255,0.3); font-style: italic; }
.code-block span.flag    { color: #ffcc70; }

/* ── INFO BOXES ── */
.info-box {
  display: flex; gap: 14px;
  padding: 16px 18px; border-radius: 10px;
  margin: 24px 0; align-items: flex-start;
}

.info-box.tip  { background: #eaf5ea; border-left: 4px solid #2e7d32; }
.info-box.warn { background: #fff8e1; border-left: 4px solid #f9a825; }
.info-box.note { background: #e3f2fd; border-left: 4px solid #1976d2; }

.info-box .material-icons { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.info-box.tip  .material-icons { color: #2e7d32; }
.info-box.warn .material-icons { color: #f9a825; }
.info-box.note .material-icons { color: #1976d2; }

.info-box p { font-size: 0.88rem !important; color: #444 !important; line-height: 1.6 !important; margin: 0 !important; }
.info-box strong { color: #222 !important; }

/* ── TABLES (shared base) ── */
.req-table,
.accept-table,
.curriculum-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 32px;
  font-size: 0.88rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.req-table th,
.accept-table th,
.curriculum-table th {
  background: #2e7d32; color: white;
  padding: 11px 14px; text-align: left;
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.3px;
}

.req-table td,
.accept-table td,
.curriculum-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  color: #444; vertical-align: middle;
}

.req-table tr:last-child td,
.accept-table tr:last-child td,
.curriculum-table tr:last-child td { border-bottom: none; }

.req-table tr:nth-child(even) td,
.accept-table tr:nth-child(even) td,
.curriculum-table tr:nth-child(even) td { background: #fafafa; }

.req-ok  { color: #2e7d32; font-weight: 700; }
.req-min { color: #f9a825; font-weight: 700; }
.req-no  { color: #c0392b; font-weight: 700; }

/* ── IMPACT STATS ── */
.impact-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px; margin: 28px 0;
}

.impact-stat {
  background: #f7f9fb; border: 1.5px solid #e8f0e8;
  border-radius: 10px; padding: 16px 14px; text-align: center;
}

.impact-stat .impact-num   { font-size: 1.6rem; font-weight: 700; color: #2e7d32; line-height: 1; margin-bottom: 4px; }
.impact-stat .impact-label { font-size: 0.78rem; color: #777; line-height: 1.3; }

/* ── DISTRO CARDS (linux-instalacija) ── */
.distro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin: 28px 0 36px;
}

.distro-card {
  background: #f7f9fb; border: 1.5px solid #e8f0e8;
  border-radius: 12px; padding: 20px 18px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s; cursor: default;
}

.distro-card:hover { border-color: #a5d6a7; box-shadow: 0 4px 16px rgba(46,125,50,0.1); transform: translateY(-2px); }

.distro-card-icon { width: 40px; height: 40px; margin-bottom: 12px; display: flex; align-items: center; }
.distro-card-icon svg { width: 36px; height: 36px; display: block; }
.distro-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; color: #222; }
.distro-card p  { font-size: 0.8rem !important; color: #777 !important; line-height: 1.5 !important; margin: 0 !important; }

.distro-badge { display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 700; background: #eaf5ea; color: #2e7d32; }

.distro-de-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 6px; }

.de-tag { font-size: 0.68rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; letter-spacing: 0.3px; }
.de-xfce     { background: #e8f4f8; color: #2980b9; }
.de-cinnamon { background: #fef0e8; color: #c0392b; }
.de-mate     { background: #e8f5e9; color: #388e3c; }
.de-gnome    { background: #f3e5f5; color: #7b1fa2; }
.de-kde      { background: #e3f2fd; color: #1565c0; }
.de-any      { background: #f5f5f5; color: #666; }

/* ── DONOR CARDS (prikupljanje-uredaja) ── */
.donor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin: 28px 0 36px;
}

.donor-card {
  background: #f7f9fb; border: 1.5px solid #e8f0e8;
  border-radius: 12px; padding: 22px 18px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.donor-card:hover { border-color: #a5d6a7; box-shadow: 0 4px 16px rgba(46,125,50,0.1); transform: translateY(-2px); }

.donor-card-icon { width: 44px; height: 44px; border-radius: 10px; background: #eaf5ea; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.donor-card-icon .material-icons { font-size: 24px; color: #2e7d32; }
.donor-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; color: #222; }
.donor-card p  { font-size: 0.82rem !important; color: #777 !important; line-height: 1.5 !important; margin: 0 !important; }

.status-ok  { color: #2e7d32; font-weight: 700; }
.status-no  { color: #c0392b; font-weight: 700; }
.status-ask { color: #f9a825; font-weight: 700; }

/* ── TOOL CARDS (obnova-hardvera) ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin: 24px 0 32px;
}

.tool-card {
  background: #f7f9fb; border: 1.5px solid #e8f0e8;
  border-radius: 10px; padding: 16px 14px;
  display: flex; align-items: flex-start; gap: 12px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.tool-card:hover { border-color: #a5d6a7; box-shadow: 0 4px 12px rgba(46,125,50,0.09); }

.tool-card-icon { width: 36px; height: 36px; border-radius: 8px; background: #eaf5ea; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tool-card-icon .material-icons { font-size: 20px; color: #2e7d32; }
.tool-card-text strong { display: block; font-size: 0.84rem; font-weight: 700; color: #222; margin-bottom: 2px; }
.tool-card-text span   { font-size: 0.76rem; color: #888; line-height: 1.4; }

/* ── WORKSHOP CARDS (edukacija-korisnika) ── */
.workshop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin: 28px 0 36px;
}

.workshop-card {
  background: #f7f9fb; border: 1.5px solid #e8f0e8;
  border-radius: 12px; padding: 22px 18px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.workshop-card:hover { border-color: #a5d6a7; box-shadow: 0 4px 16px rgba(46,125,50,0.1); transform: translateY(-2px); }

.workshop-card-icon { width: 44px; height: 44px; border-radius: 10px; background: #eaf5ea; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.workshop-card-icon .material-icons { font-size: 24px; color: #2e7d32; }
.workshop-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; color: #222; }
.workshop-card p  { font-size: 0.82rem !important; color: #777 !important; line-height: 1.5 !important; margin: 0 0 10px !important; }

.workshop-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.wmeta-tag { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #eaf5ea; color: #2e7d32; }

.level-badge    { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.72rem; font-weight: 700; }
.level-beginner { background: #e8f5e9; color: #2e7d32; }
.level-mid      { background: #e3f2fd; color: #1565c0; }
.level-advanced { background: #fce4ec; color: #c62828; }

/* ── GUIDE LIST (edukacija-korisnika) ── */
.guide-list { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 32px; }

.guide-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: #f7f9fb; border: 1.5px solid #e8f0e8;
  border-radius: 10px; text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.guide-item:hover { border-color: #a5d6a7; background: #f0f8f0; transform: translateX(3px); }

.guide-item-icon { width: 38px; height: 38px; border-radius: 8px; background: #eaf5ea; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.guide-item-icon .material-icons { font-size: 20px; color: #2e7d32; }
.guide-item-text strong { display: block; font-size: 0.88rem; font-weight: 700; color: #222; margin-bottom: 2px; }
.guide-item-text span   { font-size: 0.77rem; color: #888; }
.guide-item-arrow { margin-left: auto; color: #ccc; font-size: 18px; }
.guide-item:hover .guide-item-arrow { color: #2e7d32; }

/* ── SIDEBAR ── */
.blog-sidebar { position: sticky; top: 80px; }

.sidebar-card {
  background: white; border-radius: 12px;
  padding: 22px 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  margin-bottom: 20px; border: 1px solid #f0f0f0;
}

.sidebar-card-title {
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: #2e7d32; margin-bottom: 14px;
}

.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: 2px; }

.toc-list a {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 7px;
  font-size: 0.83rem; color: #555;
  text-decoration: none; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.toc-list a:hover  { background: #f0f5f0; color: #2e7d32; }
.toc-list a.active { background: #eaf5ea; color: #2e7d32; font-weight: 600; }

.toc-list a::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #c8e6c9; flex-shrink: 0; }
.toc-list a.active::before { background: #2e7d32; }

.share-btns { display: flex; flex-direction: column; gap: 8px; }

.share-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 8px;
  font-size: 0.83rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid #e8e8e8; background: white; color: #444;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
}

.share-btn:hover { background: #f0f5f0; border-color: #a5d6a7; color: #2e7d32; }
.share-btn .material-icons { font-size: 18px; }

.related-article {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid #f0f0f0; text-decoration: none;
}

.related-article:last-child { border-bottom: none; }

.related-article-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: #eaf5ea; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}

.related-article-icon .material-icons { font-size: 18px; color: #2e7d32; }
.related-article-text strong { display: block; font-size: 0.82rem; font-weight: 600; color: #333; line-height: 1.4; margin-bottom: 2px; transition: color 0.2s; }
.related-article:hover .related-article-text strong { color: #2e7d32; }
.related-article-text span { font-size: 0.75rem; color: #aaa; }

/* ── CTA ── */
.blog-cta {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  border-radius: 16px; padding: 48px 40px;
  text-align: center; color: white; margin: 0 0 64px;
}

.blog-cta h2 { font-size: 1.6rem; margin-bottom: 12px; }
.blog-cta p  { opacity: 0.88; margin-bottom: 24px; max-width: 480px; margin-left: auto; margin-right: auto; line-height: 1.6; }

.blog-cta .btn {
  background: white; color: #2e7d32;
  display: inline-block; padding: 12px 28px;
  border-radius: 8px; font-weight: 700; font-size: 0.95rem;
  text-decoration: none; transition: background 0.2s, transform 0.15s; margin: 4px;
}

.blog-cta .btn:hover { background: #f1f8e9; transform: translateY(-1px); }

.blog-cta .btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.6); }
.blog-cta .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: white; }

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

.dark .blog-content h2     { color: #eee; }
.dark .blog-content p      { color: #bbb; }
.dark .blog-content strong { color: #ddd; }

.dark .info-box.tip  { background: #1a2e1a; }
.dark .info-box.warn { background: #2a2200; }
.dark .info-box.note { background: #0d1e2e; }
.dark .info-box p    { color: #bbb !important; }
.dark .info-box strong { color: #ddd !important; }

.dark .step-body strong { color: #ddd; }
.dark .step-body p      { color: #999 !important; }

.dark .req-table th,
.dark .accept-table th,
.dark .curriculum-table th { background: #1b5e20; }

.dark .req-table td,
.dark .accept-table td,
.dark .curriculum-table td { color: #bbb; border-color: #2a2a2a; }

.dark .req-table tr:nth-child(even) td,
.dark .accept-table tr:nth-child(even) td,
.dark .curriculum-table tr:nth-child(even) td { background: #161616; }

.dark .impact-stat  { background: #1f1f1f; border-color: #2a2a2a; }
.dark .impact-label { color: #888; }

.dark .distro-card    { background: #1f1f1f; border-color: #2a2a2a; }
.dark .distro-card h4 { color: #ddd; }
.dark .de-xfce     { background: #0d2233; color: #64b5f6; }
.dark .de-cinnamon { background: #2d1010; color: #ef9a9a; }
.dark .de-mate     { background: #0d2010; color: #81c784; }
.dark .de-gnome    { background: #1a0d1f; color: #ce93d8; }
.dark .de-kde      { background: #0d1a2d; color: #90caf9; }
.dark .de-any      { background: #222;    color: #aaa; }

.dark .donor-card      { background: #1f1f1f; border-color: #2a2a2a; }
.dark .donor-card h4   { color: #ddd; }
.dark .donor-card-icon { background: #1a2e1a; }

.dark .tool-card            { background: #1f1f1f; border-color: #2a2a2a; }
.dark .tool-card-icon       { background: #1a2e1a; }
.dark .tool-card-text strong { color: #ddd; }
.dark .tool-card-text span   { color: #777; }

.dark .workshop-card        { background: #1f1f1f; border-color: #2a2a2a; }
.dark .workshop-card h4     { color: #ddd; }
.dark .workshop-card-icon   { background: #1a2e1a; }

.dark .guide-item            { background: #1f1f1f; border-color: #2a2a2a; }
.dark .guide-item:hover      { background: #1a2a1a; border-color: #2e7d32; }
.dark .guide-item-icon       { background: #1a2e1a; }
.dark .guide-item-text strong { color: #ddd; }
.dark .guide-item-text span   { color: #777; }
.dark .guide-item-arrow      { color: #444; }

.dark .sidebar-card { background: #1a1a1a; border-color: #2a2a2a; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.dark .toc-list a   { color: #aaa; }
.dark .toc-list a:hover  { background: #2a2a2a; }
.dark .toc-list a.active { background: #1a2e1a; }

.dark .share-btn       { background: #1a1a1a; border-color: #2a2a2a; color: #aaa; }
.dark .share-btn:hover { background: #222; border-color: #2e7d32; color: #2ecc71; }

.dark .related-article        { border-color: #2a2a2a; }
.dark .related-article-icon   { background: #1a2e1a; }
.dark .related-article-text strong { color: #ccc; }
