/* ==========================================================================
   SERVICES PAGE STYLES
   ========================================================================== */

/* --- SERVICES CAROUSEL --- */
.svc-carousel-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 20px 0; /* Space for subtle shadows/hover effects */
  cursor: grab;
}

.svc-carousel-container:active {
  cursor: grabbing;
}

.svc-track {
  display: flex;
  gap: 24px;
  padding: 0 32px;
  width: max-content;
}

.svc-card {
  width: 320px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  display: flex;
  flex-direction: column;
}

.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
}

.svc-card-visual {
  height: 200px;
  width: 100%;
  background: #F8F7F5;
  position: relative;
  overflow: hidden;
  padding: 24px;
  box-sizing: border-box;
}

/* We will replace this placeholder with images later */
.placeholder-bg::after {
  content: 'Image Placeholder';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #999;
  font-size: 14px;
  font-weight: 500;
}

.svc-card-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.svc-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(103, 58, 183, 0.1);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.svc-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.svc-card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* --- MODAL (FLIP) --- */
.svc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  pointer-events: none; /* Initially non-interactive */
  visibility: hidden;
}

.svc-modal-overlay.is-active {
  pointer-events: auto;
  visibility: visible;
}

.svc-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.svc-modal-overlay.is-active .svc-modal-backdrop {
  opacity: 1;
}

.svc-modal-scroll-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.svc-modal-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: auto;
  /* Perspective for 3D tilt */
  perspective: 1200px;
}

.svc-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.svc-modal-overlay.is-active .svc-modal-close {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

/* The actual expanded card wrapper inside the modal */
.svc-modal-card {
  width: 100%;
  min-height: 500px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: row; /* Desktop split layout */
  overflow: hidden;
  /* Transform style for 3D */
  transform-style: preserve-3d;
  will-change: transform;
}

/* We will inject the content from the clicked card into here, and add extra details */
.svc-expanded-visual {
  flex: 1;
  background: #f0f0f5;
  position: relative;
  /* TranslateZ for inner parallax */
  transform: translateZ(40px);
}

.svc-expanded-content {
  flex: 1;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* TranslateZ for inner parallax */
  transform: translateZ(30px);
}

.svc-expanded-content h3 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
}

.svc-expanded-content p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.svc-deliverables {
  list-style: none;
  padding: 0;
  margin: 0;
}

.svc-deliverables li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 500;
  color: var(--text);
}

.svc-deliverables li svg {
  color: var(--purple);
}

/* Responsive modal */
@media (max-width: 768px) {
  .svc-modal-card {
    flex-direction: column;
  }
  .svc-expanded-visual {
    height: 240px;
    flex: none;
  }
  .svc-expanded-content {
    padding: 32px 24px;
  }
  .svc-expanded-content h3 {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   ADVANTAGES STORYTELLING SEQUENCE
   ========================================================================== */
.adv-story-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  margin-top: 80px;
}
.adv-stat-clean {
  position: sticky;
  top: 120px; /* offset for nav */
  height: calc(100vh - 160px);
  max-height: 700px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}
.adv-stat-clean .adv-stat-num {
  font-size: 8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--green);
  transition: transform 0.3s ease, color 0.3s ease;
}
.adv-stat-clean .adv-stat-label {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 16px;
  opacity: 0.9;
  line-height: 1.45;
}
.adv-story-stack {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 20vh 0 30vh 0; /* padding so last item can scroll up */
}
.adv-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 32px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.adv-item.inactive {
  opacity: 0.3;
  transform: scale(0.95);
}

@media (max-width: 992px) {
  .adv-story-layout {
    display: flex;
    flex-direction: column;
    gap: 48px;
  }
  .adv-stat-clean {
    position: relative;
    top: 0;
    margin-bottom: 0;
    align-items: center;
    text-align: center;
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
  }
  .adv-graphic-slot {
    order: -1;
    margin-top: 0;
    margin-bottom: 24px;
  }
  .adv-story-stack {
    padding: 0;
  }
}

/* ==========================================================================
   BENEFITS HORIZONTAL SEQUENCE
   ========================================================================== */
.benefits-h-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 20px 0;
}
.benefits-h-track {
  display: flex;
  gap: 32px;
  width: max-content;
}
.benefit-step {
  width: 320px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  /* removing the number styling since we removed the numbers */
}
.benefit-step h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--purple);
}

/* ==========================================================================
   CLIENTS INTERACTIVE SELECTOR
   ========================================================================== */
.clients-interactive-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 80px;
}
.clients-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.client-btn {
  background: transparent;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--muted);
  padding: 16px 24px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}
.client-btn:hover {
  background: rgba(103, 58, 183, 0.05);
  color: var(--purple);
}
.client-btn.active {
  background: rgba(103, 58, 183, 0.1);
  color: var(--purple);
  border-left: 3px solid var(--purple);
}
.clients-detail {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  min-height: 480px;
  display: flex;
  align-items: center;
}
.client-detail-panel {
  position: absolute;
  top: 48px;
  left: 48px;
  right: 48px;
  bottom: 48px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.4s ease;
}
.client-detail-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.client-detail-panel h4 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
}
.client-detail-panel p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 992px) {
  .clients-interactive-layout {
    grid-template-columns: 1fr;
  }
  .clients-detail {
    min-height: 450px;
    padding: 24px;
  }
  .client-detail-panel {
    top: 24px;
    left: 24px;
    right: 24px;
    bottom: 24px;
  }
  .client-detail-visual img {
    max-height: 200px;
  }
}

.svc-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.svc-card:hover .svc-img {
  transform: scale(1.05);
}

.svc-modal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Refinements added for Advantages, Benefits, Clients */
.adv-story-stack {
  gap: 16px !important;
}

.placeholder-bg {
  background: var(--surface);
  border: 1px dashed var(--border);
}

.benefit-step {
  position: relative;
  z-index: 1; /* Keep above arrow */
}

/* Benefits Arrow & Dots Refinement */
.benefits-h-track {
  padding-bottom: 80px; /* Space for the dots and arrow below the cards */
}


.benefit-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.benefit-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  color: var(--card-color);
  flex-shrink: 0;
}
.benefit-step h4 {
  color: var(--card-color) !important;
  margin-bottom: 0 !important;
}
.benefit-step:first-child {
  background: rgba(103, 58, 183, 0.05); /* Match the purple tint of the first card from screenshot */
  border: 1px solid rgba(103, 58, 183, 0.1);
  box-shadow: none;
}

.benefit-step {
  background: var(--card-color);
  color: var(--white);
}
.benefit-step h4 {
  color: var(--white) !important;
}
.benefit-step p {
  color: rgba(255, 255, 255, 0.95);
}
.benefit-icon {
  background: rgba(255, 255, 255, 0.2) !important;
  color: var(--white) !important;
}
.benefit-step:first-child {
  background: var(--card-color) !important;
  border: none !important;
}

.adv-graphic-slot {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}
.adv-graphic-slot img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.client-detail-visual {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}
.client-detail-visual img {
  width: 100%;
  height: 100%;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.svc-card-visual img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
