/* Manus-inspired Agent Card Design for AIKolab */

/* Card Container */
.agent-card {
  position: relative;
  width: 100%;
  aspect-ratio: 384/420; /* Match exact reference aspect ratio */
  background-color: #FAFAFA; /* Match the reference background color */
  border-radius: 18px; /* Match reference border radius */
  padding: 24px; /* Slightly increased padding */
  margin-bottom: 30px; /* Increased spacing between cards */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03); /* Enhanced layered shadow for better depth */
  display: flex;
  flex-direction: column;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1); /* Slightly longer transition for smoother effect */
  border: 1px solid rgba(0, 0, 0, 0.08); /* Slightly more subtle border */
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
  max-width: 380px; /* Slightly reduced maximum width for better proportions */
  margin-left: auto;
  margin-right: auto;
}

.agent-card:hover {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.07), 0 4px 12px rgba(0, 0, 0, 0.05); /* Enhanced layered shadow on hover */
  transform: translateY(-4px); /* Slightly reduced lift for more subtle effect */
  border-color: rgba(0, 0, 0, 0.12); /* Slightly darker border on hover */
}

/* Category Icon - Hidden as requested */
.agent-category-icon {
  display: none; /* Hide the category icon completely */
}

/* Remove hover icon - as requested */
.agent-hover-icon {
  display: none;
}

/* Stats Line - moved to be positioned near the title */
.agent-stats-line {
  display: flex;
  align-items: center;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 12px; /* Slightly larger for better readability */
  font-weight: 500;
  color: #777;
  margin-left: 12px; /* Add space between title and stats */
  z-index: 2;
  background-color: rgba(240, 240, 240, 0.6); /* Subtle background for better visibility */
  padding: 2px 6px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.agent-card:hover .agent-stats-line {
  background-color: rgba(240, 240, 240, 0.9); /* Darker background on hover */
}

.agent-chat-count {
  display: inline-flex;
  align-items: center;
  margin-right: 5px;
  font-weight: 500;
  color: #666; /* Darker for better contrast */
  font-size: 12px; /* Slightly larger for better readability */
}

/* Seu Badge */
.agent-seu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0; /* Slightly darker for better visibility */
  color: #666;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px; /* Slightly larger for better readability */
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-left: 5px;
}

/* Agent Content */
.agent-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  max-height: 60%; /* Reduced from 66% to ensure more space for the image */
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1); /* Longer transition for smoother effect */
  padding-right: 10px; /* Match reference */
  overflow-y: auto; /* Changed from hidden to auto to always allow scrolling */
  margin-top: 0; /* No top margin needed with padding-top on card */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  padding-bottom: 40px; /* Extra padding at the bottom to prevent overlap with image */
}

.agent-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.agent-card:hover .agent-content {
  max-height: 75%; /* Reduced from 100% to ensure image is still visible */
  overflow-y: auto;
}

/* Gradient Overlay - refined for more subtle fade into image */
.agent-gradient-overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 36%; /* Increased from 32% to cover more area */
  background: linear-gradient(180deg, 
                rgba(250, 250, 250, 0) 0%, 
                rgba(250, 250, 250, 0.7) 35%,
                rgba(250, 250, 250, 0.85) 65%, 
                rgba(250, 250, 250, 0.92) 80%,
                #FAFAFA 100%); /* More refined gradient stops */
  z-index: 1;
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1); /* Longer transition for smoother effect */
  pointer-events: none;
  padding-top: 30px; /* Add padding on top for better transition */
  margin-top: -30px; /* Offset the padding to keep position */
}

.agent-card:hover .agent-gradient-overlay {
  height: 45px; /* Increased from 35px to ensure better coverage */
  opacity: 0.95; /* Adjusted opacity */
}

/* Title container to hold title and stats side by side */
.agent-title-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px; /* Slightly reduced spacing */
  flex-wrap: wrap; /* Allow wrapping on small screens */
  gap: 8px; /* Add gap between title and stats when they wrap */
}

/* Card Title */
.agent-title {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* System fonts for better readability */
  font-size: 19px; /* Slightly larger for better readability */
  font-weight: 600; /* More weight for better visibility */
  color: #1a1a1a; /* Slightly darker for even better contrast */
  margin: 0; /* Remove margin completely */
  line-height: 1.2; /* Match reference */
  transition: color 0.4s ease;
  letter-spacing: -0.01em; /* Slight adjustment for readability */
  flex: 1; /* Allow title to take available space */
  min-width: 60%; /* Ensure the title has enough space */
}

/* Card Description */
.agent-description {
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; /* Adjusted for better readability */
  line-height: 1.45; /* Slightly improved line height for readability */
  color: #444; /* Slightly darker for better contrast */
  margin-bottom: 0;
  padding-bottom: 16px; /* Match reference */
  margin-top: 8px; /* Slightly reduced space after title */
}

/* Image Container - Adjusted to create text-to-image fade effect */
.agent-image {
  position: absolute;
  width: 74%; /* Fine-tuned width */
  height: auto;
  aspect-ratio: 275/210; /* Match reference aspect ratio */
  bottom: -15%; /* Adjusted from -18% to prevent overlap */
  left: 13%; /* Center horizontally */
  overflow: hidden;
  z-index: 1;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); /* Longer transition for smoother effect */
  border-radius: 10px; /* Increased for better visibility */
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.12), 0px 2px 8px rgba(0, 0, 0, 0.08); /* Enhanced layered shadow */
  border: 1px solid rgba(0, 0, 0, 0.1); /* Slightly adjusted border */
}

.agent-card:hover .agent-image {
  bottom: -28%; /* More dramatic movement on hover */
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.15), 0px 4px 12px rgba(0, 0, 0, 0.1); /* Enhanced shadow on hover */
}

.agent-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); /* Longer transition for smoother effect */
}

.agent-card:hover .agent-image img {
  transform: scale(1.02); /* Very subtle scale on hover */
}

/* Hide category buttons as requested */
.agent-category {
  display: none;
}

.agent-category-button {
  display: none;
}

/* Small edit button style enhancement */
.edit-button {
  z-index: 3 !important; /* Ensure it's above all other elements */
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.edit-button:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Responsive adaptations */
@media (max-width: 768px) {
  .agent-card {
    padding: 20px; /* Slightly reduced padding */
    max-width: 360px; /* Slightly reduced max width */
    aspect-ratio: 384/400; /* Slightly shorter cards on tablet */
  }
  
  .agent-title {
    font-size: 17px; /* Slightly smaller on tablet */
    min-width: 100%; /* Full width on tablet */
  }
  
  .agent-description {
    font-size: 14px; /* Slightly smaller */
    line-height: 1.4; /* Slightly tighter */
  }
  
  .agent-stats-line {
    margin-left: 0; /* Reset margin */
    margin-top: 4px; /* Add space when it's below title */
  }
  
  .agent-content {
    max-height: 58%; /* Slightly reduce content height */
    padding-bottom: 50px; /* Increase bottom padding */
  }
  
  .agent-gradient-overlay {
    height: 40%; /* Increase gradient height */
  }
  
  .agent-image {
    width: 72%; /* Slightly narrower */
    bottom: -16%; /* Adjusted position */
    left: 14%; /* Slightly adjusted position */
  }
  
  .agent-card:hover .agent-image {
    bottom: -26%; /* Adjusted hover position */
  }
}

@media (max-width: 576px) {
  .agent-card {
    padding: 16px; /* Further reduced padding */
    max-width: 340px; /* Further reduced max width */
    aspect-ratio: 384/380; /* Even shorter cards on mobile */
  }
  
  .agent-title {
    font-size: 16px; /* Even smaller on mobile */
  }
  
  .agent-description {
    font-size: 14px;
    line-height: 1.35; /* Even tighter on mobile */
  }
  
  .agent-content {
    max-height: 56%; /* Further reduce content height */
    padding-bottom: 60px; /* Increase bottom padding more */
  }
  
  .agent-gradient-overlay {
    height: 44%; /* Increase gradient height even more */
  }
  
  .agent-image {
    width: 76%; /* Slightly wider for visibility */
    bottom: -14%; /* Adjusted position */
    left: 12%; /* Adjusted position */
  }
  
  .agent-card:hover .agent-image {
    bottom: -24%; /* Adjusted hover position */
  }
}

/* Simple fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards; /* Slightly longer animation for smoother effect */
} 