/* =========================================================
   PREMIUM CONTRACTOR / LUXURY DARK SERVICES SECTION
========================================================= */

.sm-services-tabs {
  width: 100%;
  position: relative;
}

.sm-services-tabs.has-fixed-height {
  --sm-services-panel-height: 0px;
}

/* =========================================================
   TOP NAV
========================================================= */

.sm-services-tabs-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 12px;
  padding: 0 0 14px;

  border-bottom: 1px solid rgba(255,255,255,.05);
}

.sm-services-tab-trigger {
  appearance: none;

  border: 1px solid rgba(255,255,255,.10);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.05),
      rgba(255,255,255,.02)
    );

  color: #fff;

  border-radius: 999px;

  padding: 10px 18px;

  font-size: 14px;
  font-weight: 600;

  letter-spacing: -.01em;

  cursor: pointer;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    transform .3s ease,
    background .3s ease,
    border-color .3s ease,
    box-shadow .3s ease;
}

.sm-services-tab-trigger:hover {
  transform: translateY(-2px);

  border-color: rgba(255,255,255,.18);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.04)
    );

  box-shadow:
    0 10px 30px rgba(0,0,0,.22);
}

.sm-services-tab-trigger.is-active {
  color: #111;

  border-color: #ffc13c;

  background:
    linear-gradient(
      135deg,
      #ffd75a,
      #ffc13c
    );

  box-shadow:
    0 10px 34px rgba(255,193,60,.30);
}

/* =========================================================
   PANELS
========================================================= */

.sm-services-tab-panel {
  display: none;
}

.sm-services-tab-panel.is-active {
  display: block;
  height: var(--sm-services-panel-height, auto);
  overflow: hidden;
}

.sm-services-tab-panel.is-animating .sm-service-stack-media,
.sm-services-tab-panel.is-animating .sm-service-stack-copy {
  animation: smServiceIn .6s cubic-bezier(.22,.8,.2,1) both;
}

.sm-services-tab-panel.is-animating .sm-service-stack-copy {
  animation-delay: .08s;
}

.sm-services-tabs.has-fixed-height .sm-services-tab-panel.is-active {
  min-height: var(--sm-services-panel-height, auto);
}

/* =========================================================
   MAIN LAYOUT
========================================================= */

.sm-service-stack {
  display: grid;

  grid-template-columns:
    minmax(0, 1.1fr)
    minmax(0, .9fr);

  gap: 36px;

  align-items: start;

  position: relative;

  isolation: isolate;
}

/* prevents overflow */

.sm-service-stack-copy,
.sm-service-stack-media {
  min-width: 0;
}

/* ensure copy sits above decorative media layers and keeps its own stacking context */
.sm-service-stack-copy {
  position: relative;
  z-index: 3;
}

/* warm ambient glow */

.sm-service-stack::before {
  content: "";

  position: absolute;

  width: 600px;
  height: 600px;

  border-radius: 999px;

  background:
    radial-gradient(
      circle,
      rgba(255,193,60,.10),
      transparent 70%
    );

  top: -220px;
  right: -220px;

  z-index: -1;

  filter: blur(60px);

  pointer-events: none;
}

/* =========================================================
   IMAGE
========================================================= */

.sm-service-stack-media {
  position: relative;

  overflow: hidden;

  border-radius: 30px;

  height: 450px;

  width: 100%;

  border: 1px solid rgba(255,255,255,.08);

  background: rgba(255,255,255,.03);

  box-shadow:
    0 18px 40px rgba(0,0,0,.24);

  isolation: isolate;
}

/* warm glow */

.sm-service-stack-media::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at top right,
      rgba(255,193,60,.12),
      transparent 45%
    );

  z-index: 2;

  pointer-events: none;
}

/* cinematic overlay */

.sm-service-stack-media::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to top,
      rgba(0,0,0,.52),
      rgba(0,0,0,.10) 40%,
      rgba(0,0,0,.02)
    );

  z-index: 1;
}

/* image */

.sm-service-stack-media img {
  width: 100%;
  height: 100%!important;

  object-fit: cover;

  object-position: center;

  display: block;

  transition:
    transform 1.4s cubic-bezier(.22,.8,.2,1),
    filter .6s ease;

  filter:
    saturate(.96)
    contrast(1.02)
    brightness(.98);
}

.sm-service-stack:hover .sm-service-stack-media img {
  transform: scale(1.03);
}

/* =========================================================
   GLASS BUTTON
========================================================= */

.sm-services-accordion-btn {
  position: absolute;

  left: 50%;
  bottom: 28px;

  transform: translateX(-50%);

  z-index: 3;

  min-width: 280px;

  text-align: center;
  text-decoration: none;

  padding: 15px 24px;

  border-radius: 18px;

  color: #fff;

  font-weight: 600;
  font-size: 16px;

  border: 1px solid rgba(255,255,255,.18);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.18),
      rgba(255,255,255,.08)
    );

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow:
    0 12px 34px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.10);

  transition:
    transform .3s ease,
    color .3s ease,
    background .3s ease,
    border-color .3s ease,
    box-shadow .3s ease;
}

.sm-services-accordion-btn:hover {
  transform:
    translateX(-50%)
    translateY(-3px);

  color: #111;

  border-color: #ffc13c;

  background:
    linear-gradient(135deg, #ffd75a, #ffc13c);

  box-shadow:
    0 18px 40px rgba(0,0,0,.34),
    0 0 30px rgba(255,193,60,.18);
}

.sm-services-accordion-btn:focus-visible {
  color: #111;
  border-color: #ffc13c;
  background: linear-gradient(135deg, #ffd75a, #ffc13c);
}



/* =========================================================
   HEADING
========================================================= */

.sm-service-stack-copy h4 {
  margin: 0 0 22px;

  color:var(--e-global-color-uicore_white);
  font-size: 35px;
  line-height: 1.02;
  max-width: 100%;
  font-weight: 900;

  text-transform: none;



  overflow-wrap: anywhere;
}

/* =========================================================
   PARAGRAPH
========================================================= */

.sm-service-stack-copy p {


  color:var(--e-global-color-uicore_light);

  max-width: 100%;
}

/* =========================================================
   TABLE
========================================================= */

.sm-service-stack-table {
  margin-top: 8px;
}

/* headings */

.sm-service-stack-head,
.sm-service-stack-row {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 40px;
}

.sm-service-stack-head {
  padding:6px 0 26px;

  color: #fff;

  font-weight: 700;

  font-size:25px;
}

/* premium playful underline */

.sm-service-stack-head span {
  position: relative;

  display: inline-block;

  width: fit-content;
}

.sm-service-stack-head span:first-child::after,
.sm-service-stack-head span:last-child::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -12px;

  width: 110%;
  height: 14px;

  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='18' viewBox='0 0 160 18'%3E%3Cpath d='M4 12C38 8 68 15 101 11C126 8 144 5 156 8' stroke='%23ffc13c' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");

  background-repeat: no-repeat;
  background-size: contain;

  opacity: .95;
}

/* rows */

.sm-service-stack-row {
  padding: 10px 0;

  border-top:
    1px solid rgba(255,255,255,.05);

  transition:
    transform .25s ease,
    background .25s ease;
}

.sm-service-stack-row:hover {
  transform: translateX(6px);

  background: rgba(255,255,255,.015);
}

.sm-service-stack-row span {
  color: rgba(255,255,255,.88);

  font-size:
    clamp(15px, 1vw, 19px);

  line-height: 1.5;

  display: flex;

  align-items: flex-start;

  gap: 10px;
}

.sm-service-stack-row span img {
  width: 11px;
  height: 11px;

  object-fit: contain;

  flex: 0 0 11px;

  margin-top: .45em;
}

/* =========================================================
   ARROWS
========================================================= */

.sm-services-tabs-arrows {
  display: flex;

  justify-content: center;

  gap: 14px;

  margin-top: 28px;
}

.sm-services-tabs-arrow {
  width: 54px;
  height: 54px;

  border-radius: 999px;

  border:
    1px solid rgba(255,255,255,.12);

  background:
    rgba(255,255,255,.04);

  color: #fff;

  display: inline-flex;

  align-items: center;
  justify-content: center;

  cursor: pointer;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 10px 24px rgba(0,0,0,.22);

  transition:
    transform .25s ease,
    border-color .25s ease,
    background .25s ease;
}

.sm-services-tabs-arrow span {
  font-size: 30px;

  transform: translateY(-1px);
}

.sm-services-tabs-arrow:hover {
  transform: translateY(-3px);

  border-color: #ffc13c;

  background: rgba(255,193,60,.08);
}

/* =========================================================
   ANIMATION
========================================================= */

@keyframes smServiceIn {
  from {
    opacity: 0;

    transform:
      translateY(14px)
      scale(.985);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

  .sm-service-stack {
    grid-template-columns: 1fr;

    gap: 28px;
  }

  .sm-service-stack-copy {
    padding-top: 0;
  }

  .sm-service-stack-media {
    height: 400px;
  }

  .sm-service-stack-copy h4 {
    max-width: 100%;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

  .sm-services-tabs-nav {
    flex-wrap: nowrap;

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    padding-bottom: 10px;
    justify-content: flex-start; /* keep left-aligned scroll on small screens */
    padding-left: 12px;
    padding-right: 12px;
  }

  .sm-services-tab-trigger {
    white-space: nowrap;
    padding: 9px 14px;
    font-size: 13px;
  }

  .sm-service-stack {
    gap: 24px;
  }

  .sm-service-stack-media {
    height: 300px;

    border-radius: 24px;
  }

  .sm-service-stack-copy h4 {
    font-size: clamp(20px, 7.5vw, 40px);

    line-height: 1.02;
  }

  /* keep concerns/benefits side-by-side on mobile as requested */
  .sm-service-stack-head,
  .sm-service-stack-row {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .sm-services-accordion-btn {
    min-width: 220px;
  }
}

/* Compact case-study card variant (use by adding class `sm-case-study--compact`) */
.sm-case-study {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  color: #fff;
  width: 100%;
  max-width: 520px;
  height: 360px;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}

.sm-case-study .case-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(.62) saturate(.98);
}

.sm-case-study .case-content {
  position: absolute;
  left: 22px;
  top: 28px;
  z-index: 4;
  max-width: 56%;
}

.sm-case-study .case-meta {
  font-size: 13px;
  opacity: .9;
  margin-bottom: 8px;
}

.sm-case-study .case-title {
  margin: 0 0 6px;
  font-size: 42px;
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.02em;
  max-width: 100%;
  word-break: break-word;
}

.sm-case-study .case-lead {
  font-size: 15px;
  margin-top: 8px;
  color: var(--e-global-color-uicore_light);
}

.sm-case-study .case-badges {
  position: absolute;
  left: 22px;
  bottom: 18px;
  display: flex;
  gap: 10px;
  z-index: 4;
}

.sm-case-study .case-badge {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 13px;
}

/* Even smaller compact variant for tight slots */
.sm-case-study--compact {
  height: 300px;
}


.sm-case-study--compact .case-title,
.sm-compact .sm-case-study-title {
  font-size: 34px;
}
.sm-case-study--compact .case-content, .sm-compact .sm-case-study-content { max-width: 62%; }

/* Scope compact card tweaks to the related/recent case-study area only */
.sm-related-case-studies .sm-case-study-card,
.sm-case-studies-grid.recent .sm-case-study-card {
  --overlay: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.18));
  background-image: var(--sm-case-bg);
  background-size: cover;
  background-position: center;
  display: block;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.sm-related-case-studies .sm-case-study-card::before,
.sm-case-studies-grid.recent .sm-case-study-card::before{
  content: "";
  position:absolute;inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.36), rgba(0,0,0,.12));
  z-index:1;
}
.sm-related-case-studies .sm-case-study-card .sm-case-study-image-wrapper,
.sm-case-studies-grid.recent .sm-case-study-card .sm-case-study-image-wrapper{position:relative;height:100%;min-height:220px}
.sm-related-case-studies .sm-case-study-card .sm-case-study-content,
.sm-case-studies-grid.recent .sm-case-study-card .sm-case-study-content{position:relative;z-index:2;padding:22px}
.sm-related-case-studies .sm-case-study-card .sm-case-meta,
.sm-case-studies-grid.recent .sm-case-study-card .sm-case-meta{font-size:13px;opacity:.92;margin-bottom:6px;color:rgba(255,255,255,.9)}
.sm-related-case-studies .sm-case-study-card .sm-case-study-title,
.sm-case-studies-grid.recent .sm-case-study-card .sm-case-study-title{font-size:36px;line-height:1.02;margin:0;color:#fff;font-weight:800}

@media (max-width:900px){
  .sm-related-case-studies .sm-case-study-card .sm-case-study-title,
  .sm-case-studies-grid.recent .sm-case-study-card .sm-case-study-title{font-size:26px}
}

/* Homepage: stronger/darker overlay for featured/recent cards */
.home .sm-related-case-studies .sm-case-study-card::before,
.home .sm-case-studies-grid.recent .sm-case-study-card::before,
.home .sm-case-study-card::before{
  background: linear-gradient(180deg, rgba(0,0,0,.82), rgba(0,0,0,.48));
}

/* Single case study page: use same overlay but lighter (smaller) so content remains readable */
body.single-case_study .sm-related-case-studies .sm-case-study-card::before,
body.single-case_study .sm-case-studies-grid.recent .sm-case-study-card::before,
body.single-case_study .sm-case-study-card::before{
  background: linear-gradient(180deg, rgba(0,0,0,.58), rgba(0,0,0,.28));
}

/* Ensure related-grid content appears above overlays/images on single case pages */
body.single-case_study .sm-related-case-studies .sm-case-study-card .sm-case-study-content,
body.single-case_study .sm-case-studies-grid .sm-case-study-card .sm-case-study-content{
  position: relative;
  z-index: 6;
  color: #fff;
}

body.single-case_study .sm-related-case-studies .sm-case-study-card .sm-case-study-image-wrapper,
body.single-case_study .sm-case-studies-grid .sm-case-study-card .sm-case-study-image-wrapper{
  z-index: 1; /* push image wrapper behind content */
}

/* Safety: ensure title is visible */
body.single-case_study .sm-case-study-title,
body.single-case_study .sm-case-study-card .sm-case-study-title{
  color: #fff !important;
}

/* High-specificity enforcement in case other CSS overrides load later */
body.single-case_study .sm-related-case-studies .sm-case-study-card .sm-case-study-content,
body.single-case_study .sm-case-studies-grid .sm-case-study-card .sm-case-study-content{
  position: relative !important;
  z-index: 9999 !important;
  color: #fff !important;
}

body.single-case_study .sm-related-case-studies .sm-case-study-card .sm-case-study-image-wrapper,
body.single-case_study .sm-case-studies-grid .sm-case-study-card .sm-case-study-image-wrapper{
  z-index: 0 !important;
}

body.single-case_study .sm-case-studies-grid .sm-case-study-card::before,
body.single-case_study .sm-related-case-studies .sm-case-study-card::before{
  z-index: 2 !important;
}

/* Force related-case-studies content above images across templates */
.sm-related-case-studies .sm-case-study-card .sm-case-study-content,
.sm-case-studies-grid .sm-related-case-studies .sm-case-study-card .sm-case-study-content{
  position: relative !important;
  z-index: 9999 !important;
  color: #fff !important;
}
.sm-related-case-studies .sm-case-study-card .sm-case-study-image-wrapper,
.sm-case-studies-grid .sm-related-case-studies .sm-case-study-card .sm-case-study-image-wrapper{
  z-index: 0 !important;
  pointer-events: none !important;
}

/* Featured grid from shortcode [case_studies_grid featured="true"] — make it darker for contrast */
.sm-case-studies-grid.sm-grid-featured .sm-case-study-card::before,
.home .sm-case-studies-grid.sm-grid-featured .sm-case-study-card::before {
  background: linear-gradient(180deg, rgba(0,0,0,.88), rgba(0,0,0,.6));
}

