/* Company Profile Cards Style */
.company-profile-cards {
  margin-top: 3rem;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.profile-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #00476B;
}

.profile-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #00476B;
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.875rem;
  background: transparent;
  border: 2px solid #00476B;
  color: #00476B;
  font-size: 1.75rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.card-image {
  width: 100%;
  height: 160px;
  border-radius: 0.875rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.profile-card:hover .card-image img {
  transform: scale(1.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 0.5rem 0.25rem;
  background: #f8fafc;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  word-wrap: break-word;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: #00476B;
  margin-bottom: 0.2rem;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 500;
  line-height: 1.2;
  word-wrap: break-word;
  hyphens: auto;
  max-height: 2.4em;
  overflow: hidden;
}

.card-description {
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

.feature-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: #00476B;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  font-size: 1rem;
}

.feature-text {
  font-size: 0.875rem;
  color: #374151;
  font-weight: 500;
}

.badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.badge {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 2rem;
  font-size: 0.75rem;
  color: #00476B;
  font-weight: 500;
}

.badge i {
  margin-right: 0.375rem;
  font-size: 0.75rem;
}

/* Specific card variations */
.profile-card.rd {
  border-top-color: #00476B;
}

.profile-card.rd .card-icon {
  background: transparent;
  border: 2px solid #00476B;
  color: #00476B;
}

.profile-card.manufacturing {
  border-top-color: #00476B;
}

.profile-card.manufacturing .card-icon {
  background: transparent;
  border: 2px solid #00476B;
  color: #00476B;
}

.profile-card.applications {
  border-top-color: #00476B;
}

.profile-card.applications .card-icon {
  background: transparent;
  border: 2px solid #00476B;
  color: #00476B;
}

/* Responsive design */
@media (max-width: 768px) {
  .cards-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .profile-card {
    padding: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .card-header {
    flex-direction: column;
    text-align: center;
  }
  
  .card-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

/* Animation for card entrance with fallback for all browsers */
@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Default visible state for cards with animation as enhancement */
.profile-card {
  opacity: 1; /* Ensure cards are visible by default */
  transform: translateY(0); /* Ensure cards are in correct position by default */
  animation: cardEntrance 0.6s ease-out; /* Keep animation as enhancement */
}

.profile-card:nth-child(2) {
  animation-delay: 0.2s;
}

.profile-card:nth-child(3) {
  animation-delay: 0.4s;
}

/* Fallback for browsers that might have issues with animations */
@supports not (animation-name: cardEntrance) {
  .profile-card {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}