/* ==========================================================================
   ATAUR DIGITAL MARKETING AGENCY - PREMIUM GLOSSY SERVICE BOXES
   Pixel-Perfect Vertical Rhythm & Alignment System:
   - Unified Header Height (154px) across all card titles (1, 2, or 3 lines)
   - Synchronized Description Line Heights (4.4rem)
   - Uniform Deliverable Tags (min-height: 68px, exactly 2 rows)
   - Level Button Alignment with Zero Awkward Gaps
   ========================================================================== */

/* ---------- Grid Layouts ---------- */
.services-grid-12,
.services-pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: stretch;
}

@media (max-width: 1080px) {
  .services-grid-12,
  .services-pillar-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
}

@media (max-width: 680px) {
  .services-grid-12,
  .services-pillar-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ---------- Glossy Service Box Container ---------- */
.svc-box {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 26px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px var(--shadow);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease,
              box-shadow 0.38s ease;
  height: 100%;
}

/* Dark Mode Gloss & Depth */
[data-theme="dark"] .svc-box {
  background: #0d0d12;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 45px -10px rgba(0, 0, 0, 0.75),
              inset 0 1px 1px rgba(255, 255, 255, 0.16);
}

/* Light Mode Gloss & Contrast */
[data-theme="light"] .svc-box {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.08),
              inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

/* Glossy Top Edge Highlight */
.svc-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25) 30%, var(--red) 70%, transparent);
  z-index: 3;
  opacity: 0.6;
  transition: opacity 0.35s ease, height 0.35s ease;
}

/* Hover Elevation & Reflex Glow */
.svc-box:hover {
  transform: translateY(-8px);
  border-color: rgba(215, 38, 46, 0.55);
}

[data-theme="dark"] .svc-box:hover {
  box-shadow: 0 28px 65px -12px rgba(0, 0, 0, 0.85),
              0 0 35px rgba(215, 38, 46, 0.22),
              inset 0 1px 2px rgba(255, 255, 255, 0.35);
}

[data-theme="light"] .svc-box:hover {
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.14),
              0 0 28px rgba(215, 38, 46, 0.12),
              inset 0 1px 2px rgba(255, 255, 255, 1);
}

.svc-box:hover::before {
  opacity: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--red), #f0c35a, var(--red));
}

/* ---------- Top Header Zone (Pixel-Perfect Unified Height) ---------- */
.svc-box-head {
  position: relative;
  overflow: hidden;
  padding: 24px 22px 20px;
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  min-height: 154px;
  box-sizing: border-box;
  background: radial-gradient(circle at 85% 15%, rgba(215, 38, 46, 0.22) 0%, transparent 60%),
              linear-gradient(180deg, #181822 0%, #101017 100%);
}

[data-theme="light"] .svc-box-head {
  background: radial-gradient(circle at 85% 15%, rgba(215, 38, 46, 0.12) 0%, transparent 60%),
              linear-gradient(180deg, #fbfbfd 0%, #f1f1f5 100%);
}

@media (max-width: 680px) {
  .svc-box-head {
    min-height: auto;
  }
}

/* Animated Tech Grid Overlay */
.svc-box-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: 18px 18px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  pointer-events: none;
  z-index: 0;
  animation: svcGridShift 16s linear infinite;
  opacity: 0.7;
}

[data-theme="light"] .svc-box-grid-bg {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  opacity: 0.8;
}

@keyframes svcGridShift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 36px 36px;
  }
}

/* Head Meta Text (Service Number & Title) */
.svc-box-meta {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.svc-box-num {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}

.svc-box-title {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.34;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 0;
  min-height: 4.6rem;
  display: flex;
  align-items: flex-start;
  transition: color 0.25s ease;
}

[data-theme="light"] .svc-box-title {
  color: var(--text-primary);
}

.svc-box:hover .svc-box-title {
  color: var(--red);
}

@media (max-width: 680px) {
  .svc-box-title {
    min-height: auto;
  }
}

/* ---------- Top-Right Floating Animated Mockup Box ---------- */
.svc-box-preview {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 126px;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: svcPreviewFloat 4.5s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
}

[data-theme="light"] .svc-box-preview {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.svc-box:nth-child(2n) .svc-box-preview { animation-delay: 0.75s; animation-duration: 4.8s; }
.svc-box:nth-child(3n) .svc-box-preview { animation-delay: 1.5s; animation-duration: 4.2s; }
.svc-box:nth-child(4n) .svc-box-preview { animation-delay: 2.25s; animation-duration: 4.6s; }

@keyframes svcPreviewFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.svc-box:hover .svc-box-preview {
  transform: translateY(-7px) scale(1.04);
  border-color: rgba(215, 38, 46, 0.45);
}

/* Mockup Header Row */
.svc-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  gap: 4px;
}

.svc-preview-check {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--red);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(215, 38, 46, 0.55);
  animation: svcCheckPulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes svcCheckPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(215, 38, 46, 0.45);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 14px rgba(215, 38, 46, 0.85);
  }
}

.svc-preview-idx {
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
}

[data-theme="light"] .svc-preview-idx {
  color: var(--text-secondary);
}

.svc-preview-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.svc-preview-act {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

[data-theme="light"] .svc-preview-act {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
}

/* Mockup Body Content (Scanning bar & Skeleton lines) */
.svc-preview-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.svc-preview-bar {
  height: 3px;
  border-radius: 3px;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  width: 75%;
  animation: svcBarScan 3s ease-in-out infinite alternate;
}

@keyframes svcBarScan {
  0% {
    width: 45%;
    opacity: 0.7;
  }
  50% {
    width: 90%;
    opacity: 1;
  }
  100% {
    width: 60%;
    opacity: 0.85;
  }
}

.svc-preview-line {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  transition: opacity 0.2s ease;
}

[data-theme="light"] .svc-preview-line {
  background: rgba(0, 0, 0, 0.12);
}

.svc-preview-line.line-1 { width: 95%; }
.svc-preview-line.line-2 { width: 80%; }
.svc-preview-line.line-3 { width: 55%; }

/* Shimmer wave across skeleton lines */
.svc-box:hover .svc-preview-line {
  animation: svcLineShimmer 1.8s infinite;
}

@keyframes svcLineShimmer {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.6; }
}

/* ---------- Bottom Content Zone (Zero Gaps, Perfect Rhythm) ---------- */
.svc-box-body {
  padding: 22px 22px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.svc-box-desc {
  font-family: var(--font);
  font-size: 0.86rem;
  line-height: 1.58;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
  min-height: 4.4rem;
  display: flex;
  align-items: flex-start;
}

@media (max-width: 680px) {
  .svc-box-desc {
    min-height: auto;
  }
}

/* ---------- Deliverable Tags with Red Checkbox Boxes ---------- */
.svc-box-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 68px;
  align-content: flex-start;
  margin-bottom: 20px;
}

@media (max-width: 680px) {
  .svc-box-tags {
    min-height: auto;
  }
}

.svc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.25s ease;
}

[data-theme="light"] .svc-tag {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

.svc-box:hover .svc-tag {
  border-color: rgba(215, 38, 46, 0.25);
  background: rgba(215, 38, 46, 0.04);
}

.svc-tag-chk {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--red);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  font-weight: 900;
  box-shadow: 0 0 8px rgba(215, 38, 46, 0.4);
  flex-shrink: 0;
}

.svc-tag-text {
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

/* ---------- Prominent Red CTA Button with Arrow Circle ---------- */
.svc-box-foot {
  margin-top: 0;
}

.svc-box-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 16px 11px 22px;
  border-radius: 100px;
  background: var(--red);
  color: #ffffff;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(215, 38, 46, 0.32);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.svc-box-btn:hover {
  background: var(--red-hover);
  box-shadow: 0 10px 28px rgba(215, 38, 46, 0.5);
  transform: translateY(-2px);
  color: #ffffff;
}

.svc-btn-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s ease,
              color 0.2s ease;
  flex-shrink: 0;
}

.svc-box-btn:hover .svc-btn-circle {
  transform: rotate(45deg);
  background: #ffffff;
  color: var(--red-hover);
}
