/* Custom Portfolio Overrides */

/* Reset case hero image wrapper to stretch full screen and remove rounded corners */
.case-hero-img-wrapper {
  border-radius: 0 !important;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  left: 0 !important;
  right: 0 !important;
  position: relative !important;
  height: 60vh !important;
  overflow: hidden !important;
  margin-bottom: 3.5em !important;
}

.case-hero-img {
  border-radius: 0 !important;
  object-fit: contain !important;
  width: 100% !important;
  height: 100% !important;
}

/* Custom Grid Positioning to support quinconce (alternating layout) */
.service-title {
  font-size: 2.2em !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.2 !important;
  margin-top: 0 !important;
}

/* Explicit grid rules for desktop */
@media (min-width: 992px) {
  .main-grid {
    display: grid !important;
    grid-template-columns: 1fr 0.1fr 1.2fr !important;
    grid-column-gap: 32px !important;
    grid-row-gap: 24px !important;
  }

  /* Odd sections: title on left (col 1), meta/desc on right (col 3) */
  .section:nth-of-type(odd) .service-title {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 3 !important;
    text-align: left !important;
  }

  .section:nth-of-type(odd) .service-meta {
    grid-column: 3 / 4 !important;
    grid-row: 1 / 2 !important;
    margin-top: 0 !important;
  }

  .section:nth-of-type(odd) .service-desc {
    grid-column: 3 / 4 !important;
    grid-row: 2 / 3 !important;
    margin-top: 0 !important;
  }

  /* Even sections: title on right (col 3), meta/desc on left (col 1) */
  .section:nth-of-type(even) .service-title {
    grid-column: 3 / 4 !important;
    grid-row: 1 / 3 !important;
    text-align: left !important;
  }

  .section:nth-of-type(even) .service-meta {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
    margin-top: 0 !important;
  }

  .section:nth-of-type(even) .service-desc {
    grid-column: 1 / 2 !important;
    grid-row: 2 / 3 !important;
    margin-top: 0 !important;
  }
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .case-hero-img-wrapper {
    height: 45vh !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
  }
  
  .main-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }
  
  .service-title {
    font-size: 1.8em !important;
  }
}
