/* =======================
   Global Styles
======================= */
main.wrap.grid {
  margin-top: 2rem;   /* space between header/nav and grid */
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(120deg, #f9f9ff, #eef3ff);
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}
html { scroll-behavior: smooth; }
/* Make footer sticky on short pages */
html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
}

main {
  flex: 1; /* pushes footer to the bottom */
}

.container {
  max-width: 1120px;   /* match blog width */
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

h1, h2, h3 {
  color: #3a4f92;
  margin-bottom: 20px;
  line-height: 1.3;
}
p { margin-bottom: 15px; }
a { color: #4a6cf7; text-decoration: none; }
a:hover { text-decoration: underline; }
.intro {
  text-align: center;
  margin-bottom: 20px;
  color: #555;
}

/* =======================
   Forms & Inputs
======================= */
label { font-weight: 600; display: block; margin-top: 15px; }
input, select, textarea, button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 15px;
  box-sizing: border-box;
}
button {
  background: linear-gradient(90deg, #4a6cf7, #6b8afd);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}
button:hover { background: linear-gradient(90deg, #3a58d9, #5974f0); }

/* Contact Form */
form textarea { resize: vertical; min-height: 120px; }

/* =======================
   Results & Summary
======================= */
#preg-result, #preg-summary {
  margin-top: 25px;
  padding: 20px;
  background: #f7f9ff;
  border-left: 6px solid #4a6cf7;
  border-radius: 12px;
}
.progress-bar {
  background: #e4e9ff;
  border-radius: 30px;
  height: 25px;
  margin: 15px 0;
}
.progress {
  background: linear-gradient(90deg, #4a6cf7, #6b8afd);
  height: 100%;
  text-align: center;
  color: #fff;
  font-weight: bold;
  line-height: 25px;
  border-radius: 30px;
}

/* =======================
   Blog List
======================= */
.blog-list {
  list-style: none;
  padding: 0;
}
.blog-list li {
  background: #f7f9ff;
  margin-bottom: 15px;
  padding: 15px;
  border-radius: 12px;
  border-left: 5px solid #4a6cf7;
  transition: transform 0.2s;
}
.blog-list li:hover { transform: translateX(5px); }
.blog-list a {
  font-weight: 600;
  font-size: 16px;
  color: #3a4f92;
  text-decoration: none;
}

/* =======================
   Blog Article
======================= */
article h1, article h2, article h3 {
  margin-top: 25px;
}
article img {
  max-width: 100%;
  border-radius: 10px;
  margin: 20px 0;
}
blockquote {
  background: #f0f4ff;
  border-left: 5px solid #4a6cf7;
  padding: 15px 20px;
  margin: 20px 0;
  font-style: italic;
  color: #444;
}

/* =======================
   Milestones Table
======================= */
.table-container { margin-top: 25px; overflow-x: auto; }
.milestone-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.milestone-table th, .milestone-table td {
  border: 1px solid #ddd;
  padding: 10px;
}
.milestone-table th {
  background: #4a90e2;
  color: white;
}
.milestone-table tr.highlight {
  background: #ffe08a !important;
  font-weight: 600;
}

/* =======================
   Share Buttons
======================= */
.share-buttons {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.share {
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  border: none;
}
.share.native { background: #4a90e2; }
.share.whatsapp { background: #25d366; }
.share.email { background: #ff5a5f; }
.share.copy { background: #6c757d; }

/* Floating Share */
.floating-share {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}
.floating-share button {
  background: #ff4081;
  border: none;
  border-radius: 50%;
  padding: 12px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.floating-share button:hover { background: #e73370; }

/* =======================
   Footer
======================= */
/* =======================
   Footer (Improved)
======================= */
/* =======================
   Footer (Fixed Contrast)
======================= */
footer {
  background: linear-gradient(90deg, #3a4f92, #4a6cf7); /* dark theme gradient */
  color: #00000; /* light gray text */
  text-align: center;
  padding: 25px 15px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -3px 10px rgba(0,0,0,0.15);
}

footer p {
  margin: 6px 0;
  line-height: 1.6;
}

footer a {
  color: blue; /* bright soft yellow for contrast */
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: lightblue; /* even brighter yellow */
  text-decoration: underline;
}



/* =======================
   Responsive
======================= */
@media (max-width: 600px) {
  .container { padding: 20px; border-radius: 15px; }
  h1 { font-size: 1.6rem; }
  input, select, button, textarea { font-size: 14px; padding: 10px; }
  .share-buttons { flex-direction: column; align-items: stretch; }
}

/* --- Enhancements appended --- */

/* === Layout Enhancements === */
:root{--accent:#4a6cf7;}
html,body{width:100%}
.wrap{max-width:1200px;margin:0 auto;padding:0 20px}
.site-
.nav{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0}
.nav .logo{font-weight:700;text-decoration:none;color:#111}
.nav 
.nav 

@media(max-width:820px){
  .nav 
  
  .nav.show 
}
.site-footer{margin-top:40px;background:#f9fafb;border-top:1px solid #e5e7eb}
.site-footer .wrap{padding:24px 20px;text-align:center}
.footer-cta{margin:10px auto 20px}
.footer-cta .btn{display:inline-block;background:var(--accent);color:#fff;padding:10px 16px;border-radius:8px;text-decoration:none}

/* Grid with sidebar */
.grid{display:grid;grid-template-columns:1fr 320px;gap:28px}
@media(max-width:980px){.grid{grid-template-columns:1fr}}

/* Sidebar */
.sidebar .list{list-style:none;margin:0;padding:0}
.sidebar .list li{margin:6px 0}
.chip{background:#eef2ff;border-radius:999px;padding:2px 10px;font-size:12px;margin-right:6px}
/* Sidebar Widgets: proper spacing between blocks */
.sidebar .widget {
  margin-bottom: 20px;   /* space below each widget */
  padding: 16px;         /* a bit more breathing room inside */
}

.sidebar .widget:last-child {
  margin-bottom: 0;      /* no extra space after the last one */
}

.sidebar .widget h3 {
  margin: 0 0 12px 0;    /* more space under titles */
  font-size: 1rem;
  color: #3a4f92;
  font-weight: 600;
}


/* Blog cards */
.cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.cards.mini{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:14px;display:flex;flex-direction:column}
/* Blog card images - uniform but no cropping */
.cards .card {
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cards .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}


.cards .card-body {
  padding: 16px;     /* nice left/right spacing */
}

.cards .card h2 {
  margin: 12px 0 8px;
  font-size: 1.3rem;
  font-weight: 700;
}

.cards .card .meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
}

.cards .card p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.cards .card .btn {
  display: inline-block;
  margin-top: 12px;
  margin-bottom: 0;   /* no extra gap below */
}

/* ðŸ”¹ Mobile adjustments */
@media (max-width: 768px) {

  .cards .card-body {
    padding: 12px;   /* tighter padding */
  }

  .cards .card h2 {
    font-size: 1.1rem;
    margin: 10px 0 6px;
  }

  .cards .card .meta {
    font-size: 0.8rem;
    margin-bottom: 10px;
  }

  .cards .card p {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }
}

/* ðŸ”¹ Extra small screens (phones < 480px) */
@media (max-width: 480px) {
 

  .cards .card-body {
    padding: 10px;
  }

  .cards .card h2 {
    font-size: 1rem;
  }

  .cards .card p {
    font-size: 0.9rem;
  }
}


/* Breadcrumbs, meta */
.breadcrumbs{font-size:14px;color:#6b7280;margin:12px 0 10px}
.meta time{color:#6b7280}

/* Featured image */
.featured img{width:100%;height:auto;border-radius:12px}

/* Mini calculator */
.mini-calc label{display:block;font-size:14px;margin:6px 0}
.mini-calc input, .mini-calc select{width:100%;padding:8px;border:1px solid #d1d5db;border-radius:8px}
.btn{background:var(--accent);color:#fff;border:0;border-radius:8px;padding:8px 12px;cursor:pointer}

/* TOC */
.toc{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:12px;margin:16px 0}
.toc h3{margin-top:0}
.toc .active{font-weight:600;color:var(--accent)}

/* Progress bar */
#progress-bar{position:fixed;left:0;top:0;height:4px;background:var(--accent);width:0;z-index:1000}

/* Anchor link (visible on hover only) */
h2 .anchor, h3 .anchor{visibility:hidden;margin-left:6px;font-size:.8em;color:#888}
h2:hover .anchor, h3:hover .anchor{visibility:visible;color:var(--accent)}

/* Post nav */
.post-nav{display:flex;justify-content:space-between;gap:10px;margin-top:16px}
.post-nav a{text-decoration:none;color:var(--accent)}

#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-color, #0077cc);
  color: #fff;
  font-size: 20px;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
#back-to-top:hover {
  background: #333;
}


/* Unified nav */
.site-
.headerbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;position:relative}
.logo{font-weight:700;color:#4169e1;text-decoration:none;font-size:18px}

/* three-line hamburger */
.hamburger{display:none;align-items:center;justify-content:center;width:44px;height:44px;border:none;background:transparent;cursor:pointer}
.hamburger .bar{display:block;width:22px;height:2px;background:#262626;margin:3px 0;border-radius:2px}

/* desktop menu */




/* mobile */
@media (max-width:768px){
  .logo{position:absolute;left:50%;transform:translateX(-50%)}
  .hamburger{display:inline-flex;margin-left:auto}
  
  
  
  
}



/* responsive grid */
.wrap.grid{display:grid;grid-template-columns:2fr 1fr;gap:24px}
@media (max-width: 960px){ .wrap.grid{grid-template-columns:1fr} .sidebar{margin-top:20px} }
.widget{background:#fff;border:1px solid #eee;border-radius:10px;padding:12px}
.widget h3{margin:0 0 8px 0}



/* Mobile menu */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  
  
}


/* =======================
   Fixed Header & Navigation
======================= */
.site-
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3a4f92;
}



.menu-toggle .bar {
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}
/* Mobile menu */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  
  
}


/* =======================
   NAV: Robust overrides
======================= */
.site-header .nav-container{display:flex;align-items:center;justify-content:space-between}
.site-header .menu-toggle{display:none;flex-direction:column;justify-content:space-between;width:26px;height:20px;background:none;border:0;cursor:pointer;z-index:1001}
.site-header .menu-toggle .bar{width:100%;height:3px;background:#333;border-radius:2px;transition:transform .25s ease, opacity .25s ease}

.site-header 

@media (max-width:768px){
  .site-header .menu-toggle{display:flex}
  .site-header 
  .site-header 
  .site-header 
}
/* hamburger -> X */
.site-header .menu-toggle.open .bar:nth-child(1){transform:translateY(8.5px) rotate(45deg)}
.site-header .menu-toggle.open .bar:nth-child(2){opacity:0}
.site-header .menu-toggle.open .bar:nth-child(3){transform:translateY(-8.5px) rotate(-45deg)}


/* =======================
   Modern Header & Navigation
======================= */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  z-index: 1000;
}
.site-header .nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.site-header .logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #3a4f92;
  text-decoration: none;
}
.site-header .nav-links {
  display: flex;
  gap: 20px;
}
.site-header .nav-links a {
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}
.site-header .nav-links a:hover,
.site-header .nav-links a.active {
  color: #4a6cf7;
}
.site-header .menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}
.site-header .menu-toggle .bar {
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile */
@media (max-width: 768px) {
  .site-header .menu-toggle { display: flex; }
  .site-header .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    right: 10px;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    width: 220px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    overflow: hidden;
  }
  .site-header .nav-links.active { display: flex; }
  .site-header .nav-links a {
    width: 100%;
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
  }
}
/* Hamburger â†’ X animation */
.site-header .menu-toggle.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header .menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.site-header .menu-toggle.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* =======================
   Force Hamburger Visibility
======================= */
.site-header .menu-toggle {
  display: flex !important;
  margin-left: auto;
  cursor: pointer;
  width: 28px;
  height: 22px;
  justify-content: space-between;
  flex-direction: column;
  background: none;
  border: none;
}

.site-header .menu-toggle .bar {
  display: block;
  height: 3px;
  width: 100%;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Slide-down animation for mobile menu */
.site-header .nav-links {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.site-header .nav-links.active {
  display: flex;
  max-height: 400px; /* enough to reveal all links */
}


/* =======================
   Navigation Fix & Active Link
======================= */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 999;
}
.site-header .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
}
.site-header .logo a {
  font-size: 1.2rem;
  font-weight: 700;
  color: #3a4f92;
  text-decoration: none;
}
.site-header .menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
}
.site-header .menu-toggle .bar {
  width: 100%;
  height: 3px;
  background: #333;
  margin: 3px 0;
  border-radius: 2px;
  transition: 0.3s;
}
.site-header .nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-header .nav-links a {
  color: #333;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s;
}
.site-header .nav-links a:hover,
.site-header .nav-links a.active {
  color: #4a6cf7;
  font-weight: 700;
  text-decoration: underline;
}
@media (max-width: 768px) {
  .site-header .menu-toggle { display: flex; }
  .site-header .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    width: 220px;
    padding: 10px 0;
    display: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }
  .site-header .nav-links.active { display: flex; }
  .site-header .nav-links a {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
  }
  .site-header .nav-links a:last-child { border-bottom: none; }
}



/* === ChatGPT Fixes: Navigation visibility & mobile colors (2025-09-30) === */

/* Desktop: always show nav on wider screens */
@media (min-width: 769px) {
  .site-header .nav-links {
    display: flex !important;
    position: static !important;
    background: none !important;
    flex-direction: row !important;
    width: auto !important;
    box-shadow: none !important;
  }
  .site-header .nav-links a {
    color: #333 !important;
    border: none !important;
    padding: 0 15px;
  }
}

/* Mobile: ensure link visibility on white background */
@media (max-width: 768px) {
  .site-header .nav-links a {
    color: #333 !important;
  }
}
/* === End Fixes === */



/* === ChatGPT Strict Navigation Fixes (2025-09-30) === */

/* Force hamburger bars visible on mobile */
.site-header .menu-toggle .bar {
  background: #333 !important;
}

/* Desktop: hide toggle, show nav */
@media (min-width: 769px) {
  .site-header .menu-toggle {
    display: none !important;
  }
  .site-header .nav-links {
    display: flex !important;
    position: static !important;
    background: none !important;
    flex-direction: row !important;
    width: auto !important;
    box-shadow: none !important;
  }
  .site-header .nav-links a {
    color: #333 !important;
    border: none !important;
    padding: 0 15px;
  }
}

/* Mobile: show toggle, ensure links visible */
@media (max-width: 768px) {
  .site-header .menu-toggle {
    display: flex !important;
  }
  .site-header .nav-links a {
    color: #333 !important;
  }
}
/* === End Strict Fixes === */



/* === ChatGPT Stronger Navigation Fixes (2025-09-30) === */

/* Force desktop nav visible */
@media (min-width: 769px) {
  header.site-header nav.nav-links,
  .site-header .nav-links {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    flex-direction: row !important;
    background: none !important;
    width: auto !important;
    box-shadow: none !important;
  }
  .site-header .nav-links a {
    color: #333 !important;
    padding: 0 15px !important;
    border: none !important;
  }
  .site-header .menu-toggle {
    display: none !important;
  }
}

/* Ensure hamburger bars are visible */
.site-header .menu-toggle .bar {
  background-color: #000 !important; /* pure black for contrast */
  display: block !important;
}

/* Mobile link visibility */
@media (max-width: 768px) {
  .site-header .nav-links a {
    color: #333 !important;
  }
}
/* === End Stronger Fixes === */



/* -----------------------
   Modern, robust navigation
   (appended by ChatGPT fix)
--------------------------*/

:root{
  --nav-bg: #ffffff;
  --nav-text:#111827; /* gray-900 */
  --nav-muted:#6b7280; /* gray-500 */
  --nav-accent:#3b82f6; /* blue-500 */
  --nav-shadow: 0 6px 24px rgba(17,24,39,.06), 0 2px 8px rgba(17,24,39,.05);
}

/* Wrap */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: saturate(180%) blur(6px);
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(0,0,0,.06);
  box-shadow: var(--nav-shadow);
}
.site-header .nav-container{
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.site-header .logo a{
  font-weight: 700;
  letter-spacing: .2px;
  color: #1e3a8a; /* brand-ish */
  text-decoration:none;
  font-size: 1.15rem;
}

/* Desktop nav */
.site-header .nav-links{
  display:flex;
  align-items:center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style:none;
}
.site-header .nav-links a{
  color: var(--nav-text);
  text-decoration:none;
  font-weight:500;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.site-header .nav-links a:hover{
  color: var(--nav-accent);
  background: rgba(59,130,246,.08);
}

/* Hamburger */
.site-header .menu-toggle{
  display:none;
  width: 36px; height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.site-header .menu-toggle .bar{
  display:block;
  height: 3px; width: 100%;
  background: #111 !important; /* ensure visible on light background */
  border-radius: 3px;
  position:absolute; left:0;
  transition: transform .25s ease, opacity .25s ease;
}
.site-header .menu-toggle .bar:nth-child(1){ top: 3px; }
.site-header .menu-toggle .bar:nth-child(2){ top: 12px; }
.site-header .menu-toggle .bar:nth-child(3){ top: 21px; }

/* Open state (turn into X) */
.site-header.nav-open .menu-toggle .bar:nth-child(1){ transform: translateY(9px) rotate(45deg); }
.site-header.nav-open .menu-toggle .bar:nth-child(2){ opacity: 0; }
.site-header.nav-open .menu-toggle .bar:nth-child(3){ transform: translateY(-9px) rotate(-45deg); }

/* Mobile menu */
@media (max-width: 900px){
  .site-header .menu-toggle{ display:block; }
  .site-header .nav-links{
    position: absolute;
    top: 60px; right: 12px; left: 12px;
    display:block;
    background: var(--nav-bg);
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 14px;
    padding: 10px;
    box-shadow: var(--nav-shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .site-header .nav-links li{ margin: 2px 0; }
  .site-header .nav-links a{ display:block; padding: 12px 12px; }
  .site-header.nav-open .nav-links{ max-height: 340px; }
}

/* Accessibility focus */
.site-header .nav-links a:focus-visible,
.site-header .menu-toggle:focus-visible{
  outline: 3px solid rgba(59,130,246,.55);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Ensure visibility on any BG */


/* -----------------------
   Professional Navigation (Light Theme)
--------------------------*/
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background:#fff; /* always white */
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.site-header .logo a{
  font-weight:700;
  color:#1e3a8a;
  text-decoration:none;
  font-size:1.2rem;
}
.site-header .nav-links a{
  color:#333;
  font-weight:500;
  padding:8px 10px;
  border-radius:8px;
  transition:color .2s ease, background .2s ease;
}
.site-header .nav-links a:hover{
  color:#3b82f6;
  background:rgba(59,130,246,.08);
}
.site-header .menu-toggle .bar{
  background:#333 !important; /* visible bars on white header */
}
@media (max-width:900px){
  .site-header .nav-links{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:12px;
    box-shadow:0 6px 16px rgba(0,0,0,.08);
  }
  .site-header .nav-links a{
    color:#333;
    width:100%;
    display:block;
    padding:12px 14px;
    border-bottom:1px solid #eee;
  }
}
/* Active link highlight */
.site-header .nav-links a[aria-current="page"]{
  color:#3b82f6;
  background:rgba(59,130,246,.10);
  font-weight:600;
}



/* Slimmer header on mobile */
@media (max-width:900px){
  .site-header .nav-container{
    padding:6px 14px;
    height:52px;
  }
  .site-header .logo a{
    font-size:1.05rem;
  }
  .site-header .menu-toggle{
    width:32px; height:22px;
  }
  .site-header .menu-toggle .bar:nth-child(1){ top:2px; }
  .site-header .menu-toggle .bar:nth-child(2){ top:10px; }
  .site-header .menu-toggle .bar:nth-child(3){ top:18px; }
}



/* -----------------------
   FINAL NAVIGATION FIXES
--------------------------*/

/* Desktop: menu always visible */
@media (min-width:901px){
  .site-header .nav-links{
    display:flex !important;
    position:static !important;
    flex-direction:row !important;
    gap:22px;
    background:none !important;
    box-shadow:none !important;
    border:none !important;
    max-height:none !important;
    width:auto !important;
  }
}

/* Mobile: menu aligned under toggle on right */
@media (max-width:900px){
  .site-header .nav-links{
    position:absolute;
    top:52px; /* just below header */
    right:12px;
    left:auto;
    width:220px;
    text-align:left;
    border-radius:12px;
    overflow:hidden;
    transform:scaleY(0);
    transform-origin:top right;
    transition:transform .25s ease;
  }
  .site-header.nav-open .nav-links{
    transform:scaleY(1);
  }
}



/* -----------------------
   Refined Navigation Hover (Professional)
--------------------------*/
.site-header .nav-links a {
  color: #333;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.site-header .nav-links a:hover {
  color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.06);
}

.site-header .nav-links a[aria-current="page"] {
  color: #2563eb;
  background-color: rgba(59, 130, 246, 0.12);
  font-weight: 600;
}



/* -----------------------
   Underline Hover Animation for Nav Links
--------------------------*/
.site-header .nav-links a {
  position: relative;
  overflow: hidden;
}

.site-header .nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #3b82f6;
  transition: width 0.3s ease;
}

.site-header .nav-links a:hover::after,
.site-header .nav-links a[aria-current="page"]::after {
  width: 100%;
}



/* -----------------------
   Clean Navigation Hover & Active (Underline only)
--------------------------*/
.site-header .nav-links a {
  color: #333;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 0;
  transition: color 0.25s ease;
  position: relative;
  overflow: hidden;
  background: none !important;
}

.site-header .nav-links a:hover {
  color: #3b82f6;
  background: none !important;
}

.site-header .nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #3b82f6;
  transition: width 0.3s ease;
}

.site-header .nav-links a:hover::after,
.site-header .nav-links a[aria-current="page"]::after {
  width: 100%;
}

.site-header .nav-links a[aria-current="page"] {
  color: #2563eb;
  font-weight: 600;
  background: none !important;
}



/* -----------------------
   Remove default underline from nav links
--------------------------*/
.site-header .nav-links a {
  text-decoration: none !important;
}



/* -----------------------
   Consistent Spacing Fixes
--------------------------*/

/* Gap below header on all pages */
.site-header + * {
  margin-top: 30px;
}

/* Sidebar layout: consistent gap between content and sidebar */
.grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
}

/* Responsive stacking */
@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}



/* -----------------------
   Page With Sidebar Layout
--------------------------*/
.page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
}

@media (max-width: 980px) {
  .page-with-sidebar {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}



/* -----------------------
   Standardized Max Width for Content
--------------------------*/
.container, .page-with-sidebar, .grid {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}


/* =======================
   Blog Page Optimizations
   ======================= */

/* Widen blog page */
.blog-page {
  max-width: 1280px;   /* more modern width */
  padding-left: 10px;
  padding-right: 10px;
}

/* Blog cards grid */
.blog-page .cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* bigger cards */
  gap: 20px; /* extra breathing room */
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Blog card styling */
.blog-page .card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-page .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Featured images: uniform aspect ratio */
.blog-page .card img,
.cards .card figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 12px 12px 0 0;
}

/* Card body */
.blog-page .card-body {
  padding: 16px;
}

/* Title */
.blog-page .card h2 {
  margin: 12px 0 8px;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Meta */
.blog-page .card .meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
}

/* Excerpt */
.blog-page .card p {
  margin-bottom: 12px;
  line-height: 1.6;
}

/* Read More Button */
.blog-page .card .btn {
  display: inline-block;
  margin-top: auto; /* stick to bottom of card */
  background: linear-gradient(90deg, #4a6cf7, #6b8afd);
  color: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}

.blog-page .card .btn:hover {
  background: linear-gradient(90deg, #3a58d9, #5974f0);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .blog-page .cards {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
  }
  .blog-page .card h2 {
    font-size: 1.1rem;
  }
  .blog-page .card img {
    aspect-ratio: 4 / 3; /* taller images on small screens */
  }
}
/* Blog card image fix */
/* Blog card cleanup */
.blog-page .card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;  /* 🚀 no padding here */
}

.blog-page .card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 12px 12px 0 0;
}
.blog-page .card-body {
  padding: 16px; /* ✅ move padding here */
}
/* Stronger fix to stop image cropping on blog cards */
.blog-page .cards .card {
  overflow: visible !important;
  padding: 0; /* remove padding around image */
}

.blog-page .cards .card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

.blog-page .cards .card-body {
  padding: 16px; /* move padding to text only */
}

/* Strongest fix for blog cards */
.blog-page .card {
  padding: 0 !important;        /* kill global padding */
  overflow: hidden !important;  /* prevent crop artifacts */
}

.blog-page .card img {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  object-fit: cover !important;
  border-radius: 12px 12px 0 0 !important;
  display: block;
}

.blog-page .card-body {
  padding: 16px !important; /* keep text padding */
}

/* Pagination styling */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  font-size: 0.95rem;
}

.pagination a {
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.pagination a:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.pagination span {
  padding: 6px 12px;
  color: #6b7280;
  font-weight: 500;
}
/* Global main content styling */

/* Author Box Styling */
.author-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
}

.author-box img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #ddd;
}

.author-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #333;
}

.author-info p {
  margin: 0.2rem 0;
  color: #555;
  line-height: 1.5;
}

.author-updated {
  font-size: 0.9rem;
  color: #008000;
  font-style: italic;
}

/* Avatar circle instead of image */
.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #4CAF50; /* green background, you can change */
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid #ddd;
}

.author-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  background: #fafafa;
}

.author-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: #333;
}

.author-info p {
  margin: 0.3rem 0;
  color: #555;
  line-height: 1.5;
}

.author-updated {
  font-size: 0.9rem;
  color: #008000;
  font-style: italic;
}
/* Hide text visually but keep for screen readers (used on the H2 in tool) */
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* Homepage hero + calculator wrappers */
.hero-card{
  background:#fff;border:1px solid #e5e7eb;border-radius:16px;
  padding:20px;margin-bottom:20px;display:flex;gap:20px;
}
.hero-text h1{ margin:0 0 10px; }
.value-list{ margin:10px 0 16px; padding-left:18px; }
.value-list li{ margin:4px 0; }

.calculator-card{
  background:#fff;border:1px solid #e5e7eb;border-radius:16px;
  padding:16px;margin-bottom:24px;
}

/* FAQ boxes on homepage */
.faq .faq-item{
  background:#fff;border:1px solid #e5e7eb;border-radius:12px;
  padding:12px;margin:10px 0;
}


/* Mobile & Tablet (up to 1024px): show hamburger, hide desktop links */
@media (max-width: 1024px) {
  .site-header .menu-toggle {
    display: flex !important;
  }
  .site-header .nav-links {
    display: none !important;  /* hide by default */
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 15px;
    background: #fff;
    width: 220px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  }
  .site-header.nav-open .nav-links {
    display: flex !important;  /* show when nav-open class is added */
  }
}

/* Desktop (from 1025px): always show links, hide hamburger */
@media (min-width: 1025px) {
  .site-header .menu-toggle {
    display: none !important;
  }
  .site-header .nav-links {
    display: flex !important;
    position: static !important;
    flex-direction: row !important;
    gap: 20px;
    box-shadow: none !important;
    background: none !important;
    width: auto !important;
  }
}
