/* ==========================================================================
   Shiners Group - Before & After Evidence Showcase Section Styles
   Matches brand tokens: Inter Tight / Lato, #0073ff, #0c0c0d, #eff5ff, #f9f9fa
   ========================================================================== */

.sg-showcase-section {
  position: relative;
  background-color: #f9f9fa;
  padding: 100px 0;
  overflow: hidden;
  border-top: 1px solid #eaeaea;
  border-bottom: 1px solid #eaeaea;
}

.sg-showcase-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header Area */
.sg-showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 24px;
}

.sg-showcase-header-left {
  max-width: 700px;
}

.sg-showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #eff5ff;
  color: #0073ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 115, 255, 0.18);
}

.sg-showcase-badge::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #0073ff;
  box-shadow: 0 0 8px rgba(0, 115, 255, 0.6);
}

.sg-showcase-title {
  font-family: 'Inter Tight', 'Lato', sans-serif;
  font-size: 40px;
  line-height: 1.15;
  font-weight: 600;
  color: #0c0c0d;
  margin: 0 0 14px 0;
  letter-spacing: -0.5px;
}

.sg-showcase-title strong {
  font-weight: 800;
}

.sg-showcase-title em {
  font-style: italic;
  font-weight: 300;
  color: #0073ff;
}

.sg-showcase-desc {
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #555c66;
  margin: 0;
}

/* Tabs Navigation */
.sg-project-tabs {
  display: flex;
  background: #ffffff;
  padding: 6px;
  border-radius: 100px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  gap: 6px;
}

.sg-tab-btn {
  background: transparent;
  border: none;
  font-family: 'Inter Tight', 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #555c66;
  padding: 10px 22px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.sg-tab-btn:hover {
  color: #0c0c0d;
  background: rgba(0, 115, 255, 0.06);
}

.sg-tab-btn.active {
  background: #0c0c0d;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 12, 13, 0.2);
}

.sg-tab-btn .sg-tab-num {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.6;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 20px;
}

.sg-tab-btn:not(.active) .sg-tab-num {
  background: #e2e8f0;
  color: #0c0c0d;
  opacity: 1;
}

/* Main Content Grid */
.sg-showcase-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 36px;
  align-items: stretch;
  margin-bottom: 36px;
}

/* Interactive Split Slider Container */
.sg-slider-wrapper {
  background: #ffffff;
  border-radius: 20px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.sg-slider-view {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  user-select: none;
  cursor: ew-resize;
  background: #1a1a1a;
  line-height: 0; /* remove inline gap below img */
}

/* After image — sits in normal flow to set the container height */
#sg-slider-after-img.sg-slider-img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

/* Before image — pinned to fill exactly the same area as the after image */
.sg-slider-before-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
  border-right: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.35);
  will-change: width;
  background: #1a1a1a; /* fallback so no after-image bleed through any gap */
}

.sg-slider-before-wrap .sg-slider-img {
  position: absolute;
  top: 0;
  left: 0;
  /* width is set by JS to the full slider-view width */
  height: 100%; /* 100% of container = same rendered height as the after image */
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

/* Draggable Handle */
.sg-slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(0, 115, 255, 0.85);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  cursor: ew-resize;
  pointer-events: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sg-slider-view:hover .sg-slider-handle {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 0 0 4px #0073ff;
}

.sg-slider-handle svg {
  width: 12px;
  height: 12px;
  fill: #0c0c0d;
}

.sg-slider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #ffffff;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}

/* Glass Badges */
.sg-pill-badge {
  position: absolute;
  top: 18px;
  padding: 6px 14px;
  font-family: 'Inter Tight', 'Lato', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 100px;
  z-index: 5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sg-pill-before {
  left: 18px;
  background: rgba(12, 12, 13, 0.75);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sg-pill-after {
  right: 18px;
  background: rgba(0, 115, 255, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 10px rgba(0, 115, 255, 0.4);
}

/* Slider Footer Instruction */
.sg-slider-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 6px 4px 6px;
}

.sg-slider-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #717b88;
}

.sg-slider-hint svg {
  width: 16px;
  height: 16px;
  fill: #0073ff;
}

.sg-current-angle-tag {
  font-size: 13px;
  font-weight: 700;
  color: #0c0c0d;
  background: #eff5ff;
  padding: 4px 12px;
  border-radius: 6px;
}

/* Project Details Card */
.sg-details-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 32px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sg-details-top {
  display: flex;
  flex-direction: column;
}

.sg-project-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sg-project-sector {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0073ff;
}

.sg-project-bullet {
  color: #cbd5e1;
}

.sg-project-id {
  font-size: 12px;
  font-weight: 600;
  color: #838e9c;
}

.sg-project-heading {
  font-family: 'Inter Tight', 'Lato', sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: #0c0c0d;
  margin: 0 0 16px 0;
}

.sg-project-summary {
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
  margin: 0 0 24px 0;
}

/* Impact Highlights List */
.sg-highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.sg-highlight-box {
  background: #f9f9fa;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sg-highlight-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  background: #eff5ff;
  color: #0073ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.sg-highlight-content h5 {
  font-size: 13px;
  font-weight: 700;
  color: #0c0c0d;
  margin: 0 0 2px 0;
}

.sg-highlight-content p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
}

/* Bottom CTA & Button */
.sg-details-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 16px;
}

.sg-cta-note {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.sg-cta-note strong {
  color: #0c0c0d;
}

/* Thumbnails Selector Row */
.sg-thumbnails-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.sg-thumbnails-title {
  font-family: 'Inter Tight', 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #838e9c;
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sg-thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.sg-thumb-card {
  position: relative;
  background: #f9f9fa;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sg-thumb-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.sg-thumb-card.active {
  border-color: #0073ff;
  background: #eff5ff;
  box-shadow: 0 6px 16px rgba(0, 115, 255, 0.15);
}

.sg-thumb-images-wrap {
  position: relative;
  width: 100%;
  height: 95px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
}

.sg-thumb-half {
  width: 50%;
  height: 100%;
  object-fit: cover;
}

.sg-thumb-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1.5px;
  background: #ffffff;
}

.sg-thumb-badge-micro {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
}

.sg-thumb-info {
  display: flex;
  flex-direction: column;
  padding: 0 2px 2px 2px;
}

.sg-thumb-name {
  font-family: 'Inter Tight', 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #0c0c0d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sg-thumb-sub {
  font-size: 11px;
  color: #64748b;
}

/* Animations */
.sg-fade-in {
  animation: sgFadeIn 0.35s ease forwards;
}

@keyframes sgFadeIn {
  from {
    opacity: 0.4;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive Breakpoints */
@media screen and (max-width: 991px) {
  .sg-showcase-grid {
    grid-template-columns: 1fr;
  }

  .sg-slider-view {
    /* height is now driven by the image — no fixed override needed */
  }

  #sg-slider-after-img.sg-slider-img {
    max-height: 420px;
  }

  .sg-thumbnails-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 767px) {
  .sg-showcase-section {
    padding: 60px 0;
  }

  .sg-showcase-title {
    font-size: 28px;
  }

  .sg-slider-view {
    /* height is driven by image */
  }

  #sg-slider-after-img.sg-slider-img {
    max-height: 340px;
  }

  .sg-project-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .sg-tab-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .sg-highlights-grid {
    grid-template-columns: 1fr;
  }

  /* Horizontal scrolling thumbnail strip to keep the section compact */
  .sg-thumbnails-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }

  .sg-thumb-card {
    flex: 0 0 170px;
    width: 170px;
    scroll-snap-align: start;
  }

  /* Move the Evidence Angle Selector directly under the slider
     (above the details card) so users don't have to scroll past
     the project details to pick an angle. */
  .sg-showcase-container {
    display: flex;
    flex-direction: column;
  }

  .sg-showcase-grid {
    display: contents;
  }

  .sg-showcase-header {
    order: 1;
  }

  .sg-slider-wrapper {
    order: 2;
    margin-bottom: 24px;
  }

  .sg-thumbnails-section {
    order: 3;
    margin-bottom: 24px;
  }

  .sg-details-card {
    order: 4;
  }
}

@media screen and (max-width: 479px) {
  .sg-thumb-card {
    flex-basis: 150px;
    width: 150px;
  }

  .sg-slider-view {
    /* height is driven by image */
  }

  #sg-slider-after-img.sg-slider-img {
    max-height: 300px;
  }
}
