/* Gardens Styles */

.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px;
  margin-top: 56px;
}

.case-study-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-study-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.case-study-images {
  display: block;
  position: relative;
  overflow: hidden;
}

.before-after {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.before-img,
.after-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.after-img {
  opacity: 0;
}

.case-study-card:hover .after-img {
  opacity: 1;
}

.ba-labels {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.ba-label {
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #333;
}

.ba-label:last-child {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.case-study-card:hover .ba-label:first-child {
  opacity: 0;
}

.case-study-card:hover .ba-label:last-child {
  opacity: 1;
}

.case-study-content {
  padding: 24px;
}

.case-study-content h3 {
  margin: 0 0 12px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.case-study-content h3 a {
  color: #1f1d18;
  text-decoration: none;
  transition: color 0.2s ease;
}

.case-study-content h3 a:hover {
  color: #5c7a3f;
}

.case-study-content p {
  margin: 0 0 16px 0;
  color: #666;
  line-height: 1.6;
  font-size: 15px;
}

.read-more {
  display: inline-block;
  color: #5c7a3f;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: transform 0.2s ease;
}

.read-more:hover {
  transform: translateX(4px);
}

/* Single Garden */
.breadcrumb {
  margin-bottom: 32px;
}

/* Hero image – full-width banner above article */
.case-study-hero-wrap {
  margin-bottom: 48px;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}

.case-study-hero-img {
  width: 100%;
  max-height: 520px;
  height: auto;
  object-fit: cover;
  display: block;
}

.breadcrumb a {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #5c7a3f;
}

.case-study-single {
  max-width: 900px;
  margin: 0 auto;
}

.case-study-header {
  text-align: center;
  margin-bottom: 48px;
}

.case-study-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 48px;
  font-weight: 600;
  margin: 0;
  color: #1f1d18;
}

.before-after-compare {
  margin-bottom: 48px;
  background: #f8f8f8;
  padding: 32px;
  border-radius: 8px;
}

.compare-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.compare-side {
  position: relative;
}

.compare-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #333;
  z-index: 1;
}

.compare-side img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.case-study-body {
  line-height: 1.8;
  font-size: 17px;
  color: #333;
}

.case-study-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 600;
  color: #1f1d18;
  margin: 48px 0 24px 0;
  line-height: 1.3;
}

.case-study-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: #1f1d18;
  margin: 40px 0 20px 0;
  line-height: 1.3;
}

.case-study-body p {
  margin: 0 0 24px 0;
}

.case-study-body p:last-child {
  margin-bottom: 0;
}

.content-image {
  margin: 32px 0;
  text-align: center;
}

.content-image img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-image figcaption,
.content-image-half figcaption,
.content-video figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: #666;
  font-style: italic;
  text-align: center;
  line-height: 1.5;
}

/* Content video */
.content-video {
  margin: 32px 0;
  text-align: center;
}

.content-video video {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
}

/* Side by side images */
.content-images-sidebyside {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 20px;
  margin: 32px 0;
  width: 100%;
}

.content-image-half {
  margin: 0;
  text-align: center;
  display: block;
}

.content-image-half img {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
}

/* Three images in a row */
.content-images-three {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 20px;
  margin: 32px 0;
  width: 100%;
}

.content-image-third {
  margin: 0;
  text-align: center;
  display: block;
}

.content-image-third img {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
}

/* Four images in a row */
.content-images-four {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr 1fr !important;
  gap: 20px;
  margin: 32px 0;
  width: 100%;
}

.content-image-quarter {
  margin: 0;
  text-align: center;
  display: block;
}

.content-image-quarter img {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .case-studies-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .compare-images {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .case-study-header h1 {
    font-size: 36px;
  }

  .before-after-compare {
    padding: 20px;
  }

  .content-images-sidebyside {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .content-images-three {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .content-images-four {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .ba-toggle-mobile {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    pointer-events: auto;
  }

  .ba-toggle-mobile button {
    background: #fff;
    border: 1px solid #e2ded3;
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 13px;
    font-family: var(--font-display);
    color: #4f6b57;
    font-weight: 500;
    margin: 0 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  }

  .ba-toggle-mobile button.active {
    background: #4f6b57;
    color: #fff;
  }

  .before-after .before-img {
    opacity: 1;
    z-index: 2;
  }

  .before-after .after-img {
    opacity: 0;
    z-index: 1;
  }

  .before-after.show-after .before-img {
    opacity: 0;
    z-index: 1;
  }

  .before-after.show-after .after-img {
    opacity: 1;
    z-index: 2;
  }

  .ba-labels {
    z-index: 2;
    pointer-events: none;

    opacity: 1 !important;
  }

  .ba-label {
    opacity: 0.5;
    transition: opacity 0.3s;
  }

  .before-after:not(.show-after) .ba-label:first-child {
    opacity: 1;
  }

  .before-after:not(.show-after) .ba-label:last-child {
    opacity: 0;
  }

  .before-after.show-after .ba-label:first-child {
    opacity: 0;
  }

  .before-after.show-after .ba-label:last-child {
    opacity: 1;
  }
}

@media (min-width: 769px) {
  .ba-toggle-mobile {
    display: none;
  }
}
