/* Services Animated Tabs - frontend */
/*
  Flatsome-friendly theming:
  - We try to inherit Flatsome CSS variables when available.
  - Fallbacks are provided for non-Flatsome themes.
*/

.sat-services-animated{
  font-family: inherit;

  color: var(--sat-text);
  /* Primary brand color (Flatsome commonly exposes --primary-color) */
  --sat-primary: var(--primary-color, var(--fs-color-primary, #446084));
  --sat-primary-contrast: var(--primary-color-inverse, #ffffff);
  /* Surface / text */
  --sat-surface: var(--fs-color-bg, #ffffff);
  --sat-text: var(--fs-color-text, var(--flatsome-body-color, var(--body-color, #555555)));
  --sat-heading: var(--fs-color-heading, var(--flatsome-heading-color, var(--sat-text)));
  --sat-muted: color-mix(in srgb, var(--sat-text) 90%, transparent);
  /* Derived states */
  --sat-primary-soft: color-mix(in srgb, var(--sat-primary) 10%, transparent);
  --sat-primary-hover: color-mix(in srgb, var(--sat-primary) 85%, #000);
  --sat-border: color-mix(in srgb, var(--sat-primary) 18%, rgba(0,0,0,.12));
  --sat-shadow: 0 14px 40px rgba(0,0,0,.08);
}

/* If color-mix isn't supported, keep a safe, usable fallback */
@supports not (color: color-mix(in srgb, #000 50%, #fff)){
  .sat-services-animated{
  font-family: inherit;

    --sat-primary-soft: rgba(68,96,132,.10);
    --sat-primary-hover: rgba(68,96,132,.85);
    --sat-border: rgba(0,0,0,.12);
  }
}

.sat-section-title{ text-align:center; margin: 0 0 22px; }

.sat-stage{ max-width: 980px; margin: 0 auto; }

.sat-tabs{
  display:flex; justify-content:center; gap:12px;
  margin-bottom:26px; flex-wrap:wrap;
}
.sat-tab{
  font-family: inherit;
  padding:10px 20px;
  border-radius:999px;
  border:1px solid var(--sat-border);
  background: var(--sat-primary-soft);
  cursor:pointer;
  font-size:15px;
  color: var(--sat-text);
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.sat-tab:hover{
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--sat-primary) 45%, rgba(0,0,0,.18));
}
.sat-tab:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sat-primary) 35%, transparent);
}
.sat-tab.is-active{
  background: var(--sat-primary);
  color: var(--sat-primary-contrast);
  border-color: var(--sat-primary);
}

.sat-service{
  display:none;
  border-radius:18px;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.06);
  box-shadow: var(--sat-shadow);
  background: var(--sat-surface);
}
.sat-service.is-active{ display:flex; }

.sat-img{ width:45%; min-height: 320px; background: rgba(0,0,0,.04); }
.sat-img img{ width:100%; height:100%; object-fit:cover; display:block; }

.sat-content{ width:55%; padding:28px 28px 26px; }
.sat-title{ margin:0; font-size:22px; letter-spacing:.2px; color: var(--sat-heading); }

.sat-desc{
  margin:12px 0 14px;
  line-height:1.85;
  color: color-mix(in srgb, var(--sat-text) 88%, transparent);
}
.sat-features{
  margin:0; padding:0; list-style:none;
  display:grid; gap:10px;
}
.sat-features li{
  position:relative;
  padding-inline-start:22px;
}
.sat-features li::before{
  content:"✔";
  position:absolute;
  inset-inline-start:0;
  top:0;
  color: var(--sat-check-color, var(--sat-primary));
}

.sat-btn{
  display:inline-block;
  margin-top:16px;
  padding:10px 18px;
  background: var(--sat-primary);
  color: var(--sat-primary-contrast);
  border-radius:10px;
  font-size:14px;
  text-decoration:none;
  transition: transform .2s ease, background .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.sat-btn:hover{
  transform: translateY(-1px);
  background: var(--sat-primary-hover);
  opacity:.98;
}
.sat-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sat-primary) 35%, transparent);
}

/* ------------------------------------------------------------------
   Variants (flat / boxed / outline) + Templates (default / alt)
   ------------------------------------------------------------------ */

/* Template: Alt (image on the right) */
.sat-template-alt .sat-service.is-active{ flex-direction: row-reverse; }
.sat-template-alt .sat-service.is-play .sat-img{ animation-name: satImgInAlt; }
.sat-template-alt .sat-service.is-play .sat-content{ animation-name: satPanelInAlt; }
@keyframes satImgInAlt{
  from{ opacity:0; transform: translateX(-22px) scale(1.03); filter: blur(2px); }
  to  { opacity:1; transform: translateX(0) scale(1); filter: blur(0); }
}
@keyframes satPanelInAlt{
  from{ opacity:0; transform: translateX(12px); }
  to  { opacity:1; transform: translateX(0); }
}

/* Variant: Flat (lighter surface, minimal shadow) */
.sat-variant-flat .sat-service{
  box-shadow: none;
  border-color: var(--sat-border);
}
.sat-variant-flat .sat-tab{ background: transparent; }
.sat-variant-flat .sat-tab.is-active{ background: var(--sat-primary); }

/* Variant: Boxed (stronger card feel) */
.sat-variant-boxed .sat-service{
  box-shadow: 0 18px 55px rgba(0,0,0,.12);
  border-color: color-mix(in srgb, var(--sat-primary) 14%, rgba(0,0,0,.12));
}

/* Variant: Outline (match Flatsome outline button idea) */
.sat-variant-outline .sat-btn{
  background: transparent;
  color: var(--sat-primary);
  border: 2px solid var(--sat-primary);
}
.sat-variant-outline .sat-btn:hover{
  background: var(--sat-primary);
  color: var(--sat-primary-contrast);
}

/* Make sure Flatsome button classes don't break our layout */
.sat-services-animated .sat-btn.button{ line-height: normal; }
.sat-services-animated .sat-btn.button.primary{ text-decoration:none; }
.sat-services-animated .sat-btn.button.is-outline{ background: transparent; }

/* Animations */
.sat-service.is-play .sat-img{ animation: satImgIn .55s ease both; }
.sat-service.is-play .sat-content{ animation: satPanelIn .45s ease both; }
.sat-service.is-play .sat-title{ animation: satUpFade .45s ease both; animation-delay: .10s; }
.sat-service.is-play .sat-desc{ animation: satUpFade .45s ease both; animation-delay: .18s; }
.sat-service.is-play .sat-features li{
  opacity:0; transform: translateY(10px);
  animation: satUpFade .45s ease both;
}
.sat-service.is-play .sat-features li:nth-child(1){ animation-delay:.26s; }
.sat-service.is-play .sat-features li:nth-child(2){ animation-delay:.34s; }
.sat-service.is-play .sat-features li:nth-child(3){ animation-delay:.42s; }
.sat-service.is-play .sat-features li:nth-child(4){ animation-delay:.50s; }
.sat-service.is-play .sat-features li:nth-child(5){ animation-delay:.58s; }
.sat-service.is-play .sat-features li:nth-child(6){ animation-delay:.66s; }
.sat-service.is-play .sat-btn{
  opacity:0; transform: translateY(10px);
  animation: satUpFade .45s ease both;
  animation-delay:.55s;
}

@keyframes satImgIn{
  from{ opacity:0; transform: translateX(22px) scale(1.03); filter: blur(2px); }
  to  { opacity:1; transform: translateX(0) scale(1); filter: blur(0); }
}
@keyframes satPanelIn{
  from{ opacity:0; transform: translateX(-12px); }
  to  { opacity:1; transform: translateX(0); }
}
@keyframes satUpFade{
  from{ opacity:0; transform: translateY(10px); }
  to  { opacity:1; transform: translateY(0); }
}

@media (max-width: 820px){
  .sat-service.is-active{ flex-direction:column; }
  .sat-img{ width:100%; min-height:220px; }
  .sat-content{ width:100%; }
  @keyframes satImgIn{
    from{ opacity:0; transform: translateY(14px) scale(1.03); filter: blur(2px); }
    to  { opacity:1; transform: translateY(0) scale(1); filter: blur(0); }
  }
}

@media (prefers-reduced-motion: reduce){
  .sat-service.is-play *{ animation: none !important; }
}
