/* TrueVantage Redesign - Process & Services Sections */

:root {
  --tv-bg: #0A0A0F;
  --tv-bg-card: #FFFFFF;
  --tv-bg-accent: #111118;
  --tv-coral: #E8453C;
  --tv-coral-light: #FF6B63;
  --tv-white: #F5F5F7;
  --tv-grey100: #E0E0E6;
  --tv-grey300: #9898A6;
  --tv-grey500: #5C5C6E;
  --tv-grey700: #2A2A36;
  --tv-gradient: linear-gradient(135deg, #E8453C 0%, #FF6B63 50%, #E8453C 100%);
}

/* ===== Container ===== */
.tv-sections {
  background: var(--tv-bg);
  font-family: 'Sora', sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* Noise texture overlay */
.tv-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ===== Section: Process ===== */
.tv-process {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 32px 80px;
}

/* ===== Section Headers ===== */
.tv-section-header {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tv-section-header.tv-visible {
  opacity: 1;
  transform: translateY(0);
}

.tv-badge {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--tv-coral-light);
  background: rgba(232, 69, 60, 0.07);
  padding: 8px 20px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.tv-section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  color: var(--tv-white);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 16px;
}

.tv-gradient-text {
  background: var(--tv-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tv-section-header p {
  font-size: 16px;
  color: var(--tv-grey300);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.tv-services .tv-section-header p {
  max-width: 600px;
}

/* ===== Process Steps ===== */
.tv-steps {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 64px;
}

.tv-step {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.tv-step.tv-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Connecting line between steps */
.tv-step-line {
  position: absolute;
  top: 28px;
  left: calc(50% + 32px);
  width: calc(100% - 64px);
  height: 2px;
  background: var(--tv-grey700);
  z-index: 0;
  transition: background 1s ease;
}

.tv-step.tv-visible .tv-step-line {
  background: linear-gradient(90deg, var(--tv-coral), var(--tv-grey700));
}

.tv-step:last-child .tv-step-line {
  display: none;
}

/* Step number circle */
.tv-step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--tv-grey700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--tv-white);
  z-index: 1;
  transition: all 0.5s ease;
  box-shadow: none;
}

.tv-step.tv-visible .tv-step-number {
  background: var(--tv-gradient);
  border: none;
  box-shadow: 0 4px 24px rgba(232, 69, 60, 0.3);
}

.tv-step h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--tv-white);
  margin-top: 20px;
  margin-bottom: 10px;
  text-align: center;
  letter-spacing: -0.02em;
}

.tv-step p {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--tv-grey300);
  text-align: center;
  max-width: 220px;
  margin: 0;
}

/* ===== Divider ===== */
.tv-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(42, 42, 54, 0.38), transparent);
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== Section: Services — full-width dark background wrapper ===== */
.tv-services-bg {
  background: #212121;
  position: relative;
  z-index: 1;
}

/* ===== Section: Services ===== */
.tv-services {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px 100px;
}

/* Headings inside the services section (dark background) */
.tv-services-bg .tv-section-header h2 {
  color: var(--tv-white);
}

.tv-services-bg .tv-section-header p {
  color: var(--tv-grey300);
}

.tv-services-bg .tv-badge {
  background: rgba(232, 69, 60, 0.07);
  color: var(--tv-coral-light);
}

/* Divider between dark process and white services */
.tv-divider {
  display: none;
}

.tv-services .tv-section-header {
  margin-bottom: 56px;
}

.tv-process .tv-section-header {
  margin-bottom: 0;
}

/* ===== Services Grid ===== */
.tv-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ===== Service Card ===== */
.tv-card-wrap {
  perspective: 800px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  /* Fill the grid cell so all cards in a row match height */
  display: flex;
  flex-direction: column;
}

.tv-card-wrap.tv-visible {
  opacity: 1;
  transform: translateY(0);
}

.tv-card {
  background: var(--tv-bg-card);
  border-radius: 20px;
  padding: 32px 28px;
  border: 1px solid #E2E2EA;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* Use flex: 1 so card stretches to fill the wrap (= full grid cell height) */
  flex: 1;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  z-index: 1;
}

.tv-card:hover {
  border-color: rgba(232, 69, 60, 0.25);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(232, 69, 60, 0.08);
}

/* Card shine effect */
.tv-card-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 20px;
}

.tv-card:hover .tv-card-shine {
  opacity: 1;
}

/* Card glow */
.tv-card-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 69, 60, 0.03) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.tv-card:hover .tv-card-glow {
  opacity: 1;
}

/* Card body content wrapper */
.tv-card-body {
  flex: 1;
}

/* Card icon — no container, just the SVG */
.tv-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* Force SVG size — overrides Elementor/theme max-width resets */
.tv-card-icon svg {
  width: 62px !important;
  height: 62px !important;
  min-width: 62px;
  display: block;
  flex-shrink: 0;
}

.tv-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1A1A2E !important;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.tv-card-body > p {
  font-family: 'Sora', sans-serif;
  font-size: 13.5px;
  line-height: 1.75;
  color: #44444F !important;
  margin: 0 0 16px;
}

/* Hide details section in the card (shown only in modal) */
.tv-card-details {
  display: none;
}

/* Tags */
.tv-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.tv-card-tags span {
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--tv-coral);
  background: rgba(232, 69, 60, 0.06);
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

/* Card footer */
.tv-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.tv-card-footer-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #888899 !important;
  transition: color 0.3s ease;
}

.tv-card:hover .tv-card-footer-text {
  color: var(--tv-coral) !important;
}

.tv-card-footer-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.tv-card:hover .tv-card-footer-arrow {
  transform: translateX(4px);
}

/* ===== Modal Overlay ===== */
.tv-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.tv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 15, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tv-modal-overlay.tv-modal-active .tv-modal-backdrop {
  opacity: 1;
}

.tv-modal-box {
  position: relative;
  z-index: 1;
  background: #FFFFFF;
  border-radius: 24px;
  padding: 40px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(232, 69, 60, 0.12);
  border: 1px solid #E2E2EA;
  box-sizing: border-box;
  /* JS sets initial transform for FLIP animation */
}

.tv-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #F2F2F7;
  color: #5C5C6E;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  padding: 0;
}

.tv-modal-close:hover {
  background: rgba(232, 69, 60, 0.1);
  color: #E8453C;
}

/* Modal icon */
.tv-modal-box .tv-card-icon {
  margin-bottom: 0;
}

.tv-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #1A1A2E !important;
  margin: 18px 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.tv-modal-desc {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: #44444F !important;
  margin: 0 0 12px;
}

.tv-modal-divider {
  height: 1px;
  background: #E2E2EA;
  margin: 16px 0 20px;
}

.tv-modal-details {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  line-height: 1.85;
  color: #44444F !important;
  margin: 0 0 24px;
}

/* Tags inside modal */
.tv-modal-box .tv-card-tags {
  margin-bottom: 24px;
}

.tv-modal-actions {
  margin-top: 4px;
}

.tv-modal-actions .tv-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #F5F5F7;
  background: var(--tv-gradient);
  border: none;
  border-radius: 12px;
  padding: 13px 30px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(232, 69, 60, 0.25);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  display: inline-block;
}

.tv-modal-actions .tv-btn:hover {
  box-shadow: 0 6px 28px rgba(232, 69, 60, 0.4);
  transform: translateY(-1px);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .tv-services-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 600px) {
  .tv-services-grid {
    grid-template-columns: 1fr !important;
  }

  .tv-process {
    padding: 60px 20px 50px;
  }

  .tv-services {
    padding: 50px 20px 70px;
  }

  .tv-steps {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .tv-step-line {
    display: none;
  }

  .tv-step {
    min-width: unset;
    width: 100%;
    max-width: 300px;
  }

  .tv-modal-box {
    padding: 28px 24px;
    border-radius: 18px;
  }

  .tv-modal-title {
    font-size: 20px;
  }
}

/* Ensure the consultation form always stacks above the service detail modal */
#consultModal {
  z-index: 100001 !important;
}
