/**
 * Blog archive / posts — visual upgrade only
 * Match modules typography & TimeERP teal. No content add/remove.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body.blog,
body.archive,
body.single-post,
body.category,
body.tag {
  --bg-primary: #25B7A7;
  --bg-bright: #17C3B2;
  --bg-deep: #1A9E8F;
  --bg-navy: #083530;
  --bg-navy-deep: #000000;
  --bg-text: #3D5250;
  --bg-muted: #616365;
  --bg-ice: #E8F8F6;
  --bg-ice-2: #EEFAF8;
  --bg-white: #FFFFFF;
  --bg-font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --bg-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --bg-shadow: 0 12px 28px rgba(26, 158, 143, 0.1);
  --bg-shadow-hover: 0 22px 44px rgba(8, 53, 48, 0.16);
}

body.blog .page-wrapper,
body.archive .page-wrapper,
body.single-post .page-wrapper,
body.category .page-wrapper,
body.tag .page-wrapper,
body.blog .sidebar-page-container,
body.archive .sidebar-page-container,
body.single-post .sidebar-page-container {
  font-family: var(--bg-body);
  color: var(--bg-text);
  background: linear-gradient(180deg, var(--bg-ice) 0%, var(--bg-white) 10%, var(--bg-white) 90%, var(--bg-ice-2) 100%);
}

body.blog h1,
body.blog h2,
body.blog h3,
body.blog h4,
body.archive h1,
body.archive h2,
body.archive h3,
body.single-post h1,
body.single-post h2,
body.single-post h3 {
  font-family: var(--bg-font) !important;
  letter-spacing: -0.015em;
  color: var(--bg-navy) !important;
}

/* ---------- Listing shell ---------- */
body.blog .sidebar-page-container,
body.archive .sidebar-page-container,
body.category .sidebar-page-container,
body.tag .sidebar-page-container,
body.single-post .sidebar-page-container {
  padding: 40px 0 56px !important;
  background: transparent !important;
}

body.blog .sidebar-page-container > .container,
body.archive .sidebar-page-container > .container,
body.single-post .sidebar-page-container > .container {
  max-width: 1100px;
}

body.blog .blog-content,
body.archive .blog-content,
body.single-post .blog-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- Post cards ---------- */
body.blog .single-blog-content,
body.archive .single-blog-content,
body.category .single-blog-content,
body.tag .single-blog-content,
body.single-post .single-blog-content {
  margin: 0 !important;
}

body.blog .single-blog-content .inner-box,
body.archive .single-blog-content .inner-box,
body.category .single-blog-content .inner-box,
body.tag .single-blog-content .inner-box,
body.single-post .single-blog-content .inner-box {
  background: var(--bg-white) !important;
  border: 1px solid rgba(37, 183, 167, 0.16) !important;
  border-radius: 18px !important;
  box-shadow: var(--bg-shadow) !important;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}

body.blog .single-blog-content:hover .inner-box,
body.archive .single-blog-content:hover .inner-box {
  transform: translateY(-4px);
  border-color: rgba(37, 183, 167, 0.35) !important;
  box-shadow: var(--bg-shadow-hover) !important;
}

body.blog .single-blog-content .image-box,
body.archive .single-blog-content .image-box,
body.single-post .single-blog-content .image-box {
  margin: 0 !important;
  background: linear-gradient(145deg, #EEFAF8, #E8F2F1);
  min-height: 0;
  overflow: hidden;
}

body.blog .single-blog-content .image-box:empty,
body.blog .single-blog-content .image-box:not(:has(img)) {
  display: none !important;
}

body.blog .single-blog-content .image-box img,
body.archive .single-blog-content .image-box img,
body.single-post .single-blog-content .image-box img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0 !important;
  transition: transform 0.4s ease;
}

body.blog .single-blog-content:hover .image-box img {
  transform: scale(1.03);
}

body.blog .single-blog-content .lower-content,
body.archive .single-blog-content .lower-content,
body.single-post .single-blog-content .lower-content {
  padding: 22px 24px 20px !important;
}

body.blog .single-blog-content .upper-box,
body.archive .single-blog-content .upper-box,
body.single-post .single-blog-content .upper-box {
  padding: 0 !important;
  margin: 0 0 16px !important;
  border: 0 !important;
}

/* Meta */
body.blog .post_meta,
body.archive .post_meta,
body.single-post .post_meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  list-style: none !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
}

body.blog .post_meta li,
body.archive .post_meta li,
body.single-post .post_meta li {
  font-family: var(--bg-body) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: var(--bg-muted) !important;
  line-height: 1.4 !important;
}

body.blog .post_meta li a,
body.archive .post_meta li a,
body.single-post .post_meta li a {
  color: var(--bg-deep) !important;
  text-decoration: none !important;
}

body.blog .post_meta li a:hover {
  color: var(--bg-primary) !important;
}

body.blog .post_meta .meta_date a::before,
body.archive .post_meta .meta_date a::before {
  content: none;
}

/* Titles */
body.blog .single-blog-content .upper-box h3,
body.archive .single-blog-content .upper-box h3,
body.single-post .single-blog-content .upper-box h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem) !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
}

body.blog .single-blog-content .upper-box h3 a,
body.archive .single-blog-content .upper-box h3 a,
body.single-post .single-blog-content .upper-box h3 a {
  color: var(--bg-navy) !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

body.blog .single-blog-content .upper-box h3 a:hover,
body.archive .single-blog-content .upper-box h3 a:hover {
  color: var(--bg-primary) !important;
}

/* Excerpt */
body.blog .single-blog-content .upper-box .text,
body.blog .single-blog-content .upper-box .text p,
body.archive .single-blog-content .upper-box .text,
body.archive .single-blog-content .upper-box .text p,
body.single-post .single-blog-content .upper-box .text,
body.single-post .single-blog-content .upper-box .text p {
  font-family: var(--bg-body) !important;
  font-size: 14.5px !important;
  line-height: 1.65 !important;
  color: var(--bg-muted) !important;
  margin: 0 !important;
}

/* Card footer */
body.blog .single-blog-content .lower-box,
body.archive .single-blog-content .lower-box,
body.single-post .single-blog-content .lower-box {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 !important;
  padding: 14px 0 0 !important;
  border-top: 1px solid rgba(37, 183, 167, 0.14) !important;
}

body.blog .single-blog-content .lower-box .left-content,
body.blog .single-blog-content .lower-box .right-content,
body.archive .single-blog-content .lower-box .left-content,
body.archive .single-blog-content .lower-box .right-content {
  float: none !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.blog .single-blog-content .admin-image,
body.archive .single-blog-content .admin-image {
  margin: 0 !important;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(37, 183, 167, 0.25);
}

body.blog .single-blog-content .admin-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.blog .single-blog-content .admin-name,
body.archive .single-blog-content .admin-name {
  font-family: var(--bg-font) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--bg-navy) !important;
}

body.blog .single-blog-content .link a,
body.archive .single-blog-content .link a,
body.single-post .single-blog-content .link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--bg-font) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--bg-deep) !important;
  text-decoration: none !important;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(37, 183, 167, 0.1);
  border: 1px solid rgba(37, 183, 167, 0.2);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.blog .single-blog-content .link a:hover,
body.archive .single-blog-content .link a:hover {
  color: #fff !important;
  background: linear-gradient(145deg, var(--bg-bright), var(--bg-deep)) !important;
  border-color: transparent;
}

body.blog .single-blog-content .link a i {
  font-size: 12px;
}

body.blog .post-categories,
body.archive .post-categories,
body.single-post .post-categories {
  margin: 0 0 10px !important;
}

body.blog .post-categories a,
body.archive .post-categories a,
body.single-post .post-categories a {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--bg-deep) !important;
  text-decoration: none !important;
}

/* ---------- Pagination ---------- */
body.blog .post-pagination,
body.archive .post-pagination {
  margin-top: 28px !important;
}

body.blog .post-pagination .pagination,
body.archive .post-pagination .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  justify-content: center;
}

body.blog .post-pagination .pagination li,
body.archive .post-pagination .pagination li {
  margin: 0 !important;
}

body.blog .post-pagination .page-numbers,
body.archive .post-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-family: var(--bg-font) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--bg-navy) !important;
  background: #fff;
  border: 1px solid rgba(37, 183, 167, 0.18);
  text-decoration: none !important;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.blog .post-pagination .page-numbers:hover,
body.archive .post-pagination .page-numbers:hover {
  color: #fff !important;
  background: var(--bg-primary) !important;
  border-color: var(--bg-primary);
}

body.blog .post-pagination .page-numbers.current,
body.archive .post-pagination .page-numbers.current {
  color: #fff !important;
  background: linear-gradient(145deg, var(--bg-bright), var(--bg-deep)) !important;
  border-color: transparent;
}

body.blog .post-pagination .page-numbers.dots {
  border: 0;
  background: transparent;
  min-width: 24px;
}

/* ---------- Single post polish ---------- */
body.single-post .single-blog-content .upper-box h3 {
  font-size: clamp(1.45rem, 2.6vw, 1.9rem) !important;
}

body.single-post .single-blog-content .upper-box .text,
body.single-post .single-blog-content .upper-box .text p {
  font-size: 15.5px !important;
  line-height: 1.7 !important;
  color: var(--bg-text) !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  body.blog .sidebar-page-container,
  body.archive .sidebar-page-container,
  body.single-post .sidebar-page-container {
    padding: 28px 0 40px !important;
  }

  body.blog .single-blog-content .lower-content,
  body.archive .single-blog-content .lower-content {
    padding: 18px 18px 16px !important;
  }
}

@media (max-width: 767px) {
  body.blog .single-blog-content .upper-box h3,
  body.archive .single-blog-content .upper-box h3 {
    font-size: 1.15rem !important;
  }

  body.blog .single-blog-content .lower-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.blog .single-blog-content .inner-box,
  body.blog .single-blog-content .image-box img {
    transition: none !important;
  }

  body.blog .single-blog-content:hover .inner-box {
    transform: none;
  }
}
