/* =========================================
   Earth Software Solution — Blog Styles
   ========================================= */

/* Hero */
.blog-hero {
  background: linear-gradient(135deg, #0a2342 0%, #1565c0 100%);
  padding: 50px 20px 40px;
  margin-bottom: 0;
}
.blog-hero h1 {
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}
.blog-hero p {
  color: #90caf9;
  font-size: 15px;
}

/* Container */
.blog-container {
  padding-top: 40px;
  padding-bottom: 60px;
}

/* Article Card */
.article-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(21,101,192,0.08);
  overflow: hidden;
  margin-bottom: 28px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #e8f0fb;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 28px rgba(21,101,192,0.15);
}
.article-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, #0a2342, #1565c0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.article-card-body {
  padding: 20px 22px 22px;
}
.article-cat-badge {
  display: inline-block;
  background: #e3f2fd;
  color: #1565c0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.article-card-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 17px;
  color: #0a2342;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}
.article-card-title a {
  color: #0a2342;
  text-decoration: none;
}
.article-card-title a:hover { color: #1565c0; }
.article-card-excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.65;
  margin-bottom: 14px;
}
.article-card-meta {
  font-size: 12px;
  color: #90a4ae;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.read-more-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 18px;
  background: #1565c0;
  color: #fff !important;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s;
}
.read-more-btn:hover { background: #0d47a1; }

/* Sidebar */
.blog-sidebar { padding-left: 10px; }
.sidebar-widget {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(21,101,192,0.07);
  border: 1px solid #e8f0fb;
}
.sidebar-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0a2342;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #1565c0;
}
.sidebar-cats { list-style: none; padding: 0; margin: 0; }
.sidebar-cats li { border-bottom: 1px solid #f0f4f8; }
.sidebar-cats li:last-child { border-bottom: none; }
.sidebar-cats a {
  display: block;
  padding: 7px 0;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
}
.sidebar-cats a:hover { color: #1565c0; padding-left: 4px; }

/* Article Page */
.article-header { margin-bottom: 28px; }
.article-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 28px;
  color: #0a2342;
  font-weight: 700;
  line-height: 1.35;
  margin: 10px 0 14px;
}
.article-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #90a4ae;
  margin-bottom: 20px;
}
.article-meta i { margin-right: 4px; color: #1565c0; }
.article-cover-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 28px;
}
.article-body {
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  line-height: 1.85;
  color: #333;
}
.article-body h2 {
  font-family: 'Libre Baskerville', serif;
  font-size: 21px;
  color: #0a2342;
  margin-top: 32px;
  margin-bottom: 12px;
}
.article-body h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  color: #1565c0;
  margin-top: 24px;
  margin-bottom: 10px;
}
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol {
  margin-bottom: 16px;
  padding-left: 22px;
}
.article-body li { margin-bottom: 6px; }
.article-body a { color: #1565c0; }
.article-body blockquote {
  border-left: 4px solid #1565c0;
  background: #e3f2fd;
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-style: italic;
  color: #0a2342;
}
.article-body .amazon-product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ff9900;
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  margin: 4px 4px 4px 0;
}
.article-body .amazon-product-link:hover { background: #e68900; color: #fff; }

/* Amazon CTA Box */
.amazon-cta-box {
  background: #fffbf0;
  border: 2px solid #ff9900;
  border-radius: 10px;
  padding: 20px 24px;
  margin: 32px 0;
}
.amazon-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ff9900;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.amazon-link-btn:hover { background: #e68900; color: #fff; text-decoration: none; }

/* Share */
.article-share {
  margin-top: 28px;
  padding: 16px 0;
  border-top: 1px solid #e8f0f8;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.85; }
.twitter-btn { background: #1da1f2; color: #fff !important; }
.facebook-btn { background: #1877f3; color: #fff !important; }
.copy-btn { background: #607d8b; color: #fff !important; }

/* Admin Panel */
.admin-header {
  background: linear-gradient(135deg, #0a2342, #1565c0);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-nav a {
  color: #90caf9;
  font-size: 14px;
  margin-left: 20px;
  text-decoration: none;
}
.admin-nav a:hover { color: #fff; }
.admin-sidebar {
  background: #0f2035;
  min-height: calc(100vh - 60px);
  padding: 20px 0;
  width: 220px;
  position: fixed;
  top: 60px;
  left: 0;
}
.admin-sidebar a {
  display: block;
  padding: 11px 22px;
  color: #90caf9;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: #1a3558;
  color: #fff;
  border-left: 3px solid #42a5f5;
}
.admin-sidebar a i { width: 20px; margin-right: 8px; }
.admin-main {
  margin-left: 220px;
  padding: 30px;
  min-height: calc(100vh - 60px);
  background: #f5f7fa;
}
.admin-card {
  background: #fff;
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(21,101,192,0.07);
  border: 1px solid #e8f0fb;
}
.admin-card h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  color: #0a2342;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8f0fb;
}
.admin-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d0dce8;
  border-radius: 7px;
  font-size: 14px;
  color: #333;
  margin-bottom: 14px;
  font-family: 'Open Sans', sans-serif;
  transition: border-color 0.2s;
}
.admin-input:focus {
  border-color: #1565c0;
  outline: none;
  box-shadow: 0 0 0 3px rgba(21,101,192,0.1);
}
.admin-btn {
  padding: 10px 26px;
  border: none;
  border-radius: 25px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-btn-primary { background: #1565c0; color: #fff; }
.admin-btn-primary:hover { background: #0d47a1; }
.admin-btn-danger { background: #ef5350; color: #fff; }
.admin-btn-danger:hover { background: #c62828; }
.admin-btn-secondary { background: #607d8b; color: #fff; }
.admin-btn-secondary:hover { background: #455a64; }
.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  border: 1px solid #e8f0fb;
  box-shadow: 0 2px 8px rgba(21,101,192,0.06);
}
.stat-card .stat-num {
  font-size: 32px;
  font-weight: 700;
  color: #1565c0;
}
.stat-card .stat-label { font-size: 12px; color: #90a4ae; }
.article-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #f0f4f8;
  gap: 12px;
}
.article-list-item:last-child { border-bottom: none; }
.article-list-title { font-weight: 600; font-size: 14px; color: #0a2342; }
.article-list-meta { font-size: 12px; color: #90a4ae; margin-top: 3px; }
.article-list-actions { display: flex; gap: 8px; flex-shrink: 0; }
.badge-published { background: #e8f5e9; color: #2e7d32; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight:700; }
.badge-draft { background: #fff8e1; color: #f57f17; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight:700; }
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1565c0;
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: none;
}
/* Rich text editor */
#editor-toolbar {
  background: #f5f7fa;
  border: 1.5px solid #d0dce8;
  border-bottom: none;
  border-radius: 7px 7px 0 0;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
#editor-toolbar button {
  background: #fff;
  border: 1px solid #d0dce8;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
#editor-toolbar button:hover { background: #e3f2fd; }
#article-editor {
  border: 1.5px solid #d0dce8;
  border-top: none;
  border-radius: 0 0 7px 7px;
  min-height: 340px;
  padding: 16px;
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  outline: none;
  background: #fff;
}
#article-editor:focus { border-color: #1565c0; }
