/* Service detail pages — Cosmo-style layout, AGS branding */

.ags-service-page {
  background: #fff;
  color: #4d4d4d;
}

.ags-svc-container {
  width: min(1400px, 90%);
  margin: 0 auto;
}

/* Page title */
.ags-svc-page-title {
  padding: calc(110px + clamp(2rem, 4vw, 3.5rem)) 0 clamp(2rem, 4vw, 3.5rem);
}

.ags-svc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.ags-svc-breadcrumb li {
  position: relative;
  font-family: Rubik, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2a3547;
}

.ags-svc-breadcrumb li + li::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: -0.85rem;
  width: 6px;
  height: 13px;
  background: #1653ac;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.ags-svc-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.ags-svc-breadcrumb a:hover {
  color: #ed1c24;
}

.ags-svc-main-title {
  margin: 0;
  max-width: 16ch;
  font-family: Rubik, sans-serif;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #2a3547;
}

.ags-svc-main-title strong {
  font-weight: 500;
}

.ags-svc-page-lede {
  max-width: 42rem;
  margin: 1.25rem 0 0;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  font-weight: 400;
  line-height: 1.55;
  color: #4d4d4d;
}

/* Industry / intro section */
.ags-svc-industry {
  padding: 0 0 clamp(2rem, 4vw, 3.5rem);
}

.ags-service-page .ags-svc-page-title:has(+ .automatic-clients) {
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
}

.ags-service-page .ags-svc-page-title + .automatic-clients {
  padding-top: 0;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.ags-svc-industry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.ags-svc-figure {
  margin: 0;
  height: clamp(320px, 42vw, 639px);
  overflow: hidden;
  border-radius: 4px;
}

.ags-svc-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s cubic-bezier(0, 0, 0.2, 1);
}

.ags-svc-deploy-panel--sidebar {
  margin: 0 0 1.75rem;
  padding: 0;
  background: none;
  min-height: 0;
}

.ags-svc-deploy-panel__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.ags-svc-deploy-panel--sidebar .ags-svc-deploy-panel__icon {
  display: flex;
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 50%;
  background: #eef3fb;
  color: #ed1c24;
}

.ags-svc-deploy-panel--sidebar .ags-svc-deploy-panel__icon .material-symbols-outlined {
  font-size: 1.45rem;
  line-height: 1;
}

.ags-svc-deploy-panel--sidebar .ags-svc-deploy-panel__title {
  margin: 0;
  font-family: Rubik, sans-serif;
  font-size: clamp(0.92rem, 1.7vw, 1.08rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
  color: #2a3547;
}

.ags-svc-deploy-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.ags-svc-deploy-item {
  margin: 0;
}

.ags-svc-deploy-panel--sidebar .ags-svc-deploy-item span {
  display: block;
  padding: 0.52rem 0.8rem;
  border: 1px solid #d5dce8;
  background: #fff;
  font-family: Rubik, sans-serif;
  font-size: clamp(0.66rem, 1.45vw, 0.76rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.35;
  color: #2a3547;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.ags-svc-figure:hover img {
  transform: scale3d(1.06, 1.06, 1.06);
}

.ags-svc-details h3 {
  margin: 0 0 1.25rem;
  font-family: Rubik, sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  color: #2a3547;
}

.ags-svc-uses-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 0.65rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.ags-svc-sector-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
}

.ags-svc-sector-chip__icon {
  display: flex;
  width: 3.85rem;
  height: 3.85rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef3fb;
  color: #ed1c24;
  font-size: 1.65rem;
  line-height: 1;
}

.ags-svc-sector-chip__label {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
  color: #2a3547;
}

.ags-svc-name {
  margin: 0 0 1.25rem;
  font-family: Rubik, sans-serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #2a3547;
}

.ags-svc-details p {
  margin: 0 0 1.25rem;
  font-size: clamp(0.95rem, 1.1vw, 1.125rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: #4d4d4d;
}

.ags-svc-details p:last-of-type {
  margin-bottom: 0;
}

/* Contact box — AGS brand */
.ags-svc-contact-box {
  margin-top: 1.75rem;
  padding: 1.5rem;
  background: #1653ac;
  border: 1px solid #1653ac;
  border-top: 3px solid #ed1c24;
}

.ags-svc-contact-box h3 {
  margin: 0 0 1rem;
  font-family: Rubik, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

.ags-svc-contact-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0;
}

.ags-svc-contact-quick .ags-svc-contact-btn {
  gap: 0.5rem;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  font-weight: 600 !important;
}

.ags-svc-sector-chip__icon .material-symbols-outlined {
  font-size: 1.65rem;
  line-height: 1;
}

.ags-svc-contact-quick .ags-svc-contact-btn .material-symbols-outlined {
  font-size: 1rem;
  line-height: 1;
}

.ags-svc-contact-quick .ags-svc-contact-btn .bi {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.ags-svc-contact-form {
  max-width: none;
}

.ags-svc-contact-form__grid {
  grid-template-columns: 1fr 1fr;
  gap: 0 0.75rem;
}

.ags-svc-contact-form .ags-contact-form__field {
  margin-bottom: 0.85rem;
}

.ags-svc-contact-form input,
.ags-svc-contact-form textarea {
  border-color: rgba(22, 83, 172, 0.25);
  border-radius: 0;
}

.ags-svc-contact-form input:focus,
.ags-svc-contact-form textarea:focus {
  outline: 2px solid rgba(22, 83, 172, 0.35);
  outline-offset: 1px;
}

.ags-svc-contact-form .ags-contact-form__submit {
  width: 100%;
  margin-top: 0.25rem;
}

@media (max-width: 600px) {
  .ags-svc-contact-form__grid {
    grid-template-columns: 1fr;
  }
}

/* Values — same content as homepage, Leadership-sized heading */
.ags-svc-values {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 6.25rem);
  background: #f5f5f5;
}

.ags-svc-section-title {
  margin: 0 0 var(--ags--preset--spacing--50, 2.5rem) !important;
  font-style: normal !important;
  font-weight: 300 !important;
  color: #2a3547 !important;
}

.ags-svc-values-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.ags-svc-value-item__icon {
  display: block;
  width: auto;
  height: 48px;
  margin-bottom: 1rem;
  object-fit: contain;
}

.ags-svc-value-item__title {
  margin: 0 0 0.65rem;
  font-family: Rubik, sans-serif;
  font-size: var(--ags--preset--font-size--large, 1.25rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.35;
  color: inherit;
}

.ags-svc-value-item__text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.55;
  color: #4d4d4d;
}

/* Sectors — informational list with icons (not buttons) */
.ags-svc-sectors {
  padding: 0 0 clamp(3rem, 6vw, 6.25rem);
}

.ags-svc-sectors > .ags-svc-container > h3 {
  margin: 0 0 1.35rem;
  font-family: Rubik, sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #2a3547;
}

.ags-svc-sector-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ags-svc-sector-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.ags-svc-sector-item__icon {
  display: flex;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.ags-svc-sector-item__icon img {
  width: 24px;
  height: 24px;
}

.ags-svc-sector-item__body {
  min-width: 0;
}

.ags-svc-sector-item__title {
  margin: 0 0 0.4rem;
  font-family: Rubik, sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1653ac;
}

.ags-svc-sector-item__text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.55;
  color: #4d4d4d;
}

/* Our Clients strip on service pages */
.ags-service-page .automatic-clients {
  margin: 0;
  padding: 0.65rem 0 0.75rem;
}

.ags-service-page .automatic-clients__inner {
  width: min(1400px, 90%);
  max-width: none;
  margin: 0 auto;
}

.ags-service-page .automatic-clients__label {
  padding-left: 0;
}

@media (max-width: 781px) {
  .ags-service-page .automatic-clients__partner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .ags-service-page .automatic-clients__label {
    width: 100%;
    min-width: 0;
    padding-right: 0;
    text-align: center;
  }

  .ags-service-page .automatic-clients__carousel {
    width: 100%;
    gap: 6px;
  }

  .ags-service-page .automatic-clients__nav {
    display: inline-flex;
  }

  .ags-service-page .automatic-clients__track-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    mask-image: none;
    -webkit-mask-image: none;
    scrollbar-width: none;
  }

  .ags-service-page .automatic-clients__track-wrap::-webkit-scrollbar {
    display: none;
  }

  .ags-service-page .automatic-clients__track {
    animation: none !important;
    transform: none !important;
  }

  .ags-service-page .automatic-clients__card--dup {
    display: none;
  }
}

/* Bottom CTA band — match homepage red AGS pattern */
.ags-svc-bottom-cta {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
  background-color: #b01018;
  background-image:
    linear-gradient(
      180deg,
      rgba(120, 8, 14, 0.72) 0%,
      rgba(140, 10, 16, 0.68) 45%,
      rgba(110, 6, 12, 0.76) 100%
    ),
    url("../img/ags-pattern-red.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.ags-svc-bottom-cta h2 {
  margin: 0 0 1rem;
  max-width: 28ch;
  font-family: Rubik, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 300;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.ags-svc-bottom-cta p {
  max-width: 42rem;
  margin: 0 0 1.5rem;
  font-size: 1rem;
  line-height: 1.55;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1100px) {
  .ags-svc-values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ags-svc-sector-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .ags-svc-industry-grid {
    grid-template-columns: 1fr;
  }

  .ags-svc-figure {
    height: clamp(280px, 55vw, 420px);
  }

  .ags-svc-details > h3:first-of-type {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .ags-svc-deploy-panel--sidebar .ags-svc-deploy-item span {
    font-size: 0.78rem;
  }
}

@media (max-width: 600px) {
  .ags-svc-values-grid {
    grid-template-columns: 1fr;
  }

  .ags-svc-uses-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ags-svc-sector-list {
    grid-template-columns: 1fr;
  }

  .ags-svc-main-title {
    max-width: none;
  }
}
/* Service image gallery */
.ags-svc-gallery {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
  background: #f7f9fc;
  border-top: 1px solid rgba(22, 83, 172, 0.1);
}

.ags-svc-gallery__title {
  margin: 0 0 0.35rem;
  font-family: Rubik, sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ed1c24;
  text-align: center;
}

.ags-svc-gallery__lede {
  margin: 0 auto 1.75rem;
  max-width: 36rem;
  text-align: center;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.5;
  color: #4d4d4d;
}

.ags-svc-gallery__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ags-svc-gallery__item {
  margin: 0;
  width: calc((100% - 3 * 0.85rem) / 4);
}

.ags-svc-gallery__btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: 0.35rem;
  box-shadow: 0 1px 0 rgba(22, 83, 172, 0.08);
  aspect-ratio: 4 / 5;
}

.ags-svc-gallery__btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.ags-svc-gallery__btn:hover img,
.ags-svc-gallery__btn:focus-visible img {
  transform: scale(1.04);
}

.ags-svc-gallery__btn:focus-visible {
  outline: 2px solid #1653ac;
  outline-offset: 3px;
}

.ags-svc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(14, 24, 40, 0.88);
}

.ags-svc-lightbox[hidden] {
  display: none;
}

.ags-svc-lightbox__img {
  max-width: min(1100px, 96vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.25rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.ags-svc-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: #ed1c24;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .ags-svc-gallery__item {
    width: calc((100% - 0.85rem) / 2);
  }
}

@media (max-width: 520px) {
  .ags-svc-gallery__grid {
    gap: 0.55rem;
  }

  .ags-svc-gallery__item {
    width: calc((100% - 0.55rem) / 2);
  }

  .ags-svc-gallery__btn {
    aspect-ratio: 3 / 4;
  }
}

.ags-svc-gallery__grid--3 .ags-svc-gallery__item {
  width: calc((100% - 2 * 0.85rem) / 3);
}

@media (max-width: 900px) {
  .ags-svc-gallery__grid--3 .ags-svc-gallery__item {
    width: calc((100% - 0.85rem) / 2);
  }
}
