/* =============================================================================
   Mansons Blog Plugin — mansons-blog.css  v1.1.0
   Hero header styled to match mansons.in/work-at-mansons/
   Brand: Navy #1a1a2e / Charcoal #1e1e2e | Red #c8102e | White text
   ============================================================================= */

/* ── Design tokens ──────────────────────────────────────────────────────────── */
:root {
  --mb-navy:       #1a3c6e;
  --mb-charcoal:   #1e1f26;   /* hero bg — matches Mansons dark pages */
  --mb-charcoal2:  #14151a;   /* deeper shadow */
  --mb-red:        #c8102e;   /* Mansons red accent */
  --mb-text:       #1a1a1a;
  --mb-muted:      #666666;
  --mb-border:     #e0e0e0;
  --mb-bg:         #ffffff;
  --mb-bg-alt:     #f5f5f5;
  --mb-radius:     4px;
  --mb-font:       'Open Sans', 'Helvetica Neue', Arial, sans-serif;

  --cat-bg-1: #e8f0fb; --cat-txt-1: #1a3c6e;
  --cat-bg-2: #fdecea; --cat-txt-2: #c8102e;
  --cat-bg-3: #e9f7ef; --cat-txt-3: #1a6b3c;
  --cat-bg-4: #fff8e1; --cat-txt-4: #7a5400;
  --cat-bg-5: #f3e5f5; --cat-txt-5: #6a1b9a;
}

/* ── Box-reset ──────────────────────────────────────────────────────────────── */
.mb-hero *, .mb-wrap *, .mbc-section *, .mb-single-wrap * { box-sizing: border-box; }
.mb-hero a, .mb-wrap a, .mbc-section a, .mb-single-wrap a { text-decoration: none; }

/* =============================================================================
   HIDE PART FINDER — body-class approach (set by enqueue.php)
   ============================================================================= */
.mb-hide-part-finder #main-header ~ div > .et_pb_section:first-child,
.mb-hide-part-finder .et_builder_inner_content > .et_pb_section:first-child,
.mb-hide-part-finder .mansons-part-finder {
  display: none !important;
}
.mb-hide-part-finder #page-container,
.mb-hide-part-finder #page-container .container,
.mb-hide-part-finder #page-container .et_pb_section,
.mb-hide-part-finder #page-container .et_pb_row,
.mb-hide-part-finder .et_full_width_page #main-content .container {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.mb-hide-part-finder #sidebar      { display: none !important; }
.mb-hide-part-finder #left-area    { width: 100% !important; float: none !important; padding: 0 !important; }


/* =============================================================================
   HERO HEADER — matches mansons.in/work-at-mansons/
   Dark charcoal bg, subtle circle SVG, red eyebrow, big white title, grey sub
   ============================================================================= */

.mb-hero {
  position: relative;
  width: 100%;
  min-height: 320px;
  background-color: var(--mb-charcoal);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
  font-family: var(--mb-font);
}

/* Dark overlay — always present, stronger when image is behind */
.mb-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(20, 21, 26, 0.97) 0%,
    rgba(20, 21, 26, 0.88) 55%,
    rgba(20, 21, 26, 0.70) 100%
  );
  z-index: 1;
}

/* No overlay div on archive (no image) — make bg solid */
.mb-hero:not(.mb-hero--single) {
  background-image: none !important;
}

/* Decorative SVG circles — left side like Mansons pages */
.mb-hero__curve {
  position: absolute;
  left: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  height: 420px;
  z-index: 1;
  pointer-events: none;
}

/* Content wrapper */
.mb-hero__content {
  position: relative;
  z-index: 2;
  padding: 56px 20px 56px 20px;
  width: 100%;
  max-width: 100%;
}

/* Breadcrumb inside hero (single only) */
.mb-hero__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 22px;
}
.mb-hero__breadcrumb a {
  color: rgba(255,255,255,0.55);
  transition: color 0.15s;
}
.mb-hero__breadcrumb a:hover { color: var(--mb-red); }
.mb-hero__breadcrumb span    { color: rgba(255,255,255,0.3); }

/* Eyebrow label — red uppercase, matches "Mansons International · Since 1956" */
.mb-hero__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mb-red);
  margin: 0 0 10px;
  line-height: 1;
}

/* Red underline rule — same thick red bar from Mansons pages */
.mb-hero__rule {
  width: 52px;
  height: 4px;
  background: var(--mb-red);
  margin-bottom: 22px;
  border-radius: 2px;
}

/* Main H1 title — large, bold, white */
.mb-hero__title {
  font-size: clamp(28px, 4.5vw, 54px);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  max-width: 800px;
  text-transform: uppercase;
}

/* Subtitle */
.mb-hero__sub {
  font-size: clamp(14px, 1.6vw, 17px);
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  max-width: 620px;
  line-height: 1.65;
}

/* Meta line (single post only) */
.mb-hero__meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  margin-top: 4px;
}
.mb-hero__meta strong { color: rgba(255,255,255,0.85); font-weight: 700; }

/* Taller hero for single posts (has more text) */
.mb-hero--single { min-height: 380px; }


/* =============================================================================
   BLOG GRID  — [mansons_blog_grid]
   4-column card layout with category filter + pagination
   ============================================================================= */

.mb-wrap {
  font-family: var(--mb-font);
  color: var(--mb-text);
  max-width: 100%;
  padding: 0 20px 60px;
}

/* ── Category filter bar ── */
.mb-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  align-items: center;
  justify-content: center;
  padding: 0 0 32px;
  border-bottom: 1px solid var(--mb-border);
  margin-bottom: 36px;
}
.mb-filter__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 18px;
  font-family: var(--mb-font);
  font-size: 14px;
  font-weight: 700;
  color: var(--mb-text);
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
  text-decoration: none;
  line-height: 1;
}
.mb-filter__chip:hover {
  color: var(--mb-navy);
  border-bottom-color: var(--mb-navy);
}
.mb-filter__chip.is-active {
  color: var(--mb-navy);
  border-bottom-color: var(--mb-red);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.mb-filter__count {
  font-size: 12px;
  font-weight: 400;
  color: var(--mb-muted);
}

/* ── 4-column grid ── */
.mb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 22px;
}

/* ── Card ── */
.mb-card {
  display: flex;
  flex-direction: column;
  background: var(--mb-bg);
}

.mb-card__thumb-link { display: block; }
.mb-card__thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--mb-radius);
  background: #dde4ed;
  aspect-ratio: 4 / 3;
  margin-bottom: 14px;
}
.mb-card__img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.38s ease;
}
.mb-card:hover .mb-card__img { transform: scale(1.05); }
.mb-card__img-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #b0bac6;
}

.mb-card__body { display: flex; flex-direction: column; flex: 1; }
.mb-card__title {
  font-size: 16px; font-weight: 700; line-height: 1.4;
  color: var(--mb-text); margin-bottom: 10px;
}
.mb-card__title a { color: inherit; transition: color 0.18s; }
.mb-card__title a:hover { color: var(--mb-navy); }
.mb-card__excerpt {
  font-size: 14px; line-height: 1.65;
  color: var(--mb-muted); flex: 1; margin-bottom: 12px;
}
.mb-card__readmore {
  color: var(--mb-navy); font-size: 14px;
  margin-left: 4px; transition: color 0.15s;
}
.mb-card__readmore:hover { color: var(--mb-red); }
.mb-card__meta {
  font-size: 13px; color: var(--mb-muted);
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--mb-border);
}
.mb-card__meta strong { color: var(--mb-text); font-weight: 700; }

/* No posts */
.mb-empty {
  grid-column: 1 / -1; text-align: center;
  padding: 60px 20px; color: var(--mb-muted); font-size: 15px;
}
.mb-empty a { color: var(--mb-navy); }

/* ── Pagination ── */
.mb-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; margin-top: 48px; padding-top: 32px;
  border-top: 1px solid var(--mb-border); flex-wrap: wrap;
}
.mb-page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px;
  border: 1px solid var(--mb-border); border-radius: var(--mb-radius);
  font-family: var(--mb-font); font-size: 14px;
  color: var(--mb-text); background: var(--mb-bg);
  cursor: pointer; text-decoration: none; transition: all 0.15s;
}
.mb-page-btn:hover { border-color: var(--mb-navy); color: var(--mb-navy); }
.mb-page-btn.current {
  background: var(--mb-navy); border-color: var(--mb-navy);
  color: #fff; font-weight: 700;
}
.mb-page-btn.dots { border: none; background: transparent; cursor: default; color: var(--mb-muted); }

/* Archive body */
.mb-archive-body { background: #fff; padding: 40px 0; }


/* =============================================================================
   SINGLE BLOG POST  — full-width, 20px L/R
   ============================================================================= */

.mb-single-wrap {
  font-family: var(--mb-font);
  background: #fff;
  width: 100%;
  padding: 0 20px 72px;
}
.mb-single-inner { width: 100%; max-width: 100%; }

.mb-single-content {
  font-size: 16px; line-height: 1.85; color: #333; max-width: 900px;
}
.mb-single-content h2 {
  font-size: 22px; font-weight: 700; color: var(--mb-navy); margin: 36px 0 14px;
}
.mb-single-content h3 {
  font-size: 18px; font-weight: 700; color: var(--mb-text); margin: 28px 0 10px;
}
.mb-single-content p  { margin-bottom: 18px; }
.mb-single-content ul,
.mb-single-content ol { padding-left: 24px; margin-bottom: 18px; }
.mb-single-content li { margin-bottom: 6px; }
.mb-single-content a  { color: var(--mb-navy); }
.mb-single-content a:hover { color: var(--mb-red); }
.mb-single-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 12px 0; }
.mb-single-content blockquote {
  border-left: 4px solid var(--mb-red); padding: 12px 20px;
  margin: 24px 0; background: #f9f9f9; font-style: italic; color: #555;
}

.mb-single-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--mb-border);
}
.mb-single-tag {
  font-size: 12px; font-weight: 600; padding: 4px 12px;
  border: 1px solid var(--mb-border); border-radius: 2px;
  color: var(--mb-muted); background: var(--mb-bg-alt);
}

.mb-single-back {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--mb-border);
}
.mb-single-back a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 700; color: var(--mb-navy); transition: color 0.15s, gap 0.15s;
}
.mb-single-back a:hover { color: var(--mb-red); gap: 10px; }


/* =============================================================================
   HOMEPAGE CAROUSEL — [mansons_blog_carousel]
   ============================================================================= */

.mbc-section {
  font-family: var(--mb-font);
  padding: 56px 20px;
  background: var(--mb-bg-alt);
}
.mbc-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; max-width: 1200px; margin: 0 auto 28px;
}
.mbc-eyebrow {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mb-red); margin-bottom: 6px;
}
.mbc-title {
  font-size: clamp(20px, 2.5vw, 26px); font-weight: 700;
  color: var(--mb-navy); line-height: 1.2;
}
.mbc-view-all {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; color: var(--mb-navy);
  white-space: nowrap; transition: gap 0.15s, color 0.15s;
}
.mbc-view-all:hover { color: var(--mb-red); gap: 8px; }

.mbc-outer {
  position: relative; max-width: 1200px;
  margin: 0 auto; overflow: hidden;
}
.mbc-track {
  display: flex; gap: 22px;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}
.mbc-card {
  flex: 0 0 calc(33.33% - 15px);
  background: var(--mb-bg); border-radius: var(--mb-radius);
  overflow: hidden; transition: box-shadow 0.22s;
}
.mbc-card:hover { box-shadow: 0 6px 24px rgba(26,60,110,0.12); }
.mbc-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }

.mbc-thumb {
  position: relative; aspect-ratio: 4/3;
  overflow: hidden; background: #dde5ef;
}
.mbc-thumb-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.38s ease;
}
.mbc-card:hover .mbc-thumb-img { transform: scale(1.05); }
.mbc-thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; color: #b0bac6;
}

.mbc-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 2px; background: var(--cat-bg-1); color: var(--cat-txt-1);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.mbc-cat-news       { background: var(--cat-bg-2); color: var(--cat-txt-2); }
.mbc-cat-industry   { background: var(--cat-bg-3); color: var(--cat-txt-3); }
.mbc-cat-technology { background: var(--cat-bg-4); color: var(--cat-txt-4); }
.mbc-cat-lifestyle  { background: var(--cat-bg-5); color: var(--cat-txt-5); }
.mbc-cat-product    { background: var(--cat-bg-1); color: var(--cat-txt-1); }
.mbc-cat-csr        { background: var(--cat-bg-3); color: var(--cat-txt-3); }

.mbc-body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.mbc-card-title {
  font-size: 15px; font-weight: 700; line-height: 1.4;
  color: var(--mb-text); margin-bottom: 8px; transition: color 0.15s;
}
.mbc-card:hover .mbc-card-title { color: var(--mb-navy); }
.mbc-excerpt {
  font-size: 13px; line-height: 1.6; color: var(--mb-muted); flex: 1; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mbc-meta { font-size: 12px; color: var(--mb-muted); margin-top: auto; }
.mbc-meta strong { color: var(--mb-text); font-weight: 700; }

.mbc-btn {
  display: none; position: absolute; top: 38%; transform: translateY(-50%); z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--mb-border); background: var(--mb-bg);
  color: var(--mb-navy); cursor: pointer;
  align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mbc-btn.is-visible { display: flex; }
.mbc-btn:hover { background: var(--mb-navy); color: #fff; border-color: var(--mb-navy); }
.mbc-btn-prev { left: -12px; }
.mbc-btn-next { right: -12px; }

.mbc-dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.mbc-dot-el {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mb-border); border: none; padding: 0; cursor: pointer;
  transition: background 0.2s, width 0.2s, border-radius 0.2s;
}
.mbc-dot-el.is-active { background: var(--mb-navy); width: 22px; border-radius: 4px; }


/* =============================================================================
   RESPONSIVE
   ============================================================================= */

/* Hero */
@media (max-width: 768px) {
  .mb-hero { min-height: 260px; }
  .mb-hero--single { min-height: 300px; }
  .mb-hero__content { padding: 40px 20px; }
  .mb-hero__rule { margin-bottom: 16px; }
  .mb-hero__title { font-size: 26px; }
  .mb-hero__breadcrumb { font-size: 12px; }
}

/* Grid: 2 columns tablet */
@media (max-width: 1024px) {
  .mb-grid { grid-template-columns: repeat(2, 1fr); }
  .mbc-card { flex: 0 0 calc(50% - 11px); }
}

/* Grid: 1 column mobile */
@media (max-width: 600px) {
  .mb-grid { grid-template-columns: 1fr; }
  .mbc-card { flex: 0 0 88%; }
  .mbc-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .mbc-section { padding: 36px 16px; }
  .mb-filter { justify-content: flex-start; }
  .mb-single-wrap { padding: 0 20px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .mbc-track, .mb-card__img, .mbc-thumb-img { transition: none; }
}
