/* ═══════════════════════════════════════════════
   Services Grid — Frontend Styles
═══════════════════════════════════════════════ */


.mcb-section .mcb-wrap .mcb-item-n4js0ldv .column_attr {
  margin-top: -26px !important;
}

.sg-section {
  font-family: Arial, sans-serif;
  padding: 40px 20px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sg-wrapper {
  width: 100%;
  max-width: 1600px;
  box-sizing: border-box;
}

.sg-grid {
  display: grid;
  gap: 20px;
  width: 100%;
}

/* ── Card ── */
.sg-card {
  background: #FFFFFF;
  border: 1px solid #F0F0F0 !important;
  border-radius: 20px;
  padding: 31px 25px;
  transition: border-color 0.3s ease;
  position: relative;
  min-height: 160px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: none !important;
}

.sg-card:hover {
  border: 1px solid #35B6FF !important;
  box-shadow: none !important;
}

/* ── Card Top ── */
.sg-card-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.sg-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #191919;
  line-height: 1;
  letter-spacing: 0;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.sg-card-icon {
  width: 50px !important;
  height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  flex-shrink: 0 !important;
  flex: 0 0 50px;
  object-fit: contain;
  align-self: flex-start;
}

/* ── Link ── */
.sg-card-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #778AA9;
  transition: color 0.3s ease;
}

.sg-section .sg-card .sg-card-link,
.sg-section .sg-card .sg-card-link span {
  font-family: 'Syne', sans-serif !important;
  font-style: normal !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

.sg-card-link:hover {
  text-decoration: none;
  color: #778AA9;
}

.sg-card:hover .sg-card-link {
  color: #35B6FF;
}

/* ── Arrow switching ── */
.sg-link-arrows {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 18px;
  height: 14px;
  flex-shrink: 0;
}

.sg-link-arrow-default,
.sg-link-arrow-hover {
  position: absolute;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sg-link-arrow-default {
  opacity: 1;
  transform: scale(1);
}

.sg-link-arrow-hover {
  opacity: 0;
  transform: scale(0.6);
}

.sg-card:hover .sg-link-arrow-default {
  opacity: 0;
  transform: scale(0.6);
}

.sg-card:hover .sg-link-arrow-hover {
  opacity: 1;
  transform: scale(1);
}

/* ── View All Button ── */
.sg-view-all-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.sg-view-all-btn {
  display: inline-flex;
  align-items: center;
  width: 297px;
  height: 55px;
  background: #E2F4FF;
  border-radius: 50px;
  padding: 0 10px 0 26px;
  text-decoration: none;
  transition: transform 0.25s ease;
  box-sizing: border-box;
}

.sg-view-all-btn:hover {
  text-decoration: none !important;
}

.sg-view-all-wrap a:hover {
  text-decoration: none !important;
}

.sg-view-all-text {
  flex: 1;
  white-space: nowrap;
  text-decoration: none !important;
  font-family: 'Syne', sans-serif !important;
  font-weight: 700 !important;
  font-style: normal !important;
  font-size: 22px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  color: #191919 !important;
  text-align: center;
}

.sg-view-all-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  background: #35B6FF;
  border-radius: 50%;
  flex-shrink: 0;
}

.sg-vaa-default,
.sg-vaa-hover {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sg-vaa-default {
  opacity: 1;
  transform: scale(1);
}

.sg-vaa-hover {
  opacity: 0;
  transform: scale(0.6);
}

.sg-view-all-btn:hover .sg-vaa-default {
  opacity: 0;
  transform: scale(0.6);
}

.sg-view-all-btn:hover .sg-vaa-hover {
  opacity: 1;
  transform: scale(1);
}

/* ═══════════════════════════════════════════════
   Scroll Reveal — 3D flip-up unfold + accent glow bloom
   Brisk, staggered, premium. Motion only when allowed.
═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: no-preference) {

  /* Hidden resting state — applied once JS marks the section .sg-reveal.
     Cards lie back on their bottom edge, tilted away & sunk down. */
  .sg-reveal .sg-card,
  .sg-reveal .sg-view-all-wrap {
    --sg-reveal-delay: 0ms;
    opacity: 0;
    transform: perspective(1100px) rotateX(-26deg) translateY(52px) scale(0.97);
    transform-origin: 50% 100%;
    transition:
      opacity   0.7s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--sg-reveal-delay);
    will-change: opacity, transform;
  }

  /* Revealed state — cards spring upright into place. */
  .sg-reveal .sg-card.sg-in,
  .sg-reveal .sg-view-all-wrap.sg-in {
    opacity: 1;
    transform: perspective(1100px) rotateX(0deg) translateY(0) scale(1);
  }

  /* Soft accent glow that blooms from the top edge as each card lands. */
  .sg-reveal .sg-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(
      120% 85% at 50% 0%,
      rgba(53, 182, 255, 0.16),
      transparent 62%
    );
    opacity: 0;
    z-index: 2;
  }

  .sg-reveal .sg-card.sg-in::after {
    animation: sg-glow 0.8s ease-out forwards;
    animation-delay: var(--sg-reveal-delay);
  }

  @keyframes sg-glow {
    0%   { opacity: 0; }
    45%  { opacity: 1; }
    100% { opacity: 0; }
  }
}

/* ── Responsive ──
   Drop to 2 columns for the whole laptop/tablet band (≤1240px). The default
   3-col grid (set inline) was too cramped between ~992px and 1240px and the
   card titles collided with the icons. */
@media (max-width: 1240px) {
  .sg-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .sg-card { padding: 24px 20px; }
  .sg-card-top { gap: 16px; }
  .sg-card-title { font-size: 20px; }
  .sg-card-icon { width: 44px; height: 44px; flex: 0 0 44px; }
}

@media (max-width: 640px) {
  .sg-wrapper { padding: 0 15px; }
  .sg-grid { grid-template-columns: 1fr !important; }
  .sg-card { padding: 20px; min-height: 130px; }
  .sg-card-top { gap: 14px; }
  .sg-card-title { font-size: 18px; }
  .sg-card-icon { width: 40px !important; height: 40px !important; max-width: 40px !important; max-height: 40px !important; flex: 0 0 40px; }
}
