/* Diagnostics service page — aligned with the redesigned homepage. */
.service-page {
  --service-radius: 18px;
  --service-shadow: 0 14px 34px rgba(7, 52, 81, 0.1);
  overflow-x: hidden;
  color: var(--home-ink);
  background: var(--home-bg);
}

.service-page main {
  margin: 0;
}

.service-page .service-section {
  scroll-margin-top: 82px;
}

.service-page .section-title {
  position: relative;
  margin: 0 auto 34px;
  padding-bottom: 14px;
  color: var(--home-navy-dark);
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1.45;
  text-align: center;
}

.service-page .section-title::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 0;
  width: 30%;
  height: 4px;
  border-radius: 999px;
  background: var(--home-yellow);
  transform: translateX(50%);
}

/* Shared header refinements */
.service-page header .home-navbar .header-nav-link .nav-icon {
  display: none;
}

/* Service breadcrumb */
.service-page .service-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.service-page .service-breadcrumb a {
  color: var(--home-yellow);
  font-weight: 700;
  transition: color 0.2s ease;
}

.service-page .service-breadcrumb a:hover {
  color: #fff;
}

.service-page .service-breadcrumb svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

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

/* Hero */
.service-page .service-hero {
  position: relative;
  min-height: 600px;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: 84px 16px;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(4, 31, 51, 0.28), rgba(4, 31, 51, 0.9)),
    url("../images/service-imgs/hero-img.webp") center 46% / cover no-repeat;
}

.service-page .service-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("../patterns/diag-brand-pattern.svg");
  background-size: 150px;
}

.service-page .service-hero .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(
    90deg,
    rgba(4, 31, 51, 0.35),
    rgba(4, 31, 51, 0.06),
    rgba(4, 31, 51, 0.35)
  );
}

.service-page .service-hero .hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 780px);
  margin-inline: auto;
}

.service-page .service-hero .hero-kicker {
  margin-bottom: 16px;
  font-size: 12px;
}

.service-page .service-hero h1 {
  margin: 0;
  color: #fff;
  font-family: "lalehzar", "vazir", sans-serif;
  font-size: clamp(34px, 7vw, 58px);
  font-weight: 400;
  line-height: 1.35;
}

.service-page .service-hero p {
  max-width: 680px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(14px, 2vw, 18px);
  font-style: normal;
  line-height: 2;
}

.service-page .hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.service-page .service-hero .btn,
.service-page .contact-us .btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  transition:
    transform 0.25s ease,
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.service-page .service-hero .btn:hover,
.service-page .contact-us .btn:hover {
  transform: translateY(-2px);
}

.service-page .service-hero .btn.primary {
  color: var(--home-navy-dark);
  background: var(--home-yellow);
  border-color: var(--home-yellow);
  box-shadow: 0 12px 24px rgba(255, 188, 36, 0.2);
}

.service-page .service-hero .btn.primary:hover {
  color: #fff;
  background: transparent;
}

.service-page .service-hero .btn.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(5px);
}

.service-page .service-hero .btn.secondary:hover {
  color: var(--home-navy-dark);
  background: #fff;
  border-color: #fff;
}

.service-page .service-hero .hero-icon,
.service-page .contact-us .contact-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

/* Diagnostic services */
.service-page .diag-services {
  width: min(100% - 32px, 1180px);
  margin-inline: auto;
  padding-block: 72px;
}

.service-page .diag-services-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-page .diag-services-list li {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: center;
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: var(--service-radius);
  box-shadow: var(--service-shadow);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.service-page .diag-services-list .item-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 12px;
}

.service-page .diag-services-list .icon {
  width: 42px;
  height: 42px;
  padding: 9px;
  color: var(--home-blue);
  background: var(--home-blue-soft);
  border-radius: 12px;
}

.service-page .diag-services-list h3 {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--home-navy-dark);
  font-size: 14px;
  line-height: 1.7;
}

.service-page .diag-services-list p {
  color: var(--home-muted);
  font-size: 11px;
  line-height: 1.9;
}

.service-page .diag-services-list img {
  display: none;
}

/* Reasons */
.service-page .why-choose-us {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 72px 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--home-navy-dark), var(--home-navy));
}

.service-page .why-choose-us::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.1;
  background-image: url("../patterns/diag-brand-pattern.svg");
  background-size: 160px;
}

.service-page .why-choose-us .section-title {
  color: #fff;
}

.service-page .why-choose-list {
  width: min(100%, 1180px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-inline: auto;
}

.service-page .why-choose-list li {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.service-page .why-choose-icon {
  width: 34px;
  height: 34px;
  color: var(--home-yellow);
}

.service-page .why-choose-list h3 {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--home-yellow);
  font-size: 14px;
  line-height: 1.7;
}

.service-page .why-choose-list p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.9;
}

/* Contact */
.service-page .contact-us {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 250px 16px 56px;
  color: var(--home-navy-dark);
  background: linear-gradient(135deg, #ffb816, #ffd45e 72%, #ffe49a);
}

.service-page .contact-us::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 250px;
  z-index: -2;
  background:
    linear-gradient(
      to bottom,
      rgba(255, 184, 22, 0.25),
      rgba(255, 212, 94, 0.55)
    ),
    url("../images/service-imgs/contact-us-bg.webp") center 42% / cover
      no-repeat;
  filter: saturate(0.78) contrast(1.04);
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 62%,
    transparent 100%
  );
  mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
}

.service-page .contact-us::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.12;
  background-image: url("../patterns/diag-brand-pattern.svg");
  background-size: 145px;
}

.service-page .contact-content {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  margin-inline: auto;
  text-align: center;
}

.service-page .contact-content h2 {
  color: var(--home-navy-dark);
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.5;
}

.service-page .contact-content p {
  max-width: 650px;
  margin: 14px auto 0;
  color: rgba(4, 31, 51, 0.78);
  font-size: 14px;
  line-height: 2;
}

.service-page .contact-buttons {
  width: min(100%, 420px);
  display: grid;
  gap: 9px;
  margin: 26px auto 0;
}

.service-page .contact-us .contact-buttons .btn {
  width: 100%;
}

.service-page .contact-us .phone-call {
  color: #fff;
  background: var(--home-navy-dark);
  border-color: var(--home-navy-dark);
}

.service-page .contact-us .whatsapp {
  color: var(--home-navy-dark);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(4, 31, 51, 0.42);
}

.service-page .contact-us .whatsapp .contact-icon {
  fill: currentColor;
}

/* FAQ */
.service-page .common-questions {
  width: min(100% - 32px, 940px);
  margin-inline: auto;
  padding-block: 72px;
}

.service-page .questions-list {
  display: grid;
  gap: 10px;
}

.service-page .question-item {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--home-border);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(7, 52, 81, 0.055);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.service-page .question-item.active {
  border-color: rgba(8, 127, 189, 0.42);
  box-shadow: inset -4px 0 0 var(--home-yellow);
}

.service-page .question-btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 16px;
  color: var(--home-navy-dark);
  text-align: right;
}

.service-page .question-title {
  flex: 1;
  color: currentColor;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.9;
}

.service-page .question-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--home-blue);
  margin-top: 3px;
  transition: transform 0.3s ease;
}

.service-page .question-item.active .question-icon {
  transform: rotate(180deg);
}

.service-page .question-answer {
  max-height: 0;
  overflow: hidden;
  padding-inline: 16px;
  opacity: 0;
  transition:
    max-height 0.35s ease,
    padding 0.35s ease,
    opacity 0.3s ease;
}

.service-page .question-item.active .question-answer {
  max-height: 360px;
  padding-bottom: 18px;
  opacity: 1;
}

.service-page .question-answer p {
  padding-top: 13px;
  color: var(--home-muted);
  font-size: 12px;
  line-height: 2;
  border-top: 1px solid var(--home-border);
}

.service-page .question-answer a {
  color: var(--home-blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Existing footer, visually aligned with the new site footer */
.service-page .footer-section {
  padding-top: 54px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--home-navy-dark);
}

.service-page .footer-wrapper {
  width: min(100% - 32px, 1180px);
  display: grid;
  gap: 30px;
  margin-inline: auto;
}

.service-page .footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.service-page .footer-section .footer-wrapper .footer-nav-list a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.service-page .footer-section .footer-wrapper .footer-nav-list a:hover {
  color: var(--home-yellow);
}

.service-page .contact-list {
  display: grid;
  gap: 13px;
}

.service-page .contact-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  line-height: 1.9;
}

.service-page .contact-item address {
  display: flex;
  gap: 9px;
  font-style: normal;
}

.service-page .footer-contact-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--home-yellow);
}

.service-page .phone-num {
  color: #fff;
  direction: ltr;
}

.service-page .contact-item.social {
  display: block;
}

.service-page .social-icons {
  display: flex;
  gap: 9px;
  margin-top: 10px;
}

.service-page .social-icons a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--home-navy-dark);
  background: var(--home-yellow);
  border-radius: 10px;
}

.service-page .footer-social-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.service-page .slogan {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.service-page .copy-right {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 38px;
  padding: 16px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.service-page .copy-right-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

@media (max-width: 359px) {
  .service-page .diag-services-list,
  .service-page .why-choose-list {
    grid-template-columns: 1fr;
  }

  .service-page .diag-services-list .item-content {
    padding: 28px 18px;
  }

  .service-page .hero-buttons {
    display: grid;
  }

  .service-page .service-hero .btn {
    width: 100%;
  }
}

@media (min-width: 600px) {
  .service-page .diag-services-list,
  .service-page .why-choose-list {
    gap: 16px;
  }

  .service-page .diag-services-list .item-content,
  .service-page .why-choose-list li {
    padding: 28px 22px;
  }

  .service-page .diag-services-list h3,
  .service-page .why-choose-list h3 {
    min-height: auto;
    font-size: 17px;
  }

  .service-page .diag-services-list p,
  .service-page .why-choose-list p {
    font-size: 13px;
  }

  .service-page .contact-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-page .footer-wrapper {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .service-page .slogan {
    grid-column: 1 / -1;
  }
}

/* Prevent dark-gradient banding inside cards on mobile devices */
@media (max-width: 767px) {
  .service-page .why-choose-list li {
    background: #12364e;
  }

  .service-page .why-choose-list li:hover {
    background: #16415c;
    transform: none;
  }

  .service-page .why-choose-us {
    transform: none;
    transition: opacity 0.5s ease;
  }

  .service-page .why-choose-us.section-hidden {
    transform: none;
  }
}

@media (min-width: 768px) {
  .service-page .service-section {
    scroll-margin-top: 92px;
  }

  .service-page .service-hero h1 {
    font-size: 45px;
  }

  .service-page .section-title::after {
    display: none;
  }

  .service-page header .home-navbar .nav-icon {
    display: none;
  }

  .service-page .service-hero {
    min-height: 560px;
  }

  .service-page .diag-services,
  .service-page .why-choose-us,
  .service-page .common-questions {
    padding-block: 88px;
  }

  .service-page .diag-services-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .service-page .diag-services-list .item-content {
    padding: 22px 10px;
  }

  .service-page .diag-services-list h3 {
    min-height: 48px;
    font-size: 14px;
    line-height: 1.7;
  }

  .service-page .diag-services-list p {
    font-size: 11px;
    line-height: 1.85;
  }

  .service-page .why-choose-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    /* gap: 10px; */
  }

  .service-page .why-choose-list h3 {
    min-height: 45px;
    font-size: 14px;
    line-height: 1.7;
  }

  .service-page .why-choose-list .why-choose-item {
    padding: 22px 10px;
  }

  .service-page .why-choose-list p {
    font-size: 11px;
    margin-top: 0;
  }

  .service-page .question-btn {
    padding: 21px 22px;
  }

  .service-page .question-title {
    font-size: 15px;
  }

  .service-page .question-answer {
    padding-inline: 22px;
  }

  .service-page .question-answer p {
    font-size: 14px;
  }
}

@media (min-width: 1024px) {
  .service-page .service-breadcrumb {
    justify-content: flex-start;
  }

  .service-page .section-title::after {
    display: none;
  }
  .service-page .service-hero {
    min-height: 580px;
    place-items: center start;
    padding-inline: max(32px, calc((100vw - 1180px) / 2));
    text-align: right;
    background-position: center 44%;
  }

  .service-page .service-hero .hero-content {
    width: min(58%, 680px);
    margin: 0;
  }

  .service-page .service-hero p {
    margin-inline: 0;
  }

  .service-page .hero-buttons {
    justify-content: flex-start;
  }

  .service-page .diag-services-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .service-page .diag-services-list h3,
  .service-page .why-choose-list h3 {
    font-size: 16px;
    margin-top: 14px;
  }

  .service-page .diag-services-list p,
  .service-page .why-choose-list p {
    font-size: 13px;
  }

  .service-page .contact-us::before {
    inset: 0 auto 0 0;
    width: 62%;
    height: 100%;
    background:
      linear-gradient(
        to right,
        rgba(255, 184, 22, 0.25),
        rgba(255, 212, 94, 0.58)
      ),
      url("../images/service-imgs/contact-us-bg.webp") center / cover no-repeat;
    mask-image: linear-gradient(
      to right,
      #000 0%,
      #000 58%,
      rgba(0, 0, 0, 0.72) 72%,
      transparent 100%
    );
  }

  .service-page .contact-us {
    min-height: 380px;
    padding: 72px max(32px, calc((100vw - 1180px) / 2));
  }

  .service-page .contact-content {
    padding-left: 54%;
    text-align: right;
  }

  .service-page .contact-content p {
    margin-inline: 0;
  }

  .service-page .contact-buttons {
    margin-inline: 0;
  }

  .service-page .footer-wrapper {
    grid-template-columns: 0.75fr 1.45fr 0.8fr;
    align-items: start;
  }

  .service-page .slogan {
    grid-column: auto;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-page *,
  .service-page *::before,
  .service-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
