@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,700;0,9..144,800;0,9..144,900;1,9..144,400;1,9..144,700;1,9..144,800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/**
 * Carry Magazine – The Font Studio
 * Dynamic Blog & Category Filtering Stylesheet
 * Version: 1.2.3 - High Fidelity Design System
 */

:root {
  --cm-blog-plum: #21132b;
  --cm-blog-plum-deep: #160b1e;
  --cm-blog-orange: #ff5722;
  --cm-blog-orange-gradient: linear-gradient(135deg, #ff4e20 0%, #ff7a00 50%, #ffa500 100%);
  --cm-blog-purple: #6842a0;
  --cm-blog-purple-light: #9d71c7;
  --cm-blog-ink: #23162f;
  --cm-blog-muted: #5e536b;
  --cm-blog-line: #ece3f2;
  --cm-blog-card-bg: #ffffff;
}

/* Full Viewport Ambient Pastel Background for the Blog Studio Page */
body.cm-font-studio-blog-page,
body.cm-font-studio-blog-page #page,
body.cm-font-studio-blog-page #content,
body.cm-font-studio-blog-page .site-content,
body.cm-font-studio-blog-page .bb-grid,
body.cm-font-studio-blog-page #primary,
body.cm-font-studio-blog-page #main,
body.cm-font-studio-blog-page article.page,
body.cm-font-studio-blog-page .entry-content {
  background-color: transparent !important;
  background: transparent !important;
}

body.cm-font-studio-blog-page {
  background-color: #fcfbfe !important;
  background-image: 
    radial-gradient(circle 520px at -40px 140px, rgba(255, 185, 80, 0.48), transparent 70%),
    radial-gradient(circle 540px at calc(100% + 50px) 150px, rgba(215, 160, 255, 0.50), transparent 70%),
    radial-gradient(circle 380px at calc(100% + 30px) 520px, rgba(186, 104, 200, 0.28), transparent 70%),
    radial-gradient(circle 520px at calc(100% + 60px) calc(100% - 60px), rgba(255, 170, 155, 0.44), transparent 70%),
    radial-gradient(circle 440px at 4% calc(100% + 40px), rgba(255, 210, 130, 0.32), transparent 70%) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}

/* Base Wrapper */
.cm-blog-studio-wrap {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px 20px 80px;
  box-sizing: border-box;
  color: var(--cm-blog-ink);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  isolation: isolate;
  overflow: visible;
}

.cm-blog-studio-wrap * {
  box-sizing: border-box;
}

/* Ambient Floating Background Bokeh Bubbles matching mockup arrows */
.cm-blog-bg-orbs {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: visible;
  pointer-events: none;
  z-index: -1;
}

.cm-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* Left Top: Warm Peach / Amber Orb */
.cm-orb-left-peach {
  top: -40px;
  left: -120px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(255, 179, 71, 0.52) 0%, rgba(255, 140, 0, 0.26) 45%, transparent 75%);
  filter: blur(60px);
}

.cm-orb-left-yellow {
  top: 140px;
  left: -140px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(255, 213, 79, 0.44) 0%, rgba(255, 183, 77, 0.22) 50%, transparent 75%);
  filter: blur(50px);
}

/* Right Top: Lavender / Violet Layered Orbs */
.cm-orb-right-purple {
  top: -60px;
  right: -130px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(206, 147, 216, 0.55) 0%, rgba(179, 136, 255, 0.30) 50%, transparent 75%);
  filter: blur(65px);
}

.cm-orb-right-violet {
  top: 180px;
  right: -90px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(186, 104, 200, 0.38) 0%, rgba(142, 36, 170, 0.18) 50%, transparent 75%);
  filter: blur(55px);
}

/* Bottom Right: Peach / Pink Floating Glow */
.cm-orb-bottom-pink {
  bottom: 40px;
  right: -100px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 171, 145, 0.50) 0%, rgba(240, 98, 146, 0.26) 48%, transparent 75%);
  filter: blur(70px);
}

.cm-orb-bottom-coral {
  bottom: -60px;
  left: 6%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(255, 204, 128, 0.38) 0%, rgba(255, 138, 101, 0.20) 50%, transparent 75%);
  filter: blur(60px);
}

/* Breadcrumb */
.cm-blog-breadcrumb-wrap {
  text-align: center;
  margin-bottom: 22px;
  position: relative;
  z-index: 2;
}

.cm-blog-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: #ffffff;
  border: 1px solid #ebdfee;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(33, 19, 43, 0.05);
  font-size: 13px;
  font-weight: 600;
  color: #5c4e68;
}

.cm-blog-breadcrumb a {
  color: #5c4e68;
  text-decoration: none;
  transition: color 0.18s ease;
}

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

.cm-breadcrumb-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #ff6a3d;
  border-radius: 50%;
}

.cm-breadcrumb-sep {
  color: #9f94a8;
  font-size: 12px;
}

.cm-breadcrumb-current {
  color: var(--cm-blog-plum);
  font-weight: 700;
}

/* Header & Main Title */
.cm-blog-header {
  text-align: center;
  max-width: 960px;
  margin: 0 auto 34px;
  position: relative;
}

.cm-blog-title {
  font-family: "Fraunces", Georgia, serif !important;
  font-size: clamp(44px, 6.8vw, 76px) !important;
  line-height: 1.04 !important;
  letter-spacing: -0.035em !important;
  margin: 0 auto 10px !important;
  position: relative !important;
  display: inline-block !important;
  text-align: center !important;
}

.cm-title-font {
  font-family: inherit !important;
  font-weight: 900 !important;
  color: #1e112d !important;
  margin-right: 6px !important;
  display: inline-block !important;
}

.cm-title-studio {
  font-family: inherit !important;
  font-style: italic !important;
  font-weight: 800 !important;
  color: #ff5722 !important;
  background: linear-gradient(135deg, #ff4e20 0%, #ff7a00 50%, #ffa500 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  display: inline-block !important;
  margin-left: 2px !important;
}

/* Title Gradient Underline */
.cm-title-underline-svg {
  display: block;
  width: clamp(230px, 46vw, 360px);
  height: 16px;
  margin: 4px auto 0;
  overflow: visible;
}

/* Subtitle */
.cm-blog-subtitle {
  font-size: clamp(16px, 2.1vw, 18.5px);
  line-height: 1.65;
  color: var(--cm-blog-muted);
  max-width: 760px;
  margin: 16px auto 0;
  font-weight: 400;
}

/* Category Filter Bar */
.cm-blog-filters-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px auto 44px;
  position: relative;
}

.cm-blog-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  list-style: none;
  padding: 4px 2px 10px;
  margin: 0;
}

.cm-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid #eae1f1;
  background: #ffffff;
  color: #4a3c57;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(33, 19, 43, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  outline: none;
}

.cm-filter-btn:hover {
  border-color: #ff5722;
  color: var(--cm-blog-plum);
  background: #fff8f5;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(255, 87, 34, 0.12);
}

.cm-filter-btn.is-active {
  background: var(--cm-blog-plum);
  border-color: var(--cm-blog-plum);
  color: #ffffff;
  box-shadow: 0 5px 18px rgba(33, 19, 43, 0.28);
  transform: translateY(-1px);
}

.cm-filter-btn.is-active:hover {
  background: var(--cm-blog-plum-deep);
  border-color: var(--cm-blog-plum-deep);
  color: #ffffff;
}

.cm-filter-plus {
  min-width: 42px;
  padding: 8px 14px;
  font-size: 17px;
  font-weight: 600;
  justify-content: center;
}

.cm-filter-emoji {
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cm-filter-text {
  letter-spacing: -0.01em;
}

/* Blog Cards Grid */
.cm-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-bottom: 48px;
  transition: opacity 0.25s ease;
}

.cm-blog-grid.is-filtering {
  opacity: 0.45;
  pointer-events: none;
}

/* Individual Card */
.cm-blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1.2px solid #eee5f3;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(33, 19, 43, 0.04);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease;
}

.cm-blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(33, 19, 43, 0.12);
  border-color: #d6c1e6;
}

/* Card Media / Thumbnail Container */
.cm-card-media {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 16 / 9.6 !important;
  overflow: hidden !important;
  background: #f4ecf8 !important;
  border-top-left-radius: 21px !important;
  border-top-right-radius: 21px !important;
}

/* Actual Featured Image (Direct Child of .cm-card-media) */
.cm-card-media > img.cm-card-img,
.cm-card-media > img:not(.wp-smiley),
.cm-card-media .cm-card-art,
.cm-card-media .cm-svg-art {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: transform 0.4s ease;
}

.cm-blog-card:hover .cm-card-media img.cm-card-img,
.cm-blog-card:hover .cm-card-media .cm-svg-art {
  transform: scale(1.04);
}

/* Sleek Floating Category Pill Badge top-left (EXACT MATCH TO MOCKUP) */
.cm-card-media .cm-card-category-badge {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  z-index: 10 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 12px !important;
  height: 26px !important;
  max-height: 26px !important;
  min-height: 26px !important;
  width: auto !important;
  max-width: fit-content !important;
  background: rgba(22, 11, 31, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22) !important;
  pointer-events: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  transform: none !important;
}

.cm-card-media .cm-card-category-badge .cm-badge-emoji {
  font-size: 13px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  max-width: 16px !important;
  max-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.cm-card-media .cm-card-category-badge .cm-badge-name {
  font-size: 11.5px !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  display: inline-block !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
}

/* STRICT OVERRIDES: Never allow any Twemoji or image inside badge or filters to expand */
.cm-card-category-badge img,
.cm-card-category-badge img.wp-smiley,
.cm-badge-emoji img,
.cm-blog-filters img.wp-smiley {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  display: inline-block !important;
  vertical-align: -1px !important;
  margin: 0 2px 0 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: contain !important;
  background: transparent !important;
}

/* Card Body Content */
.cm-card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 22px 24px 20px;
}

.cm-card-title {
  font-family: "Fraunces", Georgia, serif !important;
  font-size: 20px !important;
  line-height: 1.34 !important;
  font-weight: 850 !important;
  color: var(--cm-blog-plum) !important;
  margin: 0 0 10px !important;
  letter-spacing: -0.018em !important;
  transition: color 0.18s ease;
}

.cm-blog-card:hover .cm-card-title {
  color: var(--cm-blog-orange) !important;
}

.cm-card-stretched-link {
  color: inherit !important;
  text-decoration: none !important;
}

/* Stretched Link pseudo-element makes whole card clickable */
.cm-card-stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cm-card-excerpt {
  font-size: 14px;
  line-height: 1.65;
  color: var(--cm-blog-muted);
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Meta Footer */
.cm-card-meta {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f1eaf5;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #7d7086;
  font-weight: 500;
}

.cm-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cm-meta-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.cm-meta-sep {
  color: #c7bccf;
  font-size: 11px;
}

/* Fallback Post Banner Default */
.cm-fallback-banner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 16px;
  text-align: center;
  color: #ffffff;
}

.cm-fallback-banner-decor {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.22), transparent 55%), radial-gradient(circle at 10% 80%, rgba(0, 0, 0, 0.12), transparent 60%);
  pointer-events: none;
}

.cm-fallback-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cm-fallback-icon {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18));
}

.cm-fallback-label {
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.cm-theme-default { background: linear-gradient(135deg, #6842a0 0%, #c65c3b 100%); }

/* Pagination / Load More Button */
.cm-blog-pagination {
  text-align: center;
  margin-top: 20px;
}

.cm-load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 13px 36px;
  border-radius: 999px;
  background: var(--cm-blog-plum);
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 750;
  box-shadow: 0 6px 20px rgba(33, 19, 43, 0.24);
  transition: all 0.22s ease;
  user-select: none;
  outline: none;
}

.cm-load-more-btn:hover {
  background: #391e4f;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(33, 19, 43, 0.32);
}

.cm-load-more-btn:active {
  transform: translateY(0);
}

.cm-load-more-btn.is-loading {
  opacity: 0.8;
  cursor: wait;
  pointer-events: none;
}

.cm-chevron {
  display: inline-block;
  font-size: 15px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.cm-load-more-btn:hover .cm-chevron {
  transform: translateY(2px);
}

.cm-btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: cm-spin 0.65s linear infinite;
}

.cm-load-more-btn.is-loading .cm-btn-spinner {
  display: inline-block;
}

.cm-load-more-btn.is-loading .cm-chevron {
  display: none;
}

@keyframes cm-spin {
  to { transform: rotate(360deg); }
}

/* Empty State Message */
.cm-blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  background: #fbf9fd;
  border: 1.5px dashed #ded3e7;
  border-radius: 20px;
  color: var(--cm-blog-muted);
}

.cm-blog-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.cm-blog-empty h3 {
  font-size: 19px;
  color: var(--cm-blog-plum);
  margin: 0 0 6px;
}

.cm-blog-empty p {
  font-size: 14px;
  margin: 0;
}

/* Responsive Rules */
@media (max-width: 990px) {
  .cm-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
  .cm-blog-studio-wrap {
    padding: 24px 16px 60px;
  }
}

@media (max-width: 680px) {
  .cm-blog-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .cm-blog-filters-container {
    margin: 20px auto 32px;
  }
  .cm-blog-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: #d8cce5 transparent;
  }
  .cm-blog-filters::-webkit-scrollbar {
    height: 4px;
  }
  .cm-blog-filters::-webkit-scrollbar-thumb {
    background: #d8cce5;
    border-radius: 4px;
  }
  .cm-filter-btn {
    min-height: 38px;
    padding: 7px 14px;
    font-size: 12.5px;
  }
  .cm-card-content {
    padding: 18px 18px 16px;
  }
  .cm-card-title {
    font-size: 18px !important;
  }
}

/* Remove BuddyBoss title, margins, breadcrumbs and header conflicts on the Blog Studio page */
body.cm-font-studio-blog-page .entry-header,
body.cm-font-studio-blog-page .entry-title,
body.cm-font-studio-blog-page .page-title,
body.cm-font-studio-blog-page .bb-page-title,
body.cm-font-studio-blog-page .bb-title-wrapper {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.cm-font-studio-blog-page .site-content {
  padding-top: 0 !important;
}

body.cm-font-studio-blog-page .bb-grid.site-content-grid {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.cm-font-studio-blog-page #primary.content-area {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.cm-font-studio-blog-page .entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
