/* ============================================================
   service-page.css — Shared styles for all Rufen service subpages
   ============================================================ */

/* ── Service Hero ── */
.service-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 140px;
  padding-bottom: 80px;
  box-sizing: border-box;
  width: 100%;
}
.service-hero .container {
  width: 100%;
}
.service-hero-orange { --accent-hero: var(--accent-orange); }
.service-hero-green  { --accent-hero: var(--accent-green); }

.service-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid rgba(0, 98, 255, 0.22);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 28px;
}

.service-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.service-hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 1020px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.service-hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.service-hero-actions .btn {
  width: 320px;
  justify-content: center;
  text-align: center;
}
@media (max-width: 768px) {
  .service-hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }
}

/* ── Section alternation ── */
.service-section {
  padding: 80px 0;
}
.service-alt {
  background: rgba(0, 98, 255, 0.025);
}

/* ── Feature grid ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

/* 3D Card Flip System */
.feature-card-wrapper {
  perspective: 1000px;
  cursor: pointer;
  min-height: 250px;
  height: 100%;
}
.feature-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}
.feature-card-wrapper.flipped .feature-card-inner {
  transform: rotateY(180deg);
}

.feature-card-front, .feature-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 16px;
  box-sizing: border-box;
  padding: 28px;
}

.feature-card-front {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  z-index: 2;
  transform: rotateY(0deg);
}
.feature-card-front i {
  width: 28px;
  height: 28px;
  color: var(--accent-blue);
  stroke-width: 1.5;
}
.feature-card-front h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  font-family: var(--font-display);
}

.feature-card-back {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  background: rgba(7, 10, 19, 0.96);
  border: 1px solid rgba(0, 98, 255, 0.25);
  color: #fff;
  transform: rotateY(180deg);
  z-index: 1;
  backdrop-filter: blur(12px);
}
.feature-card-back h5 {
  margin: 0 0 8px 0;
  font-family: var(--font-display);
  color: #38bdf8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.feature-card-back p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
  margin: 0;
}

.feature-card-wrapper:hover .feature-card-front {
  border-color: rgba(0, 98, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.flip-hint {
  margin-top: auto;
  font-size: 0.7rem;
  color: var(--accent-blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.flip-back-hint {
  margin-top: auto;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Use case grid ── */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.usecase-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 14px;
}
.usecase-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(0,98,255,0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
}
.usecase-icon i { width: 20px; height: 20px; }
.usecase-item strong { display: block; font-weight: 600; margin-bottom: 4px; color: var(--text-primary); }
.usecase-item p { font-size: 0.875rem; color: var(--text-secondary); margin: 0; line-height: 1.6; }

/* ── CTA section ── */
.service-cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(0,98,255,0.04) 0%, rgba(255,107,0,0.04) 100%);
}
.service-cta-card {
  padding: 64px 48px;
  text-align: center;
  background: rgba(255,255,255,0.85);
}
.service-cta-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  margin-bottom: 16px;
}
.service-cta-card p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* ── Related cards grid ── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,0.72);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,98,255,0.10);
}
.related-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.related-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

/* ── Split layout (Business Assistants) ── */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 768px) { .split-layout { grid-template-columns: 1fr; } }

.split-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
  margin-bottom: 20px;
}
.split-copy p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}
.highlight-text {
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  color: var(--accent-blue) !important;
}

/* Subscription comparison card */
.sub-comparison { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 500;
}
.sub-bad { color: #ef4444; }
.sub-bad i { color: #ef4444; width: 16px; height: 16px; }
.sub-good { color: #10b981; font-weight: 700; font-size: 0.95rem; }
.sub-good i { color: #10b981; width: 16px; height: 16px; }
.sub-divider {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-blue);
  padding: 8px 0;
  border-top: 1px dashed rgba(0,98,255,0.2);
  border-bottom: 1px dashed rgba(0,98,255,0.2);
  margin: 6px 0;
}

/* Ownership pillars */
.ownership-block {
  padding: 48px;
  background: rgba(255,255,255,0.85);
}
.ownership-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
  margin-bottom: 16px;
}
.ownership-block > p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 40px;
}
.ownership-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}
.pillar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pillar i { width: 24px; height: 24px; color: var(--accent-blue); }
.pillar strong { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.pillar span { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* ── Workflow steps ── */
.workflow-steps {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 48px;
  flex-wrap: wrap;
}
.workflow-step {
  flex: 1;
  min-width: 180px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255,255,255,0.72);
  position: relative;
}
.step-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 0.08em;
}
.workflow-step i { width: 24px; height: 24px; color: var(--accent-blue); }
.workflow-step h4 { font-size: 0.95rem; font-weight: 600; margin: 0; }
.workflow-step p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }
.workflow-arrow {
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: var(--accent-blue);
  opacity: 0.5;
}
@media (max-width: 768px) {
  .workflow-steps { flex-direction: column; }
  .workflow-arrow { transform: rotate(90deg); align-self: center; }
}

/* ── Extended service blocks (other-services) ── */
.extended-service-block {
  padding: 48px;
  background: rgba(255,255,255,0.82);
}
.esb-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.esb-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
}
.esb-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(0,98,255,0.1);
  color: var(--accent-blue);
}
.esb-tag-cta { background: rgba(255,107,0,0.1); color: var(--accent-orange); }
.extended-service-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
  margin-bottom: 16px;
}
.esb-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: 32px;
}
.esb-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.esb-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.esb-feature i { width: 22px; height: 22px; color: var(--accent-blue); flex-shrink: 0; margin-top: 2px; }
.esb-feature strong { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.esb-feature p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* Audit outcomes */
.audit-outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.audit-outcome {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  background: rgba(0,98,255,0.04);
  border: 1px solid rgba(0,98,255,0.1);
  border-radius: 10px;
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.5;
}
.audit-outcome i { width: 18px; height: 18px; color: var(--accent-blue); flex-shrink: 0; }

/* nav active state */
.nav-link.active {
  color: var(--accent-blue);
  font-weight: 600;
}

/* ============================================================
   AI Voice Systems Sandbox Styles
   ============================================================ */
.sandbox-section-subpage {
  border-top: 1px solid rgba(15, 23, 42, 0.03);
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.sandbox-container {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 32px;
  margin-top: 40px;
}

.agent-selector-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 620px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom Scrollbar for Agent List */
.agent-selector-list::-webkit-scrollbar {
  width: 5px;
}
.agent-selector-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.02);
  border-radius: 100px;
}
.agent-selector-list::-webkit-scrollbar-thumb {
  background: rgba(0, 98, 255, 0.15);
  border-radius: 100px;
}

.agent-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 18px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
}
.agent-btn:hover {
  border-color: rgba(0, 98, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}
.agent-btn.active {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--accent-blue);
  box-shadow: 0 8px 20px rgba(0, 98, 255, 0.08), 0 0 0 1px var(--accent-blue);
}

.agent-btn strong {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Console Top Detail Card */
.agent-detail-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  backdrop-filter: blur(10px);
}
.agent-detail-header h3 {
  margin: 0;
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
}
.agent-detail-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1.5;
}
.agent-detail-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.meta-tag {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-display);
}
.meta-tag.blue {
  background: rgba(0, 98, 255, 0.15);
  color: #38bdf8;
}
.meta-tag.gray {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
}

/* Console Styling */
.sandbox-console-wrapper {
  background: #070a13;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  height: 620px;
}
.sandbox-console-header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.console-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
}
.console-badge {
  background: rgba(0, 98, 255, 0.15);
  border: 1px solid rgba(0, 98, 255, 0.3);
  color: #8ab4f8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.console-body-section {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* Dialer Panel */
.dialer-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.dialer-panel input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}
.dialer-panel input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(0, 98, 255, 0.2);
}

/* Voice Waveform visualizer */
.voice-waveform-container {
  height: 36px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 12px;
  padding: 0 12px;
  flex-shrink: 0;
}
.waveform-bar {
  width: 3px;
  height: 6px;
  background: rgba(0, 98, 255, 0.3);
  border-radius: 100px;
  transition: height 0.15s ease, background-color 0.2s ease;
}
.waveform-bar.active {
  background: var(--accent-blue);
  animation: pulseBar 1.2s infinite ease-in-out;
}
.waveform-bar.active:nth-child(even) {
  animation-delay: 0.15s;
}
.waveform-bar.active:nth-child(3n) {
  animation-delay: 0.3s;
}
.waveform-bar.active:nth-child(5n) {
  animation-delay: 0.45s;
}

@keyframes pulseBar {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

/* Transcript Log */
.live-transcript-log {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 16px;
  overflow-y: auto;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 220px;
}
.transcript-msg {
  font-size: 0.85rem;
  line-height: 1.4;
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 10px;
}
.transcript-msg.caller {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.06);
  border-bottom-right-radius: 2px;
  color: #ffffff;
}
.transcript-msg.agent {
  align-self: flex-start;
  background: rgba(0, 98, 255, 0.12);
  border-bottom-left-radius: 2px;
  border: 1px solid rgba(0, 98, 255, 0.2);
  color: #e8f0fe;
}
.transcript-msg.system-msg {
  align-self: center;
  background: transparent;
  color: #8ab4f8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 4px;
  text-align: center;
  max-width: 100%;
}

/* Telemetry Light board */
.telemetry-panel {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.telemetry-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.telemetry-label {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
}
.telemetry-light {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 2px rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
}
.telemetry-light.active-green {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.telemetry-light.active-blue {
  background: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue);
}

/* Terminal Log Lines */
.terminal-logs-window {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  height: 100px;
  overflow-y: auto;
}
.log-line {
  margin-bottom: 4px;
}

@media (max-width: 992px) {
  .sandbox-container {
    grid-template-columns: 1fr;
  }
  .agent-selector-list {
    max-height: 320px;
  }
}

/* Split Hero Columns Layout */
.split-hero-layout {
  text-align: left !important;
}
.split-hero-container {
  display: grid;
  grid-template-columns: 0.95fr 1.2fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
  min-height: 520px;
}
.hero-spacer-left {
  height: 100%;
  pointer-events: none;
}
.hero-copy-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 3;
}

@media (max-width: 992px) {
  .split-hero-container {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    min-height: auto;
  }
  .hero-spacer-left {
    display: none;
  }
  .hero-copy-right {
    align-items: center !important;
  }
  .hero-copy-right .service-hero-title,
  .hero-copy-right .service-hero-sub {
    text-align: center !important;
  }
  .hero-copy-right .service-hero-actions {
    justify-content: center !important;
    width: 100%;
  }
}

.pushed-down-section {
  padding-top: 140px !important;
}

/* Left Text / Right Animation Layout */
.split-hero-container-reverse {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
  min-height: 520px;
}
.hero-spacer-right {
  height: 100%;
  pointer-events: none;
}
.hero-copy-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 3;
}

@media (max-width: 992px) {
  .split-hero-container-reverse {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    min-height: auto;
  }
  .hero-spacer-right {
    display: none;
  }
  .hero-copy-left {
    align-items: center !important;
  }
  .hero-copy-left .service-hero-title,
  .hero-copy-left .service-hero-sub {
    text-align: center !important;
  }
  .hero-copy-left .service-hero-actions {
    justify-content: center !important;
    width: 100%;
  }
}
