/* ==========================================================================
   CCTech Blog Listing — premium card redesign
   Scoped entirely under .cctech-blog-section so it only affects the blog
   listing views (blog index, category/tag/author archives, search results)
   and never touches the single-post template or any other page.
   Brand tokens: blue #2185D0, navy #00367B, orange #E77817 (sparing accent),
   ink #0A0E27, muted #4C516C, surface #FFFFFF, bg #F8FAFE.
   ========================================================================== */

.cctech-blog-section {
  background: #F8FAFE;
}

/* ---- Grid ---------------------------------------------------------- */

.cctech-blog-section .cctech-blog-grid.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-left: 0;
  margin-right: 0;
}

@media (min-width: 768px) {
  .cctech-blog-section .cctech-blog-grid.row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }
}

/* ---- Card ------------------------------------------------------------ */

.cctech-blog-section .cctech-blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #FFFFFF;
  border: 1px solid rgba(33, 133, 208, 0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(10, 14, 39, 0.05);
  transition: transform 0.35s cubic-bezier(.2,.7,.3,1), box-shadow 0.35s ease, border-color 0.35s ease;
  margin-bottom: 0 !important;
}

.cctech-blog-section .cctech-blog-card::before {
  content: "";
  display: block;
  height: 3px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, #2185D0, #00367B);
}

.cctech-blog-section .cctech-blog-card:hover,
.cctech-blog-section .cctech-blog-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px -16px rgba(10, 14, 39, 0.22), 0 6px 16px -4px rgba(33, 133, 208, 0.18);
  border-color: rgba(33, 133, 208, 0.35);
}

/* ---- Media / thumbnail ------------------------------------------------ */

.cctech-blog-section .cctech-blog-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #00367B 0%, #2185D0 65%, #3E9BDB 100%);
}

.cctech-blog-section .cctech-blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.cctech-blog-section .cctech-blog-card:hover .cctech-blog-card__media img {
  transform: scale(1.07);
}

/* neutralise the old diagonal flip overlay from the base theme */
.cctech-blog-section .cctech-blog-card .news-thumb:after {
  content: none;
}

.cctech-blog-section .cctech-blog-card__placeholder {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 26px),
    linear-gradient(135deg, #00367B 0%, #2185D0 65%, #3E9BDB 100%);
}

/* Category badge — reuses the theme's existing .news-top-meta pill */
.cctech-blog-section .cctech-blog-card__cat.news-top-meta {
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(10, 14, 39, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.cctech-blog-section .cctech-blog-card__cat.news-top-meta a {
  color: #fff;
}

/* ---- Body / content ---------------------------------------------------- */

.cctech-blog-section .cctech-blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 24px 24px 22px !important;
}

.cctech-blog-section .cctech-blog-card__content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  margin-bottom: 18px !important;
}

.cctech-blog-section .cctech-blog-card .news-bottom-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  color: #4C516C;
  font-size: 12.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0 !important;
}

.cctech-blog-section .cctech-blog-card .news-bottom-meta a {
  color: #4C516C;
}

.cctech-blog-section .cctech-blog-card .the-title {
  margin-bottom: 0 !important;
  font-size: 20px;
  line-height: 1.38;
  font-weight: 700;
  color: #0A0E27;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.76em;
}

.cctech-blog-section .cctech-blog-card .the-title a {
  color: inherit;
  transition: color 0.25s ease;
}

.cctech-blog-section .cctech-blog-card:hover .the-title a {
  color: #2185D0;
}

.cctech-blog-section .cctech-blog-card .the-content {
  color: #4C516C;
  font-size: 14.5px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- CTA ---------------------------------------------------------------- */

.cctech-blog-section .cctech-blog-card .news-link {
  margin-top: auto;
  text-transform: none;
  letter-spacing: normal;
}

.cctech-blog-section .cctech-blog-card .news-link:before {
  content: none;
}

.cctech-blog-section .cctech-blog-card .news-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2185D0;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cctech-blog-section .cctech-blog-card .news-link a i {
  transition: transform 0.25s ease;
}

.cctech-blog-section .cctech-blog-card:hover .news-link a i {
  transform: translateX(5px);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.cctech-blog-section .cctech-blog-sidebar .single-widget {
  background: #FFFFFF;
  border: 1px solid rgba(33, 133, 208, 0.12);
  border-radius: 16px;
  padding: 28px !important;
  box-shadow: 0 2px 10px rgba(10, 14, 39, 0.05);
}

.cctech-blog-section .cctech-blog-sidebar .widget-title {
  font-size: 17px;
  font-weight: 700;
  color: #0A0E27;
  text-transform: none;
  padding-left: 16px;
}

.cctech-blog-section .cctech-blog-sidebar .widget-title:after {
  height: 16px;
  border-radius: 2px;
}

.cctech-blog-section .cctech-blog-sidebar .widget-search .search-form input {
  border: 1px solid #E2E8F4;
  border-radius: 10px;
  background: #F8FAFE;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.cctech-blog-section .cctech-blog-sidebar .widget-search .search-form input:focus {
  border-color: #2185D0;
  box-shadow: 0 0 0 3px rgba(33, 133, 208, 0.15);
  outline: none;
}

.cctech-blog-section .cctech-blog-sidebar .widget-search .search-form button {
  border-radius: 0 10px 10px 0;
}

.cctech-blog-section .cctech-blog-sidebar .widget-categories ul li,
.cctech-blog-section .cctech-blog-sidebar .widget-archives ul li {
  border-bottom: 1px solid #EEF2FA;
  padding: 12px 4px;
  transition: padding-left 0.2s ease;
}

.cctech-blog-section .cctech-blog-sidebar .widget-categories ul li:hover,
.cctech-blog-section .cctech-blog-sidebar .widget-archives ul li:hover {
  padding-left: 8px;
}

.cctech-blog-section .cctech-blog-sidebar .widget-categories ul li:last-child,
.cctech-blog-section .cctech-blog-sidebar .widget-archives ul li:last-child {
  border-bottom: none;
}

.cctech-blog-section .cctech-blog-sidebar .widget-categories ul li a,
.cctech-blog-section .cctech-blog-sidebar .widget-archives ul li a {
  color: #4C516C;
  font-weight: 500;
  font-size: 14.5px;
  transition: color 0.2s ease;
}

.cctech-blog-section .cctech-blog-sidebar .widget-categories ul li a:hover,
.cctech-blog-section .cctech-blog-sidebar .widget-archives ul li a:hover {
  color: #2185D0;
}

.cctech-blog-section .cctech-blog-sidebar .widget-tags ul li a {
  border-radius: 999px;
  border-color: #E2E8F4;
  background: #F8FAFE;
  color: #4C516C;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.25s ease;
}

.cctech-blog-section .cctech-blog-sidebar .widget-tags ul li a:hover {
  background: #2185D0;
  border-color: #2185D0;
  color: #fff;
  transform: translateY(-2px);
}

.cctech-blog-section .cctech-blog-sidebar ul li a,
.cctech-blog-section .cctech-blog-sidebar .textwidget a {
  word-break: break-word;
}

.cctech-blog-section .cctech-blog-sidebar input[type="submit"],
.cctech-blog-section .cctech-blog-sidebar button[type="submit"],
.cctech-blog-section .cctech-blog-sidebar .mc4wp-form button {
  background: #2185D0 !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 600;
  transition: background 0.25s ease, transform 0.2s ease;
}

.cctech-blog-section .cctech-blog-sidebar input[type="submit"]:hover,
.cctech-blog-section .cctech-blog-sidebar button[type="submit"]:hover,
.cctech-blog-section .cctech-blog-sidebar .mc4wp-form button:hover {
  background: #1a6dae !important;
  transform: translateY(-1px);
}

@media (max-width: 991px) {
  .cctech-blog-section .cctech-blog-sidebar {
    margin-top: 12px;
  }
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.cctech-blog-pagination .pagination-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}

.cctech-blog-pagination .pagination-list > li {
  margin-right: 0 !important;
}

.cctech-blog-pagination .pagination-list > li > a,
.cctech-blog-pagination .pagination-list > li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
  line-height: 1;
  border-radius: 10px;
  border: 1px solid #E2E8F4;
  color: #4C516C;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.25s ease;
}

.cctech-blog-pagination .pagination-list > li > a:hover {
  background: #2185D0;
  border-color: #2185D0;
  color: #fff;
  box-shadow: 0 8px 16px -6px rgba(33, 133, 208, 0.5);
}

.cctech-blog-pagination .pagination-list > li > span.current {
  background: #2185D0;
  border-color: #2185D0;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 16px -6px rgba(33, 133, 208, 0.5);
}

.cctech-blog-pagination .pagination-list > li > span.dots {
  border-color: transparent;
  color: #9AA3B8;
}

/* ==========================================================================
   Small-screen refinements — 480 / 390 / 360 / 320
   ========================================================================== */

@media (max-width: 480px) {
  .cctech-blog-section .cctech-blog-grid.row {
    gap: 20px;
  }
  .cctech-blog-section .cctech-blog-card__body {
    padding: 20px 18px 18px !important;
  }
  .cctech-blog-section .cctech-blog-card .the-title {
    font-size: 18px;
    min-height: 2.6em;
  }
  .cctech-blog-section .cctech-blog-card .the-content {
    font-size: 13.5px;
  }
  .cctech-blog-section .cctech-blog-sidebar .single-widget {
    padding: 22px !important;
  }
}

@media (max-width: 360px) {
  .cctech-blog-section .cctech-blog-card__body {
    padding: 16px 14px 16px !important;
  }
  .cctech-blog-section .cctech-blog-card .news-bottom-meta {
    gap: 4px 10px;
    font-size: 11.5px;
  }
  .cctech-blog-pagination .pagination-list > li > a,
  .cctech-blog-pagination .pagination-list > li > span {
    height: 38px;
    width: 38px;
    font-size: 13px;
  }
}
