/* ==========================================================================
   Webologists – AI service pages (shared by all 7 AI service pages)
   Built from Figma, Final page → "Web Agency Design-Services" (prototype page 6).
   Loaded after style.css, so the header, AI tools section, "I need a" picker
   and footer reuse the homepage styles exactly.
   ========================================================================== */

/* ---------- Page banner ---------- */
.svc-hero {
  --banner-h: 705px;          /* grows if a longer service name needs a third line */
  --banner-pt: 112px;          /* text block centred in the space below the menu */
  --banner-shade: linear-gradient(105.55deg, #06071B 11.4%, rgba(6, 7, 27, 0) 99.56%);   /* dark fade from the left, from Figma */
  background-image: url("../assets/images/services/service-hero-bg.jpg");
  text-align: center;
}

.svc-hero__title {
  width: 638px;
  margin: 0 auto;
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 62px;
  line-height: 78px;
  color: var(--color-white);
}

.svc-hero__text {
  width: 733px;
  margin: 19px auto 0;          /* lands at 430px, as in the design */
  font-family: var(--font-poppins);
  font-weight: 400;
  font-size: 18px;
  line-height: 30px;
  color: var(--color-white);
}

.svc-stats {
  display: flex;
  justify-content: space-between;
  width: 635px;
  margin: 23px auto 0;          /* lands at 513px, as in the design */
  padding: 0;
  list-style: none;
}

.svc-stats li { display: flex; flex-direction: column; align-items: center; }

.svc-stats__value {
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 32px;
  line-height: 48px;
  color: #15D4EC;
}

.svc-stats__label {
  margin-top: -1px;
  font-family: var(--font-poppins);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--color-white);
}

/* ---------- Introduction + "Connect with us" form ---------- */
.svc-intro { padding: var(--section-space) 0; }

.svc-intro__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: var(--container-width);
  margin: 0 auto;
}

.svc-intro__text { width: 1020px; padding-top: 97px; }

.svc-intro__title {
  width: 880px;
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 42px;
  line-height: 50.4px;
  color: var(--color-heading);
}

.svc-intro__text p {
  margin-top: 25px;
  font-family: var(--font-dm-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 28px;
  color: var(--color-body);
}

.svc-intro__title + p { margin-top: 25px; }

.svc-form {
  flex: 0 0 509px;
  padding: 21px 24px 24px;
  background: #F6F6FF;
}

.svc-form__title {
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 22px;
  line-height: 26.4px;
  color: var(--color-heading);
}

.svc-form__field {
  position: relative;
  display: block;
  margin-top: 24px;
}

.svc-form__title + .svc-form__field { margin-top: 15px; }

.svc-form__icon {
  position: absolute;
  left: 24px;
  top: 17px;
  width: 24px;
  height: 24px;
  color: var(--color-heading);
  pointer-events: none;
}

.svc-form__prefix {
  position: absolute;
  left: 68px;
  top: 17px;
  font-family: var(--font-poppins);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-heading);
  pointer-events: none;
}

.svc-form input,
.svc-form textarea {
  display: block;
  width: 100%;
  height: 58px;
  padding: 0 16px 0 68px;
  border: 1px solid #CCCCCC;
  border-radius: 0;
  background: #FFFFFF;
  font-family: var(--font-poppins);
  font-weight: 400;
  font-size: 16px;
  color: var(--color-heading);
  outline: none;
  transition: border-color .2s ease;
}

.svc-form textarea { height: 105px; padding-top: 16px; resize: vertical; }
.svc-form input[type="tel"] { padding-left: 129px; }
.svc-form input::placeholder, .svc-form textarea::placeholder { color: #999999; opacity: 1; }
.svc-form input:focus, .svc-form textarea:focus { border-color: var(--color-primary); }

.svc-form__note {
  margin-top: 27px;
  font-family: var(--font-poppins);
  font-size: 14px;
  line-height: 21px;
  color: var(--color-heading);
}

.svc-form__submit {
  display: block;
  width: 100%;
  height: 47px;
  margin-top: 18px;
  border: 0;
  border-radius: 8px;
  background: var(--color-primary);
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 16px;
  line-height: 21px;
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color .2s ease;
}

.svc-form__submit:hover { background: #0066C2; }

.svc-form__status { margin-top: 12px; font-family: var(--font-poppins); font-size: 14px; color: var(--color-primary); }

/* ---------- "The Engineering Behind Reliable ML" ---------- */
.svc-features { padding: var(--section-space) 0; background: #F6F6FF; }

.svc-features__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: var(--container-width);
  margin: 0 auto;
}

.svc-features__intro { flex: 0 0 486px; }

.svc-features__title {
  width: 385px;
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 42px;
  line-height: 50.4px;
  color: var(--color-heading);
}

.svc-features__text {
  margin-top: 25px;
  font-family: var(--font-poppins);
  font-weight: 400;
  font-size: 16px;
  line-height: 28px;
  color: var(--color-body);
}

.svc-features__image {
  width: 485px;
  height: 400px;
  margin-top: 25px;
  border-radius: 12px;
  object-fit: cover;
}

.svc-features__grid {
  flex: 0 0 1001px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* a line between each row of features */
.svc-feature { padding: 48px 23px 28px; border-top: 1px solid #DCDDE6; }
.svc-feature:nth-child(-n + 2) { border-top: 0; padding-top: 0; }
/* a lone feature on the last row still gets a full-width line above it, as in the design */
.svc-feature { position: relative; }
.svc-feature:nth-child(odd):last-child { border-top-color: transparent; }
.svc-feature:nth-child(odd):last-child::before { content: ""; position: absolute; left: 0; top: -1px; width: 200%; height: 1px; background: #DCDDE6; }

.svc-feature__icon { display: block; width: 50px; height: 50px; }

.svc-feature__title {
  width: 388px;
  margin-top: 25px;
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 22px;
  line-height: 30px;
  color: var(--color-heading);
}

.svc-feature__text {
  width: 450px;
  margin-top: 18px;
  font-family: var(--font-dm-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 28px;
  color: var(--color-body);
}

/* ---------- "Industries we serve" ---------- */
/* follows the AI tools section, which already ends with the section space */
.svc-industries { padding: 0 0 var(--section-space); }

.svc-industries__inner { max-width: var(--container-width); margin: 0 auto; }

.svc-industries__title {
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 42px;
  line-height: 52px;
  color: var(--color-heading);
}

.svc-industries__text {
  width: 990px;
  margin-top: 17px;
  font-family: var(--font-dm-sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 30px;
  color: var(--color-body);
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 45px 0 0;
  padding: 0;
  list-style: none;
}

.industry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 390px;
  padding: 32px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--color-hero-bg);
  color: #FFFFFF;
}

/* The card's photo is always showing, with a soft dark shade so the white text reads.
   The path in the page is written from the css folder, because that's where it's used. */
.industry-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 7, 27, .45) 0%, rgba(6, 7, 27, .1) 40%, rgba(6, 7, 27, .55) 100%),
    var(--industry-bg) center / cover no-repeat;
  transition: transform .5s ease;
}

/* Black layer that fades in on hover */
.industry-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .5) 50%, rgba(0, 0, 0, .85) 100%);
  opacity: 0;
  transition: opacity .3s ease;
}

.industry-card > * { position: relative; z-index: 1; }

.industry-card__top { display: flex; justify-content: space-between; align-items: flex-start; }

/* Icon shows only on hover */
.industry-card__icon { width: 40px; height: 40px; color: #FFFFFF; opacity: 0; transition: opacity .3s ease; }


.industry-card__title {
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 20px;
  line-height: 27.5px;
}

.industry-card__text {
  margin-top: 8px;
  font-family: var(--font-dm-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 21.84px;
  color: rgba(255, 255, 255, .92);
}

/* Hover (or keyboard focus): black layer over the photo */
.industry-card:hover::after,
.industry-card:focus-within::after,
.industry-card:hover .industry-card__icon,
.industry-card:focus-within .industry-card__icon { opacity: 1; }
.industry-card:hover::before,
.industry-card:focus-within::before { transform: scale(1.04); }

/* ---------- "Let's Build Something Meaningful." ---------- */
.svc-cta {
  padding: var(--section-space) 0;
  background: #000000 url("../assets/images/services/service-cta-bg.jpg") center / cover no-repeat;
}

.svc-cta__inner { max-width: var(--container-width); margin: 0 auto; }

.svc-cta__title {
  width: 684px;
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 42px;
  line-height: 50.4px;
  color: #FFFFFF;
}

.svc-cta .section-divider { margin-top: 24px; }

.svc-cta__text {
  width: 479px;
  margin-top: 24px;
  font-family: var(--font-dm-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 32px;
  color: #FFFFFF;
}

.svc-cta .circle-link { margin-top: 28px; }

/* the AI tools section on these pages follows straight after a coloured band */
.svc-page .ai-tools { padding-top: var(--section-space); }

/* ---------- Phones & small tablets ---------- */
@media (max-width: 1199.98px) {
  .svc-hero__title { width: auto; font-size: 36px; line-height: 44px; }
  .svc-hero__title br { display: inline; }
  .svc-hero__text { width: auto; font-size: 16px; line-height: 26px; }
  .svc-stats { width: auto; max-width: 480px; flex-wrap: wrap; gap: 16px; justify-content: space-around; }

  .svc-intro__inner, .svc-features__inner { flex-direction: column; gap: 40px; padding: 0 16px; }
  .svc-intro__text { width: auto; padding-top: 0; }
  .svc-intro__title, .svc-features__title { width: auto; font-size: 32px; line-height: 40px; }
  .svc-form { flex-basis: auto; width: 100%; }

  .svc-features__intro { flex-basis: auto; }
  .svc-features__image { width: 100%; height: auto; aspect-ratio: 485 / 400; }
  .svc-features__grid { flex-basis: auto; width: 100%; grid-template-columns: 1fr; margin-top: 0; }
  .svc-feature { padding: 32px 0; }
  .svc-feature:nth-child(2) { border-top: 1px solid #DCDDE6; padding-top: 32px; }
  .svc-feature:nth-child(odd):last-child { border-top-color: #DCDDE6; }
  .svc-feature:nth-child(odd):last-child::before { content: none; }
  .svc-feature__title, .svc-feature__text { width: auto; }

  .svc-industries__inner { padding: 0 16px; }
  .svc-industries__title { font-size: 32px; line-height: 40px; }
  .svc-industries__text { width: auto; font-size: 16px; line-height: 28px; }
  .industry-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .industry-card { height: 300px; padding: 24px; }

  .svc-cta { padding: var(--section-space) 16px; background-position: 70% center; }
  .svc-cta__title, .svc-cta__text { width: auto; }
  .svc-cta__title { font-size: 32px; line-height: 40px; }
}

@media (max-width: 575.98px) {
  .industry-grid { grid-template-columns: 1fr; }
  .svc-hero__title { font-size: 30px; line-height: 38px; }   /* keeps the banner heading on 2 lines on phones */
}

/* ---------- Visible spacing: exactly 85px between sections ----------
   Text has invisible space above its letters and below its baseline (line height).
   These small offsets remove it where text starts or ends a section, so the gap
   you SEE is 85px, not 85px plus that hidden space. */
@media (min-width: 1200px) {
  .svc-industries__title       { margin-top: -8px; }
  .svc-cta__title              { margin-top: -6px; }
  .svc-features__grid          { margin-bottom: -37px; }   /* last feature text sits on the 85px line */
  .svc-cta                     { padding-bottom: calc(var(--section-space) - 1px); }  /* the circle sits 1px inside its button */
}

/* very narrow phones: smaller banner heading so it still fits on 2 lines */
@media (max-width: 359.98px) {
  .svc-hero__title { font-size: 26px; line-height: 34px; }
}

/* ==========================================================================
   Review updates (developer feedback)
   ========================================================================== */
/* "The Engineering Behind …": the heading and photo stay in view while the list scrolls */
@media (min-width: 1200px) {
  .svc-features__inner { align-items: flex-start; }
  .svc-features__intro { position: sticky; top: 140px; }
}
