/* Amaranth 10-style solution service detail page */

.service-page {
  padding-bottom: 0;
}

.service-hero {
  position: relative;
  padding: 4rem 0 3.5rem;
  background: linear-gradient(135deg, #0a1628 0%, #0c3560 45%, #0d4a8a 100%);
  color: #fff;
  overflow: hidden;
}

.service-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(0, 102, 255, 0.25) 0%, transparent 55%);
  pointer-events: none;
}

.service-hero--photo-bg {
  --service-hero-aspect: 8 / 3;
  position: relative;
  width: 100%;
  aspect-ratio: var(--service-hero-aspect);
  min-height: clamp(360px, 37.5vw, 720px);
  max-height: min(72vh, 720px);
  padding: clamp(2.25rem, 4vw, 4.5rem) 0 clamp(2rem, 3vw, 3.75rem);
  background: #0a1628;
  overflow: hidden;
}

.service-hero--photo-bg::before {
  display: none;
}

.service-hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.service-hero__bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% 48%;
}

.service-hero--photo-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    102deg,
    rgba(8, 18, 38, 0.9) 0%,
    rgba(8, 18, 38, 0.74) 34%,
    rgba(8, 18, 38, 0.34) 62%,
    rgba(8, 18, 38, 0.08) 100%
  );
  pointer-events: none;
}

.service-hero__inner--wide {
  grid-template-columns: minmax(0, 640px);
  align-items: center;
  z-index: 1;
  height: 100%;
}

.breadcrumb--on-dark,
.breadcrumb--on-dark a {
  color: rgba(255, 255, 255, 0.72);
}

.breadcrumb--on-dark a:hover {
  color: #fff;
}

.breadcrumb--on-dark .breadcrumb__sep {
  color: rgba(255, 255, 255, 0.35);
}

.breadcrumb--on-dark [aria-current="page"] {
  color: rgba(255, 255, 255, 0.92);
}

.service-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 2.5rem;
  align-items: center;
}

.service-hero__badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  margin-bottom: 1rem;
}

.service-hero__title {
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.service-hero__desc {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
}

.service-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

.service-hero__actions .btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.service-hero__actions .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.service-nav {
  position: sticky;
  top: var(--header-height);
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(10, 22, 40, 0.06);
}

.service-nav__inner {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.service-nav__inner::-webkit-scrollbar {
  display: none;
}

.service-nav__inner a {
  flex-shrink: 0;
  padding: 1rem 1.35rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.service-nav__inner a:hover,
.service-nav__inner a.is-active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.service-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--color-border);
}

.service-section:last-of-type {
  border-bottom: none;
}

.service-section--gray {
  background: var(--color-bg-subtle);
}

.service-section__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.service-section__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.85rem;
}

.service-section__desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text-secondary);
  max-width: 720px;
}

.service-section__header {
  margin-bottom: 2.5rem;
}

.service-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.service-split--reverse .service-split__media {
  order: -1;
}

.service-split__text p + p {
  margin-top: 1rem;
}

.service-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  object-fit: cover;
  background: #e8eef8;
}

.service-photo--hero {
  width: 100%;
  min-height: 280px;
  max-height: 420px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.service-hero--ambient-bg {
  padding: 4rem 0 3.5rem;
  background: linear-gradient(135deg, #0a1628 0%, #0c3560 45%, #0d4a8a 100%);
}

.service-hero--ambient-bg::before {
  display: none;
}

.service-hero__ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--service-hero-ambient-bg);
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
  opacity: 0.55;
  filter: saturate(1.05);
  pointer-events: none;
}

.service-hero--ambient-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    98deg,
    rgba(10, 22, 40, 0.82) 0%,
    rgba(10, 22, 40, 0.62) 34%,
    rgba(10, 22, 40, 0.32) 56%,
    rgba(12, 53, 96, 0.14) 76%,
    rgba(13, 74, 138, 0.04) 100%
  );
  pointer-events: none;
}

.service-hero__inner--text {
  position: relative;
  z-index: 2;
  display: block;
}

.service-hero__inner--text .service-hero__content {
  max-width: 620px;
}

.service-hero__media--subtle {
  position: relative;
  width: 100%;
}

.service-hero__media-frame {
  position: relative;
  width: 100%;
  min-height: 280px;
  max-height: 420px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.service-hero__media-bg {
  position: absolute;
  inset: -4%;
  display: block;
  background-image: var(--service-hero-media-bg);
  background-size: cover;
  background-position: 56% 46%;
  background-repeat: no-repeat;
  opacity: 0.42;
  filter: saturate(1.05) blur(0.3px);
  transform: scale(1.04);
}

.service-hero__media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    rgba(10, 22, 40, 0.28) 0%,
    rgba(10, 22, 40, 0.08) 45%,
    rgba(255, 255, 255, 0.06) 100%
  );
  pointer-events: none;
}

.service-feature__media .service-photo {
  min-height: 260px;
  max-height: 360px;
}

.service-photo--sm {
  min-height: 140px;
  max-height: 180px;
}

.service-function-card__thumb {
  margin-bottom: 0.85rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.service-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 280px;
  padding: 2rem;
  background: linear-gradient(145deg, #f0f4fa 0%, #e8eef8 100%);
  border: 2px dashed rgba(0, 102, 255, 0.25);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  text-align: center;
}

.service-img-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.service-img-placeholder span {
  font-size: 0.88rem;
  font-weight: 500;
}

.service-img-placeholder small {
  font-size: 0.75rem;
  opacity: 0.75;
}

.service-img-placeholder--wide {
  min-height: 360px;
}

.service-img-placeholder--sm {
  min-height: 160px;
}

.service-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
}

.service-feature:first-child {
  border-top: none;
  padding-top: 0;
}

.service-feature--reverse .service-feature__media {
  order: -1;
}

.service-feature__num {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-primary-light);
  margin-bottom: 0.5rem;
}

.service-feature__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.service-feature__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-feature__list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.service-feature__list li + li {
  margin-top: 0.5rem;
}

.service-feature__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-primary);
}

.service-effects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-effect-card {
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-effect-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.service-effect-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: var(--color-primary-light);
  border-radius: 50%;
  color: var(--color-primary);
  font-size: 1.25rem;
  font-weight: 700;
}

.service-effect-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.service-effect-card p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.service-functions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-function-card {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.service-function-card h4 {
  font-size: 0.95rem;
  margin: 0.85rem 0 0.35rem;
}

.service-function-card p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.service-diagram {
  margin: 0 0 2rem;
}

.service-diagram__img,
.service-hero__media .service-diagram__img,
.service-split__media .service-diagram__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  background: #fff;
}

.service-model-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.service-model-panel {
  padding: 1.35rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--color-primary);
}

.service-model-panel--strategy {
  border-top-color: #2563eb;
}

.service-model-panel--roles {
  border-top-color: #f59e0b;
}

.service-model-panel--edi {
  border-top-color: #10b981;
}

.service-model-panel__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.service-model-panel__diagram {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.service-model-box {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.service-model-box--client {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.service-model-box--it {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.service-model-box--partner {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.service-model-panel__link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-align: center;
  margin: 0.25rem 0 0;
}

.service-model-panel__values {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-model-panel__values li {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
  padding: 0.35rem 0;
  border-top: 1px solid var(--color-border);
}

.service-role-group {
  padding: 0.85rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.service-role-group:last-child {
  margin-bottom: 0;
}

.service-role-group--client {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.service-role-group--outsource {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.service-role-group h4 {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-role-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-role-group li {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  padding: 0.2rem 0;
}

.service-edi-hub {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 1rem;
}

.service-edi-hub__core {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px 0 0 999px;
}

.service-edi-hub__core--van {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  border-radius: 0 999px 999px 0;
}

.service-edi-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.service-edi-links h4 {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--color-text-secondary);
}

.service-edi-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-edi-links li {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  padding: 0.15rem 0;
}

.service-functions--roles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-function-card__badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
}

.service-function-card--client .service-function-card__badge {
  background: #fff7ed;
  color: #c2410c;
}

.service-function-card--outsource .service-function-card__badge {
  background: #ecfdf5;
  color: #047857;
}

.service-process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.service-process__item {
  padding: 1.35rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--color-primary);
}

.service-process__item span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary);
}

.service-process__item h4 {
  font-size: 1rem;
  margin: 0.35rem 0 0.45rem;
}

.service-process__item p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.service-cta {
  padding: 3rem 0;
  background: linear-gradient(135deg, var(--color-hero-start) 0%, var(--color-hero-end) 100%);
  color: #fff;
}

.service-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.service-cta h2 {
  font-size: 1.45rem;
  margin-bottom: 0.4rem;
}

.service-cta p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}

.service-cta .btn--primary {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}

.service-cta .btn--primary:hover {
  background: var(--color-primary-light);
}

@media (max-width: 960px) {
  .service-hero--ambient-bg .service-hero__ambient {
    inset: 0;
    opacity: 0.45;
    background-position: center 40%;
  }

  .service-hero--ambient-bg::after {
    background: linear-gradient(
      180deg,
      rgba(10, 22, 40, 0.88) 0%,
      rgba(10, 22, 40, 0.72) 45%,
      rgba(12, 53, 96, 0.35) 100%
    );
  }

  .service-hero--photo-bg {
    aspect-ratio: auto;
    min-height: clamp(340px, 62vw, 480px);
    max-height: none;
    padding: 3.25rem 0 2.75rem;
  }

  .service-hero--photo-bg .service-hero__bg-img {
    object-position: 62% 42%;
  }

  .service-hero--photo-bg::after {
    background: linear-gradient(
      180deg,
      rgba(8, 18, 38, 0.82) 0%,
      rgba(8, 18, 38, 0.55) 45%,
      rgba(8, 18, 38, 0.35) 100%
    );
  }

  .service-hero__inner,
  .service-split,
  .service-feature,
  .service-effects,
  .service-functions,
  .service-process,
  .service-model-grid,
  .service-functions--roles {
    grid-template-columns: 1fr;
  }

  .service-split--reverse .service-split__media,
  .service-feature--reverse .service-feature__media {
    order: 0;
  }
}

@media (max-width: 600px) {
  .service-effects,
  .service-functions {
    grid-template-columns: 1fr;
  }

  .service-process {
    grid-template-columns: 1fr;
  }
}
