/* ==========================================
   BLACK HARBOR GROUP - SITEMAP TREE STYLES
   ========================================== */

.sitemap-hero-section {
  position: relative;
  padding: 80px 0 50px;
  background: linear-gradient(180deg, #050a12 0%, #0b1320 100%);
  border-bottom: 1px solid rgba(178, 140, 64, 0.2);
  text-align: center;
  overflow: hidden;
}

.sitemap-hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 350px;
  background: radial-gradient(circle, rgba(178, 140, 64, 0.12) 0%, rgba(5, 10, 18, 0) 70%);
  pointer-events: none;
}

.sitemap-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(178, 140, 64, 0.12);
  border: 1px solid rgba(178, 140, 64, 0.35);
  border-radius: 50px;
  color: var(--gold-primary, #b28c40);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.sitemap-title {
  font-family: 'Outfit', sans-serif;
  font-size: 42px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.sitemap-subtitle {
  color: rgba(255, 255, 255, 0.65);
  font-size: 16px;
  max-width: 650px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

/* View Switcher Controls */
.sitemap-controls {
  display: inline-flex;
  background: rgba(13, 24, 40, 0.8);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid rgba(178, 140, 64, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.sitemap-btn-view {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sitemap-btn-view.active {
  background: linear-gradient(135deg, #b28c40 0%, #d4a84e 100%);
  color: #050a12;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(178, 140, 64, 0.35);
}

/* Sitemap Content Area */
.sitemap-main-content {
  background: #050a12;
  padding: 60px 0 100px;
  min-height: 700px;
  position: relative;
}

/* ==========================================
   TREE DIAGRAM LAYOUT (Org Chart Style)
   ========================================== */
.sitemap-tree-wrapper {
  overflow-x: auto;
  padding: 20px 10px 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-primary, #b28c40) #070e1b;
}

.sitemap-tree-wrapper::-webkit-scrollbar {
  height: 8px;
}

.sitemap-tree-wrapper::-webkit-scrollbar-track {
  background: #070e1b;
}

.sitemap-tree-wrapper::-webkit-scrollbar-thumb {
  background: #b28c40;
  border-radius: 4px;
}

.sitemap-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 1100px;
  margin: 0 auto;
}

/* Root Node */
.tree-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin-bottom: 50px;
}

.tree-root-card {
  background: linear-gradient(145deg, rgba(20, 35, 55, 0.95), rgba(10, 20, 32, 0.95));
  border: 2px solid var(--gold-primary, #b28c40);
  border-radius: 16px;
  padding: 18px 36px;
  text-align: center;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(178, 140, 64, 0.25);
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none !important;
  transition: all 0.3s ease;
}

.tree-root-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7), 0 0 35px rgba(178, 140, 64, 0.45);
  border-color: #f3d07e;
}

.tree-root-logo {
  height: 48px;
  width: auto;
}

.tree-root-info h4 {
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0;
}

.tree-root-info span {
  color: var(--gold-primary, #b28c40);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Vertical stem leaving root */
.tree-root::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: 50%;
  width: 2px;
  height: 50px;
  background: linear-gradient(180deg, #b28c40 0%, rgba(178, 140, 64, 0.6) 100%);
  transform: translateX(-50%);
}

/* Main Horizontal Bus Line connecting level 1 nodes */
.tree-level-1-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-around;
  padding-top: 30px;
}

/* Top Horizontal Line across level 1 */
.tree-level-1-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 3%;
  right: 3%;
  height: 2px;
  background: rgba(178, 140, 64, 0.5);
  box-shadow: 0 0 8px rgba(178, 140, 64, 0.3);
}

/* Column structure for each main category */
.tree-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  padding: 0 6px;
  max-width: 190px;
}

/* Stem linking main bus line to parent node card */
.tree-column::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  width: 2px;
  height: 30px;
  background: rgba(178, 140, 64, 0.5);
  transform: translateX(-50%);
}

/* Node Cards */
.tree-node-card {
  width: 100%;
  background: rgba(13, 24, 40, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(178, 140, 64, 0.3);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.tree-node-card:hover {
  transform: translateY(-5px);
  background: rgba(18, 34, 56, 0.95);
  border-color: #d4a84e;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(178, 140, 64, 0.35);
}

.tree-node-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(178, 140, 64, 0.12);
  color: var(--gold-primary, #b28c40);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.3s ease;
}

.tree-node-card:hover .tree-node-icon {
  background: #b28c40;
  color: #050a12;
}

.tree-node-title {
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  letter-spacing: 0.3px;
}

.tree-node-url {
  color: rgba(178, 140, 64, 0.85);
  font-size: 10px;
  font-family: monospace;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 2px;
}

.live-dot {
  width: 5px;
  height: 5px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px #4ade80;
}

/* Vertical Sub-tree Children */
.tree-subbranches {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  padding-top: 25px;
}

/* Vertical line connecting parent node to subbranches */
.tree-subbranches::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: rgba(178, 140, 64, 0.35);
  transform: translateX(-50%);
  z-index: 1;
}

.tree-child-card {
  width: 95%;
  background: rgba(10, 18, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--gold-primary, #b28c40);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  text-decoration: none !important;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tree-child-card:hover {
  transform: translateX(4px);
  background: rgba(18, 32, 52, 0.95);
  border-color: rgba(178, 140, 64, 0.6);
  border-left-color: #f3d07e;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 12px rgba(178, 140, 64, 0.2);
}

.tree-child-title {
  color: #e2e8f0;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  margin: 0;
}

.tree-child-card:hover .tree-child-title {
  color: #ffffff;
}

.tree-child-icon {
  color: var(--gold-primary, #b28c40);
  font-size: 11px;
  transition: transform 0.2s ease;
}

.tree-child-card:hover .tree-child-icon {
  transform: translateX(3px);
}


/* ==========================================
   INTERACTIVE LIST VIEW (Grid / Accordion)
   ========================================== */
.sitemap-list-wrapper {
  max-width: 1140px;
  margin: 0 auto;
}

.sitemap-category-card {
  background: rgba(13, 24, 40, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(178, 140, 64, 0.25);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.sitemap-category-card:hover {
  border-color: rgba(178, 140, 64, 0.5);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(178, 140, 64, 0.15);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.category-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(178, 140, 64, 0.15);
  color: var(--gold-primary, #b28c40);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid rgba(178, 140, 64, 0.3);
}

.category-header h3 {
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.category-header h3 a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.category-header h3 a:hover {
  color: var(--gold-primary, #b28c40);
}

.category-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.list-item-card {
  background: rgba(8, 15, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.list-item-card:hover {
  background: rgba(18, 34, 56, 0.9);
  border-color: rgba(178, 140, 64, 0.4);
  transform: translateY(-2px);
}

.list-item-info {
  display: flex;
  flex-direction: column;
}

.list-item-name {
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.list-item-path {
  color: rgba(178, 140, 64, 0.8);
  font-size: 11px;
  font-family: monospace;
}

.list-item-arrow {
  color: var(--gold-primary, #b28c40);
  font-size: 13px;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.list-item-card:hover .list-item-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* ==========================================
   RESPONSIVE DESIGN (Mobile & Tablets)
   ========================================== */
@media (max-width: 991px) {
  .sitemap-title {
    font-size: 32px;
  }
  
  .sitemap-tree-wrapper {
    overflow-x: auto;
  }

  .sitemap-tree {
    min-width: auto;
    width: 100%;
    align-items: flex-start;
  }

  .tree-root {
    width: 100%;
    margin-bottom: 30px;
  }

  .tree-root::after {
    display: none;
  }

  .tree-level-1-container {
    flex-direction: column;
    padding-top: 0;
    gap: 20px;
  }

  .tree-level-1-container::before {
    display: none;
  }

  .tree-column {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    padding: 0;
  }

  .tree-column::before {
    display: none;
  }

  .tree-subbranches {
    padding-top: 10px;
    padding-left: 20px;
  }

  .tree-subbranches::before {
    left: 8px;
  }

  .tree-child-card {
    width: 100%;
  }
}
