/* ============================================================
   Karsen Elektrik — Blog Shared CSS
   Tüm blog sayfalarında ortak kullanılan stiller.
   Nav → navbar.js, Footer → footer.js tarafından yönetilir.
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg: #FFFFFF; --bg-soft: #F5F7FA; --bg-alt: #EEF1F6;
  --bg-dark: #0F1923; --bg-dark2: #1A2738;
  --accent: #B62126; --accent-h: #9A1B1F; --accent-bg: #FEF0F0;
  --tx-1: #0F1923; --tx-2: #3A4557; --tx-3: #6B7A90; --tx-inv: #FFFFFF;
  --bd: #E2E6EC; --bd-md: #C8CDD6;
  --sh-sm: 0 1px 3px rgba(15,25,35,.08),0 1px 2px rgba(15,25,35,.04);
  --sh-md: 0 4px 12px rgba(15,25,35,.10),0 2px 4px rgba(15,25,35,.06);
  --sh-lg: 0 16px 40px rgba(15,25,35,.14),0 4px 10px rgba(15,25,35,.08);
  --ff-d: 'Barlow Condensed', sans-serif;
  --ff-b: 'Inter', sans-serif;
  --r: 8px;
  --tr: 250ms cubic-bezier(.4,0,.2,1);
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--ff-b);
  color: var(--tx-2);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}

/* ── PROGRESS BAR ───────────────────────────────────────── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--accent); z-index: 9999; width: 0%;
  transition: width .1s linear;
}

/* ── ARTICLE HERO ───────────────────────────────────────── */
.article-hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
  min-height: 640px;
  display: flex;
  align-items: flex-end;
}

/* Kırmızı radyal glow — sol alt */
.article-hero::before {
  content: '';
  position: absolute;
  bottom: -80px; left: -100px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(182,33,38,.22) 0%, transparent 65%);
  z-index: 1; pointer-events: none;
}

/* Aksent çizgisi — alt kenarda */
.article-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(to right, var(--accent) 0%, transparent 55%);
  z-index: 5;
}

/* Cover image — tam arka plan olarak */
.cover-image {
  position: absolute;
  inset: 0; z-index: 0;
}
.cover-image::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(105deg, rgba(15,25,35,.97) 0%, rgba(15,25,35,.75) 45%, rgba(15,25,35,.35) 100%),
    linear-gradient(to top, rgba(15,25,35,1) 0%, rgba(15,25,35,.5) 40%, transparent 70%);
}
.cover-image img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: saturate(.55) brightness(.7);
}

/* Hero inner — metinler */
.article-hero-inner {
  position: relative; z-index: 3;
  max-width: 960px; width: 100%;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.breadcrumb a,
.breadcrumb span { font-size: 13px; color: rgba(255,255,255,.38); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: rgba(255,255,255,.75); }
.breadcrumb .sep { color: rgba(255,255,255,.18); }
.breadcrumb .current { color: rgba(255,255,255,.55); }

/* Tags */
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.article-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 6px;
  backdrop-filter: blur(6px);
}
.tag-brand  { background: rgba(182,33,38,.28); color: #F87171; border: 1px solid rgba(182,33,38,.45); }
.tag-green  { background: rgba(74,222,128,.15); color: #4ADE80; border: 1px solid rgba(74,222,128,.3); }
.tag-blue   { background: rgba(59,130,246,.15);  color: #60A5FA; border: 1px solid rgba(59,130,246,.3); }
.tag-yellow { background: rgba(234,179,8,.15);   color: #FACC15; border: 1px solid rgba(234,179,8,.3); }

/* Title */
.article-title {
  font-family: var(--ff-d);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800; color: #fff;
  line-height: 1.06; letter-spacing: -.015em;
  margin-bottom: 32px;
  text-shadow: 0 2px 24px rgba(0,0,0,.5);
  max-width: 780px;
}

/* Meta bar — glass pill */
.article-meta-bar {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 13px 20px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 100px;
  flex-wrap: wrap;
}
.author-chip { display: flex; align-items: center; gap: 10px; }
.author-avatar {
  width: 34px; height: 34px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-d); font-weight: 900; font-size: 14px;
  color: #fff; border-radius: 50%; flex-shrink: 0;
}
.author-name  { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); line-height: 1.2; }
.author-date  { font-size: 11px; color: rgba(255,255,255,.45); }
.meta-sep     { height: 18px; width: 1px; background: rgba(255,255,255,.15); }
.meta-item    { font-size: 12px; color: rgba(255,255,255,.5); }

/* ── ARTICLE LAYOUT ─────────────────────────────────────── */
.article-layout {
  max-width: 1280px; margin: 0 auto;
  padding: 60px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
}
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none !important; }
}

/* ── PROSE ──────────────────────────────────────────────── */
.prose { max-width: 720px; }

.prose h2 {
  font-family: var(--ff-d);
  font-size: clamp(26px,3vw,36px); font-weight: 800;
  color: var(--tx-1); line-height: 1.05;
  margin-top: 52px; margin-bottom: 18px;
  padding-top: 48px; border-top: 1px solid var(--bd);
}
.prose h2:first-of-type { border-top: none; padding-top: 0; margin-top: 32px; }

.prose h3 {
  font-family: var(--ff-d);
  font-size: clamp(20px,2.5vw,26px); font-weight: 700;
  color: var(--tx-1); line-height: 1.15; margin-top: 32px; margin-bottom: 12px;
}

.prose p { font-size: 16px; color: var(--tx-2); line-height: 1.75; margin-bottom: 20px; }
.prose p strong { color: var(--tx-1); }

.prose ul {
  list-style: none; padding: 0; margin-bottom: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.prose ul li {
  font-size: 15px; color: var(--tx-2); line-height: 1.7;
  padding-left: 20px; position: relative;
}
.prose ul li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 7px; height: 2px; background: var(--accent); border-radius: 1px;
}
.prose ul li strong { color: var(--tx-1); }

.prose ol {
  list-style: none; counter-reset: list; padding: 0; margin-bottom: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.prose ol li {
  counter-increment: list; font-size: 15px; color: var(--tx-2);
  line-height: 1.7; padding-left: 36px; position: relative;
}
.prose ol li::before {
  content: counter(list); position: absolute; left: 0; top: 0;
  font-family: var(--ff-d); font-weight: 800; font-size: 18px;
  color: var(--accent); line-height: 1.45;
}
.prose ol li strong { color: var(--tx-1); }

.prose a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid rgba(182,33,38,.3);
  transition: border-color var(--tr);
}
.prose a:hover { border-color: var(--accent); }

/* ── CALLOUT ────────────────────────────────────────────── */
.callout {
  background: var(--accent-bg); border-left: 3px solid var(--accent);
  padding: 20px 24px; margin-bottom: 24px;
  border-radius: 0 var(--r) var(--r) 0;
}
.callout p { margin-bottom: 0; font-size: 15px; color: var(--tx-2); }
.callout.tip { background: #F0FDF4; border-color: #22C55E; }
.callout.tip .callout-label { color: #16A34A; }
.callout-label {
  font-size: 10px; font-weight: 800; letter-spacing: .15em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px; display: block;
}

/* ── TABLE ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto; margin-bottom: 28px;
  border-radius: var(--r); border: 1px solid var(--bd);
}
.comparison-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.comparison-table th {
  background: var(--bg-alt); border-bottom: 2px solid var(--bd-md);
  padding: 12px 16px;
  font-family: var(--ff-d); font-size: 14px; font-weight: 700;
  color: var(--tx-1); text-align: left;
  letter-spacing: .04em; white-space: nowrap;
}
.comparison-table th:first-child { color: var(--accent); }
.comparison-table td {
  border-bottom: 1px solid var(--bd); padding: 12px 16px;
  color: var(--tx-2); vertical-align: top; line-height: 1.6;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: var(--bg-soft); }
.comparison-table .highlight td { background: var(--bg-soft); }

/* ── ARTICLE CTA BOX ────────────────────────────────────── */
.article-cta-box {
  position: relative; overflow: hidden;
  background: var(--bg-dark);
  border-radius: 16px; padding: 40px 44px;
  margin-top: 56px;
  border: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center;
  justify-content: space-between; gap: 40px;
}
/* Kırmızı sol aksent çizgisi */
.article-cta-box::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent);
}
/* Arka plan glow */
.article-cta-box::after {
  content: '';
  position: absolute; left: -60px; top: -60px; z-index: 0;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(182,33,38,.14) 0%, transparent 65%);
  pointer-events: none;
}
.article-cta-body { flex: 1; position: relative; z-index: 1; }
.article-cta-label {
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px; display: block;
}
.article-cta-title {
  font-family: var(--ff-d); font-size: 26px; font-weight: 800;
  color: #FFFFFF; margin-bottom: 8px; line-height: 1.1; letter-spacing: -.015em;
}
.article-cta-box .article-cta-desc { font-size: 14px; color: rgba(255,255,255,.68); line-height: 1.7; }
.article-cta-btns {
  display: flex; flex-direction: column; gap: 10px;
  flex-shrink: 0; position: relative; z-index: 1;
}

.btn-cta-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff !important;
  font-family: var(--ff-b); font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 13px 28px; border-radius: var(--r);
  text-decoration: none; white-space: nowrap;
  transition: background 200ms ease, box-shadow 200ms ease;
  border: 1px solid transparent;
}
.btn-cta-primary:hover {
  background: var(--accent-h);
  box-shadow: 0 4px 16px rgba(182,33,38,.4);
}

.btn-cta-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: #4ADE80 !important;
  font-family: var(--ff-b); font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 12px 28px; border-radius: var(--r);
  text-decoration: none;
  border: 1px solid rgba(74,222,128,.3);
  white-space: nowrap;
  transition: background 200ms ease, border-color 200ms ease;
}
.btn-cta-wa:hover {
  background: rgba(74,222,128,.08);
  border-color: rgba(74,222,128,.55);
}

@media (max-width: 768px) {
  .article-cta-box { flex-direction: column; padding: 32px 28px; gap: 28px; }
  .article-cta-btns { flex-direction: row; width: 100%; }
  .btn-cta-primary, .btn-cta-wa { flex: 1; }
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.article-sidebar { position: sticky; top: 88px; }

.toc-box {
  background: var(--bg-soft); border: 1px solid var(--bd);
  border-radius: 12px; padding: 24px; margin-bottom: 20px;
}
.toc-title {
  font-size: 10px; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--tx-3); margin-bottom: 14px;
}
.toc-link {
  display: block; font-size: 13px; color: var(--tx-3);
  padding: 6px 0 6px 14px; border-left: 2px solid var(--bd);
  text-decoration: none;
  transition: color var(--tr), border-color var(--tr);
}
.toc-link:hover { color: var(--accent); border-color: var(--accent); }
.toc-link.active { color: var(--accent); border-color: var(--accent); font-weight: 600; }

.sidebar-cta {
  position: relative; overflow: hidden;
  background: var(--bg-dark);
  border-radius: 12px; padding: 24px; margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.08);
  border-top: 2px solid var(--accent);
}
.sidebar-cta::before {
  content: '';
  position: absolute; top: -50px; right: -30px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(182,33,38,.18) 0%, transparent 65%);
  pointer-events: none;
}
.sidebar-cta-title {
  font-family: var(--ff-d); font-size: 20px; font-weight: 800;
  color: #fff; margin-bottom: 8px; line-height: 1.1;
  letter-spacing: -.01em; position: relative;
}
.sidebar-cta-desc {
  font-size: 13px; color: rgba(255,255,255,.45);
  margin-bottom: 18px; line-height: 1.65; position: relative;
}
.sidebar-cta-btn {
  display: block; background: var(--accent);
  color: #fff; text-align: center;
  padding: 11px 16px; font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; border-radius: 8px;
  transition: background 200ms ease, box-shadow 200ms ease;
  position: relative;
}
.sidebar-cta-btn:hover {
  background: var(--accent-h);
  box-shadow: 0 4px 14px rgba(182,33,38,.4);
}

/* ── RELATED ARTICLES ───────────────────────────────────── */
.related-section {
  background: var(--bg-soft); padding: 120px 0;
  border-top: 1px solid var(--bd);
}
.related-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.related-title {
  font-family: var(--ff-d);
  font-size: clamp(26px,3.5vw,36px); font-weight: 800;
  color: var(--tx-1); margin-bottom: 32px;
}
.related-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }

.related-card {
  background: var(--bg); border: 1px solid var(--bd);
  border-radius: 12px; overflow: hidden;
  text-decoration: none; color: inherit; display: block;
  transition: box-shadow var(--tr), transform var(--tr);
}
.related-card:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }

.related-card-img { width: 100%; height: 200px; overflow: hidden; }
.related-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 400ms cubic-bezier(.4,0,.2,1);
}
.related-card:hover .related-card-img img { transform: scale(1.05); }

.related-card-body { padding: 20px 22px 22px; }
.related-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-bg);
  padding: 3px 8px; border-radius: 4px; margin-bottom: 10px;
}
.related-card-title {
  font-family: var(--ff-d); font-size: 20px; font-weight: 700;
  color: var(--tx-1); margin-bottom: 6px; line-height: 1.15;
}
.related-card-meta { font-size: 12px; color: var(--tx-3); }

@media (max-width: 600px) {
  .related-grid { grid-template-columns: 1fr; }
  .related-inner { padding: 0 16px; }
  .article-hero-inner { padding: 0 16px 40px; }
  .article-layout { padding: 40px 16px 60px; max-width: 100%; }
  .prose { max-width: 100%; }
  .prose h2 { font-size: 22px; }
  .article-hero::before { left: 0; width: 220px; height: 220px; bottom: -40px; }
  .article-hero { min-height: 520px; }
}

/* ── BLOG LIST — Kart Grid (blog/index.html + kategori sayfaları) ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  background: var(--bg); border: 1px solid var(--bd); border-radius: 12px;
  overflow: hidden; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: box-shadow var(--tr), transform var(--tr);
}
.blog-card:hover { box-shadow: var(--sh-lg); transform: translateY(-3px); }

.blog-card-img {
  aspect-ratio: 16/9; overflow: hidden; flex-shrink: 0;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
}
.blog-card-img img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  transition: transform 400ms cubic-bezier(.4,0,.2,1);
}
.blog-card:hover .blog-card-img img { transform: scale(1.04); }

.blog-card-body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }

.blog-card-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 4px; margin-bottom: 10px;
  width: fit-content;
}

.blog-card-title {
  font-family: var(--ff-d); font-size: 20px; font-weight: 700;
  color: var(--tx-1); margin-bottom: 8px; line-height: 1.15;
}

.blog-card-desc {
  font-size: 14px; color: var(--tx-3); line-height: 1.6; flex: 1;
  margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

.blog-card-meta {
  font-size: 12px; color: var(--tx-3);
  display: flex; align-items: center; gap: 6px; margin-top: auto;
}
.blog-card-meta-sep { opacity: .4; }

/* ── FEATURED — Öne çıkan büyük kart ── */
.blog-featured {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--bd); border-radius: 16px; overflow: hidden;
  box-shadow: var(--sh-md); text-decoration: none; color: inherit;
  transition: box-shadow var(--tr), transform var(--tr);
}
.blog-featured:hover { box-shadow: var(--sh-lg); transform: translateY(-3px); }

.blog-featured-img { position: relative; overflow: hidden; }
.blog-featured-img img {
  width: 100%; height: 100%; min-height: 340px;
  object-fit: cover; display: block;
  transition: transform 400ms cubic-bezier(.4,0,.2,1);
}
.blog-featured:hover .blog-featured-img img { transform: scale(1.04); }
.blog-featured-badge {
  position: absolute; top: 20px; left: 20px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 4px;
}

.blog-featured-body {
  padding: 48px 44px; display: flex; flex-direction: column; justify-content: center;
}

.blog-featured-title {
  font-family: var(--ff-d); font-size: clamp(26px,2.5vw,36px); font-weight: 800;
  color: var(--tx-1); line-height: 1.1; margin: 12px 0 14px;
}

.blog-featured-desc {
  font-size: 15px; color: var(--tx-2); line-height: 1.7; margin-bottom: 22px; flex: 1;
}

.blog-featured-read {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 700; font-size: 15px;
  text-decoration: none; transition: gap var(--tr); width: fit-content;
}
.blog-featured:hover .blog-featured-read { gap: 14px; }

@media (max-width: 768px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-body { padding: 28px 24px; }
  .blog-featured-img img { min-height: 220px; }
}
