
/* Contracts Section */
.contracts-section {
  padding: 100px 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Add a subtle background decoration */
.contracts-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, color-mix(in oklab, var(--primary) 5%, transparent), transparent 70%);
  pointer-events: none;
}

.contracts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px;
}

/* Contract Cards with Images */
.contract-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  height: 100%;
}

.contract-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: color-mix(in oklab, var(--primary) 30%, transparent);
}

/* Image Wrapper */
.contract-image-wrapper {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background-color: #f1f5f9;
}

.contract-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Gradient Overlay for Text Readability if needed, but we have content below now */
.contract-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contract-card:hover .contract-image-wrapper::after {
  opacity: 1;
}

/* Number Styling */
.contract-number {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 10;
  line-height: 1;
}

/* Content Area */
.contract-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.contract-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.contract-card:hover .contract-name {
  color: var(--primary);
}

.contract-name::after {
  content: none;
}

.contract-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .contracts-grid {
    grid-template-columns: 1fr;
  }
  
  .contract-image-wrapper {
    height: 200px;
  }
}
