/* ==========================================================================
   IdeaSpot360 Markets - Institutional Financial Theme
   Style & Ultra-Precision Pan-Zoom Lightbox Engine CSS
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Light Theme (Clean Institutional Navy/Slate) */
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-color: #0f172a;
  --text-muted: #64748b;
  --primary-color: #0284c7; /* Precision Cyan-Blue */
  --primary-hover: #0369a1;
  --accent-color: #10b981; /* Bullish Green */
  --bearish-color: #ef4444; /* Bearish Red */
  --header-bg: rgba(255, 255, 255, 0.92);
  --header-border: #e2e8f0;
  --code-bg: #f1f5f9;
  --callout-bg: #f0f9ff;
  --callout-border: #bae6fd;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
  --bg-color: #0b0f17;
  --card-bg: #111827;
  --border-color: #1f2937;
  --text-color: #f3f4f6;
  --text-muted: #94a3b8;
  --primary-color: #38bdf8;
  --primary-hover: #7dd3fc;
  --accent-color: #34d399;
  --bearish-color: #f87171;
  --header-bg: rgba(17, 24, 39, 0.92);
  --header-border: #1f2937;
  --code-bg: #1e293b;
  --callout-bg: #0c2338;
  --callout-border: #0369a1;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border);
  transition: border-color 0.25s ease;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-title {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-badge {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

.site-tagline {
  display: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border-color);
  padding-left: 14px;
}

@media (min-width: 768px) {
  .site-tagline {
    display: inline-block;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-external {
  color: #10b981;
  font-weight: 600;
}

.theme-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.theme-btn:hover {
  border-color: var(--primary-color);
}

/* Site Content */
.site-content {
  padding: 44px 0 80px 0;
}

/* Typography & Post */
.post-header {
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.category-badge {
  background: var(--code-bg);
  color: var(--primary-color);
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.8rem;
}

.tags .tag {
  background: var(--code-bg);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-title {
  font-size: 2.2rem;
  line-height: 1.3;
  margin: 0 0 16px 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.post-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.entry-content h2 {
  font-size: 1.55rem;
  margin: 48px 0 18px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.entry-content h3 {
  font-size: 1.25rem;
  margin: 32px 0 14px 0;
  font-weight: 600;
}

.entry-content p {
  margin: 0 0 20px 0;
}

.entry-content strong {
  font-weight: 700;
  color: var(--text-color);
}

.entry-content ul, .entry-content ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.entry-content li {
  margin-bottom: 8px;
}

/* Callout Box */
.callout {
  background-color: var(--callout-bg);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin: 28px 0;
}

.callout-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-color);
  margin-bottom: 6px;
}

.callout p {
  margin: 0;
  font-size: 0.95rem;
}

/* Financial Tables */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.92rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.entry-content th, .entry-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.entry-content th {
  background: var(--code-bg);
  font-weight: 700;
  color: var(--text-color);
  border-bottom: 2px solid var(--border-color);
}

.entry-content tr:last-child td {
  border-bottom: none;
}

.entry-content tr:hover {
  background-color: rgba(2, 132, 199, 0.04);
}

/* Code & Pre */
pre {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  position: relative;
  margin: 24px 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

pre code {
  background: transparent;
  padding: 0;
}

.copy-code-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-code-btn:hover {
  color: var(--text-color);
  border-color: var(--primary-color);
}

/* Post Disclaimer & EEAT Box */
.post-disclaimer-box {
  margin-top: 48px;
  padding: 20px 24px;
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
  border-radius: 8px;
}

.post-disclaimer-box h4 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: var(--primary-color);
}

.post-disclaimer-box p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.author-eeat-box {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 8px;
}

.author-eeat-box h4 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
}

.author-eeat-box p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 32px 0;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-links {
  display: flex;
  gap: 48px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-heading {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.footer-col a {
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary-color);
}

.footer-disclaimer {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.footer-disclaimer p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   🔍🖼️ Ultra-Precision Interactive Pan-Zoom Lightbox Engine
   ========================================================================== */

.entry-content img, article.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
  margin: 28px auto;
  background-color: var(--card-bg);
}

.entry-content img:hover, article.post-content img:hover {
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.25), 0 8px 10px -6px rgba(2, 132, 199, 0.2);
  transform: translateY(-2px);
}

.panzoom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background-color: rgba(11, 15, 23, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  user-select: none;
  touch-action: none;
}

.panzoom-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.panzoom-toolbar {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  padding: 6px 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.panzoom-btn {
  background: transparent;
  border: none;
  color: #f3f4f6;
  font-size: 1.15rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.panzoom-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.panzoom-scale-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  padding: 0 8px;
  min-width: 48px;
  text-align: center;
}

.panzoom-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: grab;
}

.panzoom-viewport.dragging {
  cursor: grabbing;
}

.panzoom-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transform-origin: 0 0;
  will-change: transform;
  pointer-events: none;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.panzoom-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.82rem;
  padding: 6px 16px;
  border-radius: 20px;
  pointer-events: none;
  letter-spacing: 0.02em;
}
