/* What We Do Best / Expertise Section - 2025 Style */
.capabilities-section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(12, 12, 12, 0.95) 0%,
    rgba(18, 18, 18, 0.9) 100%
  );
}

.capabilities-section::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(
      circle at 15% 85%,
      rgba(10, 165, 166, 0.15),
      transparent 40%
    ),
    radial-gradient(circle at 85% 20%, rgba(20, 196, 197, 0.1), transparent 45%);
  z-index: 1;
  pointer-events: none;
}

/* Expertise Container */
.expertise-container {
  position: relative;
  z-index: 2;
  margin-top: 60px;
  padding-bottom: 50px;
}

/* Expertise Cards Layout */
.expertise-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  perspective: 1000px;
}

/* Individual Expertise Card */
.expertise-card {
  position: relative;
  background: rgba(30, 30, 30, 0.75);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 35px 30px;
  transition: transform 0.6s ease, box-shadow 0.6s ease, opacity 0.3s ease;
  transform-style: preserve-3d;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  opacity: 0;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.expertise-card.active {
  opacity: 1;
  transform: translateY(0) rotateY(0);
}

.expertise-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: 0.5s;
  pointer-events: none;
}

.expertise-card:hover::after {
  left: 100%;
}

.expertise-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--primary-color),
    0 0 20px rgba(10, 165, 166, 0.3);
}

/* Card appearance sequence animation */
.expertise-card[data-index='1'] {
  animation: cardAppear 0.5s 0.1s forwards;
}
.expertise-card[data-index='2'] {
  animation: cardAppear 0.5s 0.2s forwards;
}
.expertise-card[data-index='3'] {
  animation: cardAppear 0.5s 0.3s forwards;
}
.expertise-card[data-index='4'] {
  animation: cardAppear 0.5s 0.4s forwards;
}
.expertise-card[data-index='5'] {
  animation: cardAppear 0.5s 0.5s forwards;
}
.expertise-card[data-index='6'] {
  animation: cardAppear 0.5s 0.6s forwards;
}

@keyframes cardAppear {
  0% {
    opacity: 0;
    transform: translateY(20px) rotateY(5deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateY(0);
  }
}

/* Icon Styling */
.expertise-icon-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 25px;
}

.expertise-icon {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 0 5px rgba(10, 165, 166, 0.2);
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.expertise-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.4),
    rgba(255, 255, 255, 0.1)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.expertise-card:hover .expertise-icon {
  transform: rotate(-10deg) scale(1.1);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 0 5px rgba(10, 165, 166, 0.3),
    0 0 20px rgba(10, 165, 166, 0.5);
}

.expertise-icon i {
  font-size: 28px;
  color: white;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Title and Description */
.expertise-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  position: relative;
}

.expertise-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 2px;
  transition: width 0.3s ease;
}

.expertise-card:hover .expertise-title::after {
  width: 70px;
}

.expertise-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
  flex-grow: 1;
}

/* Hover Content */
.expertise-hover-content {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease, max-height 0.5s ease;
}

.expertise-card:hover .expertise-hover-content {
  opacity: 1;
  max-height: 200px;
}

.expertise-details {
  list-style: none;
  padding-left: 0;
}

.expertise-details li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.expertise-details li i {
  color: var(--primary-color);
  margin-right: 8px;
  font-size: 0.8rem;
}

/* Footer Tag */
.expertise-footer {
  margin-top: 15px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.expertise-tag {
  display: inline-block;
  background: rgba(10, 165, 166, 0.2);
  color: var(--primary-color);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(10, 165, 166, 0.3);
}

/* Navigation Dots */
.expertise-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  gap: 12px;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  padding: 0;
}

.nav-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.nav-dot:hover,
.nav-dot.active {
  background: var(--primary-color);
  transform: scale(1.1);
}

.nav-dot.active::before {
  border-color: var(--primary-color);
  opacity: 0.5;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .expertise-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .expertise-cards {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .expertise-card {
    padding: 30px 25px;
  }

  .expertise-icon-wrapper {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
  }

  .expertise-icon {
    width: 60px;
    height: 60px;
  }

  .expertise-title {
    font-size: 1.3rem;
  }

  .expertise-nav {
    overflow-x: auto;
    padding-bottom: 10px;
    justify-content: flex-start;
  }
}

/* Animation for when in viewport */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header.visible h2,
.section-header.visible p {
  animation: fadeIn 0.8s forwards;
}

.section-header h2 {
  opacity: 0;
}

.section-header p {
  opacity: 0;
  animation-delay: 0.2s;
}

/* Mobile improvements */
@media (max-width: 576px) {
  .capabilities-section {
    padding: 70px 0;
  }

  .expertise-card {
    padding: 25px 20px;
  }

  .expertise-title {
    font-size: 1.2rem;
  }

  .expertise-hover-content {
    display: block;
    opacity: 1;
    max-height: unset;
  }
}

/* Dark/Light mode adaptations */
@media (prefers-color-scheme: light) {
  .expertise-card {
    background: rgba(245, 245, 245, 0.75);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  }

  .expertise-desc,
  .expertise-details li {
    color: #555;
  }

  .expertise-title {
    color: #333;
  }
}
