/* ==========================================================================
   TrynixTech — Case Study Detail Pages
   Design System: Satoshi Typography, Clean Architectural Layout, Frosted Header
   ========================================================================== */

/* Fail-safe: Ensure preloader never blocks case study rendering */
.preloader,
.preloader-inner {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -9999 !important;
}

/* Main Page Container */
.cs-detail-page {
  background-color: #ffffff;
  color: #0f172a;
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 120px;
  padding-bottom: 0;
  position: relative;
  overflow-x: hidden;
}

/* Subtle Ambient Gradient at Top */
.cs-detail-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1400px;
  height: 520px;
  background: radial-gradient(50% 60% at 50% 0%, rgba(226, 232, 240, 0.45) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 0;
}

.cs-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   1. Breadcrumb / Back Link Strip
   -------------------------------------------------------------------------- */
.cs-detail-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0 32px;
  border-bottom: 1px solid #f1f5f9;
}

.cs-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'SatoshiMedium', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.cs-back-link svg {
  transition: transform 0.24s ease;
}

.cs-back-link:hover {
  color: #0c0c0e;
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.cs-back-link:hover svg {
  transform: translateX(-3px);
}

.cs-detail-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'SatoshiBold', 'Satoshi', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0c0c0e;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: 999px;
}

.cs-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e11d48;
}

.cs-badge-dot.badge-urvisa {
  background: #d97706;
}

.cs-badge-dot.badge-sme {
  background: #ea580c;
}

/* --------------------------------------------------------------------------
   2. Hero Intro Header (H1 & Lead Narrative)
   -------------------------------------------------------------------------- */
.cs-detail-header {
  padding-top: 40px;
  padding-bottom: 24px;
  max-width: 960px;
}

.cs-detail-title {
  font-family: 'SatoshiBold', 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: #0c0c0e;
  margin: 0 0 24px 0;
}

.cs-detail-lead {
  font-family: 'SatoshiMedium', 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.62;
  color: #475569;
  margin: 0;
  max-width: 860px;
}

/* --------------------------------------------------------------------------
   3. Hero Showcase Media
   -------------------------------------------------------------------------- */
.cs-detail-hero-media {
  margin: 36px 0 54px;
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 60px -15px rgba(15, 23, 42, 0.08);
}

.cs-detail-hero-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 640px;
}

/* --------------------------------------------------------------------------
   4. Project Meta Specs Bar (Client, Platform, Services)
   -------------------------------------------------------------------------- */
.cs-detail-meta-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 60px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.03);
}

.cs-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  position: relative;
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  position: relative;
}

.cs-meta-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -14px;
  top: 10%;
  height: 80%;
  width: 1px;
  background: #f1f5f9;
}

.cs-meta-label {
  font-family: 'SatoshiBold', 'Satoshi', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 8px;
}

.cs-meta-value {
  font-family: 'SatoshiBold', 'Satoshi', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #0c0c0e;
  line-height: 1.35;
}

.cs-meta-value.services-list {
  font-family: 'SatoshiMedium', 'Satoshi', sans-serif;
  font-size: 15px;
  color: #334155;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   5. Main Narrative Body
   -------------------------------------------------------------------------- */
.cs-detail-body {
  max-width: 940px;
  margin: 0 auto;
}

.cs-content-section {
  padding: 48px 0;
  border-top: 1px solid #f1f5f9;
}

.cs-section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'SatoshiBold', 'Satoshi', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0c0c0e;
  background: #f1f5f9;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.cs-section-eyebrow.eyebrow-accent {
  background: rgba(225, 29, 72, 0.08);
  color: #e11d48;
}

.cs-section-heading {
  font-family: 'SatoshiBold', 'Satoshi', sans-serif;
  font-size: clamp(26px, 2.7vw, 36px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: #0c0c0e;
  margin: 0 0 20px 0;
}

.cs-section-text {
  font-family: 'SatoshiRegular', 'Satoshi', sans-serif;
  font-size: 17.5px;
  line-height: 1.78;
  color: #475569;
  margin: 0 0 24px 0;
}

.cs-section-text:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   6. Approach Feature Cards Grid (Gloqr Shop, Salesman, Mylead, Circle)
   -------------------------------------------------------------------------- */
.cs-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 36px;
}

.cs-feature-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 30px;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.cs-feature-card:hover {
  transform: translateY(0px);
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 16px 36px -10px rgba(15, 23, 42, 0.07);
}

.cs-feature-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.cs-feature-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0c0c0e;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.cs-feature-title {
  font-family: 'SatoshiBold', 'Satoshi', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #0c0c0e;
  margin: 0;
}

.cs-feature-desc {
  font-family: 'SatoshiRegular', 'Satoshi', sans-serif;
  font-size: 15px;
  line-height: 1.62;
  color: #64748b;
  margin: 0;
}

/* --------------------------------------------------------------------------
   7. Outcome Callout Highlight Box
   -------------------------------------------------------------------------- */
.cs-outcome-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 32px 36px;
  margin-top: 32px;
  position: relative;
  overflow: hidden;
}

.cs-outcome-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #0c0c0e;
}

.cs-outcome-lead {
  font-family: 'SatoshiMedium', 'Satoshi', sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: #1e293b;
  margin: 0 0 14px 0;
}

.cs-outcome-sub {
  font-family: 'SatoshiRegular', 'Satoshi', sans-serif;
  font-size: 16px;
  line-height: 1.68;
  color: #475569;
  margin: 0;
}

/* --------------------------------------------------------------------------
   8. Tags & Services Used Section
   -------------------------------------------------------------------------- */
.cs-tags-section {
  padding: 44px 0 20px;
  border-top: 1px solid #f1f5f9;
}

.cs-tags-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.cs-tags-row:last-child {
  margin-bottom: 0;
}

.cs-tags-title {
  font-family: 'SatoshiBold', 'Satoshi', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  min-width: 140px;
  padding-top: 7px;
}

.cs-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cs-tag-item {
  font-family: 'SatoshiMedium', 'Satoshi', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.cs-tag-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0c0c0e;
}

.cs-tag-item.service-tag {
  background: #0c0c0e;
  color: #ffffff;
  border-color: #0c0c0e;
  box-shadow: 0 2px 8px rgba(12, 12, 14, 0.15);
}

.cs-tag-item.service-tag:hover {
  background: #262629;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   9. Bottom Conversion Banner ("Start Project →")
   -------------------------------------------------------------------------- */
.cs-bottom-cta-wrap {
  margin: 70px 0 90px;
}

.cs-bottom-cta-banner {
  background: linear-gradient(135deg, #0c0c0e 0%, #18181b 100%);
  border-radius: 28px;
  padding: 60px 56px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  box-shadow: 0 24px 60px -15px rgba(12, 12, 14, 0.25);
  position: relative;
  overflow: hidden;
}

.cs-bottom-cta-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.cs-cta-text-side {
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.cs-cta-kicker {
  font-family: 'SatoshiBold', 'Satoshi', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 12px;
}

.cs-cta-headline {
  font-family: 'SatoshiBold', 'Satoshi', sans-serif;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0 0 14px 0;
}

.cs-cta-sub {
  font-family: 'SatoshiRegular', 'Satoshi', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.cs-cta-action-side {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.cs-start-project-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  color: #0c0c0e;
  font-family: 'SatoshiBold', 'Satoshi', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.cs-start-project-btn svg {
  transition: transform 0.28s ease;
}

.cs-start-project-btn:hover {
  background: #f1f5f9;
  color: #000000;
  transform: translateY(0px);
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.2);
}

.cs-start-project-btn:hover svg {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   10. Case Study Pagination / Switcher Strip
   -------------------------------------------------------------------------- */
.cs-pagination-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 32px 0;
  border-top: 1px solid #e2e8f0;
  margin-top: 40px;
}

.cs-pager-link {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.cs-pager-link:hover {
  opacity: 0.8;
}

.cs-pager-label {
  font-family: 'SatoshiBold', 'Satoshi', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.cs-pager-title {
  font-family: 'SatoshiBold', 'Satoshi', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #0c0c0e;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cs-pager-link.next {
  text-align: right;
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   11. Responsive Styles
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .cs-detail-page {
    padding-top: 100px;
  }

  .cs-meta-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .cs-meta-item:not(:last-child)::after {
    display: none;
  }

  .cs-feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cs-bottom-cta-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 44px 32px;
    gap: 32px;
  }

  .cs-tags-row {
    flex-direction: column;
    gap: 12px;
  }

  .cs-tags-title {
    min-width: unset;
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .cs-detail-page {
    padding-top: 90px;
  }

  .cs-detail-nav-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cs-detail-meta-bar {
    padding: 24px 20px;
  }

  .cs-meta-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cs-bottom-cta-banner {
    padding: 36px 24px;
  }

  .cs-start-project-btn {
    width: 100%;
    justify-content: center;
  }

  .cs-pagination-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .cs-pager-link.next {
    text-align: left;
    margin-left: 0;
  }
}