/* EGM Sunumu — Obiziz — Custom styles on top of corporate-clean theme */

/* === CONTRAST FIX: Override base.css light vars === */
body.tpl-egm,
body.tpl-egm .slide {
  --text-1: #0a2540;
  --text-2: #1e3355;
  --text-3: #334155;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f0f3f7;
  --border: rgba(10,37,64,.16);
}

/* Force strong contrast on all card text */
body.tpl-egm .card p,
body.tpl-egm .card .dim,
body.tpl-egm .dim {
  color: #1e3355 !important;
  font-size: 17px;
  line-height: 1.55;
}
body.tpl-egm .card h4 {
  color: #0a2540 !important;
  font-size: 19px;
  font-weight: 700;
}
/* Dark slide kartlarında metin rengi beyaz olmalı */
body.tpl-egm .slide.dark .card p,
body.tpl-egm .slide.dark .card .dim,
body.tpl-egm .slide.dark .dim {
  color: rgba(255,255,255,.88) !important;
  font-size: 17px;
  line-height: 1.6;
}
body.tpl-egm .slide.dark .card h4 {
  color: #ffffff !important;
  font-size: 19px;
  font-weight: 700;
}
body.tpl-egm .slide.dark .card h3 {
  color: #ffffff !important;
}
body.tpl-egm table.data td { color: #1e3355; }
body.tpl-egm .kicker { color: #1d4ed8 !important; font-weight: 800; }

/* EGM brand palette (subtle overrides) */
:root {
  --egm-navy: #0a2540;
  --egm-blue: #1d4ed8;
  --egm-blue-soft: #2563eb;
  --egm-gold: #C9A96E;
  --egm-red: #E30A17;
  --egm-bg: #ffffff;
  --egm-bg-soft: #f5f7fa;
  --egm-border: rgba(10,37,64,.12);
}

body.tpl-egm {
  font-size: 18px;
  background: var(--egm-bg);
  color: var(--egm-navy);
}

.tpl-egm .deck-header {
  position: absolute;
  top: 32px;
  left: 64px;
  right: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  z-index: 5;
}
.tpl-egm .deck-header .brand {
  font-weight: 700;
  color: var(--egm-navy);
  letter-spacing: .14em;
}
.tpl-egm .deck-header .brand-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--egm-gold);
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 2px;
}

.tpl-egm .deck-footer {
  position: absolute;
  bottom: 32px;
  left: 64px;
  right: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--text-3);
}

/* Slide base */
.tpl-egm .slide {
  padding: 88px 96px 80px;
}

/* H sizes */
.tpl-egm h1.title,
.tpl-egm .h1 {
  font-size: 64px;
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--egm-navy);
}
.tpl-egm h2.title,
.tpl-egm .h2 {
  font-size: 46px;
  line-height: 1.14;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--egm-navy);
}
.tpl-egm h3 {
  font-size: 26px;
  font-weight: 700;
  color: var(--egm-navy);
  line-height: 1.25;
}
.tpl-egm .kicker {
  font-size: 15px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--egm-blue);
  font-weight: 700;
  margin-bottom: 14px;
  display: block;
}
.tpl-egm .lede {
  font-size: 22px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 820px;
}
.tpl-egm .dim {
  color: #334155;
  font-size: 17px;
  line-height: 1.6;
}
.tpl-egm .mono { font-family: 'JetBrains Mono', 'SF Mono', monospace; }

/* Section number */
.tpl-egm .section-num {
  position: absolute;
  top: 88px;
  right: 96px;
  font-size: 96px;
  color: #f1f5f9;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* Divider */
.tpl-egm .divider {
  height: 3px;
  width: 64px;
  background: var(--egm-blue);
  margin: 18px 0 28px;
}
.tpl-egm .divider-gold {
  background: var(--egm-gold);
}

/* Cards */
.tpl-egm .card {
  background: #fff;
  border: 1px solid var(--egm-border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(10,37,64,.04), 0 6px 18px rgba(10,37,64,.04);
}
.tpl-egm .card h4 {
  font-size: 19px;
  font-weight: 700;
  color: var(--egm-navy);
  margin-bottom: 10px;
  line-height: 1.3;
}
.tpl-egm .card .num {
  font-size: 44px;
  font-weight: 800;
  color: var(--egm-blue);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -.02em;
}
.tpl-egm .card.accent {
  background: var(--egm-navy);
  color: #fff;
  border-color: var(--egm-navy);
}
.tpl-egm .card.accent h4, .tpl-egm .card.accent .num { color: #fff; }
.tpl-egm .card.accent .dim, .tpl-egm .card.accent p { color: rgba(255,255,255,.78); }
.tpl-egm .card.gold {
  border-color: var(--egm-gold);
  border-width: 2px;
}
.tpl-egm .card.gold .num { color: var(--egm-gold); }

/* Grid helpers */
.tpl-egm .grid { display: grid; gap: 18px; }
.tpl-egm .grid.g2 { grid-template-columns: 1fr 1fr; }
.tpl-egm .grid.g3 { grid-template-columns: repeat(3,1fr); }
.tpl-egm .grid.g4 { grid-template-columns: repeat(4,1fr); }
.tpl-egm .grid.g6 { grid-template-columns: repeat(6,1fr); gap:12px; }

/* Pills / badges */
.tpl-egm .pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--egm-bg-soft);
  color: var(--egm-navy);
  border: 1px solid var(--egm-border);
  letter-spacing: .04em;
}
.tpl-egm .pill.blue { background: var(--egm-blue); color: #fff; border-color: var(--egm-blue); }
.tpl-egm .pill.gold { background: var(--egm-gold); color: #fff; border-color: var(--egm-gold); }
.tpl-egm .pill.red  { background: var(--egm-red);  color: #fff; border-color: var(--egm-red); }
.tpl-egm .pill.outline { background: transparent; }

.tpl-egm .row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Metric blocks */
.tpl-egm .metric { display: flex; flex-direction: column; gap: 4px; }
.tpl-egm .metric .n {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  color: var(--egm-blue);
  letter-spacing: -0.03em;
}
.tpl-egm .metric .n.gold { color: var(--egm-gold); }
.tpl-egm .metric .n.navy { color: var(--egm-navy); }
.tpl-egm .metric .n.red  { color: var(--egm-red); }
.tpl-egm .metric .l { font-size: 15px; color: var(--text-2); font-weight: 500; }

/* Cover slide */
.tpl-egm .slide.cover {
  background: linear-gradient(135deg, #0a2540 0%, #1e3a5f 60%, #1d4ed8 120%);
  color: #fff;
  padding: 0;
}
.tpl-egm .slide.cover .cover-bg {
  position: absolute; inset: 0;
  background-image: url('img/cover-egm-shield.png');
  background-size: cover;
  background-position: center;
  opacity: 0.85;
  filter: saturate(.9);
}
.tpl-egm .slide.cover::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,31,68,.45) 0%, rgba(0,31,68,.88) 100%);
}
.tpl-egm .slide.cover > * { position: relative; z-index: 2; }
.tpl-egm .slide.cover .cover-content {
  position: absolute; left: 96px; right: 96px; bottom: 96px; z-index: 3;
}
.tpl-egm .slide.cover .cover-top {
  position: absolute; left: 96px; top: 80px; z-index: 3;
  display: flex; align-items: center; gap: 10px;
}
.tpl-egm .slide.cover h1 {
  color: #fff;
  font-size: 76px;
  line-height: 1.02;
  letter-spacing: -.025em;
  font-weight: 800;
  max-width: 1100px;
}
.tpl-egm .slide.cover .lede {
  color: rgba(255,255,255,.82);
  font-size: 21px;
  max-width: 900px;
  margin-top: 28px;
}
.tpl-egm .slide.cover .badge-row { display:flex; gap:12px; margin-top: 36px; }
.tpl-egm .slide.cover .badge-row .pill { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.95); }

/* Section divider slide */
.tpl-egm .slide.section-divider {
  background: var(--egm-navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tpl-egm .slide.section-divider h2 { color: #fff; font-size: 56px; }
.tpl-egm .slide.section-divider .kicker { color: var(--egm-gold); }
.tpl-egm .slide.section-divider .lede { color: rgba(255,255,255,.78); }
.tpl-egm .slide.section-divider .divider { background: var(--egm-gold); }

/* Quote block */
.tpl-egm .quote {
  font-size: 30px;
  line-height: 1.32;
  font-weight: 600;
  color: var(--egm-navy);
  border-left: 4px solid var(--egm-gold);
  padding-left: 24px;
  max-width: 900px;
  font-style: italic;
}
.tpl-egm .quote.dark { color: #fff; }

/* Table */
.tpl-egm table.data {
  width: 100%; border-collapse: collapse;
  font-size: 16px;
}
.tpl-egm table.data th,
.tpl-egm table.data td {
  border-bottom: 1px solid var(--egm-border);
  padding: 14px 16px;
  text-align: left;
  color: var(--text-2);
}
.tpl-egm table.data th {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--egm-navy);
  background: var(--egm-bg-soft);
}
.tpl-egm table.data td.num { font-weight: 700; color: var(--egm-navy); }
.tpl-egm table.data .ok  { color: #0e9f6e; font-weight: 600; }
.tpl-egm table.data .warn{ color: #d97706; font-weight: 600; }
.tpl-egm table.data .bad { color: #dc2626; font-weight: 600; }
.tpl-egm table.data tr:hover td { background: var(--egm-bg-soft); }

/* Two column layout */
.tpl-egm .two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.tpl-egm .two-col.flip { grid-template-columns: 1fr 1.2fr; }
.tpl-egm .two-col img { width: 100%; border-radius: 10px; box-shadow: 0 8px 28px rgba(10,37,64,.18); }

/* Bar chart for hourly distribution */
.tpl-egm .bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding: 12px 0; }
.tpl-egm .bar-chart .bar {
  flex: 1; background: var(--egm-blue);
  border-radius: 3px 3px 0 0;
  position: relative;
  min-height: 4px;
  opacity: 0.85;
}
.tpl-egm .bar-chart .bar.peak { background: var(--egm-red); }
.tpl-egm .bar-chart .bar.low { background: var(--egm-gold); opacity: 0.5; }
.tpl-egm .bar-chart .bar span {
  position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--text-3);
}

/* Viral tweet preview cards */
.tpl-egm .tweet-card {
  background: #fff;
  border: 1px solid var(--egm-border);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-2);
  min-height: 200px;
  overflow: hidden;
}
.tpl-egm .tweet-card .badge-likes {
  font-weight: 800;
  color: var(--egm-red);
  font-size: 20px;
}
.tpl-egm .tweet-card .meta {
  font-size: 13px; color: var(--text-3); letter-spacing: .06em;
  display: flex; gap: 14px;
}
.tpl-egm .tweet-card .meta span b { color: var(--egm-navy); }

/* Series cards */
.tpl-egm .series-card {
  background: #fff;
  border: 1px solid var(--egm-border);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  transition: all .2s;
}
.tpl-egm .series-card .icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}
.tpl-egm .series-card .series-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--egm-navy);
  margin-bottom: 8px;
  line-height: 1.3;
}
.tpl-egm .series-card .series-meta {
  font-size: 13px;
  color: var(--egm-blue);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tpl-egm .series-card .series-desc {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.55;
  margin-top: 8px;
}

/* Timeline */
.tpl-egm .timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
.tpl-egm .timeline::before {
  content: ''; position: absolute;
  top: 28px; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, var(--egm-gold), var(--egm-blue));
  z-index: 0;
}
.tpl-egm .timeline-step { position: relative; z-index: 1; }
.tpl-egm .timeline-step .dot {
  width: 56px; height: 56px;
  background: #fff;
  border: 3px solid var(--egm-blue);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
  color: var(--egm-navy);
  margin: 0 auto 16px;
}
.tpl-egm .timeline-step h4 { text-align: center; margin-bottom: 8px; }
.tpl-egm .timeline-step .dim { text-align: center; font-size: 15px; }

/* Team org chart */
.tpl-egm .team-org {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.tpl-egm .team-card {
  background: #fff;
  border: 1px solid var(--egm-border);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
}
.tpl-egm .team-card.star {
  border: 2px solid var(--egm-gold);
  background: linear-gradient(180deg, #fffaf0 0%, #fff 100%);
  position: relative;
}
.tpl-egm .team-card.star::before {
  content: '⭐ EGM\'YE ÖZEL';
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: var(--egm-gold); color: #fff;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 9px; font-weight: 800; letter-spacing: .1em;
}
.tpl-egm .team-card .icon { font-size: 22px; margin-bottom: 6px; display: block; }
.tpl-egm .team-card .role { font-weight: 700; font-size: 14px; color: var(--egm-navy); }
.tpl-egm .team-card .count {
  font-size: 26px; font-weight: 800; color: var(--egm-blue); line-height:1;
  margin-bottom: 4px;
}
.tpl-egm .team-card .commit { font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* Calendar grid */
.tpl-egm .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 20px;
}
.tpl-egm .cal-cell {
  background: var(--egm-bg-soft);
  border-radius: 4px;
  padding: 8px 6px;
  font-size: 10px;
  color: var(--text-2);
  min-height: 64px;
  position: relative;
}
.tpl-egm .cal-cell .d { font-weight: 700; color: var(--egm-navy); font-size: 12px; }
.tpl-egm .cal-cell.special { background: linear-gradient(135deg, #fff4d9, #fceec1); border-left: 3px solid var(--egm-gold); }
.tpl-egm .cal-cell.viral { background: linear-gradient(135deg, #ffe4e1, #fdd); border-left: 3px solid var(--egm-red); }
.tpl-egm .cal-cell .tag { font-size: 9px; opacity: .85; }
.tpl-egm .cal-cell.empty { background: transparent; }

/* References logos grid */
.tpl-egm .ref-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 24px;
}
.tpl-egm .ref-cell {
  background: #fff;
  border: 1px solid var(--egm-border);
  border-radius: 6px;
  padding: 14px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--egm-navy);
  text-align: center;
  letter-spacing: .04em;
  text-transform: uppercase;
  display: flex; align-items: center; justify-content: center;
  min-height: 56px;
}
.tpl-egm .ref-cell.gov {
  background: var(--egm-navy);
  color: #fff;
  border-color: var(--egm-navy);
}
.tpl-egm .ref-cell.gov::after {
  content: '★'; color: var(--egm-gold);
  margin-left: 4px;
}

/* Comparison chart */
.tpl-egm .compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.tpl-egm .compare-side {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  border: 1px solid var(--egm-border);
}
.tpl-egm .compare-side.bad { border-color: #fecaca; }
.tpl-egm .compare-side.good { border-color: #86efac; }
.tpl-egm .compare-side .label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 800;
}
.tpl-egm .compare-side.bad .label { color: #dc2626; }
.tpl-egm .compare-side.good .label { color: #16a34a; }
.tpl-egm .compare-side .big {
  font-size: 56px; font-weight: 800; line-height: 1;
  color: var(--egm-navy); margin: 8px 0;
}
.tpl-egm .compare-side .big small { font-size: 18px; color: var(--text-3); font-weight: 500; }

/* Background images for slide sections */
.tpl-egm .slide.with-bg .bg-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.06;
  filter: saturate(.3) brightness(.8);
  z-index: 0;
}
.tpl-egm .slide.with-bg > *:not(.bg-img) { position: relative; z-index: 1; }
.tpl-egm .slide.image-right .visual {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 42%;
  background-size: cover; background-position: center;
}
.tpl-egm .slide.image-right .visual::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--egm-bg) 0%, transparent 25%);
}
.tpl-egm .slide.image-right .content { max-width: 58%; padding-right: 32px; }

/* Highlight box */
.tpl-egm .highlight {
  background: linear-gradient(135deg, var(--egm-bg-soft), #fff);
  border-left: 4px solid var(--egm-gold);
  padding: 20px 24px;
  border-radius: 4px;
  margin: 16px 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--egm-navy);
}
.tpl-egm .highlight.blue { border-left-color: var(--egm-blue); }
.tpl-egm .highlight.red { border-left-color: var(--egm-red); }

/* Subtle backgrounds for transitions */
.tpl-egm .slide.dark {
  background: var(--egm-navy);
  color: #fff;
}
.tpl-egm .slide.dark h2, .tpl-egm .slide.dark h1, .tpl-egm .slide.dark h3 { color: #fff; }
.tpl-egm .slide.dark .dim, .tpl-egm .slide.dark .lede { color: rgba(255,255,255,.78); }
.tpl-egm .slide.dark .card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); color: #fff; }
.tpl-egm .slide.dark .card h4 { color: #fff; }
.tpl-egm .slide.dark .card .dim { color: rgba(255,255,255,.7); }
.tpl-egm .slide.dark .kicker { color: var(--egm-gold); }

/* Utilities */
.tpl-egm .mt-xs { margin-top: 8px; }
.tpl-egm .mt-s { margin-top: 14px; }
.tpl-egm .mt-m { margin-top: 24px; }
.tpl-egm .mt-l { margin-top: 36px; }
.tpl-egm .mt-xl { margin-top: 52px; }
.tpl-egm .gradient-text {
  background: linear-gradient(135deg, var(--egm-blue), var(--egm-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

/* Visual emphasis text */
.tpl-egm .big-stat {
  font-size: 120px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--egm-navy);
}
.tpl-egm .big-stat.gold { color: var(--egm-gold); }
.tpl-egm .big-stat.blue { color: var(--egm-blue); }

/* List with checkmarks/x */
.tpl-egm ul.checks { list-style: none; padding: 0; }
.tpl-egm ul.checks li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.5;
}
.tpl-egm ul.checks li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 8px;
  color: #16a34a;
  font-weight: 800;
}
.tpl-egm ul.checks.x li::before {
  content: '×'; color: #dc2626; font-size: 20px; line-height: 1;
}
.tpl-egm ul.checks.gold li::before { color: var(--egm-gold); }
