/* ==========================================================================
   Teekha Meetha Kitchen — Blog Category Archive Page Styles
   Extends tmk-blog.css; seamlessly matches the Blog Listing page design.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. RESET BODY.CATEGORY & GLOBAL SITE OVERRIDES
   WordPress adds class="category" to <body> on category archives.
   These rules ensure the site-wide header, footer, and body are never distorted.
   -------------------------------------------------------------------------- */

body.category,
body.archive.category {
  text-align: left !important;
  background: #fff !important;
  min-height: 100vh !important;
  display: block !important;
  flex: none !important;
  user-select: auto !important;
  padding: 0 !important;
}

/* Header actions, follow text, and social icons protection */
body.category .site-header,
body.category .site-header .header-top,
body.category .site-header .header-actions,
body.category .site-header .follow,
body.category .site-header .social {
  text-align: left !important;
}

body.category .site-header .header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
}

body.category .site-header .follow {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

body.category .site-header .follow > span {
  display: inline !important;
  font-size: 13px !important;
  color: #333 !important;
  pointer-events: auto !important;
  margin: 0 !important;
}

body.category .site-header .social {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body.category .site-header .social a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.category .site-header .social a i {
  font-size: 14px !important;
  margin: 0 !important;
  display: inline-block !important;
  pointer-events: auto !important;
}

/* Footer layout and alignment protection */
body.category .site-footer,
body.category .site-footer .footer-main,
body.category .site-footer .footer-col,
body.category .site-footer .footer-col ul,
body.category .site-footer .footer-col li,
body.category .site-footer .footer-contact,
body.category .site-footer .footer-bottom {
  text-align: left !important;
}

body.category .site-footer .footer-col ul {
  padding-left: 0 !important;
  list-style: none !important;
}

body.category .site-footer .footer-col li {
  text-align: left !important;
}

/* --------------------------------------------------------------------------
   1. HERO / PAGE HEADER (Contact-Hero design match)
   -------------------------------------------------------------------------- */

.blog-cat-hero.contact-hero {
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--cream);
  text-align: left !important;
}

.blog-cat-hero .contact-hero__inner {
  padding: 35px 0;
  position: relative;
  z-index: 2;
  text-align: left !important;
}

.blog-cat-hero .contact-hero__copy {
  max-width: 580px;
  text-align: left !important;
}

.blog-cat-hero .contact-hero__heading {
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

.blog-cat-hero .contact-hero__desc {
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}


/* ── Breadcrumb ─────────────────────────────────────────────────────────── */
.blog-cat-breadcrumb {
  margin-bottom: 12px;
}

.blog-cat-breadcrumb ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.blog-cat-breadcrumb ol li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-cat-breadcrumb ol li + li::before {
  content: "\f105"; /* fa-angle-right */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.6875rem;
  color: #b0a99f;
}

.blog-cat-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-cat-breadcrumb a:hover {
  color: var(--orange);
}

.blog-cat-breadcrumb li[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ── Eyebrow Badge ──────────────────────────────────────────────────────── */
.blog-cat-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(243, 107, 33, 0.12);
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 10px;
  width: fit-content;
}

/* ── Stats Pill ─────────────────────────────────────────────────────────── */
.blog-cat-hero__stats {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.blog-cat-hero__stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  background: #fff;
  padding: 5px 12px;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #ede8e1;
}

.blog-cat-hero__stat i {
  color: var(--orange);
}

/* --------------------------------------------------------------------------
   2. CATEGORY TABS (Navigation links)
   -------------------------------------------------------------------------- */

.blog-category-tabs a.blog-tab-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.blog-category-tabs a.blog-tab-btn.is-active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   3. BLOG GRID & CARDS (3 Columns matching main Blog page)
   -------------------------------------------------------------------------- */

.blog-category-page .blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-category-page .blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s, transform 0.2s;
  padding: 0;
}

.blog-category-page .blog-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
  transform: translateY(-3px);
}

.blog-category-page .blog-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--soft);
  flex-shrink: 0;
}

.blog-category-page .blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.blog-category-page .blog-card:hover .blog-card-image img {
  transform: scale(1.04);
}

.blog-category-page .blog-card-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-category-page .blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 8px;
  flex-wrap: wrap;
  line-height: 1.4;
}

.blog-category-page .blog-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.blog-category-page .blog-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-category-page .blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-category-page .blog-card-title a:hover {
  color: var(--orange);
}

.blog-category-page .blog-card-excerpt {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-category-page .blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}

.blog-category-page .blog-read-more:hover {
  color: var(--orange-dark);
  gap: 9px;
}

/* --------------------------------------------------------------------------
   4. PAGINATION
   -------------------------------------------------------------------------- */

.blog-cat-pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-cat-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid #e0ddd8;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  line-height: 1;
}

.blog-cat-pagination .page-numbers:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.blog-cat-pagination .page-numbers.current {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  pointer-events: none;
}

.blog-cat-pagination .page-numbers.dots {
  border: none;
  background: none;
  cursor: default;
}

/* --------------------------------------------------------------------------
   5. SIDEBAR: Categories & Popular Posts Enhancements
   -------------------------------------------------------------------------- */

.sidebar-categories {
  padding: 24px;
}

.sidebar-categories .blog-cat-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-categories .blog-cat-related-item {
  border-bottom: 1px solid #f0ebe2;
}

.sidebar-categories .blog-cat-related-item:last-child {
  border-bottom: none;
}

.sidebar-categories .blog-cat-related-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
  transition: color 0.2s, padding-left 0.2s;
}

.sidebar-categories .blog-cat-related-item a:hover {
  color: var(--orange);
  padding-left: 6px;
}

.sidebar-categories .blog-cat-related-item--active a {
  color: var(--orange);
  font-weight: 700;
}

.sidebar-categories .blog-cat-related-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sidebar-categories .blog-cat-related-name i {
  font-size: 0.75rem;
  color: #b0a99f;
  transition: color 0.2s;
}

.sidebar-categories .blog-cat-related-item--active .blog-cat-related-name i,
.sidebar-categories .blog-cat-related-item a:hover .blog-cat-related-name i {
  color: var(--orange);
}

.sidebar-categories .blog-cat-related-count {
  background: #f5f0ea;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  transition: background 0.2s, color 0.2s;
}

.sidebar-categories .blog-cat-related-item--active .blog-cat-related-count,
.sidebar-categories .blog-cat-related-item a:hover .blog-cat-related-count {
  background: rgba(243, 107, 33, 0.12);
  color: var(--orange);
}

/* Popular post video thumbnail overlay */
.popular-post-thumb-wrap.js-video-card {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}

.popular-post-thumb-wrap.js-video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.popular-post-thumb-wrap .pp-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.popular-post-thumb-wrap.js-video-card:hover .pp-play {
  background: rgba(0, 0, 0, 0.55);
}

/* --------------------------------------------------------------------------
   6. HEADER ACTIVE NAVIGATION FIX
   Ensures the 'Blog' nav menu item remains highlighted on category archives
   -------------------------------------------------------------------------- */

.category #site-navigation .main-nav > li.active > a,
.category #site-navigation .main-nav > li.current-menu-item > a,
.category .main-nav-container > ul > li.active > a,
.category .main-nav-container > ul > li.current-menu-item > a {
  color: var(--orange) !important;
}

.category #site-navigation .main-nav > li.active > a::after,
.category #site-navigation .main-nav > li.current-menu-item > a::after,
.category .main-nav-container > ul > li.active > a::after,
.category .main-nav-container > ul > li.current-menu-item > a::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 3px !important;
  background: var(--orange) !important;
  border-radius: 4px 4px 0 0 !important;
}

/* --------------------------------------------------------------------------
   7. FOOTER NEWSLETTER BUTTON FIX
   Ensures the newsletter submit button uses dark green on category pages
   -------------------------------------------------------------------------- */

.category .news-form input[type="submit"],
.blog-category-page .news-form input[type="submit"] {
  background: var(--green-dark) !important;
  color: #fff !important;
}

.category .news-form input[type="submit"]:hover,
.category .news-form input[type="submit"]:focus,
.blog-category-page .news-form input[type="submit"]:hover,
.blog-category-page .news-form input[type="submit"]:focus {
  background: var(--green-dark) !important;
  color: #fff !important;
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .blog-category-page .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .blog-listing-section .container {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    margin-top: 20px;
  }
}

@media (max-width: 640px) {
  .blog-category-page .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-filter-bar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .blog-search-wrap,
  .blog-search-wrap input[type="search"],
  .blog-sort-wrap,
  .blog-sort-wrap select {
    width: 100%;
  }

  .blog-cat-hero.contact-hero {
    min-height: 200px;
  }

  .blog-cat-hero .contact-hero__inner {
    padding: 28px 0;
  }
}
