
:root {
  --brand:        #1a6ef5;
  --brand-dark:   #1458c8;
  --brand-light:  #e8f0fe;
  --accent:       #f59e0b;
  --text-dark:    #0f172a;
  --text-body:    #334155;
  --text-muted:   #64748b;
  --border:       #e2e8f0;
  --bg:           #f8fafc;
  --bg-white:     #ffffff;
  --card-shadow:  0 2px 12px rgba(0,0,0,.08);
  --card-hover:   0 8px 32px rgba(26,110,245,.12);
  --radius:       10px;
  --radius-sm:    6px;
  --font-serif:   Georgia, 'Times New Roman', serif;
  --font-sans:    'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width:    1140px;
  --header-h:     68px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-dark); }
ul { list-style: none; }

/* ---- Layout ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex; align-items: center;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  width: 100%;
}
.site-logo img { height: 42px; width: auto; }
.site-logo:hover { opacity: .85; }

/* Nav */
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font-size: .95rem; font-weight: 500;
  color: var(--text-dark);
  padding: 8px 14px; border-radius: var(--radius-sm);
  transition: background .2s, color .2s;
}
.site-nav a:hover, .site-nav a.active {
  background: var(--brand-light); color: var(--brand);
}
.nav-cta {
  background: var(--brand) !important; color: #fff !important;
  padding: 8px 18px !important; border-radius: var(--radius-sm) !important;
  margin-left: 8px;
}
.nav-cta:hover { background: var(--brand-dark) !important; }

/* Hamburger */
.nav-toggle {
  display: none; flex-direction: column; justify-content: space-between;
  width: 26px; height: 20px; cursor: pointer; background: none; border: none;
  padding: 0;
}
.nav-toggle span {
  display: block; height: 2.5px; background: var(--text-dark);
  border-radius: 2px; transition: all .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8.75px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8.75px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  background: url('../assets/hero.jpg') center/cover no-repeat;
  color: #fff;
  padding: 90px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* subtle dark layer */
}

.hero-content {
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-block; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-size: .8rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 20px; margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-serif); font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700; line-height: 1.25; margin-bottom: 18px;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.hero p {
  font-size: 1.15rem; color: rgba(255,255,255,.82);
  max-width: 560px; margin: 0 auto 32px;
}
.hero-btn {
  display: inline-block; background: var(--accent); color: #0f172a;
  font-weight: 700; font-size: 1rem; padding: 14px 32px;
  border-radius: var(--radius); transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(245,158,11,.35);
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,158,11,.45); color: #0f172a; }

/* ============================================
   BLOG GRID
   ============================================ */
.section-title {
  font-family: var(--font-serif); font-size: 1.85rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 6px;
}
.section-subtitle { color: var(--text-muted); margin-bottom: 36px; font-size: .98rem; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; flex-wrap: wrap; gap: 12px; }
.view-all { font-weight: 600; font-size: .9rem; border: 1.5px solid var(--brand); padding: 8px 18px; border-radius: var(--radius-sm); transition: background .2s, color .2s; }
.view-all:hover { background: var(--brand); color: #fff; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

.blog-card {
  background: var(--bg-white); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--card-shadow); transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--card-hover); }

.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* category stays on top */
.card-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 20px;
  z-index: 2;
}

.blog-card:hover .card-thumb img {
  transform: scale(1.06);
  transition: transform 0.3s ease;
}


.card-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card-meta { font-size: .78rem; color: var(--text-muted); margin-bottom: 10px; display: flex; gap: 12px; align-items: center; }
.card-meta span { display: flex; align-items: center; gap: 4px; }
.card-title {
  font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700;
  color: var(--text-dark); line-height: 1.4; margin-bottom: 10px;
  transition: color .2s;
}
.blog-card:hover .card-title { color: var(--brand); }
.card-excerpt { color: var(--text-muted); font-size: .9rem; line-height: 1.6; margin-bottom: 18px; flex: 1; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .88rem; font-weight: 600; color: var(--brand);
  transition: gap .2s;
}
.card-link:hover { gap: 10px; }

/* Featured card */
.blog-card.featured {
  grid-column: span 2;
}
.blog-card.featured .card-thumb { height: auto; min-height: 220px; flex: 0 0 42%; }
.blog-card.featured .card-thumb-icon { font-size: 5rem; }

/* ============================================
   SINGLE BLOG PAGE
   ============================================ */
.page-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  align-items: start;
  padding: 48px 0 64px;
}

.post-header { margin-bottom: 32px; }
.post-cat {
  display: inline-block; background: var(--brand-light); color: var(--brand);
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 14px;
}
.post-title {
  font-family: var(--font-serif); font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700; color: var(--text-dark); line-height: 1.3; margin-bottom: 16px;
}
.post-meta { display: flex; gap: 18px; font-size: .85rem; color: var(--text-muted); flex-wrap: wrap; }
.post-meta span { display: flex; align-items: center; gap: 5px; }
.post-hero-img {
  width: 100%;
  height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 36px;
  background: #eee;
}
.post-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-hero-img {
  position: relative;
}

.post-hero-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.35),
    rgba(0,0,0,0.05)
  );
}

/* Article content */
.post-content h2 {
  font-family: var(--font-serif); font-size: 1.45rem; font-weight: 700;
  color: var(--text-dark); margin: 36px 0 14px;
  padding-bottom: 8px; border-bottom: 2px solid var(--brand-light);
}
.post-content h3 {
  font-size: 1.15rem; font-weight: 700; color: var(--text-dark);
  margin: 28px 0 10px;
}
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol {
  padding-left: 22px; margin-bottom: 18px;
}
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 8px; }
.post-content strong { color: var(--text-dark); font-weight: 600; }
.post-content .tip-box {
  background: var(--brand-light); border-left: 4px solid var(--brand);
  padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0; font-size: .95rem;
}
.post-content .tip-box strong { color: var(--brand); }
.post-content .warning-box {
  background: #fff7ed; border-left: 4px solid var(--accent);
  padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0; font-size: .95rem;
}

/* Sidebar */
.sidebar { position: sticky; top: calc(var(--header-h) + 24px); }
.sidebar-widget {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 24px;
  box-shadow: var(--card-shadow);
}
.widget-title {
  font-family: var(--font-serif); font-size: 1rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 2px solid var(--border);
}
.sidebar-posts li { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.sidebar-posts li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sidebar-posts a { font-size: .9rem; color: var(--text-dark); font-weight: 500; line-height: 1.45; }
.sidebar-posts a:hover { color: var(--brand); }
.sidebar-posts .s-meta { font-size: .75rem; color: var(--text-muted); margin-top: 3px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  background: var(--bg); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 20px; font-size: .8rem;
  color: var(--text-muted); transition: background .2s, color .2s, border-color .2s;
}
.tag:hover { background: var(--brand-light); color: var(--brand); border-color: var(--brand); }

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumb {
  background: var(--bg-white); border-bottom: 1px solid var(--border);
  padding: 10px 0; font-size: .83rem; color: var(--text-muted);
}
.breadcrumb ol { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumb li + li::before { content: '›'; margin-right: 6px; }

/* ============================================
   STATIC PAGES (About, Legal, etc.)
   ============================================ */
.page-hero {
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  color: #fff; padding: 60px 0 56px; text-align: center;
}
.page-hero h1 {
  font-family: var(--font-serif); font-size: 2.2rem;
  font-weight: 700; margin-bottom: 10px;
}
.page-hero p { color: rgba(255,255,255,.75); font-size: 1.05rem; }

.prose-page {
  max-width: 760px; margin: 0 auto; padding: 52px 20px 72px;
}
.prose-page h2 {
  font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700;
  color: var(--text-dark); margin: 36px 0 12px;
  border-bottom: 2px solid var(--brand-light); padding-bottom: 8px;
}
.prose-page h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-dark); margin: 22px 0 8px; }
.prose-page p { margin-bottom: 16px; }
.prose-page ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.prose-page li { margin-bottom: 7px; }
.prose-page a { color: var(--brand); text-decoration: underline; }
.prose-page strong { color: var(--text-dark); }

/* Contact info box */
.contact-box {
  background: var(--brand-light); border: 1px solid #bfdbfe;
  border-radius: var(--radius); padding: 28px 32px; margin: 32px 0;
}
.contact-box h3 { color: var(--brand); margin-top: 0; }
.contact-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; font-size: .95rem; }
.contact-icon { font-size: 1.2rem; margin-top: 1px; }

/* ============================================
   HOMEPAGE FEATURES
   ============================================ */
.features-strip {
  background: var(--bg-white); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 36px 0;
}
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; text-align: center; }
.feature-item { padding: 8px; }
.feature-icon { font-size: 2rem; margin-bottom: 10px; }
.feature-title { font-weight: 700; color: var(--text-dark); font-size: .98rem; margin-bottom: 4px; }
.feature-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); font-size: .9rem; font-weight: 500; color: var(--text-dark);
  transition: background .2s, border-color .2s, color .2s;
}
.pagination a:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ============================================
   FOOTER (injected by footer.js)
   ============================================ */
.site-footer {
  background: #0f172a; color: rgba(255,255,255,.75);
  font-size: .9rem; margin-top: auto;
}
.footer-top { padding: 52px 0 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-about .footer-logo img { height: 36px; filter: brightness(0) invert(1); opacity: .85; margin-bottom: 14px; }
.footer-about p { font-size: .88rem; line-height: 1.65; color: rgba(255,255,255,.6); max-width: 280px; }
.footer-col h4 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #fff; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,.62); transition: color .2s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { padding: 18px 0; text-align: center; font-size: .82rem; color: rgba(255,255,255,.4); }
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: #fff; }

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.divider { border: none; border-top: 1px solid var(--border); margin: 36px 0; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .blog-card.featured { grid-column: span 1; flex-direction: column; }
  .blog-card.featured .card-thumb { flex: none; }
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; flex-direction: column; align-items: flex-start; gap: 0;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-white); border-bottom: 1px solid var(--border);
    padding: 12px 20px 18px; box-shadow: 0 8px 24px rgba(0,0,0,.1);
  }
  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; padding: 10px 6px; border-radius: 0; border-bottom: 1px solid var(--border); }
  .site-nav a:last-child { border-bottom: none; }
  .nav-cta { margin-left: 0; margin-top: 6px; text-align: center; }
  .hero { padding: 60px 0 52px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 44px 0; }
  .blog-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
}
