/*
Theme Name: MyFinanceMemo
Theme URI: https://myfinancememo.com
Author: MyFinanceMemo
Author URI: https://myfinancememo.com
Description: A professional business and finance blog theme for MyFinanceMemo.com — built for clarity, trust, and bilingual content.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: myfinancememo
Tags: blog, finance, business, bilingual, responsive
*/

/* =============================================
   DESIGN TOKENS — MyFinanceMemo
   Palette: Deep Navy + Warm Gold + Ivory
   Typography: Playfair Display (headlines) + Inter (body)
   Signature: Gold left-border accent on featured content
============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400&display=swap');

:root {
  --navy-900: #0B1E3D;
  --navy-800: #112649;
  --navy-700: #1A3560;
  --navy-100: #E8EDF5;
  --gold-500: #C9A84C;
  --gold-400: #D9BC72;
  --gold-100: #FDF8EC;
  --ivory: #F9F7F2;
  --white: #FFFFFF;
  --text-primary: #1A1A2E;
  --text-secondary: #4A5568;
  --text-muted: #718096;
  --border: #E2E8F0;
  --success: #2D7A4F;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(11,30,61,0.08);
  --shadow-md: 0 4px 16px rgba(11,30,61,0.12);
  --shadow-lg: 0 12px 40px rgba(11,30,61,0.16);
  --transition: 0.2s ease;
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--ivory);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-500); }

/* =============================================
   HEADER & NAVIGATION
============================================= */
.site-header {
  background: var(--navy-900);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--gold-500);
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--gold-500);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--navy-900);
  letter-spacing: -0.5px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
}

.logo-tagline {
  font-size: 10px;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.site-nav a {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-500);
  transition: width var(--transition);
}

.site-nav a:hover { color: var(--white); }
.site-nav a:hover::after { width: 100%; }

.header-lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.lang-btn {
  padding: 4px 10px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: transparent;
  letter-spacing: 0.5px;
}

.lang-btn.active {
  background: var(--gold-500);
  color: var(--navy-900);
}

/* =============================================
   HERO SECTION
============================================= */
.hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 60%, #1E4A7A 100%);
  padding: 80px 24px 90px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '₨ $ £ €';
  position: absolute;
  bottom: 20px; right: 40px;
  font-family: var(--font-display);
  font-size: 80px;
  color: rgba(201,168,76,0.04);
  letter-spacing: 10px;
  pointer-events: none;
  line-height: 1;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 24px;
}

.hero-eyebrow::before { content: '◆'; font-size: 8px; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--gold-400);
  position: relative;
}

.hero-desc {
  font-size: 17px;
  color: rgba(255,255,255,0.7);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--gold-500);
  color: var(--navy-900);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--gold-400);
  color: var(--navy-900);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.35);
}

.btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.85);
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.25);
  transition: all var(--transition);
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}

/* =============================================
   TICKER BAR (financial feel)
============================================= */
.ticker-bar {
  background: var(--navy-800);
  border-bottom: 1px solid rgba(201,168,76,0.2);
  padding: 8px 0;
  overflow: hidden;
}

.ticker-inner {
  display: flex;
  gap: 40px;
  animation: ticker 30s linear infinite;
  width: max-content;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 12px;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.6);
}

.ticker-label { color: var(--gold-400); font-weight: 600; }
.ticker-up { color: #48BB78; }
.ticker-down { color: #FC8181; }

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* =============================================
   MAIN LAYOUT
============================================= */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

/* =============================================
   SECTION HEADERS
============================================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--gold-500);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-500);
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-link:hover { color: var(--navy-700); }

/* =============================================
   FEATURED POST (Signature Element)
============================================= */
.featured-post {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  border-left: 5px solid var(--gold-500);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 280px;
  transition: box-shadow var(--transition);
}

.featured-post:hover { box-shadow: var(--shadow-lg); }

.featured-post-img {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
  overflow: hidden;
  min-height: 220px;
}

.featured-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.featured-post-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-badge {
  display: inline-block;
  background: var(--gold-100);
  color: var(--gold-500);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  border: 1px solid rgba(201,168,76,0.3);
}

.featured-post-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.3;
  margin-bottom: 12px;
}

.featured-post-body h2 a:hover { color: var(--gold-500); }

.post-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.post-meta-author { font-weight: 600; color: var(--text-secondary); }
.post-meta-sep { opacity: 0.4; }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-500);
  margin-top: 16px;
  transition: gap var(--transition);
}

.read-more:hover { gap: 10px; color: var(--navy-700); }

/* =============================================
   POST GRID
============================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.post-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(201,168,76,0.3);
}

.post-card-img {
  height: 160px;
  background: linear-gradient(135deg, var(--navy-100), var(--navy-800));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
  overflow: hidden;
}

.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.post-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.post-card-body h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-body h3 a:hover { color: var(--gold-500); }

.post-card-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

.post-tag {
  background: var(--navy-100);
  color: var(--navy-700);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

/* =============================================
   SIDEBAR
============================================= */
.sidebar { position: sticky; top: 88px; }

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.widget-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold-100);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--gold-500);
  border-radius: 2px;
}

/* Newsletter Widget */
.newsletter-widget {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  border: none;
}

.newsletter-widget .widget-title { color: var(--white); border-bottom-color: rgba(201,168,76,0.2); }
.newsletter-widget .widget-title::before { background: var(--gold-500); }

.newsletter-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
  line-height: 1.6;
}

.newsletter-form { display: flex; flex-direction: column; gap: 10px; }

.newsletter-input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--white);
  outline: none;
  transition: border-color var(--transition);
  font-family: var(--font-body);
}

.newsletter-input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-input:focus { border-color: var(--gold-500); }

.newsletter-btn {
  background: var(--gold-500);
  color: var(--navy-900);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font-body);
}

.newsletter-btn:hover { background: var(--gold-400); }

/* Popular Posts */
.popular-post-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.popular-post-item:last-child { border-bottom: none; padding-bottom: 0; }

.popular-post-num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-100);
  line-height: 1;
  min-width: 28px;
}

.popular-post-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-post-title a:hover { color: var(--gold-500); }
.popular-post-date { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* Categories */
.category-list { list-style: none; }

.category-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.category-list li:last-child { border-bottom: none; }

.category-list a {
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-list a::before { content: '→'; color: var(--gold-500); font-size: 11px; }
.category-list a:hover { color: var(--navy-700); }
.category-count { font-size: 11px; color: var(--text-muted); background: var(--navy-100); padding: 2px 8px; border-radius: 100px; }

/* =============================================
   SINGLE POST
============================================= */
.single-post-header {
  background: var(--navy-900);
  padding: 60px 24px 50px;
  text-align: center;
}

.single-post-header .post-badge { margin-bottom: 16px; }

.single-post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  max-width: 800px;
  margin: 0 auto 20px;
  letter-spacing: -0.5px;
}

.single-post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  flex-wrap: wrap;
}

.single-post-meta strong { color: var(--gold-400); }

.post-content-wrap {
  max-width: 760px;
  margin: 48px auto;
  padding: 0 24px;
}

.post-content {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-primary);
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 40px 0 16px;
  padding-left: 16px;
  border-left: 4px solid var(--gold-500);
}

.post-content h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-800);
  margin: 28px 0 12px;
}

.post-content p { margin-bottom: 20px; }

.post-content a { color: var(--gold-500); text-decoration: underline; text-decoration-color: rgba(201,168,76,0.3); }
.post-content a:hover { color: var(--navy-700); }

.post-content blockquote {
  background: var(--gold-100);
  border-left: 4px solid var(--gold-500);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--navy-800);
}

.post-content ul, .post-content ol {
  margin: 0 0 20px 24px;
}

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

.post-content code {
  background: var(--navy-100);
  color: var(--navy-700);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 14px;
}

/* Financial Callout Box */
.finance-callout {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: var(--white);
  padding: 24px 28px;
  border-radius: var(--radius-md);
  margin: 32px 0;
  border: 1px solid rgba(201,168,76,0.2);
  position: relative;
}

.finance-callout::before {
  content: '💡';
  position: absolute;
  top: -14px;
  left: 24px;
  background: var(--gold-500);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.finance-callout-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-400);
  margin-bottom: 8px;
  margin-top: 6px;
}

.finance-callout p { font-size: 14px; color: rgba(255,255,255,0.8); margin-bottom: 0; line-height: 1.6; }

/* =============================================
   PAGINATION
============================================= */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}

.page-numbers {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
  background: var(--white);
}

.page-numbers:hover, .page-numbers.current {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.page-numbers.current { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-900); }

/* =============================================
   FOOTER
============================================= */
.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.7);
  padding: 60px 24px 32px;
  margin-top: 60px;
  border-top: 3px solid var(--gold-500);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo-name { font-size: 20px; margin-bottom: 12px; display: block; }
.footer-brand p { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,0.5); max-width: 280px; }

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-400);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13px; color: rgba(255,255,255,0.5); transition: color var(--transition); }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

.disclaimer {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  max-width: 1200px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1024px) {
  .site-main { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-post-img { min-height: 180px; }
  .posts-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hero { padding: 60px 20px 70px; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 16px; }
  .hero h1 { font-size: 30px; }
  .posts-grid { grid-template-columns: 1fr; }
}
