/* ================================================
   MyBankInsider Ghost Theme v2.0 - main.css
   Light theme · DM Sans · Purple / Gold / Green
   Matches mybankinsider.com
   ================================================ */

:root {
  --purple-deep: #2D2252;
  --purple-mid:  #3D2E6E;
  --purple-light: #EDE9F6;
  --purple-wash: #F8F6FC;
  --gold:       #B8860B;
  --gold-light: #D4A017;
  --gold-wash:  #FDF8EC;
  --green:      #0F7B5F;
  --green-light: #ECFDF5;
  --bg:         #FAFAFA;
  --white:      #FFFFFF;
  --text:       #1A1A2E;
  --text-2:     #3D3D56;
  --text-3:     #6B7280;
  --text-4:     #9CA3AF;
  --border:     #E5E7EB;
  --border-light: #F3F4F6;
  --font:       'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-h:      60px;
  --max-w:      1060px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(45,34,82,0.15); color: var(--text); }


/* ════════════════════════════════════
   NAV
   ════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  background: linear-gradient(135deg, #1a1535 0%, #2d2252 40%, #1e1a3a 100%);
  border-bottom: 2px solid var(--gold-light);
  transition: box-shadow 0.3s;
}
nav.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: #fff;
}
.nav-lock-icon {
  width: 34px; height: 34px;
  border: 1.5px solid var(--gold-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-wordmark-text {
  font-size: 17px; font-weight: 600; color: #fff;
}
.nav-logo-tag {
  font-size: 11px; font-weight: 500; color: var(--gold-light);
  letter-spacing: 0.08em; text-transform: uppercase;
  border-left: 1px solid rgba(255,255,255,0.2);
  padding-left: 12px; margin-left: 4px;
}
.nav-links {
  display: flex; align-items: center; gap: 28px; list-style: none;
}
.nav-links a {
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.7);
  transition: color 0.15s;
}
.nav-links a:hover { color: #fff; }
.nav-links .nav-cta {
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px; color: rgba(255,255,255,0.85);
  transition: background 0.15s, border-color 0.15s;
}
.nav-links .nav-cta:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.4);
}
.nav-mobile-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-mobile-toggle span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,0.7); border-radius: 2px; transition: all 0.2s;
}

/* Mobile menu */
.mobile-menu {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--purple-deep); border-bottom: 2px solid var(--gold-light);
  padding: 20px 24px; flex-direction: column; gap: 16px; z-index: 999;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 15px; font-weight: 500; color: rgba(255,255,255,0.7); padding: 8px 0; }
.mobile-menu a:last-child { color: var(--gold-light); }


/* ════════════════════════════════════
   INSIGHTS HERO
   ════════════════════════════════════ */
.insights-hero {
  padding: calc(var(--nav-h) + 56px) 48px 48px;
  background: var(--purple-deep);
  position: relative; overflow: hidden;
}
.insights-hero::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 40%;
  background: linear-gradient(135deg, transparent 0%, rgba(61,46,110,0.5) 100%);
  pointer-events: none;
}
.insights-hero-inner {
  max-width: var(--max-w); margin: 0 auto;
  position: relative; z-index: 1;
}
.hero-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 16px;
  opacity: 0; animation: fadeUp 0.6s 0.1s forwards;
}
.insights-hero h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.02em;
  color: #fff; margin-bottom: 14px; max-width: 600px;
  opacity: 0; animation: fadeUp 0.6s 0.2s forwards;
}
.insights-hero p {
  font-size: 16px; color: rgba(255,255,255,0.6); max-width: 520px;
  line-height: 1.6;
  opacity: 0; animation: fadeUp 0.6s 0.3s forwards;
}


/* ════════════════════════════════════
   FEATURED POST
   ════════════════════════════════════ */
.featured-section {
  max-width: var(--max-w); margin: 48px auto 0; padding: 0 20px;
  opacity: 0; animation: fadeUp 0.6s 0.4s forwards;
}
.featured-post {
  background: var(--white);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 40px 44px; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  text-decoration: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.featured-post:hover {
  border-color: var(--purple-mid);
  box-shadow: 0 8px 32px rgba(45,34,82,0.08);
}
.featured-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--green); margin-bottom: 16px;
}
.featured-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  animation: pulse 2s infinite;
}
.featured-post h2 {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700; line-height: 1.2; letter-spacing: -0.01em;
  color: var(--text); margin-bottom: 14px;
}
.featured-excerpt { font-size: 15px; color: var(--text-3); line-height: 1.7; margin-bottom: 20px; }
.featured-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.meta-tag {
  padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--purple-deep); background: var(--purple-light);
}
.meta-date, .meta-read { font-size: 12px; color: var(--text-4); }
.featured-read-more {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  font-size: 13px; font-weight: 600; color: var(--purple-deep);
  letter-spacing: 0.04em;
}
.featured-read-more svg { transition: transform 0.18s; }
.featured-post:hover .featured-read-more svg { transform: translateX(4px); }
.featured-visual { border-radius: 10px; overflow: hidden; }
.featured-img { width: 100%; height: 260px; object-fit: cover; border-radius: 10px; }


/* ════════════════════════════════════
   POSTS SECTION & GRID
   ════════════════════════════════════ */
.posts-section {
  max-width: var(--max-w); margin: 48px auto 80px; padding: 0 20px;
}
.section-header {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px;
}
.section-title {
  font-size: 22px; font-weight: 700; color: var(--text);
}
.section-count { font-size: 13px; color: var(--text-4); }
.section-back { font-size: 13px; color: var(--text-3); transition: color 0.15s; }
.section-back:hover { color: var(--purple-deep); }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.post-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 24px; text-decoration: none; display: flex; flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.post-card:hover {
  border-color: var(--purple-mid);
  box-shadow: 0 4px 16px rgba(45,34,82,0.06);
}
.post-card-top { margin-bottom: 12px; }
.post-card h3 {
  font-size: 17px; font-weight: 600; line-height: 1.3;
  color: var(--text); margin-bottom: 10px;
}
.post-card p { font-size: 13px; color: var(--text-3); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.post-card-footer {
  display: flex; align-items: center; justify-content: space-between; margin-top: auto;
}
.post-card-date { font-size: 12px; color: var(--text-4); }
.post-card-arrow { color: var(--purple-deep); opacity: 0; transition: opacity 0.15s, transform 0.15s; }
.post-card:hover .post-card-arrow { opacity: 1; transform: translateX(3px); }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin-top: 48px;
}
.pagination-btn {
  padding: 10px 24px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-3);
  transition: border-color 0.15s, color 0.15s;
}
.pagination-btn:hover { border-color: var(--purple-mid); color: var(--purple-deep); }
.pagination-info { font-size: 12px; color: var(--text-4); }


/* ════════════════════════════════════
   TAG HERO
   ════════════════════════════════════ */
.tag-hero {
  padding: calc(var(--nav-h) + 56px) 48px 48px;
  background: var(--purple-deep);
}
.tag-hero-inner { max-width: var(--max-w); margin: 0 auto; }
.tag-hero h1 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700; color: #fff; margin-bottom: 12px;
}
.tag-hero p { font-size: 16px; color: rgba(255,255,255,0.6); line-height: 1.6; max-width: 520px; }


/* ════════════════════════════════════
   SINGLE POST PAGE
   ════════════════════════════════════ */
.post-page { padding-top: var(--nav-h); }

.post-hero {
  padding: 56px 20px 40px; text-align: center;
  background: var(--purple-deep);
}
.post-hero-inner { max-width: 720px; margin: 0 auto; }
.post-tag {
  display: inline-block; margin-bottom: 16px;
  padding: 3px 12px; border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-light); background: rgba(255,255,255,0.1);
  transition: background 0.15s;
}
.post-tag:hover { background: rgba(255,255,255,0.15); }
.post-title {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.02em;
  color: #fff; margin-bottom: 16px;
}
.post-excerpt {
  font-size: 17px; color: rgba(255,255,255,0.6); line-height: 1.6;
  max-width: 600px; margin: 0 auto 20px;
}
.post-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
}
.post-date, .post-read, .post-author { font-size: 12px; color: rgba(255,255,255,0.4); }
.post-meta-divider { color: rgba(255,255,255,0.2); }

.post-feature-image {
  max-width: 860px; margin: 0 auto 40px; padding: 0 20px;
}
.post-feature-image img {
  width: 100%; border-radius: 12px; border: 1px solid var(--border);
}

.post-content-wrap {
  max-width: 720px; margin: 0 auto; padding: 0 20px 80px;
}


/* ════════════════════════════════════
   POST CONTENT (gh-content)
   ════════════════════════════════════ */
.gh-content { color: var(--text-2); font-size: 17px; line-height: 1.8; }

.gh-content h2 {
  font-size: 28px; font-weight: 700; color: var(--text);
  margin: 48px 0 16px; letter-spacing: -0.01em;
}
.gh-content h3 {
  font-size: 22px; font-weight: 600; color: var(--purple-deep);
  margin: 36px 0 12px;
}
.gh-content h4 {
  font-size: 14px; font-weight: 700; color: var(--text);
  letter-spacing: 0.08em; text-transform: uppercase; margin: 24px 0 8px;
}
.gh-content p { margin-bottom: 24px; }
.gh-content a {
  color: var(--purple-deep); border-bottom: 1px solid rgba(45,34,82,0.25);
  transition: border-color 0.15s;
}
.gh-content a:hover { border-bottom-color: var(--purple-deep); }
.gh-content strong { color: var(--text); font-weight: 600; }
.gh-content em { font-style: italic; }

.gh-content blockquote {
  border-left: 3px solid var(--gold-light); padding: 16px 24px;
  margin: 32px 0; background: var(--gold-wash);
  border-radius: 0 8px 8px 0;
  font-size: 19px; font-style: italic; color: var(--text);
}
.gh-content blockquote p { margin-bottom: 0; }

.gh-content ul, .gh-content ol {
  padding-left: 24px; margin-bottom: 24px;
}
.gh-content li { margin-bottom: 8px; color: var(--text-2); }
.gh-content li::marker { color: var(--purple-deep); }

.gh-content hr {
  border: none; border-top: 1px solid var(--border); margin: 48px 0;
}

.gh-content figure { margin: 32px 0; }
.gh-content figcaption {
  text-align: center; font-size: 12px; color: var(--text-4); margin-top: 10px;
}
.gh-content img { border-radius: 10px; border: 1px solid var(--border); }

/* Code */
.gh-content code {
  background: var(--purple-wash); color: var(--purple-deep); padding: 2px 6px;
  border-radius: 4px; font-size: 13px; font-family: 'SF Mono', 'Fira Code', monospace;
}
.gh-content pre {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 24px; overflow-x: auto; margin-bottom: 24px;
}
.gh-content pre code { background: none; padding: 0; color: var(--text-2); }

/* Post tags */
.post-tags {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 48px; padding-top: 32px;
  border-top: 1px solid var(--border);
}
.post-tag-link {
  padding: 5px 14px; border-radius: 6px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}
.post-tag-link:hover { color: var(--purple-deep); border-color: var(--purple-mid); }

/* Back link */
.post-back { margin-top: 32px; }
.post-back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-3);
  transition: color 0.15s;
}
.post-back-link:hover { color: var(--purple-deep); }

/* Related posts */
.related-posts {
  max-width: var(--max-w); margin: 0 auto 80px; padding: 0 20px;
  border-top: 1px solid var(--border); padding-top: 48px;
}
.related-title {
  font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 24px;
}


/* ════════════════════════════════════
   FOOTER
   ════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  background: var(--white); padding: 32px 48px;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.footer-left-col { max-width: 400px; }
.footer-brand { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.footer-tagline { font-size: 14px; color: var(--gold); font-weight: 500; margin-bottom: 12px; }
.footer-legal { font-size: 12px; color: var(--text-4); line-height: 1.5; }
.footer-right { display: flex; gap: 24px; padding-top: 2px; }
.footer-right a {
  font-size: 13px; color: var(--text-3); text-decoration: none;
  transition: color 0.15s;
}
.footer-right a:hover { color: var(--text-2); }


/* ════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.4; }
}


/* ════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════ */
@media(max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-post { grid-template-columns: 1fr; gap: 24px; }
  .featured-visual { display: none; }
}
@media(max-width: 600px) {
  nav { padding: 0 20px; }
  .nav-logo-tag { display: none; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .insights-hero { padding-left: 20px; padding-right: 20px; }
  .tag-hero { padding-left: 20px; padding-right: 20px; }
  .posts-grid { grid-template-columns: 1fr; }
  .featured-post { padding: 28px 24px; }
  footer { padding: 24px 20px; }
  .footer-inner { flex-direction: column; gap: 20px; }
}


/* ════════════════════════════════════
   GHOST CARD REQUIRED CLASSES
   ════════════════════════════════════ */
.kg-width-wide {
  margin-left: calc(50% - 50vw + 20px);
  margin-right: calc(50% - 50vw + 20px);
  max-width: 1000px;
}
.kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
}
.kg-image { max-width: 100%; }
.kg-image-card { margin: 32px 0; }
.kg-image-card img { border-radius: 10px; border: 1px solid var(--border); }
.kg-gallery-container { display: flex; flex-direction: column; gap: 8px; margin: 32px 0; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-gallery-image { flex: 1; }
.kg-gallery-image img { border-radius: 8px; width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-card { margin: 32px 0; }
.kg-bookmark-container {
  display: flex; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--white); text-decoration: none;
  transition: border-color 0.15s;
}
.kg-bookmark-container:hover { border-color: var(--purple-mid); }
.kg-bookmark-content { padding: 20px; flex: 1; }
.kg-bookmark-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.kg-bookmark-description { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.kg-bookmark-metadata { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.kg-bookmark-url { font-size: 11px; color: var(--text-4); }
.kg-bookmark-thumbnail { width: 160px; flex-shrink: 0; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-callout-card {
  display: flex; gap: 16px; padding: 20px 24px; margin: 32px 0;
  background: var(--purple-wash); border-radius: 10px; border: 1px solid rgba(45,34,82,0.08);
}
.kg-callout-emoji { font-size: 20px; flex-shrink: 0; }
.kg-callout-text { font-size: 15px; color: var(--text-2); line-height: 1.6; }
.kg-toggle-card { margin: 32px 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.kg-toggle-heading { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.kg-toggle-heading-text { font-size: 15px; font-weight: 600; color: var(--text); }
.kg-toggle-content { padding: 0 20px 16px; font-size: 14px; color: var(--text-2); line-height: 1.6; }
.kg-video-card { margin: 32px 0; border-radius: 10px; overflow: hidden; }
.kg-audio-card { margin: 32px 0; background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.kg-header-card { padding: 48px 32px; text-align: center; margin: 32px 0; background: var(--purple-wash); border-radius: 12px; }
.kg-header-card h2 { font-size: 28px; font-weight: 700; color: var(--text); }
.kg-button-card { text-align: center; margin: 32px 0; }
.kg-button-card a {
  display: inline-block; padding: 12px 28px; background: var(--purple-deep);
  color: #fff; border-radius: 6px; font-weight: 600; font-size: 14px;
  transition: background 0.15s;
}
.kg-button-card a:hover { background: #1E1740; }
