/* ============================================
   MINERAL ATLAS SECTION - Regional Resource Overview
   Premium split-panel layout with map image + category cards
   ============================================ */
.mineral-atlas {
  padding: var(--section-padding-y) var(--section-padding-x);
  background: var(--navy-950);
  position: relative;
  overflow: hidden;
}


.mineral-atlas__container {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Section Header */
.mineral-atlas__header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 4rem;
}

.mineral-atlas__overline {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--primary-gold-500);
  margin-bottom: 0.75rem;
}

.mineral-atlas__title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.8vw, 2.125rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.mineral-atlas__subtitle {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
  max-width: 680px;
  margin: 0 auto;
}

/* ---- Main Split Layout ---- */
.mineral-atlas__body {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 2rem;
  align-items: stretch;
}

/* Left: Map Image Panel — zero padding, image fills it exactly */
.mineral-atlas__map-panel {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.mineral-atlas__map-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Right: Wrapper stretches to match map height via grid stretch */
.mineral-atlas__categories-wrapper {
  position: relative;
  min-height: 0;          /* required for grid children to not overflow */
}

/* Inner scroller: absolute fill so it scrolls within the wrapper height */
.mineral-atlas__categories {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  padding-right: 1.25rem; /* space to stay clear of the custom scrollbar */
  scrollbar-width: none;  /* hide Firefox native scrollbar */
  -webkit-overflow-scrolling: touch;
}

.mineral-atlas__categories::-webkit-scrollbar {
  display: none;          /* hide WebKit/Blink native scrollbar */
}

/* Custom Visual Scrollbar — always visible on both desktop & mobile */
.mineral-atlas__custom-scrollbar {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mineral-atlas__custom-scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid rgba(10, 22, 40, 0.4);
}

/* Individual Category Card */
.mineral-atlas__cat-card {
  background: var(--navy-900);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.5s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.mineral-atlas__cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--cat-accent, var(--primary-gold-400));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}

.mineral-atlas__cat-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(15, 31, 58, 0.95);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(-3px);
}

.mineral-atlas__cat-card:hover::before {
  transform: scaleY(1);
}

/* Category Card Header */
.mineral-atlas__cat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mineral-atlas__cat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.mineral-atlas__cat-icon svg {
  color: var(--cat-accent, var(--primary-gold-400));
}

.mineral-atlas__cat-name {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
}

/* Mineral Chips List */
.mineral-atlas__chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mineral-atlas__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-ui);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-100);
  transition: all 0.3s ease;
}

.mineral-atlas__chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.mineral-atlas__chip-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
}

/* District Tags */
.mineral-atlas__districts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mineral-atlas__district-tag {
  font-family: var(--font-ui);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-300);
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* ---- Bottom Stats Bar ---- */
.mineral-atlas__stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 3rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mineral-atlas__stat {
  background: var(--navy-950);
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  transition: background 0.3s ease;
}

.mineral-atlas__stat:hover {
  background: var(--navy-900);
}

.mineral-atlas__stat-val {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--primary-gold-400);
  letter-spacing: 0.02em;
}

.mineral-atlas__stat-lbl {
  font-family: var(--font-ui);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-300);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .mineral-atlas__body {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    height: auto;
    min-height: unset;
    max-height: none;
  }

  .mineral-atlas__map-panel {
    position: relative;
    top: auto;
    height: auto;
  }

  .mineral-atlas__map-img {
    height: auto;
    object-fit: contain;
  }

  .mineral-atlas__categories {
    position: relative;
    height: 450px;
    overflow-y: auto;
    padding-right: 1.25rem;
  }
}

@media (max-width: 768px) {
  .mineral-atlas__stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .mineral-atlas__header {
    margin-bottom: 2.5rem;
  }
}

@media (max-width: 480px) {
  .mineral-atlas__stats-bar {
    grid-template-columns: 1fr;
  }

  .mineral-atlas__cat-card {
    padding: 1.5rem;
  }
}