/* ============================================================
   NanoDefense Pro Blog — Shared Stylesheet
   Tone: Clean, medical-trustworthy, editorial warmth
   ============================================================ */

:root {
  --navy:    #0e1f38;
  --teal:    #0a7c6e;
  --teal-lt: #0d9e8c;
  --gold:    #c8913a;
  --cream:   #f9f6f0;
  --white:   #ffffff;
  --gray50:  #f6f6f6;
  --gray200: #e8e8e8;
  --gray400: #9a9a9a;
  --gray700: #3d3d3d;
  --text:    #1e1e1e;
  --radius:  10px;
  --shadow:  0 4px 24px rgba(14,31,56,.10);
  --shadow-sm: 0 2px 10px rgba(14,31,56,.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.75;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-lt); }

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,.20);
}
.nav-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem; font-weight: 700;
  color: var(--white);
  letter-spacing: .02em;
}
.nav-logo sup { font-size: .6rem; vertical-align: super; }
.nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none;
}
.nav-links a { color: rgba(255,255,255,.85); font-family: 'Source Serif 4', serif; font-size: .92rem; transition: color .2s; }
.nav-links a:hover { color: var(--white); }
.btn-nav {
  background: var(--teal); color: var(--white) !important;
  padding: 8px 20px; border-radius: 6px;
  font-weight: 600 !important; letter-spacing: .02em;
  transition: background .2s !important;
}
.btn-nav:hover { background: var(--teal-lt) !important; }

/* ── INDEX HERO ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 50%, var(--teal) 100%);
  color: var(--white);
  padding: 90px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(10,124,110,.35) 0%, transparent 60%);
}
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.hero-tag {
  display: inline-block;
  background: rgba(200,145,58,.25); color: var(--gold);
  border: 1px solid var(--gold); border-radius: 4px;
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 14px; margin-bottom: 20px;
}
.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700; line-height: 1.2;
  margin-bottom: 18px;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.hero p {
  font-size: 1.1rem; opacity: .9;
  margin-bottom: 32px; max-width: 580px; margin-left: auto; margin-right: auto;
}
.hero-stats {
  display: flex; justify-content: center; gap: 40px;
  flex-wrap: wrap; margin-top: 32px;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.8rem; font-family: 'Playfair Display', serif; color: var(--gold); }
.hero-stat span { font-size: .82rem; opacity: .75; text-transform: uppercase; letter-spacing: .08em; }

/* ── BLOG GRID (index page) ── */
.section { padding: 70px 24px; }
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--navy);
  margin-bottom: 8px;
}
.section-sub { color: var(--gray400); font-size: .95rem; margin-bottom: 40px; }
.grid { max-width: 1160px; margin: 0 auto; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 28px;
}
.card {
  background: var(--white);
  border: 1px solid var(--gray200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-badge {
  background: var(--navy); color: var(--white);
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 16px;
}
.card-body { padding: 22px 22px 18px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--navy); line-height: 1.35; margin-bottom: 10px; }
.card-body p { font-size: .9rem; color: var(--gray700); line-height: 1.6; flex: 1; margin-bottom: 18px; }
.card-meta { font-size: .8rem; color: var(--gray400); margin-bottom: 14px; }
.btn-read {
  display: inline-block;
  background: var(--teal); color: var(--white) !important;
  padding: 9px 20px; border-radius: 6px;
  font-size: .88rem; font-weight: 600;
  transition: background .2s; align-self: flex-start;
}
.btn-read:hover { background: var(--teal-lt); }

/* ── INDEX CTA STRIP ── */
.cta-strip {
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: var(--white); text-align: center;
  padding: 64px 24px;
}
.cta-strip h2 { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem,4vw,2.2rem); margin-bottom: 12px; }
.cta-strip p { opacity: .88; margin-bottom: 28px; max-width: 520px; margin-left: auto; margin-right: auto; }
.btn-cta-lg {
  display: inline-block;
  background: var(--gold); color: var(--navy) !important;
  font-weight: 700; font-size: 1.05rem;
  padding: 16px 38px; border-radius: 8px;
  letter-spacing: .02em; transition: filter .2s;
}
.btn-cta-lg:hover { filter: brightness(1.08); }

/* ── TRUST BAR (index) ── */
.trust-bar {
  background: var(--gray50); border-top: 1px solid var(--gray200); border-bottom: 1px solid var(--gray200);
  padding: 26px 24px;
}
.trust-items {
  max-width: 900px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 48px;
}
.trust-item { font-size: .88rem; color: var(--navy); font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* ── BLOG POST LAYOUT ── */
.blog-post { max-width: 1160px; margin: 0 auto; padding: 0 0 60px; }

.post-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1b3a60 60%, var(--teal) 100%);
  padding: 70px 24px 60px;
}
.post-hero-inner { max-width: 760px; }
.post-tag {
  display: inline-block;
  background: rgba(200,145,58,.2); color: var(--gold);
  border: 1px solid rgba(200,145,58,.5);
  font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 4px; margin-bottom: 18px;
}
.post-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: var(--white); line-height: 1.25; margin-bottom: 14px;
}
.post-meta { color: rgba(255,255,255,.65); font-size: .85rem; }

.post-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px; align-items: start;
  padding: 52px 32px 0;
}

/* ── POST CONTENT ── */
.post-content p { margin-bottom: 1.2em; color: var(--gray700); }
.post-content .lead { font-size: 1.13rem; color: var(--navy); font-weight: 400; line-height: 1.7; margin-bottom: 1.6em; }
.post-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.65rem; color: var(--navy);
  margin: 2.4em 0 .7em; padding-bottom: 8px;
  border-bottom: 2px solid var(--teal);
}
.post-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem; color: var(--navy);
  margin: 1.8em 0 .5em;
}
.post-content strong { color: var(--navy); }

/* Lists */
.styled-list { margin: .6em 0 1.4em 1.4em; }
.styled-list li { margin-bottom: .5em; color: var(--gray700); }
.styled-list.numbered { list-style: decimal; }
.styled-list:not(.numbered) { list-style: disc; }
.styled-list li::marker { color: var(--teal); }

/* CTA block */
.cta-block {
  background: linear-gradient(135deg, #f0faf8, #e7f6f3);
  border: 1px solid rgba(10,124,110,.2);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  padding: 30px 32px; margin: 2.5em 0;
}
.cta-block h3 { font-family: 'Playfair Display', serif; color: var(--navy); margin-bottom: 8px; }
.cta-block p { color: var(--gray700); margin-bottom: 18px; }
.btn-cta {
  display: inline-block;
  background: var(--teal); color: var(--white) !important;
  padding: 13px 28px; border-radius: 7px;
  font-weight: 700; font-size: .95rem; letter-spacing: .02em;
  transition: background .2s;
}
.btn-cta:hover { background: var(--teal-lt); }
.btn-small { padding: 9px 18px; font-size: .85rem; display: block; text-align: center; margin-top: 12px; }

/* Related posts */
.related-posts {
  margin-top: 3em; padding: 24px 28px;
  background: var(--gray50); border-radius: var(--radius);
  border: 1px solid var(--gray200);
}
.related-posts h3 { font-family: 'Playfair Display', serif; color: var(--navy); font-size: 1.1rem; margin-bottom: 12px; }
.related-posts ul { list-style: none; padding: 0; }
.related-posts li { padding: 6px 0; border-bottom: 1px solid var(--gray200); }
.related-posts li:last-child { border-bottom: none; }
.related-posts a { color: var(--teal); font-size: .92rem; }
.related-posts a:hover { color: var(--navy); }

/* ── SIDEBAR ── */
.post-sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--gray200);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar-card h4 {
  font-family: 'Playfair Display', serif;
  color: var(--navy); font-size: 1rem;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--teal);
}
.sidebar-card p { font-size: .88rem; color: var(--gray700); margin-bottom: 6px; }
.sidebar-card ul { list-style: none; padding: 0; }
.sidebar-card li { font-size: .88rem; color: var(--gray700); padding: 4px 0; }
.sidebar-links a { color: var(--teal); font-size: .88rem; }
.sidebar-links a:hover { color: var(--navy); }

/* ── FOOTER ── */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,.6);
  padding: 32px 24px; margin-top: 60px;
}
.footer-inner { max-width: 1160px; margin: 0 auto; text-align: center; font-size: .82rem; line-height: 1.7; }
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: var(--white); }

/* Index footer links */
.footer-grid {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px; padding: 48px 24px 32px;
}
.footer-col h5 { font-family: 'Playfair Display', serif; color: var(--white); font-size: .95rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,.6); font-size: .87rem; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 24px; text-align: center; font-size: .8rem; color: rgba(255,255,255,.45); }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .post-body { grid-template-columns: 1fr; padding: 36px 20px 0; }
  .post-sidebar { order: -1; }
  .hero-stats { gap: 24px 32px; }
  .nav-links { gap: 16px; }
}
@media (max-width: 560px) {
  .nav-links li:not(:last-child) { display: none; }
  .post-hero { padding: 48px 20px 40px; }
  .blog-grid { grid-template-columns: 1fr; }
}
