/* ===========================
   TechPulse Blog — style.css
   Modern, Clean, Responsive
=========================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1a1a2e;
  background: #f8fafc;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ---------- Container ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Pages ---------- */
.page { display: none; }
.page.active { display: block; }

/* ===========================
   HEADER
=========================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  color: #1a1a2e;
  letter-spacing: -.5px;
}
.logo-icon { font-size: 1.4rem; }
.logo-text { color: #2563eb; }

.nav-menu { display: flex; align-items: center; gap: 4px; }

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 500;
  color: #4b5563;
  transition: background .2s, color .2s;
}
.nav-link:hover { background: #f0f4ff; color: #2563eb; }
.nav-link.active { background: #eff6ff; color: #2563eb; font-weight: 600; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 8px;
}
.hamburger span {
  width: 24px; height: 2px;
  background: #374151;
  border-radius: 4px;
  transition: transform .3s, opacity .3s;
  display: block;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================
   AD SLOTS
=========================== */
.ad-banner { background: #f1f5f9; padding: 10px 0; }

.ad-slot {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #94a3b8;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.ad-top .ad-slot,
.ad-footer-banner .ad-slot {
  height: 90px;
  width: 100%;
  max-width: 728px;
  margin: 0 auto;
}

.ad-sidebar {
  width: 100%;
  height: 250px;
}

.ad-inline {
  width: 100%;
  height: 90px;
  margin: 32px 0;
}

.ad-label { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; }
.ad-size { font-size: .85rem; color: #64748b; font-weight: 600; }

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,.3);
}
.btn-primary:hover { background: #1d4ed8; box-shadow: 0 6px 20px rgba(37,99,235,.4); transform: translateY(-1px); }

.btn-back {
  background: #f1f5f9;
  color: #475569;
  font-size: .9rem;
  padding: 9px 18px;
  border-radius: 8px;
  margin-bottom: 28px;
  transition: background .2s;
}
.btn-back:hover { background: #e2e8f0; }

/* ===========================
   HERO SECTION
=========================== */
.hero {
  padding: 60px 0;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: #dbeafe;
  color: #2563eb;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
  margin-bottom: 16px;
  letter-spacing: -.5px;
}

.hero-excerpt {
  font-size: 1.05rem;
  color: #475569;
  margin-bottom: 20px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: .9rem;
  color: #64748b;
}

.hero-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
}
.hero-image img { width: 100%; height: 320px; object-fit: cover; }

/* ===========================
   BLOG SECTION LAYOUT
=========================== */
.blog-section { padding: 60px 0; }

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
  padding-top: 40px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-heading h2 { font-size: 1.5rem; font-weight: 700; color: #0f172a; }
.post-count { background: #dbeafe; color: #2563eb; font-size: .8rem; font-weight: 600; padding: 4px 12px; border-radius: 100px; }

/* ===========================
   CATEGORY PILLS
=========================== */
.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.pill {
  padding: 7px 16px;
  border-radius: 100px;
  border: 1.5px solid #e5e7eb;
  font-size: .85rem;
  font-weight: 500;
  color: #4b5563;
  background: #fff;
  transition: all .2s;
}
.pill:hover { border-color: #2563eb; color: #2563eb; }
.pill.active { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ===========================
   BLOG GRID & CARDS
=========================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.blog-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: transform .25s, box-shadow .25s;
  cursor: pointer;
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,.1);
}

.card-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.blog-card:hover .card-image img { transform: scale(1.06); }

.card-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(37,99,235,.9);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: .4px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.card-body { padding: 20px; }

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  font-size: .875rem;
  color: #64748b;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: .8rem;
  color: #94a3b8;
}

.card-author { display: flex; align-items: center; gap: 6px; }
.author-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700;
}

.read-more {
  color: #2563eb;
  font-weight: 600;
  font-size: .8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s;
}
.blog-card:hover .read-more { gap: 8px; }

/* ===========================
   SEARCH
=========================== */
.search-bar {
  position: relative;
}
.search-bar input,
.search-bar-mobile input {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: .9rem;
  font-family: inherit;
  background: #fff;
  color: #1a1a2e;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-bar input:focus,
.search-bar-mobile input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.search-icon {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-bar-mobile { display: none; position: relative; margin-bottom: 16px; }

/* ===========================
   SIDEBAR
=========================== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.widget {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eff6ff;
}

.category-list li { margin-bottom: 4px; }
.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  color: #374151;
  font-size: .9rem;
  font-weight: 500;
  transition: background .2s, color .2s;
}
.category-list a:hover { background: #eff6ff; color: #2563eb; }
.cat-count {
  background: #dbeafe;
  color: #2563eb;
  font-size: .75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}

.widget-ad { padding: 0; overflow: hidden; background: none; border: none; box-shadow: none; }

.recent-list li { margin-bottom: 4px; }
.recent-list a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.4;
  transition: color .2s;
}
.recent-list a:hover { color: #2563eb; }
.recent-list li:last-child a { border-bottom: none; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  background: #f1f5f9;
  color: #475569;
  font-size: .8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 100px;
  transition: background .2s, color .2s;
}
.tag:hover { background: #dbeafe; color: #2563eb; }

/* ===========================
   SINGLE POST
=========================== */
.post-article { min-width: 0; }

.post-header { margin-bottom: 28px; }
.post-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  margin: 12px 0 16px;
  letter-spacing: -.3px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: .9rem;
}
.author-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

.post-image {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: 0 8px 30px rgba(0,0,0,.1);
}
.post-image img { width: 100%; height: 420px; object-fit: cover; }

.post-body {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.9;
  color: #1e293b;
}
.post-body h2 { font-family: 'Inter', sans-serif; font-size: 1.5rem; font-weight: 700; color: #0f172a; margin: 36px 0 16px; }
.post-body h3 { font-family: 'Inter', sans-serif; font-size: 1.2rem; font-weight: 700; color: #0f172a; margin: 28px 0 12px; }
.post-body p { margin-bottom: 20px; }
.post-body ul { margin: 16px 0 20px 24px; list-style: disc; }
.post-body li { margin-bottom: 8px; }
.post-body strong { color: #0f172a; }
.post-body code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Courier New', monospace;
  font-size: .9em;
  color: #2563eb;
}
.post-body pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
  font-family: 'Courier New', monospace;
  font-size: .9rem;
  line-height: 1.6;
}

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 32px 0 24px; }

.post-share {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  margin: 24px 0;
  font-size: .9rem;
  color: #64748b;
}
.share-btn {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 500;
  transition: all .2s;
}
.share-btn:hover { border-color: #2563eb; color: #2563eb; background: #eff6ff; }

.related-posts { margin-top: 40px; }
.related-posts h3 { font-size: 1.3rem; font-weight: 700; color: #0f172a; margin-bottom: 24px; }

/* ===========================
   META ELEMENTS
=========================== */
.meta-category {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.meta-dot { color: #d1d5db; }

/* ===========================
   PAGE HERO (for inner pages)
=========================== */
.page-hero {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #fff;
  padding: 60px 0;
  margin-bottom: 60px;
}
.page-hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; }
.page-hero p { font-size: 1.1rem; opacity: .85; }

/* ===========================
   ABOUT PAGE
=========================== */
.about-content { max-width: 760px; margin: 0 auto 80px; }
.about-text h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 16px; color: #0f172a; }
.about-text h3 { font-size: 1.2rem; font-weight: 700; margin: 28px 0 12px; color: #0f172a; }
.about-text p { color: #475569; margin-bottom: 16px; font-size: 1.02rem; }
.about-list { list-style: none; margin: 0 0 20px; }
.about-list li { padding: 10px 0; border-bottom: 1px solid #f1f5f9; color: #374151; font-size: .97rem; }
.about-list li:last-child { border-bottom: none; }

/* ===========================
   CONTACT PAGE
=========================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  max-width: 900px;
  margin: 0 auto 80px;
}

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .9rem; font-weight: 600; color: #374151; }
.form-group input, .form-group textarea {
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
  color: #1a1a2e;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-group textarea { resize: vertical; }
.form-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
}

.contact-info { padding-top: 20px; }
.contact-info h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; color: #0f172a; }
.contact-info p { color: #475569; margin-bottom: 10px; font-size: .95rem; }
.contact-socials { display: flex; gap: 10px; margin-top: 20px; }
.social-btn {
  background: #eff6ff;
  color: #2563eb;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s;
  display: inline-block;
}
.social-btn:hover { background: #dbeafe; }

/* ===========================
   NO RESULTS
=========================== */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 1.1rem;
}

/* ===========================
   FOOTER
=========================== */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 60px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: .9rem; color: #64748b; margin-bottom: 20px; line-height: 1.6; }

.footer-socials { display: flex; gap: 10px; }
.social-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: background .2s, transform .2s;
}
.social-icon:hover { background: #2563eb; transform: translateY(-2px); }

.footer-links h4 {
  font-size: .85rem;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 16px;
}
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul a {
  color: #64748b;
  font-size: .9rem;
  transition: color .2s;
}
.footer-links ul a:hover { color: #93c5fd; }

.footer-newsletter h4 {
  font-size: .85rem;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 10px;
}
.footer-newsletter p { font-size: .85rem; color: #64748b; margin-bottom: 14px; }

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.newsletter-form input {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: .9rem;
  font-family: inherit;
  outline: none;
}
.newsletter-form input::placeholder { color: #64748b; }
.newsletter-form .btn-primary { width: 100%; justify-content: center; padding: 10px; }
.newsletter-success {
  background: rgba(20,83,45,.3);
  border: 1px solid rgba(187,247,208,.2);
  color: #86efac;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .85rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 20px 0;
}
.footer-bottom p { text-align: center; font-size: .82rem; color: #475569; }
.footer-bottom a { color: #64748b; transition: color .2s; }
.footer-bottom a:hover { color: #93c5fd; }

/* ===========================
   AD FOOTER BANNER
=========================== */
.ad-footer-banner { background: #f1f5f9; padding: 10px 0; }

/* ===========================
   RESPONSIVE — TABLET
=========================== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-title { font-size: 1.9rem; }
  .hero-image { display: none; }

  .blog-layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .widget-ad { display: none; }
  .search-bar-mobile { display: block; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .contact-layout { grid-template-columns: 1fr; }
}

/* ===========================
   RESPONSIVE — MOBILE
=========================== */
@media (max-width: 640px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-direction: column;
    gap: 0;
    padding: 12px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
  }
  .nav-menu.open { display: flex; }
  .nav-link { width: 100%; padding: 12px 14px; }
  .hamburger { display: flex; }

  .hero { padding: 40px 0; }
  .hero-title { font-size: 1.6rem; }
  .hero-badge { font-size: .7rem; }

  .blog-section { padding: 32px 0; }
  .blog-grid { grid-template-columns: 1fr; }

  .sidebar { display: flex; flex-direction: column; }

  .post-title { font-size: 1.6rem; }
  .post-image img { height: 240px; }
  .post-meta { flex-wrap: wrap; }

  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand, .footer-newsletter { grid-column: 1; }

  .page-hero h1 { font-size: 1.8rem; }

  .ad-top .ad-slot, .ad-footer-banner .ad-slot { height: 60px; }
  .ad-inline { height: 60px; }
}

/* ===========================
   UTILITIES
=========================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ===========================
   LOADING & ERROR STATES
=========================== */
.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  font-size: .95rem;
}

/* ===========================
   CARD DATE & LAYOUT
=========================== */
.card-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.card-date { font-size: .75rem; color: #94a3b8; }

/* ===========================
   RECENT POST CATEGORY BADGE
=========================== */
.recent-cat {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  color: #2563eb;
  background: #dbeafe;
  padding: 1px 7px;
  border-radius: 100px;
  margin-bottom: 3px;
  margin-right: 4px;
}

/* ===========================
   ABOUT: JSON TIP BOX
=========================== */
.about-json-tip {
  margin-top: 40px;
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: 14px;
  padding: 28px;
}
.about-json-tip h3 { font-size: 1.1rem; font-weight: 700; color: #0369a1; margin-bottom: 10px; }
.about-json-tip p { color: #475569; font-size: .92rem; margin-bottom: 12px; }
.about-json-tip pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 18px;
  font-family: 'Courier New', monospace;
  font-size: .82rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 12px 0;
}
.about-json-tip code {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: .88rem;
}

/* ===========================
   PAGE HERO code tag
=========================== */
.page-hero code {
  background: rgba(255,255,255,.2);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: .85em;
}


/* =====================================================
   ADMIN PANEL STYLES
===================================================== */

/* ---- Footer admin link ---- */
.footer-admin-link {
  text-align: center;
  padding: 12px;
  background: #0f172a;
}
.footer-admin-link a {
  color: #475569;
  font-size: .8rem;
  text-decoration: none;
  transition: color .2s;
}
.footer-admin-link a:hover { color: #94a3b8; }

/* ---- Admin Login Page ---- */
.admin-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 40px 20px;
}
.admin-login-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(0,0,0,.4);
  text-align: center;
}
.admin-login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.admin-login-logo .logo-icon { font-size: 1.8rem; }
.admin-login-logo .logo-text { font-size: 1.5rem; font-weight: 800; color: #1e293b; }
.admin-login-heading { font-size: 1.6rem; font-weight: 700; color: #1e293b; margin-bottom: 6px; }
.admin-login-sub { color: #64748b; font-size: .95rem; margin-bottom: 28px; }

.admin-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: .9rem;
  margin-bottom: 18px;
}
.admin-login-form .form-group { text-align: left; margin-bottom: 18px; }
.admin-login-form label { font-weight: 600; font-size: .9rem; color: #374151; display: block; margin-bottom: 6px; }
.admin-login-form input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: .95rem;
  transition: border-color .2s;
  box-sizing: border-box;
}
.admin-login-form input:focus { outline: none; border-color: #3b82f6; }
.admin-login-btn { width: 100%; padding: 14px; font-size: 1rem; margin-top: 6px; border-radius: 8px; }
.admin-hint { color: #94a3b8; font-size: .82rem; margin-top: 20px; }
.admin-hint code { background: #f1f5f9; color: #475569; padding: 2px 6px; border-radius: 4px; }
.admin-back-link { color: #64748b; font-size: .88rem; text-decoration: none; display: block; margin-top: 16px; }
.admin-back-link:hover { color: #3b82f6; }

/* ---- Admin Dashboard ---- */
.admin-wrapper { min-height: 100vh; background: #f8fafc; }

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  height: 64px;
  background: #1e293b;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.admin-topbar-left { display: flex; align-items: center; gap: 10px; }
.admin-topbar-left .logo-icon { font-size: 1.4rem; }
.admin-topbar-title { color: #f1f5f9; font-size: 1.1rem; font-weight: 700; }
.admin-topbar-right { display: flex; gap: 10px; }

.admin-nav-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  transition: all .2s;
}
.admin-nav-btn:hover { background: #334155; color: #f1f5f9; }
.admin-nav-btn-danger { border-color: #dc2626; color: #fca5a5; }
.admin-nav-btn-danger:hover { background: #dc2626; color: #fff; }

.admin-body { max-width: 1200px; margin: 0 auto; padding: 32px 24px 80px; }

/* Stats row */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border: 1px solid #e2e8f0;
}
.stat-card-action {
  cursor: pointer;
  border: 2px dashed #bfdbfe;
  background: #eff6ff;
  transition: all .2s;
}
.stat-card-action:hover { background: #dbeafe; border-color: #3b82f6; }
.stat-icon { font-size: 2rem; }
.stat-num { font-size: 1.8rem; font-weight: 800; color: #1e293b; line-height: 1; }
.stat-label { font-size: .85rem; color: #64748b; margin-top: 4px; }

/* Admin notification */
.admin-msg {
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: .95rem;
  margin-bottom: 24px;
}
.admin-msg-success { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; }
.admin-msg-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626; }

/* Post form panel */
.post-form-panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.post-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.post-form-title { font-size: 1.3rem; font-weight: 700; color: #1e293b; }
.close-form-btn {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  color: #64748b;
  font-size: .88rem;
  transition: all .2s;
}
.close-form-btn:hover { background: #f1f5f9; color: #1e293b; }

/* Post form fields */
.post-form .form-group { margin-bottom: 22px; }
.post-form label { display: block; font-weight: 600; font-size: .9rem; color: #374151; margin-bottom: 7px; }
.post-form .req { color: #ef4444; }
.post-form input,
.post-form select,
.post-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .2s;
  box-sizing: border-box;
  color: #1e293b;
}
.post-form input:focus,
.post-form select:focus,
.post-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.post-form textarea { resize: vertical; line-height: 1.6; }
.form-hint { font-size: .82rem; color: #94a3b8; margin-top: 5px; display: block; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

.form-group-checkbox { display: flex; align-items: center; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: .9rem;
  color: #374151;
  margin-top: 28px;
}
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}
.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.btn-secondary:hover { background: #e2e8f0; }

/* Posts table */
.admin-table-section {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.admin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid #e2e8f0;
}
.admin-table-header h2 { font-size: 1.15rem; font-weight: 700; color: #1e293b; }
.table-wrapper { overflow-x: auto; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}
.admin-table td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  font-size: .9rem;
  color: #374151;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f8fafc; }
.table-empty { text-align: center; color: #94a3b8; padding: 48px !important; font-size: .95rem; }

.td-num { width: 40px; color: #94a3b8; font-size: .85rem; }
.td-title { max-width: 300px; }
.admin-post-title { font-weight: 600; color: #1e293b; display: block; }
.td-date { white-space: nowrap; color: #64748b; font-size: .85rem; }
.td-actions { white-space: nowrap; }

.featured-badge {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Category pills in admin table */
.cat-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
}
.cat-ai-tools      { background: #ede9fe; color: #6d28d9; }
.cat-tech-tips     { background: #dbeafe; color: #1d4ed8; }
.cat-tutorials     { background: #d1fae5; color: #065f46; }
.cat-online-earning { background: #fce7f3; color: #9d174d; }

/* Admin action buttons */
.admin-btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  margin-right: 6px;
  transition: all .15s;
}
.admin-btn:last-child { margin-right: 0; }
.admin-btn-edit    { background: #eff6ff; color: #1d4ed8; }
.admin-btn-edit:hover { background: #dbeafe; }
.admin-btn-preview { background: #f0fdf4; color: #15803d; }
.admin-btn-preview:hover { background: #dcfce7; }
.admin-btn-delete  { background: #fef2f2; color: #dc2626; }
.admin-btn-delete:hover { background: #fee2e2; }

/* ---- Responsive for admin ---- */
@media (max-width: 768px) {
  .admin-topbar { padding: 0 16px; }
  .admin-topbar-title { font-size: .95rem; }
  .admin-body { padding: 20px 16px 60px; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .admin-table th:nth-child(4), .admin-table td:nth-child(4) { display: none; }
  .admin-btn-preview { display: none; }
  .post-form-panel { padding: 20px 16px; }
  .admin-login-card { padding: 36px 24px; }
}

/* =====================================================
   IMAGE UPLOAD BOX (Admin Panel)
===================================================== */
.upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  transition: border-color .2s, background .2s;
  overflow: hidden;
  position: relative;
}
.upload-box:hover { border-color: #3b82f6; background: #eff6ff; }

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px;
  pointer-events: none;
}
.upload-icon  { font-size: 2rem; }
.upload-text  { font-size: .95rem; font-weight: 600; color: #475569; }
.upload-hint  { font-size: .8rem; color: #94a3b8; }

.upload-preview {
  width: 100%;
  max-height: 220px;
  overflow: hidden;
}
.upload-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #3b82f6;
  font-weight: 600;
  font-size: .9rem;
  padding: 24px;
}

.upload-status {
  font-size: .82rem;
  margin-top: 6px;
  font-weight: 500;
}
