/* ===============================
   ATLAS KPI SECTION STYLING
   =============================== */
.atlas-kpi-section {
  padding: 40px 0 60px; /* Balanced top & bottom spacing */
  
  /*background-color: #0e3358;*/
  background-color: #094785;
  color: #fff;
}

/* ===============================
   MAIN CONTAINER
   =============================== */
.kpi-container {
  display: flex;
  justify-content: space-between;
  align-items: center; /* ✅ changed from flex-start → center */
  gap: 70px; /* Slightly tighter spacing */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px; /* Matches previous section */
  box-sizing: border-box;
}

/* ===============================
   LEFT SIDE (Accordion)
   =============================== */
.kpi-accordion {
  flex: 1;
  color: #fff;
}

.kpi-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 35px; /* reduced from 60px */
  line-height: 1.3;
}

.kpi-items {
  border-top: 1px solid rgba(255, 255, 255, 0.85);
}

.kpi-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 20px 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.kpi-item:hover {
  border-color: #ffffff;
}

.kpi-item:last-child {
  border-bottom: none;
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kpi-icon {
  font-size: 18px;
  color: #59a9ff;
}

.kpi-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
  transition: color 0.3s ease;
}

.kpi-item:hover h3 {
  color: #7fc3ff;
}

.kpi-arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.kpi-item.active .kpi-arrow {
  transform: rotate(-135deg);
}

.kpi-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.kpi-desc {
  color: #d4e0f7;
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===============================
   RIGHT SIDE (Image + Navigation)
   =============================== */
.kpi-image-container {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 24px;
  margin-top: 60px; /* ✅ actually moves the block down */
  transform: translateY(15px); /* ✅ fine tune position */
}

/* ✅ Navigation Dots */
.kpi-nav {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 8px;
  width: 100%;
}

.kpi-nav .nav-dot {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background-color: rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
  cursor: default;
  pointer-events: none;
}

.kpi-nav .nav-dot.active {
  background-color: #3ea2ff;
}

/* ✅ Image Wrapper - Lowered for better balance */
.kpi-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 400px;
  background: #0d284f;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  margin-top: 20px; /* ✅ reduced gap for better sync */
}

/* Smooth fade + slight zoom */
.kpi-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease, filter 0.3s ease;
  filter: brightness(0.85);
}

.kpi-image.visible {
  opacity: 1;
  transform: scale(1);
  filter: brightness(1);
}

/* ===============================
   TABLET VIEW (UP TO 1200PX)
   =============================== */
@media (max-width: 1200px) {
  .kpi-container {
    padding: 0 40px;
    gap: 60px;
    align-items: center;
  }

  .kpi-image-container {
    margin-top: 50px;
    transform: translateY(10px);
  }

  .kpi-image-wrapper {
    max-width: 420px;
    height: 340px;
  }

  .kpi-title {
    margin-bottom: 45px;
  }
}

/* ===============================
   MOBILE VIEW (UP TO 900PX)
   =============================== */
@media (max-width: 900px) {
  .atlas-kpi-section {
    padding: 60px 20px 100px;
    text-align: center;
  }

  .kpi-container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    margin: 0 auto;
    max-width: 600px;
    padding: 0;
  }

  .kpi-title {
    order: -2;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: left;
    margin-bottom: 20px;
    width: 100%;
  }

  .kpi-nav {
    display: none !important;
  }

  .kpi-image-container {
    order: -1;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0;
  }

  .kpi-image-wrapper {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  }

  .kpi-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .kpi-accordion {
    width: 100%;
    max-width: 520px;
    text-align: left;
    margin-top: 10px;
  }

  .kpi-items {
    border-top: 1px solid rgba(255, 255, 255, 0.85);
  }

  .kpi-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.85);
    padding: 18px 0;
  }

  .kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .kpi-header h3 {
    font-size: 1rem;
    font-weight: 600;
  }

  .kpi-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 10px;
  }
}
