/* ===================================================================
   KRASH DEV OS — AWAINNOVA AI OPERATIVE STYLESHEET
   Page: /tecnologia/ia-operativa
   Theme: Industrial Tech Editorial
   =================================================================== */

:root {
  --ia-navy-dark: #071624;
  --ia-navy-mid: #0A283A;
  --ia-navy-card: rgba(10, 40, 58, 0.78);
  --ia-blue-tech: #004A98;
  --ia-cyan-pure: #44C1E9;
  --ia-green-bio: #61A60E;
  --ia-border: rgba(68, 193, 233, 0.22);
  --ia-border-active: #44C1E9;
  --ia-font-mono: 'IBM Plex Mono', SFMono-Regular, Consolas, monospace;
}

/* Base page structure */
.page-ia-operativa {
  background-color: var(--ia-navy-dark);
  color: #F8FAFC;
  overflow-x: hidden;
}

/* Typography elements — Anti-Slop: Kickers disabled by default */
.ia-kicker {
  display: none !important;
}

.ia-title-h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.ia-title-h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.18;
  color: #FFFFFF;
}

.ia-title-h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  color: #FFFFFF;
}

.ia-lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: #C8D6E5;
  line-height: 1.6;
}

.ia-badge {
  font-family: var(--ia-font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(68, 193, 233, 0.12);
  color: var(--ia-cyan-pure);
  border: 1px solid rgba(68, 193, 233, 0.35);
  font-weight: 600;
}

.ia-badge-success {
  background: rgba(97, 166, 14, 0.14);
  color: #78CD14;
  border: 1px solid rgba(97, 166, 14, 0.4);
}

/* Cards & Containers */
.ia-card {
  background: var(--ia-navy-card);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--ia-border);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.ia-card:hover {
  border-color: rgba(68, 193, 233, 0.45);
}

/* Hero Section */
.ia-hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h, 84px) + 2rem);
  padding-bottom: 4rem;
  overflow: hidden;
}

.ia-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ia-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% center;
}

.ia-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(7, 22, 36, 0.94) 0%,
    rgba(7, 22, 36, 0.82) 42%,
    rgba(7, 22, 36, 0.35) 75%,
    rgba(7, 22, 36, 0.15) 100%
  );
  z-index: 1;
}

@media (max-width: 768px) {
  .ia-hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(7, 22, 36, 0.6) 0%,
      rgba(7, 22, 36, 0.92) 50%,
      rgba(7, 22, 36, 0.98) 100%
    );
  }
}

.ia-hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

/* Buttons */
.ia-btn-primary {
  background: linear-gradient(135deg, var(--ia-cyan-pure), var(--ia-blue-tech));
  color: #071624;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ia-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(68, 193, 233, 0.35);
  color: #071624;
}

.ia-btn-outline {
  background: transparent;
  color: #F8FAFC;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.ia-btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* Interactive Pipeline Section */
.ia-pipeline-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 2rem;
}

.ia-pipeline-btn {
  background: rgba(10, 40, 58, 0.5);
  border: 1px solid var(--ia-border);
  border-radius: 12px;
  padding: 14px 12px;
  color: #A4B0BE;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ia-pipeline-btn:hover,
.ia-pipeline-btn.active {
  background: rgba(68, 193, 233, 0.12);
  border-color: var(--ia-cyan-pure);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.ia-pipeline-step-num {
  font-family: var(--ia-font-mono);
  font-size: 0.72rem;
  color: var(--ia-cyan-pure);
  font-weight: 700;
  display: block;
}

.ia-pipeline-step-name {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Interactive Digital Twin */
.ia-twin-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--ia-border);
}

.ia-twin-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ia-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(68, 193, 233, 0.3);
  border: 2px solid var(--ia-cyan-pure);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.2s, background-color 0.2s;
  z-index: 5;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* WCAG 2.5.5 Touch Target Expansion (48x48px hit area) */
.ia-hotspot::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
}

.ia-hotspot::after {
  content: '';
  width: 10px;
  height: 10px;
  background: #FFFFFF;
  border-radius: 50%;
}

.ia-hotspot:hover,
.ia-hotspot.active {
  transform: translate(-50%, -50%) scale(1.25);
  background: rgba(97, 166, 14, 0.5);
  border-color: var(--ia-green-bio);
  box-shadow: 0 0 20px rgba(68, 193, 233, 0.8);
}

.ia-hotspot-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7, 22, 36, 0.92);
  color: #FFFFFF;
  font-family: var(--ia-font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--ia-border);
  white-space: nowrap;
  pointer-events: none;
  margin-top: 6px;
  display: none;
}

.ia-hotspot:hover .ia-hotspot-label,
.ia-hotspot.active .ia-hotspot-label {
  display: block;
}

/* Reactive vs Predictive Switcher */
.ia-switch-pills {
  display: inline-flex;
  max-width: 100%;
  background: rgba(10, 40, 58, 0.6);
  border: 1px solid var(--ia-border);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 2rem;
}

.ia-switch-pill-btn {
  background: transparent;
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  color: #A4B0BE;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ia-switch-pill-btn.active {
  background: var(--ia-blue-tech);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 74, 152, 0.4);
}

.ia-switch-pill-btn.active.predictive {
  background: linear-gradient(135deg, var(--ia-blue-tech), var(--ia-green-bio));
}

/* Paradigm Card Header */
.ia-paradigm-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .ia-paradigm-header {
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
  }
}

.ia-paradigm-badge {
  flex-shrink: 0;
  white-space: nowrap;
}

.ia-paradigm-desc {
  color: #94A3B8;
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: normal;
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  .ia-card {
    padding: 1.25rem 1rem;
  }
  .ia-switch-pills {
    display: flex;
    width: 100%;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 14px;
    padding: 4px;
  }
  .ia-switch-pill-btn {
    flex: 1 1 50%;
    padding: 10px 8px;
    font-size: 0.8rem;
    border-radius: 10px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Process Intelligence Split Cards */
.ia-split-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--ia-navy-card);
  border: 1px solid var(--ia-border);
  border-radius: 18px;
  overflow: hidden;
}

@media (min-width: 992px) {
  .ia-split-card {
    grid-template-columns: 1fr 1fr;
  }
  .ia-split-card.reverse {
    direction: rtl;
  }
  .ia-split-card.reverse > * {
    direction: ltr;
  }
}

.ia-split-media {
  position: relative;
  width: 100%;
  min-height: 340px;
}

.ia-split-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ia-split-body {
  padding: clamp(1.8rem, 3.5vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Technical HUD box */
.ia-hud-box {
  background: rgba(7, 22, 36, 0.7);
  border-left: 3px solid var(--ia-cyan-pure);
  padding: 12px 16px;
  font-family: var(--ia-font-mono);
  font-size: 0.85rem;
  color: #CBD5E1;
  border-radius: 0 8px 8px 0;
  margin-top: 1.25rem;
}

/* Closing full-bleed hero */
.ia-cierre-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 5rem 1rem;
}

.ia-cierre-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ia-cierre-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ia-cierre-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(7, 22, 36, 0.8) 0%, rgba(7, 22, 36, 0.95) 100%);
  z-index: 1;
}

.ia-cierre-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
