/* === STYLES FOR THE CASE STUDIES GALLERY PAGE === */

/* Using variables from your main style.css for consistency */
:root {
  --primary-color: #8a2be2; /* Keeping your theme's purple */
  --bg-dark: #121212;
  --text-light: #f0f0f0;
  --text-muted: #a0a0a0;
  --card-bg: #1a1a1a;
  --border-color: #333;
}

.case-studies-gallery {
  padding-top: 120px; /* Space below the fixed header */
  padding-bottom: 60px;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
  text-align: left;
}

.case-study-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-study-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.case-study-card .card-image {
  width: 100%;
  height: 200px;
  object-fit: cover; /* Ensures image covers the area */
  border-bottom: 1px solid var(--border-color);
}

.case-study-card .card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Allows content to fill space */
}

.case-study-card .card-category {
  display: inline-block;
  background-color: rgba(138, 43, 226, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  align-self: flex-start; /* Aligns to the left */
}

.case-study-card .card-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.case-study-card .card-description {
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1; /* Pushes the link to the bottom */
  margin-bottom: 1.5rem;
}

.case-study-card .card-link {
  font-weight: 600;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease, gap 0.3s ease;
}

.case-study-card:hover .card-link {
  color: #f0f0f0; /* Change color on hover */
  gap: 1rem;
}

/* Add active state to the navigation link */
.nav-menu .nav-link.active {
    color: var(--primary-color);
    font-weight: 700;
}