/* =========================================
   MEMOGENESIS BLOG — Shared Stylesheet
   Palette: Deep Navy #0B2D6B | Gold #C9A227
   Fonts: Montserrat + Open Sans
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Open+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --primary:       #0B2D6B;
  --primary-dark:  #061A42;
  --primary-light: #1A4BAA;
  --gold:          #C9A227;
  --gold-light:    #F0C84E;
  --gold-dark:     #A07D12;
  --accent:        #00D4B4;
  --white:         #FFFFFF;
  --off-white:     #F8F9FF;
  --light-bg:      #EEF2FF;
  --text-dark:     #0D1B3E;
  --text-mid:      #374266;
  --text-light:    #7A88B8;
  --border:        #D0D9F2;
  --shadow-sm:     0 2px 8px  rgba(11,45,107,.08);
  --shadow-md:     0 4px 20px rgba(11,45,107,.14);
  --shadow-lg:     0 8px 40px rgba(11,45,107,.20);
  --shadow-gold:   0 4px 20px rgba(201,162,39,.30);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all .3s cubic-bezier(.4,0,.2,1);
  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Open Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--text-dark); background: var(--white); line-height: 1.8; overflow-x: hidden; }
img  { max-width: 100%; height: auto; display: block; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 999;
  background: var(--primary-dark);
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  box-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.navbar-logo  { height: 40px; width: auto; }
.brand-name   { font-family: var(--font-heading); font-weight: 800; font-size: 1.15rem; color: var(--white); letter-spacing: .5px; }
.brand-name span { color: var(--gold); }
.nav-links    { display: flex; gap: 28px; align-items: center; }
.nav-links a  { font-family: var(--font-heading); font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.82); letter-spacing: .4px; transition: var(--transition); }
.nav-links a:hover { color: var(--gold-light); }
.nav-cta { background: var(--gold); color: var(--primary-dark) !important; padding: 8px 22px; border-radius: 30px; font-weight: 700 !important; transition: var(--transition) !important; }
.nav-cta:hover { background: var(--gold-light) !important; transform: translateY(-1px); box-shadow: var(--shadow-gold); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }
.mobile-menu { display: none; background: var(--primary-dark); padding: 20px 5%; flex-direction: column; gap: 16px; }
.mobile-menu a { font-family: var(--font-heading); font-size: .9rem; font-weight: 600; color: rgba(255,255,255,.85); border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 12px; }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .nav-cta { background: var(--gold); color: var(--primary-dark) !important; text-align: center; padding: 12px; border-radius: var(--radius-sm); }
.mobile-menu.open { display: flex; }

/* ===== BLOG INDEX HERO ===== */
.blog-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #1A4BAA 100%);
  padding: 80px 5% 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.blog-hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,162,39,.15); border: 1px solid rgba(201,162,39,.4);
  color: var(--gold-light); font-family: var(--font-heading); font-size: .75rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 6px 16px; border-radius: 30px; margin-bottom: 20px;
}
.blog-hero h1 {
  font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; color: var(--white); margin-bottom: 16px; line-height: 1.25;
}
.blog-hero h1 span { color: var(--gold); }
.blog-hero p { font-size: 1.05rem; color: rgba(255,255,255,.75); max-width: 560px; margin: 0 auto; }

/* ===== BLOG GRID (INDEX) ===== */
.blog-grid-section { padding: 70px 5%; background: var(--off-white); }
.section-label {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white); font-family: var(--font-heading); font-size: .7rem;
  font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 30px; margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800; color: var(--primary); margin-bottom: 8px;
}
.section-title span { color: var(--gold); }
.section-sub { color: var(--text-mid); font-size: .95rem; margin-bottom: 48px; max-width: 540px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.blog-card {
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: var(--transition); border: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.blog-card-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white); font-family: var(--font-heading);
  font-size: .68rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 10px 20px;
}
.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.blog-card-meta span { font-size: .75rem; color: var(--text-light); font-family: var(--font-heading); }
.blog-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border); }
.blog-card h2 {
  font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700;
  color: var(--primary); margin-bottom: 12px; line-height: 1.4;
}
.blog-card p { font-size: .88rem; color: var(--text-mid); line-height: 1.7; flex: 1; }
.blog-card-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.read-more {
  font-family: var(--font-heading); font-size: .78rem; font-weight: 700;
  color: var(--primary); display: flex; align-items: center; gap: 6px;
  transition: var(--transition);
}
.read-more:hover { color: var(--gold-dark); gap: 10px; }
.read-more .arrow { font-size: .9rem; }
.blog-card-num { font-family: var(--font-heading); font-size: 2rem; font-weight: 900; color: var(--border); }

/* ===== BLOG POST LAYOUT ===== */
.post-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 70%);
  padding: 70px 5% 60px;
}
.post-hero-inner { max-width: 820px; margin: 0 auto; }
.post-breadcrumb { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; }
.post-breadcrumb a { font-size: .78rem; color: rgba(255,255,255,.6); font-family: var(--font-heading); transition: var(--transition); }
.post-breadcrumb a:hover { color: var(--gold-light); }
.post-breadcrumb span { color: rgba(255,255,255,.35); font-size: .78rem; }
.post-category {
  display: inline-block;
  background: rgba(201,162,39,.2); border: 1px solid rgba(201,162,39,.5);
  color: var(--gold-light); font-family: var(--font-heading); font-size: .7rem;
  font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 30px; margin-bottom: 16px;
}
.post-hero h1 {
  font-family: var(--font-heading); font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800; color: var(--white); line-height: 1.25; margin-bottom: 18px;
}
.post-hero h1 em { color: var(--gold); font-style: normal; }
.post-meta { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.post-meta-item { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: rgba(255,255,255,.65); font-family: var(--font-heading); }
.post-meta-item svg { width: 14px; height: 14px; fill: var(--gold); flex-shrink: 0; }

/* ===== ARTICLE BODY ===== */
.post-body-wrapper { max-width: 820px; margin: 0 auto; padding: 60px 5%; }

.post-toc {
  background: var(--light-bg); border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm); padding: 24px 28px; margin-bottom: 40px;
}
.post-toc h3 { font-family: var(--font-heading); font-size: .85rem; font-weight: 700; color: var(--primary); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1px; }
.post-toc ol { list-style: decimal; padding-left: 18px; }
.post-toc ol li { margin-bottom: 7px; }
.post-toc ol li a { font-size: .88rem; color: var(--primary-light); font-family: var(--font-heading); font-weight: 600; transition: var(--transition); }
.post-toc ol li a:hover { color: var(--gold-dark); }

.post-body h2 {
  font-family: var(--font-heading); font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 800; color: var(--primary); margin: 42px 0 16px;
  padding-bottom: 10px; border-bottom: 2px solid var(--light-bg);
}
.post-body h3 {
  font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700;
  color: var(--primary-light); margin: 28px 0 12px;
}
.post-body p { font-size: .97rem; color: var(--text-mid); margin-bottom: 18px; line-height: 1.85; }
.post-body p strong { color: var(--text-dark); font-weight: 700; }
.post-body ul, .post-body ol { padding-left: 0; margin-bottom: 20px; }
.post-body ul li, .post-body ol li {
  font-size: .97rem; color: var(--text-mid); padding: 6px 0 6px 28px;
  position: relative; line-height: 1.7;
}
.post-body ul li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--gold); font-weight: 700; font-size: .9rem;
}
.post-body ol { list-style: decimal inside; }
.post-body ol li::before { display: none; }

.callout {
  background: linear-gradient(135deg, #EEF2FF, #F8F9FF);
  border: 1px solid var(--border); border-left: 4px solid var(--primary-light);
  border-radius: var(--radius-sm); padding: 20px 24px; margin: 28px 0;
}
.callout p { margin: 0; font-size: .93rem; }
.callout.gold-callout { border-left-color: var(--gold); background: linear-gradient(135deg, #FFF9E6, #FFFDF4); border-color: rgba(201,162,39,.3); }

.post-cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-md); padding: 36px 40px;
  text-align: center; margin: 44px 0;
  position: relative; overflow: hidden;
}
.post-cta-box::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(201,162,39,.12); pointer-events: none;
}
.post-cta-box h3 { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; color: var(--white); margin-bottom: 10px; }
.post-cta-box p  { font-size: .9rem; color: rgba(255,255,255,.75); margin-bottom: 22px; }
.btn-gold {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: var(--primary-dark);
  font-family: var(--font-heading); font-size: .88rem; font-weight: 800;
  letter-spacing: .5px; padding: 14px 32px; border-radius: 40px;
  transition: var(--transition); box-shadow: var(--shadow-gold);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(201,162,39,.45); }

/* ===== RELATED POSTS ===== */
.related-posts { background: var(--light-bg); padding: 60px 5%; }
.related-posts-inner { max-width: 1100px; margin: 0 auto; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-top: 32px; }
.related-card {
  background: var(--white); border-radius: var(--radius-sm);
  padding: 20px; border: 1px solid var(--border);
  transition: var(--transition); display: flex; flex-direction: column; gap: 8px;
}
.related-card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.related-card .rc-label { font-size: .68rem; font-family: var(--font-heading); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-dark); }
.related-card h4 { font-family: var(--font-heading); font-size: .88rem; font-weight: 700; color: var(--primary); line-height: 1.4; }
.related-card .rc-link { font-size: .78rem; font-family: var(--font-heading); font-weight: 600; color: var(--primary-light); margin-top: auto; }
.related-card:hover .rc-link { color: var(--gold-dark); }

/* ===== FOOTER ===== */
.footer {
  background: var(--primary-dark);
  padding: 50px 5% 28px;
  color: rgba(255,255,255,.6);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .brand-name { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; color: var(--white); margin-bottom: 12px; }
.footer-brand .brand-name span { color: var(--gold); }
.footer-brand p { font-size: .82rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 { font-family: var(--font-heading); font-size: .78rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a { font-size: .82rem; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; font-size: .78rem; }
.footer-bottom p { max-width: 620px; line-height: 1.6; }
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal a { transition: var(--transition); }
.footer-legal a:hover { color: var(--gold); }

/* ===== UTILITIES ===== */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .blog-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .post-cta-box { padding: 28px 22px; }
}
@media (max-width: 480px) {
  .related-grid { grid-template-columns: 1fr; }
  .post-meta { flex-direction: column; gap: 10px; }
}
