/**
 * Convey U All Portfolio - Frontend Styles
 * 1. Homepage: Concept 1 Sketch-to-Reality Blueprint Reveal
 * 2. Main /portfolio/ Archive: Archetype 03 Monolithic Studio Spreads (5 Per Page Slider)
 */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&family=Syne:wght@600;700;800&display=swap');

/* ==========================================================================
   PART A: HOMEPAGE CONCEPT 1 (SKETCH-TO-REALITY BLUEPRINT ENGINE)
   ========================================================================== */
.cua-portfolio-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 0 20px;
  box-sizing: border-box;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111111;
  width: 100%;
}

.se-sketch-stage {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-sizing: border-box;
}

/* Blueprint Sketch Canvas Overlay */
.se-blueprint-overlay {
  position: absolute;
  inset: 0;
  background: #FDFDFD;
  border: 1px dashed #D1D5DB;
  border-radius: 16px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  pointer-events: none;
  transition: opacity 0.4s ease 0.1s;
}

.se-blueprint-overlay.sketch-done {
  opacity: 0;
  pointer-events: none;
}

/* Pen Tracing Vector Border */
.se-sketch-border-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.se-sketch-border-svg rect {
  fill: none;
  stroke: #C9F31D;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 2500;
  stroke-dashoffset: 2500;
  transition: stroke-dashoffset 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.se-sketch-stage.is-active .se-sketch-border-svg rect {
  stroke-dashoffset: 0;
}

/* Blueprint Grid Guidelines */
.se-blueprint-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.se-blueprint-tag {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: #88B500;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.se-blueprint-line {
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  width: 0%;
  transition: width 0.45s ease;
}

.se-sketch-stage.is-active .se-blueprint-line:nth-child(2) { width: 85%; transition-delay: 0.1s; }
.se-sketch-stage.is-active .se-blueprint-line:nth-child(3) { width: 65%; transition-delay: 0.18s; }
.se-sketch-stage.is-active .se-blueprint-line:nth-child(4) { width: 92%; transition-delay: 0.24s; }

/* The Finished Cards Behind Blueprint */
.se-cards-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  opacity: 0;
  transform: scale(0.97);
  filter: blur(4px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s ease;
  width: 100%;
  pointer-events: none;
}

.se-sketch-stage.is-revealed .se-cards-pair,
.se-cards-pair.cards-revealed {
  opacity: 1;
  transform: scale(1);
  filter: blur(0px);
  pointer-events: auto;
}

.cua-portfolio-grid.cua-cols-1 { grid-template-columns: 1fr; }
.cua-portfolio-grid.cua-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cua-portfolio-grid.cua-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
  .se-cards-pair, .cua-portfolio-grid.cua-cols-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .se-cards-pair, .cua-portfolio-grid.cua-cols-2, .cua-portfolio-grid.cua-cols-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Homepage Editorial Card Details */
.se-card {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease,
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  box-sizing: border-box;
}

.se-card:hover {
  transform: translateY(-5px);
  border-color: #000000;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.se-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.se-card-img-wrap {
  position: relative;
  width: 100%;
  height: 140px;
  background: #F8F8F8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #EFEFEF;
}

.se-card.card-clickites .se-card-img-wrap { background: #EAF724; }

.cua-card-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.se-card-logo {
  max-width: 80%;
  max-height: 80px;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.se-card:hover .se-card-logo { transform: scale(1.05); }

.cua-category-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 9px;
  border-radius: 99px;
  z-index: 2;
  pointer-events: none;
}

.se-circle-action {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #000000;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  z-index: 5;
}

.se-card:hover .se-circle-action {
  background: #000000;
  color: #C9F31D;
  border-color: #000000;
  transform: scale(1.12) rotate(8deg);
}

.se-card-metric {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border: 1px solid #E0E0E0;
  color: #000000;
  font-size: 10.5px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  padding: 4px 9px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.se-metric-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #88B500;
  box-shadow: 0 0 6px #C9F31D;
}

.se-card-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.se-card-client-tag {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #888888;
  font-weight: 700;
  margin-bottom: 4px;
}

.se-card-client-tag span { color: #88B500; }

.se-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 6px;
  line-height: 1.25;
}

.se-card-title a { color: #000000; text-decoration: none; }
.se-card-title a:hover { color: #88B500; }

.se-card-snippet {
  font-size: 12.5px;
  color: #666666;
  line-height: 1.45;
  margin-bottom: 12px;
}

.se-card-hook {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed #EAEAEA;
  font-size: 11px;
  color: #888888;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Fira Code', monospace;
}

.se-card-hook span.val { color: #111111; font-weight: 600; }


/* ==========================================================================
   PART B: MAIN /PORTFOLIO/ ARCHIVE: CLEAN ENTERPRISE MINIMAL GRID
   ========================================================================== */
.cua-portfolio-archive-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 100px;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111111;
  box-sizing: border-box;
}

/* Category Filter Bar */
.cua-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 36px;
  padding-bottom: 22px;
  border-bottom: 1px solid #ECEFF2;
}

.cua-filter-btn {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  color: #4B5563;
  padding: 8px 18px;
  border-radius: 99px;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.cua-filter-btn:hover {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
  transform: translateY(-1px);
}

.cua-filter-btn.active {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.cua-filter-btn .count {
  font-size: 11px;
  color: #6B7280;
  background: #F3F4F6;
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.cua-filter-btn.active .count {
  background: #1B2110;
  color: #C9F31D;
}

/* Enterprise Grid Container */
.cua-archive-grid {
  display: grid;
  gap: 28px;
  width: 100%;
}

.cua-archive-grid.cua-grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.cua-archive-grid.cua-grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.cua-archive-grid.cua-grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Enterprise Card */
.cua-card {
  background: #FFFFFF;
  border: 1px solid #EAECEF;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.32s ease,
              box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.cua-card:hover {
  transform: translateY(-6px);
  border-color: #111111;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Media Box: Dedicated Frame, Centered, Logos NEVER Shrink */
.cua-card-media {
  position: relative;
  width: 100%;
  height: 210px;
  background: #F7F8FA;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #ECEEF1;
}

.cua-card.card-clickites .cua-card-media {
  background: #EAF724;
}

.cua-media-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  text-decoration: none;
}

.cua-card-img {
  max-width: 78%;
  max-height: 110px;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.cua-card:hover .cua-card-img {
  transform: scale(1.06);
}

/* Category Badge Top Left */
.cua-card-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 99px;
  z-index: 2;
  pointer-events: none;
}

/* Metric Pill Bottom Left */
.cua-card-metric-pill {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border: 1px solid #E5E7EB;
  color: #000000;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  padding: 4px 10px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 2;
  pointer-events: none;
}

.cua-metric-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #88B500;
  box-shadow: 0 0 6px #C9F31D;
}

/* Circular Action Button Bottom Right */
.cua-circle-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #000000;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  z-index: 3;
}

.cua-card:hover .cua-circle-btn {
  background: #000000;
  color: #C9F31D;
  border-color: #000000;
  transform: scale(1.1) rotate(12deg);
}

/* Card Body */
.cua-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cua-card-client-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #888888;
  margin-bottom: 6px;
}

.cua-card-client-tag span {
  color: #88B500;
}

.cua-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 8px;
  line-height: 1.3;
}

.cua-card-title a {
  color: #000000;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cua-card-title a:hover {
  color: #88B500;
}

.cua-card-snippet {
  font-size: 13.5px;
  color: #666666;
  line-height: 1.55;
  margin-bottom: 18px;
}

.cua-card-snippet p {
  margin: 0;
}

.cua-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: #888888;
}

.cua-card-footer .val {
  color: #111111;
  font-weight: 600;
}

/* Empty State Notice */
.cua-no-results {
  text-align: center;
  padding: 60px 24px;
  background: #FFFFFF;
  border: 1px dashed #D1D5DB;
  border-radius: 16px;
  margin: 20px 0;
}

.cua-no-results p {
  font-size: 14px;
  color: #6B7280;
  margin: 0;
}

/* Responsive Grid */
@media (max-width: 1024px) {
  .cua-archive-grid,
  .cua-archive-grid.cua-grid-cols-3,
  .cua-archive-grid.cua-grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .cua-archive-grid,
  .cua-archive-grid.cua-grid-cols-2,
  .cua-archive-grid.cua-grid-cols-3,
  .cua-archive-grid.cua-grid-cols-4 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cua-portfolio-archive-wrap {
    padding: 24px 16px 60px;
  }
}

/* ==========================================================================
   PART C: CLEAN ARCHIVE TITLE SANITIZATION
   Eliminates "Archives: Portfolios" / "Archives: aportfolio" in theme header
   ========================================================================== */
.post-type-archive-portfolio .main-title-section-wrapper .main-title-section h1,
.post-type-archive-portfolio .main-title-section h1,
.post-type-archive-portfolio .breadcrumb-title h1,
.post-type-archive-portfolio .page-title-wrapper h1,
.tax-portfolio_category .main-title-section h1,
.tax-portfolio_tag .main-title-section h1 {
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
}

.post-type-archive-portfolio .main-title-section-wrapper .main-title-section h1::after,
.post-type-archive-portfolio .main-title-section h1::after,
.post-type-archive-portfolio .breadcrumb-title h1::after,
.post-type-archive-portfolio .page-title-wrapper h1::after,
.tax-portfolio_category .main-title-section h1::after,
.tax-portfolio_tag .main-title-section h1::after {
  content: "Portfolio" !important;
  font-size: 40px !important;
  line-height: 1.2 !important;
  font-family: 'Syne', sans-serif !important;
  font-weight: 800 !important;
  color: #000000 !important;
  display: block !important;
  letter-spacing: -0.02em !important;
}

/* Clean breadcrumbs if they show Archives */
.post-type-archive-portfolio .breadcrumb-wrapper .current-crumb,
.post-type-archive-portfolio .main-title-section-wrapper .breadcrumb span:last-child {
  font-size: 0 !important;
}

.post-type-archive-portfolio .breadcrumb-wrapper .current-crumb::after,
.post-type-archive-portfolio .main-title-section-wrapper .breadcrumb span:last-child::after {
  content: "Portfolio" !important;
  font-size: 13px !important;
  color: #666666 !important;
}

