/* Shared licenses block — homepage (tpl 2) + service pages (tpl 3) */

.sc-licenses.certificates-section {
  padding: 60px 0;
  background-color: #fcfcfc;
}

/* Homepage heading — match «Наши преимущества» tokens */
body:not(.sc-service-page) .sc-licenses > .container > .section-title {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #2b2e33;
  margin: 0 0 50px;
  text-align: center;
  position: relative;
  text-transform: uppercase;
  line-height: 1.2;
}

body:not(.sc-service-page) .sc-licenses > .container > .section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #277a58;
  margin: 15px auto 0;
  border-radius: 2px;
}

.sc-licenses .certificates-slider-wrap {
  position: relative;
  margin: 40px 0;
  padding: 0 40px;
  overflow: hidden;
}

.sc-licenses .cert-item {
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  border: 1px solid #f0f0f0;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.sc-licenses .cert-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(39, 122, 88, 0.1);
  border-color: #277a58;
}

.sc-licenses .cert-link {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #f9f9f9;
}

.sc-licenses .cert-link img,
.sc-licenses .cert-img {
  max-width: 100%;
  max-height: 100%;
  width: auto !important;
  height: auto;
  object-fit: contain;
  opacity: 1 !important;
}

.sc-licenses .zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(39, 122, 88, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sc-licenses .cert-link:hover .zoom-overlay,
.sc-licenses .cert-link:focus-visible .zoom-overlay {
  opacity: 1;
}

.sc-licenses .cert-title {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #2b2e33;
  line-height: 1.35;
}

.sc-licenses .cert-footer-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #2b2e33;
  background: #eef5f1;
  padding: 20px 30px;
  border-radius: 12px;
  border: 1px dashed #277a58;
  max-width: 800px;
  margin: 0 auto;
}

.sc-licenses .cert-footer-text svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Owl carousel — shared service/home behavior */
.sc-licenses .cert-carousel {
  position: relative;
  padding-bottom: 0;
}

.sc-licenses .cert-carousel .owl-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  margin: 0;
}

.sc-licenses .cert-carousel .owl-nav button {
  pointer-events: auto;
  background: #fff !important;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50% !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  color: #277a58 !important;
  font-size: 32px !important;
  line-height: 0.8 !important;
  display: flex !important;
  justify-content: center;
  align-items: center;
  border: 1px solid #eaeaea !important;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.sc-licenses .cert-carousel .owl-nav button:hover {
  background: #277a58 !important;
  color: #fff !important;
  border-color: #277a58 !important;
}

.sc-licenses .cert-carousel .owl-nav button:focus-visible {
  outline: 2px solid #277a58;
  outline-offset: 2px;
}

/* Reset global absolute owl-dots — center under slider */
.sc-licenses .cert-carousel .owl-dots {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 24px 0 8px !important;
  padding: 0 !important;
  text-align: center !important;
  transform: none !important;
  float: none !important;
}

.sc-licenses .cert-carousel .owl-dots .owl-dot {
  float: none !important;
  display: inline-flex !important;
  width: 12px !important;
  height: 12px !important;
  min-width: 12px;
  min-height: 12px;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #d1e2d9 !important;
  transition: background 0.3s ease, transform 0.3s ease;
}

.sc-licenses .cert-carousel .owl-dots .owl-dot.active {
  background: #277a58 !important;
  transform: scale(1.25);
}

.sc-licenses .cert-carousel .owl-dots .owl-dot:focus-visible {
  outline: 2px solid #277a58;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  body:not(.sc-service-page) .sc-licenses > .container > .section-title {
    font-size: 26px;
    margin-bottom: 40px;
  }

  .sc-licenses .cert-link {
    height: 250px;
  }

  .sc-licenses .certificates-slider-wrap {
    padding: 0 10px;
  }

  .sc-licenses .cert-carousel .owl-nav {
    display: none;
  }

  .sc-licenses .cert-footer-text {
    font-size: 14px;
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sc-licenses .cert-item,
  .sc-licenses .cert-link .zoom-overlay,
  .sc-licenses .cert-carousel .owl-nav button,
  .sc-licenses .cert-carousel .owl-dots .owl-dot {
    transition: none;
  }

  .sc-licenses .cert-item:hover {
    transform: none;
  }
}
