/* DGS Case Study Block */

.dgs-case-study {
  position: relative;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-xl);
}

/* Border radius options */
.dgs-case-study.radius-small {
  border-radius: var(--radius);
}

.dgs-case-study.radius-medium {
  border-radius: var(--space-l);
}

.dgs-case-study.radius-large {
  border-radius: var(--space-xxl);
}

/* Min-height options */
.dgs-case-study.height-small {
  min-height: 400px;
}

.dgs-case-study.height-medium {
  min-height: 500px;
}

.dgs-case-study.height-large {
  min-height: 600px;
}

.dgs-case-study.height-xlarge {
  min-height: 700px;
}

/* Gradient overlay - positioned absolutely to cover entire card */
.dgs-case-study__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Overlay opacity variations */
.dgs-case-study.overlay-light .dgs-case-study__overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    transparent 100%
  );
}

.dgs-case-study.overlay-medium .dgs-case-study__overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 100%
  );
}

.dgs-case-study.overlay-heavy .dgs-case-study__overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

/* Content container - sits above overlay */
.dgs-case-study__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  color: var(--white);
}

/* Logo */
.dgs-case-study__logo {
  margin-bottom: var(--space-xs);
  overflow: visible;
}

.dgs-case-study__logo img {
  max-width: 120px;
  height: auto;
  display: block;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* White filter for logo (when enabled) */
.dgs-case-study__logo.logo-white-filter img {
  filter: brightness(0) invert(1);
}

/* Text content area */
.dgs-case-study__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

/* Heading */
.dgs-case-study__heading {
  font-size: var(--h3);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--white);
}

/* Description wrapper - contains subheading and link inline */
.dgs-case-study__description-wrapper {
  font-size: var(--text-l);
  line-height: 1.5;
  margin: 0;
  color: var(--white);
  opacity: 0.95;
  width: 85%;
}

/* Subheading - now inline */
.dgs-case-study__subheading {
  display: inline;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
  color: inherit;
}

/* Link - now inline with subheading */
.dgs-case-study__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--white);
  text-decoration: none !important;
  font-size: inherit;
  font-weight: 600;
  margin-left: 0.25em;
  transition: all 0.3s ease;
}

.dgs-case-study__link:hover {
  color: var(--white);
  opacity: 0.8;
}

.dgs-case-study__link span {
  text-decoration: none !important;
}

/* Arrow indicator */
.dgs-case-study__arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 1.2em;
  text-decoration: none !important;
}

.dgs-case-study__link:hover .dgs-case-study__arrow {
  transform: translateX(4px);
}

/* Tags container */
.dgs-case-study__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-s);
}

/* Individual tag pill */
.dgs-case-study__tag {
  display: inline-block;
  padding: var(--space-xs) var(--space-s);
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--space-xl);
  color: var(--white);
  font-size: var(--text-s);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.dgs-case-study__tag:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Hover effect for entire card */
.dgs-case-study {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dgs-case-study:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-m);
}

/* Tablet adjustments */
@media (min-width: 768px) {
  .dgs-case-study {
    padding: var(--space-xxl);
  }

  .dgs-case-study__heading {
    font-size: var(--h2);
  }

  .dgs-case-study__logo img {
    max-width: 150px;
  }

  .dgs-case-study__content {
    gap: var(--space-l);
  }
}

/* Desktop adjustments */
@media (min-width: 1024px) {
  .dgs-case-study {
    padding: var(--space-xxl) var(--space-xxl) var(--space-xl);
  }

  .dgs-case-study__heading {
    font-size: var(--h1);
    max-width: 80%;
  }

  .dgs-case-study__subheading {
    max-width: 70%;
  }
}
