/* Enhanced Landing Page Styles with Hover Effects */

/* Compact Module Cards with Hover Expansion */
.module-card-compact {
  background-color: var(--scitex-color-07);
  border: 1px solid var(--scitex-color-06);
  border-radius: var(--border-radius);
  padding: 1rem;
  text-align: left;
  box-shadow: var(--box-shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: auto;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Hover state for expanded view */
.module-card-compact:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  background-color: var(--white);
  border-color: var(--scitex-color-04);
  z-index: 10;
  padding: 1.5rem;
}

/* Module icon and title container */
.module-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.module-card-compact:hover .module-header {
  margin-bottom: 1rem;
}

/* Smaller icons by default */
.module-icon-compact {
  width: 40px;
  height: 40px;
  transition: all 0.3s ease;
}

.module-card-compact:hover .module-icon-compact {
  width: 48px;
  height: 48px;
}

/* Module title */
.module-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: all 0.3s ease;
  margin: 0;
}

.module-card-compact:hover .module-title {
  font-size: 1.25rem;
}

/* Module description - hidden by default */
.module-description {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.module-card-compact:hover .module-description {
  opacity: 1;
  max-height: 100px;
  margin-bottom: 1rem;
}

/* Compact features list */
.module-features-compact {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.module-features-compact li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.3rem;
  color: var(--text-color);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.8;
  transition: all 0.3s ease;
}

/* Expanded features on hover */
.module-card-compact:hover .module-features-compact li {
  white-space: normal;
  opacity: 1;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.module-features-compact li:before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--scitex-color-04);
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.module-card-compact:hover .module-features-compact li:before {
  content: "•";
  font-size: 1rem;
  font-weight: bold;
}

/* Action buttons container */
.module-actions {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.module-card-compact:hover .module-actions {
  opacity: 1;
  padding-top: 1rem;
  border-top: 1px solid var(--scitex-color-06);
}

/* Smaller buttons by default */
.btn-compact {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.module-card-compact:hover .btn-compact {
  padding: 0.35rem 1rem;
  font-size: 0.875rem;
}

/* Coming soon overlay adjustments */
.module-card-compact .coming-soon-overlay {
  transition: all 0.3s ease;
}

.module-card-compact:hover .coming-soon-overlay {
  background: rgba(0, 0, 0, 0.6);
}

/* Grid adjustments for compact cards */
.modules-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Special styling for SciTeX Local card */
.local-card-compact {
  background: linear-gradient(135deg, var(--scitex-color-07) 0%, var(--scitex-color-06) 100%);
}

.local-card-compact:hover {
  background: linear-gradient(135deg, var(--white) 0%, var(--scitex-color-07) 100%);
}

.local-card-compact .module-icon-compact {
  color: var(--scitex-color-02);
}

/* Module preview text */
.module-preview {
  font-size: 0.75rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.5rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.module-card-compact:hover .module-preview {
  opacity: 0.8;
  max-height: 50px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modules-grid-compact {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .module-card-compact {
    min-height: 150px;
  }
  
  /* Always show features on mobile */
  .module-features-compact li {
    white-space: normal;
    opacity: 0.9;
  }
}

/* Animation for smooth transitions */
@keyframes expandCard {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-5px) scale(1.02);
  }
}

/* Focus states for accessibility */
.module-card-compact:focus {
  outline: 2px solid var(--scitex-color-04);
  outline-offset: 2px;
}

.module-card-compact:focus:not(:hover) {
  transform: translateY(-2px);
}

/* Link styling within cards */
.module-card-compact a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.module-card-compact:hover a {
  color: var(--scitex-color-01-dark);
}

/* Pricing link special styling */
.module-pricing-compact {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.module-card-compact:hover .module-pricing-compact {
  opacity: 1;
  transform: translateY(0);
}