/* Shared chrome for public tool pages (news layout + sidebar + products) */

.nd-tool-layout {
  /* inherits .news-article__layout from styles.css */
}

.nd-tool-main {
  min-width: 0;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(42, 171, 226, 0.12);
  box-shadow: 0 6px 24px rgba(15, 45, 82, 0.06);
  padding: 22px 24px 28px;
}

.nd-tool-main .te-wrap,
.nd-tool-main .te-wrap.te-light,
.nd-tool-main .st-wrap {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
  margin: 0;
  max-width: none;
}

.nd-tool-main .te-shell {
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.nd-tool-main .te-head h2 {
  display: none;
}

.nd-tools-box {
  margin-bottom: 0;
}

.nd-tools-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
}

.nd-tools-all-btn {
  display: flex;
  margin: 12px 0 0;
  width: 100%;
  box-sizing: border-box;
}

.nd-tools-loading,
.nd-tools-empty {
  margin: 0;
  padding: 8px 0;
  font-size: 13px;
  color: #94a3b8;
}

.nd-tool-aside-card {
  align-items: center;
}

.nd-tool-aside-card--current {
  background: #f0f9ff;
  border-radius: 10px;
}

.nd-tool-aside-card__img {
  display: grid;
  place-items: center;
  background: #fff;
}

.nd-tool-aside-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
}

.nd-tool-thumb-svg {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #2aabe2;
}

.nd-tool-thumb-svg svg {
  width: 32px;
  height: 32px;
}

.nd-tool-aside-card__desc {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
  margin-top: 2px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.nd-tool-aside-card .news-aside-card__body h3 {
  -webkit-line-clamp: 2;
}

.news-public-page .nd-tool-services {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 56px;
  box-sizing: border-box;
}

.news-public-page .nd-tool-services > .title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: #0f2744;
}

.news-public-page .nd-tool-services .service-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
  min-height: 0 !important;
  padding: 0;
}

.nd-svc-card {
  display: flex;
  flex-direction: column;
  min-height: 156px;
  height: 100%;
  padding: 16px 18px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(42, 171, 226, 0.12);
  box-shadow: 0 4px 18px rgba(15, 45, 82, 0.06);
  text-decoration: none;
  color: inherit !important;
  text-align: right;
  transition: background 0.2s, box-shadow 0.2s;
}

.nd-svc-card:hover {
  background: #edf6fb;
  box-shadow: 0 8px 24px rgba(42, 171, 226, 0.12);
}

.nd-svc-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.nd-svc-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0f2744;
  line-height: 1.45;
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nd-svc-card__icon {
  width: 40px !important;
  height: 40px !important;
  flex-shrink: 0;
  object-fit: contain;
}

.nd-svc-card__desc {
  margin: 0;
  margin-top: auto;
  font-size: 12px;
  line-height: 1.65;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.nd-related-list .atin-related__card {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit !important;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  box-shadow: none;
  transform: none;
  background: transparent;
}

.nd-related-list .atin-related__card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.nd-related-list .atin-related__card:hover {
  box-shadow: none;
  transform: none;
}

.nd-related-list .atin-related__card:hover .atin-related__body h3 {
  color: #2aabe2;
}

.nd-related-list .atin-related__thumb {
  width: 76px;
  height: 76px;
  min-width: 76px;
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: auto;
  background: linear-gradient(135deg, #e8f6fd, #c9eaf7);
}

.nd-related-list .atin-related__body {
  padding: 0;
  min-width: 0;
}

.nd-related-list .atin-related__body h3 {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.65;
  color: #0f2744;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}

.nd-related-list .atin-related__body p {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nd-related-list:empty::after {
  content: 'در حال بارگذاری…';
  display: block;
  font-size: 13px;
  color: #94a3b8;
  padding: 8px 0;
}

.nd-support-box .nd-support-text {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.7;
  color: #64748b;
}

.nd-support-phone {
  display: block;
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: #2aabe2 !important;
  text-decoration: none;
  direction: ltr;
  text-align: center;
}

@media (max-width: 1024px) {
  .news-public-page .nd-tool-services .service-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .nd-tool-main {
    padding: 18px;
  }
}

@media (max-width: 520px) {
  .news-public-page .nd-tool-services .service-container {
    grid-template-columns: 1fr;
  }

  .nd-svc-card {
    min-height: 140px;
  }

  .nd-tool-main {
    padding: 16px;
  }
}
