/* ==========================================================================
   work.css - Master Stylesheet for Zenerom Work & Case Studies Page
   Zenerom UAE Digital Marketing & Technology Agency
   Universal styling for the signature staggered portfolio grid & case studies
   ========================================================================== */

:root {
  --work-bg-light: #ffffff;
  --work-bg-alt: #f8f8f6;
  --work-text-dark: #0a0a0a;
  --work-text-muted: #64748b;
  --work-border-subtle: rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   1. Page Layout & Reset
   -------------------------------------------------------------------------- */
.work-page-section {
  position: relative;
  width: 100%;
  overflow-x: hidden;
  background-color: var(--work-bg-light);
}

/* Ensure absolute compliance with Universal Flat Card rule */
.work-stat-card,
.work-single-block,
.work-modal-content,
.work-filter-btn {
  border: none !important;
  box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   2. Work Hero Section
   -------------------------------------------------------------------------- */
.work-hero-section {
  padding-top: 140px;
  padding-bottom: 70px;
  background-color: var(--work-bg-light);
  position: relative;
  overflow: hidden;
}

.work-hero-container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.work-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--work-text-muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.work-breadcrumbs a {
  color: var(--work-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.work-breadcrumbs a:hover {
  color: var(--brand-flamingo, #f26934);
}

.work-breadcrumbs-sep {
  color: #cbd5e1;
  font-size: 0.75rem;
}

.work-breadcrumbs-current {
  color: var(--black-900);
  font-weight: 600;
}

.work-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.25rem;
  border-radius: 9999px;
  background-color: var(--black-900);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.work-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--brand-flamingo, #f26934);
  animation: workPulseDot 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes workPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.work-hero-title {
  font-size: clamp(2.35rem, 5.2vw, 4.35rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: var(--black-900);
  margin: 0 0 1.5rem;
}

.work-hero-title .highlight-text {
  background: linear-gradient(135deg, var(--brand-flamingo, #f26934) 0%, var(--brand-flamingo-mid, #f28255) 52%, var(--brand-ship-cove, #7892bd) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: var(--brand-flamingo, #f26934) !important;
  display: inline-block;
}

.work-hero-desc {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.65;
  color: #475569;
  max-width: 820px;
  margin: 0 auto 2.5rem;
}

/* Hero Proof Stats Row */
.work-hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

.work-stat-card {
  background: #fbfbf9;
  border-radius: 18px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.work-stat-card:hover {
  transform: translateY(-4px);
}

.work-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-flamingo, #f26934), var(--brand-ship-cove, #7892bd));
  opacity: 0.8;
}

.work-stat-number {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 700;
  color: var(--black-900);
  line-height: 1.05;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.work-stat-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   3. In-Flow Segmented Category Filter Bar
   -------------------------------------------------------------------------- */
.work-filter-section {
  padding: 20px 0 60px;
  background-color: var(--work-bg-light);
  position: relative;
  z-index: 10;
}

.work-filter-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.work-filter-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  background: #f5f3ee;
  padding: 0.5rem;
  border-radius: 9999px;
}

.work-filter-btn {
  background: transparent;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.work-filter-btn:hover {
  color: var(--black-900);
  background-color: rgba(0, 0, 0, 0.04);
}

.work-filter-btn.is-active {
  background-color: var(--brand-flamingo, #f26934) !important;
  color: #ffffff !important;
  font-weight: 700;
}

.work-filter-count {
  font-size: 0.75rem;
  opacity: 0.8;
  font-family: monospace;
}

/* --------------------------------------------------------------------------
   4. Signature Staggered Work Grid Enhancements
   -------------------------------------------------------------------------- */
.section_work_gallery {
  padding-bottom: 120px;
  background-color: var(--work-bg-light);
}

.work-gallery-container {
  max-width: 1240px;
  margin: 0 auto;
}

/* Card image wrap fixed proportional height */
.work-single-block .work-image-wrap {
  height: 480px;
  border-radius: 22px;
  background-color: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.work-single-block .work-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
}

.work-single-block:hover .work-image {
  transform: scale(1.06);
}

/* Metric / Capability Pill under title */
.work-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-flamingo, #f26934);
  background: rgba(242, 105, 52, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  margin-top: 0.65rem;
  width: fit-content;
}

.work-item-client {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-ship-cove, #7892bd);
  margin-bottom: 0.25rem;
}

.work-item-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--black-900);
  line-height: 1.35;
  letter-spacing: -0.02em;
  transition: color 0.25s ease;
  max-width: 360px;
}

.work-single-block:hover .work-item-title {
  color: var(--brand-flamingo, #f26934);
}

/* Animate card hide / show during filtering */
.work-cl-item.is-filtered-out {
  display: none !important;
}

/* --------------------------------------------------------------------------
   5. Interactive Case Study Modal / Drawer
   -------------------------------------------------------------------------- */
.work-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.work-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.work-modal-content {
  background: #ffffff;
  border-radius: 26px;
  max-width: 860px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 3rem 2.75rem;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.work-modal-backdrop.is-open .work-modal-content {
  transform: translateY(0) scale(1);
}

.work-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--black-900);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.work-modal-close:hover {
  background: #e2e8f0;
  transform: rotate(90deg);
}

.work-modal-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.work-modal-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-flamingo, #f26934);
  background: rgba(242, 105, 52, 0.1);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
}

.work-modal-client {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
}

.work-modal-title {
  font-size: clamp(1.65rem, 2.8vw, 2.25rem);
  font-weight: 700;
  color: var(--black-900);
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}

/* Proof stats strip inside modal */
.work-modal-metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  background: #fbfbf9;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.work-modal-metric-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.work-modal-metric-num {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--brand-flamingo, #f26934);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.work-modal-metric-lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.35;
}

/* Details 2-Column Section */
.work-modal-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.work-modal-block-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--black-900);
  margin: 0 0 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.work-modal-block-desc {
  font-size: 0.925rem;
  line-height: 1.65;
  color: #475569;
  margin: 0;
}

.work-modal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.work-modal-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.45;
}

.work-modal-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.work-tech-chip {
  font-size: 0.75rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-family: monospace;
}

/* Modal Bottom Actions */
.work-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
  gap: 1rem;
}

.work-modal-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.65rem;
  background: var(--brand-flamingo, #f26934);
  color: #ffffff;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.work-modal-cta-btn:hover {
  background: var(--brand-flamingo-mid, #f28255);
  transform: translateY(-2px);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   6. Bottom High-Impact Conversion Section
   -------------------------------------------------------------------------- */
.work-section-cta {
  padding: 110px 0;
  background-color: #0d0f12;
  color: #ffffff;
  position: relative;
}

.work-cta-container {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.work-cta-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0 0 1.25rem;
}

.work-cta-desc {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 720px;
  margin: 0 0 2.5rem;
}

.work-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   7. Responsive Overrides
   -------------------------------------------------------------------------- */
@media screen and (max-width: 991px) {
  .work-hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .work-modal-details-grid {
    grid-template-columns: 1fr;
  }
  .work-single-block .work-image-wrap {
    height: 400px;
  }
}

@media screen and (max-width: 767px) {
  .work-hero-section {
    padding-top: 110px;
    padding-bottom: 50px;
  }
  .work-hero-stats-grid {
    grid-template-columns: 1fr;
  }
  .work-filter-pills {
    border-radius: 18px;
    padding: 0.5rem;
  }
  .work-filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }
  .work-single-block .work-image-wrap {
    height: 320px;
  }
  .work-modal-content {
    padding: 2rem 1.5rem;
  }
  .work-modal-metrics-strip {
    grid-template-columns: 1fr;
  }
}
