/**
 * N.N Services – Custom Service Tabs (Flatsome UX Builder Element)
 * Responsive Vertical Tabs with Posts/Pages List and Customizable Tab Image
 */

:root {
  --nns-tab-active-bg: #071d61;
  --nns-tab-active-color: #ffffff;
  --nns-tab-inactive-color: #2b2b2b;
  --nns-tab-hover-bg: rgba(7, 29, 97, 0.08);
  --nns-tab-active-shadow: rgba(7, 29, 97, 0.32);
  --nns-card-border: #cdd9ed;
  --nns-card-radius: 18px;
  --nns-nav-width: 30%;
  --nns-img-width: 42%;
}

.nns-service-tabs-wrap {
  width: 100%;
  position: relative;
  box-sizing: border-box;
  font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin-top: 20px;
  margin-bottom: 30px;
}

.nns-service-tabs-wrap *,
.nns-service-tabs-wrap *::before,
.nns-service-tabs-wrap *::after {
  box-sizing: border-box;
}

/* ── Container Layout ── */
.nns-st-container {
  display: flex;
  align-items: stretch;
  gap: 30px;
  width: 100%;
}

/* ── Left Column: Tab Navigation ── */
.nns-st-nav-col {
  width: var(--nns-nav-width, 30%);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.nns-st-nav-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nns-st-nav-item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Tab Button */
.nns-st-tab-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background-color: transparent;
  color: var(--nns-tab-inactive-color, #2b2b2b);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  user-select: none;
  position: relative;
}

.nns-st-tab-btn:hover {
  background-color: var(--nns-tab-hover-bg, rgba(7, 29, 97, 0.08));
  color: var(--nns-tab-active-bg, #071d61);
}

/* Active Tab State */
.nns-st-tab-btn.active {
  background-color: var(--nns-tab-active-bg, #071d61) !important;
  color: var(--nns-tab-active-color, #ffffff) !important;
  box-shadow: 0 8px 22px var(--nns-tab-active-shadow, rgba(7, 29, 97, 0.32));
  transform: translateY(-1px);
}

.nns-st-tab-title {
  flex: 1;
  word-break: break-word;
}

/* Chevron Arrow on Active Tab */
.nns-st-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-left: 10px;
  stroke: currentColor;
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.25s ease;
}

.nns-st-tab-btn.active .nns-st-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Right Column: Content Card ── */
.nns-st-content-col {
  flex: 1;
  min-width: 0;
  display: flex;
}

.nns-st-card {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid var(--nns-card-border, #e2cca0);
  border-radius: var(--nns-card-radius, 18px);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  position: relative;
  min-height: 380px;
  display: flex;
}

/* ── Tab Panes ── */
.nns-st-pane {
  display: none;
  width: 100%;
  min-height: 100%;
}

.nns-st-pane.active {
  display: flex;
  align-items: stretch;
  animation: nnsFadeScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes nnsFadeScaleIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Left Sub-column: Links List ── */
.nns-st-links-box {
  flex: 1;
  padding: 38px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.nns-st-links-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nns-st-link-item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.nns-st-link {
  display: inline-flex;
  align-items: center;
  color: #2b2b2b;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none !important;
  transition: all 0.22s ease;
  position: relative;
  word-break: break-word;
}

.nns-st-link:hover {
  color: var(--nns-tab-active-bg, #071d61) !important;
  transform: translateX(6px);
}

.nns-st-link:focus {
  outline: none;
  color: var(--nns-tab-active-bg, #071d61);
}

/* Empty state message */
.nns-st-empty-links {
  color: #718096;
  font-size: 14px;
  font-style: italic;
  padding: 10px 0;
}

/* ── Right Sub-column: Illustration Image ── */
.nns-st-image-box {
  width: var(--nns-img-width, 42%);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background-color: #edf3fd;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nns-st-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.nns-st-img.fit-contain {
  object-fit: contain;
  padding: 16px;
}

.nns-st-card:hover .nns-st-img {
  transform: scale(1.02);
}

/* ══ RESPONSIVE BREAKPOINTS ══ */

/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
  :root {
    --nns-nav-width: 32%;
    --nns-img-width: 40%;
  }

  .nns-st-container {
    gap: 20px;
  }

  .nns-st-tab-btn {
    padding: 14px 18px;
    font-size: 16px;
  }

  .nns-st-links-box {
    padding: 28px 24px;
  }

  .nns-st-links-list {
    gap: 14px;
  }

  .nns-st-link {
    font-size: 15px;
  }
}

/* Mobile & Small Tablet (≤ 768px) */
@media (max-width: 768px) {
  .nns-st-container {
    flex-direction: column;
    gap: 16px;
  }

  .nns-st-nav-col {
    width: 100% !important;
  }

  /* Horizontal scroll tabs for mobile */
  .nns-st-nav-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px !important;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
  }

  .nns-st-nav-list::-webkit-scrollbar {
    display: none;
    /* Safari/Chrome */
  }

  .nns-st-nav-item {
    flex-shrink: 0;
  }

  .nns-st-tab-btn {
    padding: 12px 18px;
    font-size: 15px;
    white-space: nowrap;
    border-radius: 8px;
    justify-content: center;
  }

  .nns-st-tab-btn .nns-st-arrow {
    display: none;
  }

  .nns-st-content-col {
    width: 100% !important;
  }

  .nns-st-card {
    min-height: auto;
    border-radius: 16px;
  }

  .nns-st-pane.active {
    flex-direction: column;
  }

  .nns-st-links-box {
    padding: 24px 20px;
    order: 1;
  }

  .nns-st-links-list {
    gap: 14px;
  }

  .nns-st-image-box {
    width: 100% !important;
    height: 220px;
    order: 2;
  }
}

/* Small mobile (≤ 480px) */
@media (max-width: 480px) {
  .nns-st-tab-btn {
    padding: 10px 14px;
    font-size: 14px;
  }

  .nns-st-links-box {
    padding: 20px 16px;
  }

  .nns-st-link {
    font-size: 14.5px;
  }

  .nns-st-image-box {
    height: 190px;
  }
}