/**
 * Automation Service Page Stylesheet
 * Page slug: automation
 *
 * @package Code1001
 */

/* =========================================================================
   0. RESET & BASE UTILITIES
   ========================================================================= */
.automation-page {
  width: 100%;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
}

.automation-page .wrap {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* Badges & Tags */
.auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  margin-bottom: 20px;
  width: fit-content;
}

.auto-badge .auto-badge-icon {
  width: 20px;
  height: 11px;
}

.auto-badge.tag-purple {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.25);
}

/* Color Tokens */
.text-cyan { color: #06b6d4 !important; }
.text-blue { color: #3b82f6 !important; }
.text-purple { color: #a78bfa !important; }
.text-green { color: #10b981 !important; }
.text-yellow { color: #b38800 !important; }
.text-red { color: #ef4444 !important; }

.bg-shopify { background: #95bf47 !important; color: #fff; }
.bg-yellow { background: #b38800 !important; color: #000; }
.bg-purple { background: #8b5cf6 !important; color: #fff; }
.bg-slack { background: #4a154b !important; color: #fff; }
.bg-postgres { background: #336791 !important; color: #fff; }
.bg-airtable { background: #fcb400 !important; color: #000; }
.bg-cyan { background: #06b6d4 !important; color: #000; }
.bg-green { background: #10b981 !important; color: #fff; }
.bg-blue { background: #2563eb !important; color: #fff; }
.bg-red { background: #ef4444 !important; color: #fff; }

.tag-green { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); }
.tag-cyan { background: rgba(6, 182, 212, 0.12); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.25); }
.tag-purple { background: rgba(139, 92, 246, 0.12); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.25); }

/* Gradient Accent */
.auto-gradient-text {
  background: linear-gradient(135deg, #ea4b71 0%, #8b5cf6 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

/* Section Header Typography */
.automation-page .sec-head {
  margin-bottom: 48px;
  width: 100%;
}

.automation-page .sec-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ea4b71;
  margin-bottom: 8px;
}

.automation-page .sec-head h2 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 14px;
}

.automation-page .sec-head p {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0;
  max-width: 780px;
}

@media (max-width: 768px) {
  .automation-page .sec-head h2 { font-size: 28px; }
  .automation-page .sec-head p { font-size: 15px; }
}


/* =========================================================================
   1. HERO SECTION (Follows Website Redesign Page Section Style)
   ========================================================================= */
.automation-page .rd-hero {
  padding: 88px 0 60px;
  position: relative;
  text-align: center;
}

.automation-page .rd-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.automation-page .rd-hero-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 480px;
  background: radial-gradient(circle at center, rgba(167, 139, 250, 0.12) 0%, rgba(96, 165, 250, 0.06) 45%, transparent 75%);
  filter: blur(60px);
}

.automation-page .rd-grid-pattern {
  display: none !important;
}

.automation-page .rd-hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
}

.automation-page .rd-kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.automation-page .rd-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 8px #60a5fa;
}

.automation-page .rd-hero-title {
  font-size: 50px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 auto 20px;
  max-width: 960px;
}

.automation-page .rd-hero-title .rd-title-top {
  display: block;
}

.automation-page .rd-hero-title .rd-title-bottom {
  display: block;
}

@media (max-width: 768px) {
  .automation-page .rd-hero-title {
    font-size: 34px;
    line-height: 1.2;
  }
}

.automation-page .rd-gradient-text {
  background: linear-gradient(135deg, var(--text) 30%, var(--text-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.automation-page .rd-hero-lead {
  font-size: 16px;
  line-height: 1.68;
  color: var(--text-dim);
  max-width: 720px;
  margin: 0 auto 32px;
}

.automation-page .rd-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.automation-page .rd-hero-btn {
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.automation-page .rd-hero-btn:hover {
  transform: translateY(-2px);
}

.automation-page .rd-hero-btn .btn-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.automation-page .rd-hero-btn:hover .btn-arrow {
  transform: translateX(4px);
}

.automation-page .rd-hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 12px;
}

.automation-page .rd-hbadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
}

.automation-page .rd-hbadge svg {
  width: 16px;
  height: 16px;
}

.automation-page .rd-icon-green { color: #13a57f; }
.automation-page .rd-icon-blue { color: #60a5fa; }
.automation-page .rd-icon-purple { color: #a78bfa; }

/* Cockpit Window & Canvas Wrapper */
.automation-page .rd-cockpit-wrapper {
  margin-top: 48px;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}

/* Canvas Window Chrome Frame */
.auto-canvas-window {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #101011;
  box-shadow: none;
}

/* Toolbar Header */
.auto-canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #151517;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tb-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mac-window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mac-window-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.d-red { background: #ff5f56; }
.dot.d-yellow { background: #ffbd2e; }
.dot.d-green { background: #27c93f; }

.tb-n8n-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.n8n-header-logo {
  width: 28px;
  height: 15px;
}

.n8n-pipe-title {
  font-size: 12.5px;
  color: #94a3b8;
  font-family: monospace;
}

.n8n-pipe-title strong {
  color: #f1f5f9;
}

.tb-center {
  display: flex;
  align-items: center;
  gap: 14px;
}

.workflow-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
}

.live-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.workflow-exec-counter {
  font-size: 11.5px;
  color: #64748b;
  font-family: monospace;
}

@media (max-width: 640px) {
  .workflow-exec-counter { display: none; }
}

.n8n-btn-test {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  background: #ea4b71;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.n8n-btn-test:hover {
  background: #f43f5e;
  transform: scale(1.03);
}

.n8n-btn-test.running {
  background: #8b5cf6;
  opacity: 0.85;
}

.btn-spin {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =========================================================================
   CANVAS STAGE & SVG NODES GRAPH
   ========================================================================= */
.auto-canvas-stage {
  position: relative;
  width: 100%;
  height: 440px;
  background: #101011;
  overflow: hidden;
}

@media (max-width: 960px) {
  .auto-canvas-stage {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.auto-canvas-stage-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 940px;
}

/* Blueprint Dots Grid Pattern */
.canvas-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* SVG Cables Layer */
.n8n-cables-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.n8n-cable {
  fill: none;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 2.2px;
  stroke-linecap: round;
  transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.n8n-cable:hover,
.n8n-cable.active {
  stroke: #ea4b71;
  stroke-width: 2.8px;
}

.n8n-cable.cable-flowing {
  stroke: #8b5cf6;
  stroke-width: 3px;
  stroke-dasharray: 6 6;
  animation: cableDash 0.8s linear infinite;
}

@keyframes cableDash {
  to { stroke-dashoffset: -24; }
}

/* =========================================================================
   n8n NODE CARDS
   ========================================================================= */
.n8n-node-card {
  position: absolute;
  width: 180px;
  background: #18181c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.n8n-node-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.6);
}

.n8n-node-card.selected-node {
  border-color: #ea4b71 !important;
  box-shadow: 0 0 20px rgba(234, 75, 113, 0.4) !important;
}

.n8n-node-card.pulse-burst {
  animation: nodeAckBurst 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes nodeAckBurst {
  0% { transform: scale(1); border-color: #10b981; }
  50% { transform: scale(1.06); border-color: #10b981; box-shadow: 0 0 25px rgba(16, 185, 129, 0.7); }
  100% { transform: scale(1); }
}

.node-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.node-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.node-icon svg {
  width: 15px;
  height: 15px;
}

.node-meta {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.node-type {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-status-indicator {
  width: 14px;
  height: 14px;
  color: #10b981;
  flex-shrink: 0;
}

.node-status-indicator svg {
  width: 100%;
  height: 100%;
}

.node-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.param-tag {
  font-size: 9.5px;
  font-family: monospace;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.param-status {
  font-size: 9.5px;
  font-weight: 700;
  font-family: monospace;
}

/* Ports on Nodes */
.node-port {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #334155;
  border: 1.5px solid #101011;
  z-index: 6;
}

.port-in {
  left: -5.5px;
  top: calc(50% - 4.5px);
}

.port-out {
  right: -5.5px;
  top: calc(50% - 4.5px);
}

.port-out.out-top {
  right: -5.5px;
  top: 25%;
}

.port-out.out-bottom {
  right: -5.5px;
  top: 75%;
}

/* =========================================================================
   BOTTOM DRAWER: LIVE DATA INSPECTOR
   ========================================================================= */
.auto-canvas-console {
  background: #101011;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.console-tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: #151517;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-items {
  display: flex;
  gap: 8px;
}

.console-tab {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.console-tab:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

.console-tab.active {
  color: #ea4b71;
  background: rgba(234, 75, 113, 0.12);
}

.console-meta-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cm-node-indicator {
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
}

.cm-exec-time {
  font-size: 11px;
  color: #10b981;
  font-family: monospace;
}

@media (max-width: 640px) {
  .console-meta-info { display: none; }
}

.console-panel {
  display: none;
  padding: 14px 18px;
  max-height: 140px;
  overflow-y: auto;
}

.console-panel.active {
  display: block;
}

.console-code {
  margin: 0;
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  color: #cbd5e1;
}

.console-code .k { color: #f43f5e; }
.console-code .s { color: #34d399; }
.console-code .n { color: #38bdf8; }
.console-code .b { color: #fbbf24; }

.exec-ticker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exec-ticker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  font-family: monospace;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
}

.exec-ticker-item.fresh-pulse {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid #10b981;
}

.ti-time { color: #64748b; }
.ti-badge { font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.ti-desc { color: #e2e8f0; flex-grow: 1; }
.ti-ms { color: #10b981; }


/* =========================================================================
   2. AUTOMATION OPPORTUNITIES SECTION
   ========================================================================= */
.auto-sec-opportunities {
  padding: 90px 0;
  background: var(--bg);
}

.opp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .opp-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .opp-grid { grid-template-columns: 1fr; }
}

.opp-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.opp-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.18);
}

.opp-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.opp-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.opp-content h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.35;
}

.opp-content p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 16px;
}

.opp-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}

.opp-bullets li {
  font-size: 12.5px;
  color: var(--text-dim);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}

.opp-bullets li::before {
  content: '✓';
  color: #10b981;
  font-weight: 800;
  flex-shrink: 0;
}


/* =========================================================================
   3. PROCESS MAPPING SECTION
   ========================================================================= */
.auto-sec-mapping {
  padding: 90px 0;
  background: var(--bg);
}

.mapping-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .mapping-timeline { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .mapping-timeline { grid-template-columns: 1fr; }
}

.map-step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.map-step-card:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.4);
}

.map-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.step-num {
  font-size: 28px;
  font-weight: 900;
  color: #ea4b71;
  letter-spacing: -0.04em;
}

.step-line {
  flex-grow: 1;
  height: 2px;
  background: var(--border-soft);
}

.step-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--border-soft);
  color: var(--text-dim);
}

.map-step-card h3 {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.35;
}

.map-step-card p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 18px;
  flex-grow: 1;
}

.step-deliverable {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.deliv-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.deliv-text {
  font-size: 12px;
  font-weight: 700;
  color: #a78bfa;
}


/* =========================================================================
   4. INTEGRATIONS SECTION
   ========================================================================= */
.auto-sec-integrations {
  padding: 90px 0;
  background: var(--bg);
}

.integ-ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 800px) {
  .integ-ecosystem-grid { grid-template-columns: 1fr; }
}

.integ-cat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.2;
}

.cat-pill.tag-purple {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.28);
}

.cat-pill.tag-green {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.28);
}

.cat-pill.tag-cyan {
  background: rgba(6, 182, 212, 0.08);
  color: #0891b2;
  border-color: rgba(6, 182, 212, 0.28);
}

.cat-pill.tag-yellow {
  background: rgba(217, 119, 6, 0.08);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.28);
}

/* Dark Theme Adjustments */
html[data-theme="dark"] .cat-pill.tag-purple {
  background: rgba(167, 139, 250, 0.14);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.25);
}

html[data-theme="dark"] .cat-pill.tag-green {
  background: rgba(19, 165, 127, 0.14);
  color: #13a57f;
  border-color: rgba(19, 165, 127, 0.25);
}

html[data-theme="dark"] .cat-pill.tag-cyan {
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.25);
}

html[data-theme="dark"] .cat-pill.tag-yellow {
  background: rgba(250, 204, 21, 0.16);
  color: #fde047;
  border-color: rgba(250, 204, 21, 0.25);
}

.cat-header h4 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.brand-tags-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 500px) {
  .brand-tags-grid { grid-template-columns: repeat(2, 1fr); }
}

.brand-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--card-2);
  border: 1px solid var(--border-soft);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.brand-item .bi-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.bi-fallback-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* =========================================================================
   5. WORKFLOW DESIGN SECTION
   ========================================================================= */
.auto-sec-design {
  padding: 90px 0;
  background: var(--bg);
}

.design-principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .design-principles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .design-principles-grid { grid-template-columns: 1fr; }
}

.principle-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.principle-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.4);
}

.pr-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pr-icon-box svg {
  width: 18px;
  height: 18px;
}

.principle-card h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.35;
}

.principle-card p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}


/* =========================================================================
   6. MONITORING & OBSERVABILITY SECTION
   ========================================================================= */
.auto-sec-monitoring {
  padding: 90px 0;
  background: var(--bg);
}

.monitoring-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 900px) {
  .monitoring-showcase-grid { grid-template-columns: 1fr; }
}

.mon-card.mon-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mon-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
  margin-bottom: 8px;
}

.mon-card.mon-left h3 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.3;
}

.mon-card.mon-left p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0;
}

.mon-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.metric-pill {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.metric-pill .m-val {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.metric-pill .m-lbl {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 600;
}

/* Simulated Live Terminal */
.mon-terminal-window {
  background: #101011;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.4);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #151517;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.term-bar .t-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.term-bar .t-title {
  margin-left: 8px;
  font-size: 11px;
  color: #94a3b8;
  font-family: monospace;
}

.term-logs {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  color: #cbd5e1;
}

.tl-ts { color: #64748b; }
.tl-ok { color: #38bdf8; font-weight: 700; }
.tl-warn { color: #f59e0b; font-weight: 700; }
.tl-ok.highlight { color: #10b981; }


/* =========================================================================
   7. SECURITY & GOVERNANCE SECTION
   ========================================================================= */
.auto-sec-security {
  padding: 90px 0;
  background: var(--bg);
}

.security-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .security-pillars-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .security-pillars-grid { grid-template-columns: 1fr; }
}

.sec-pillar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.sec-pillar-card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.4);
}

.sec-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.sec-icon-circle svg {
  width: 20px;
  height: 20px;
}

.sec-pillar-card h3 {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.35;
}

.sec-pillar-card p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 18px;
  flex-grow: 1;
}

.pillar-tag {
  font-size: 10.5px;
  font-weight: 800;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: auto;
}


/* =========================================================================
   8. ROI EXAMPLES & INTERACTIVE CALCULATOR
   ========================================================================= */
.auto-sec-roi {
  padding: 90px 0;
  background: var(--bg);
}

.roi-case-studies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

@media (max-width: 900px) {
  .roi-case-studies-grid { grid-template-columns: 1fr; }
}

.case-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.case-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.4);
}

.case-top-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.case-stat {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 4px 0;
}

.stat-unit {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dim);
}

.case-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.35;
}

.case-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
  flex-grow: 1;
}

.case-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cf-metric {
  font-size: 11.5px;
  color: var(--text-dim);
}

.cf-metric strong {
  color: var(--text);
}

/* Interactive Calculator Container */
.roi-calc-container {
  width: 100%;
}

.roi-calc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.2);
}

.calc-header {
  margin-bottom: 32px;
}

.calc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 12px;
}

.calc-header h3 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
}

.calc-header p {
  font-size: 15px;
  color: var(--text-dim);
  margin: 0;
  max-width: 680px;
}

.calc-body-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 36px;
  align-items: center;
}

@media (max-width: 860px) {
  .calc-body-grid { grid-template-columns: 1fr; }
}

.calc-sliders-col {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ci-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ci-label-row label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.ci-val {
  font-size: 14px;
  font-weight: 800;
  color: #ea4b71;
  font-family: monospace;
}

.calc-range {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--border-soft);
  outline: none;
  cursor: pointer;
  accent-color: #ea4b71;
}

.result-box {
  background: var(--card-2);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.res-sub {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.res-big {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.res-breakdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  margin-top: 4px;
}

.res-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  flex: 1;
}

.rp-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.rp-label {
  font-size: 10.5px;
  color: var(--text-faint);
}

.calc-cta-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ea4b71 0%, #8b5cf6 100%);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.calc-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(234, 75, 113, 0.4);
}


/* =========================================================================
   9. FAQ SECTION (HOMEPAGE COMPLIANT)
   ========================================================================= */
.automation-page .sec-faq {
  padding: 90px 0;
  background: var(--bg);
}

.automation-page .sec-faq .sec-head {
  margin-bottom: 40px;
}


/* =========================================================================
   10. CTA SECTION (HOMEPAGE COMPLIANT)
   ========================================================================= */
.automation-page #quote.cta-section {
  padding: 80px 0 100px;
  position: relative;
  background: var(--bg);
}

@media (max-width: 768px) {
  .automation-page #quote.cta-section {
    padding: 60px 0 80px;
  }
}
