/* ==========================================================================
   Sitemap Page Styling
   Theme-matched with iQlance visual design system & typography rules
   ========================================================================== */

.sitemap-page-section {
  background-color: var(--white, #ffffff);
  font-family: var(--font-body, "Inter", sans-serif);
  color: var(--text-main, #131415);
}

/* Header & Meta */
.sitemap-meta {
  font-family: var(--font-body, "Inter", sans-serif);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.sitemap-meta-badge {
  font-family: var(--font-body, "Inter", sans-serif);
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  color: var(--primary-color);
  background: var(--primary-light);
  padding: 6px 16px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.sitemap-meta-desc {
  font-family: var(--font-body, "Inter", sans-serif);
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  color: #131415;
  white-space: nowrap;
}

.sitemap-main-title {
  font-family: var(--font-heading, "Inter", sans-serif);
  font-weight: 900;
  font-size: clamp(36px, 5vw + 1rem, 74px) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
  color: var(--text-main, #131415);
  margin-bottom: 24px;
}

.sitemap-main-title span {
  background: var(--gradient-primary) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.sitemap-intro-card {
  background-color: transparent;
}

.sitemap-intro-card p:last-child {
  margin-bottom: 0;
}

.sitemap-intro-text {
  font-family: var(--font-body, "Inter", sans-serif);
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  color: var(--text-main, #131415);
}

/* Category Sections */
.sitemap-section-block {
  scroll-margin-top: 120px;
  margin-bottom: 48px;
}

.sitemap-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sitemap-section-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  flex-shrink: 0;
}

.sitemap-header-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.sitemap-section-heading {
  font-family: var(--font-heading, "Inter", sans-serif);
  font-weight: 700;
  font-size: clamp(24px, 3vw + 1rem, 32px) !important;
  line-height: 1.3 !important;
  letter-spacing: -0.02em;
  color: var(--text-main, #131415);
  margin: 0;
}

/* Sitemap Links Grid */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.sitemap-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
  gap: 12px;
}

.sitemap-link-text {
  font-family: var(--font-body, "Inter", sans-serif);
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  color: var(--text-main, #131415);
  transition: color 0.2s ease;
}

.sitemap-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sitemap-arrow-img {
  width: 24px;
  height: 24px;
  display: block;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sitemap-card-link:hover {
  background-color: var(--white);
  border-color: var(--primary-color);
  box-shadow: 0 8px 24px rgba(56, 75, 255, 0.12);
  transform: translateY(-2px);
}

.sitemap-card-link:hover .sitemap-link-text {
  color: var(--primary-color);
  font-weight: 600;
}

.sitemap-card-link:hover .sitemap-card-icon {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.sitemap-card-link:hover .sitemap-arrow-img {
  transform: rotate(-45deg);
  filter: brightness(0) invert(1);
}

/* Sidebar Sticky TOC */
.sitemap-sticky-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 110px;
  align-self: flex-start;
}

.sitemap-toc-widget {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.03);
}

.sitemap-toc-title {
  font-family: var(--font-heading, "Inter", sans-serif);
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sitemap-toc-list {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.sitemap-toc-list::-webkit-scrollbar {
  width: 5px;
}

.sitemap-toc-list::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.sitemap-toc-item {
  margin: 0;
  border-bottom: 1px solid #D5D6E5;
}

.sitemap-toc-item:last-child {
  border-bottom: none;
}

.sitemap-toc-link {
  font-family: var(--font-body, "Inter", sans-serif);
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  color: var(--text-main);
  text-decoration: none;
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sitemap-toc-link:hover {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

.sitemap-toc-link.active {
  color: var(--primary-color);
  /* background-color: var(--primary-light); */
  font-weight: 600;
}

/* Mobile Sticky TOC */
.sitemap-mobile-toc {
  display: none;
  position: fixed;
  top: 84px;
  left: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  z-index: 999;
  padding: 12px 16px;
  flex-direction: column;
}

.sitemap-mobile-toc.open .sitemap-mobile-toc-dropdown {
  display: block;
}

.sitemap-mobile-toc-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(84, 96, 249, 0.15);
  transition: all 0.3s ease;
}

.sitemap-mobile-toc-btn:hover {
  background-color: var(--primary-hover);
}

.sitemap-mobile-toc-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
  filter: brightness(0) invert(1);
}

.sitemap-mobile-toc.open .sitemap-mobile-toc-arrow {
  transform: rotate(180deg);
}

.sitemap-mobile-toc-dropdown {
  display: none;
  position: absolute;
  top: calc(100% - 4px);
  left: 16px;
  right: 16px;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  padding: 8px 0;
}

.sitemap-mobile-toc-item {
  display: block;
  padding: 10px 18px;
  color: var(--text-main, #131415);
  text-decoration: none;
  font-family: var(--font-body, "Inter", sans-serif);
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--primary-light);
}

.sitemap-mobile-toc-item:last-child {
  border-bottom: none;
}

.sitemap-mobile-toc-item:hover,
.sitemap-mobile-toc-item.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 600;
}

/* Responsive Media Queries (Section design changes only, no font size changes) */
@media (max-width: 991.98px) {
  .sitemap-mobile-toc.sticky-visible {
    display: flex;
  }
}

@media (max-width: 767.98px) {
  .sitemap-grid {
    grid-template-columns: 1fr;
  }
}
