/* =================================================================
   Kima Academy - Leadership Levels Section
   ================================================================= */

.kima-leadership-levels {
  position: relative;
  overflow: hidden;
}

.leadership-levels-container {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

/* Left Column - Levels List */
.levels-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.level-item {
  background: #ffffff;
  border: 2px solid #e1e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.level-item:hover {
  border-color: #0061ff;
  box-shadow: 0 8px 24px rgba(0, 97, 255, 0.1);
  transform: translateY(-2px);
}

.level-item.active {
  border-color: #0061ff;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  box-shadow: 0 8px 24px rgba(0, 97, 255, 0.15);
}

.level-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #4776ff 0%, #0061ff 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 97, 255, 0.3);
}

.level-item.active .level-number {
  background: linear-gradient(135deg, #0061ff 0%, #0051d5 100%);
}

.level-content {
  flex: 1;
}

.level-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #5b667a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.level-label i {
  font-size: 1rem;
  color: #0061ff;
}

.level-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0b1220;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.level-subtitle {
  font-size: 0.9rem;
  color: #5b667a;
  margin: 0;
  line-height: 1.4;
}

.level-arrow {
  flex-shrink: 0;
  color: #5b667a;
  font-size: 1.25rem;
  transition: all 0.3s;
}

.level-item.active .level-arrow,
.level-item:hover .level-arrow {
  color: #0061ff;
  transform: translateX(4px);
}

/* Right Column - Level Details */
.level-details-panel {
  background: white;
  height: fit-content;
  border-radius: 16px;
  padding: 0;
  position: sticky;
  top: 2rem;
  box-shadow: 0 16px 48px rgba(0, 97, 255, 0.15);
  overflow: hidden;
  max-width: 500px;
  margin: 0 auto;
  animation: fadeInUp 0.4s ease-out;
}

.level-details-content {
  display: none;
  width: 100%;
}

.level-details-content.active {
  display: flex;
  flex-direction: column;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* All Cards - Blue Header */
.level-details-header {
  background: linear-gradient(135deg, #4776ff 0%, #0061ff 100%);
  padding: 2rem;
  margin-bottom: 0;
  color: white;
}

/* All Cards - White Body */
.level-details-body {
  background: white;
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.level-details-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 24px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

.level-details-badge i {
  font-size: 1rem;
}

.level-details-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem;
  line-height: 1.2;
  color: white;
}

.level-details-description {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1.6;
}

.level-details-section {
  margin-bottom: 2rem;
}

.level-details-section h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5b667a;
  margin: 0 0 1rem;
}

.focus-areas-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.focus-areas-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  color: #0b1220;
  font-size: 1rem;
  line-height: 1.5;
}

.focus-areas-list li:before {
  content: '●';
  color: #0061ff;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.4rem;
}

.level-details-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.level-details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #4776ff 0%, #0061ff 100%);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0, 97, 255, 0.3);
}

.level-details-btn:hover {
  background: linear-gradient(135deg, #0061ff 0%, #0051d5 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 97, 255, 0.4);
  color: white;
}

.level-details-btn.success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.level-details-btn.success:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 6px 16px rgba(21, 128, 61, 0.35);
}

.level-details-btn i {
  font-size: 1.25rem;
  transition: transform 0.3s;
}

.level-details-btn:hover i {
  transform: translateX(4px);
}

/* Partner Logos Section (Level 5) */
.level-details-partners {
  margin-bottom: 1.5rem;
}

.level-details-partners h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5b667a;
  margin: 0 0 1rem;
}

.partners-logo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  align-items: center;
}

.partners-logo-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: #f8f9ff;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  transition: all 0.3s;
  min-height: 70px;
}

.partners-logo-grid a:hover {
  border-color: #0061ff;
  box-shadow: 0 4px 12px rgba(0, 97, 255, 0.1);
  transform: translateY(-2px);
}

.partners-logo-grid img {
  max-width: 100%;
  height: auto;
  max-height: 50px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s;
}

.partners-logo-grid a:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Responsive - Tablet */
@media (max-width: 1023px) {
  .leadership-levels-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .level-details-panel {
    position: relative;
    top: 0;
    min-height: auto;
  }
}

/* Responsive - Mobile */
@media (max-width: 767px) {
  .leadership-levels-container {
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .level-item {
    padding: 1.25rem;
  }

  .level-number {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .level-title {
    font-size: 1rem;
  }

  .level-subtitle {
    font-size: 0.85rem;
  }

  /* On mobile, keep details panel visible in the stacked layout */
  .level-details-panel {
    display: block;
    max-width: 100%;
    margin: 0;
    position: relative;
    top: 0;
  }

  /* Show level details in modal on mobile */
  .level-item.active {
    border-color: #0061ff;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  }
}

/* Modal for Mobile */
@media (max-width: 767px) {
  .level-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
  }

  .level-modal-overlay.is-open {
    display: flex;
  }

  .level-modal {
    background: linear-gradient(135deg, #4776ff 0%, #0061ff 100%);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    color: white;
    position: relative;
    padding: 2rem 1.5rem;
  }

  .level-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
  }

  .level-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  .level-details-title {
    font-size: 1.5rem;
    padding-right: 2rem;
  }

  .level-details-description {
    font-size: 0.95rem;
  }
}
