/* ==========================================================================
   COMO OPERAMOS - INOVANOC
   Seção que mostra o jeito único da empresa trabalhar
   ========================================================================== */

#como-operamos {
  padding: var(--spacing-3xl) 0;
  background: linear-gradient(135deg, var(--background-light) 0%, var(--background-blue) 100%);
  position: relative;
  overflow: hidden;
}

/* Elementos decorativos de fundo */
#como-operamos::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--shadow-blue) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.3;
  z-index: 1;
}

#como-operamos::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--shadow-green) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.2;
  z-index: 1;
}

/* Container principal - layout limpo */
.flex-how {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  gap: var(--spacing-2xl);
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Título e texto principal - topo da seção */
.how-text {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.how-text h2 {
  font-size: var(--font-4xl);
  font-weight: var(--weight-bold);
  color: var(--text-dark);
  margin-bottom: var(--spacing-lg);
  position: relative;
  line-height: var(--leading-tight);
}

.how-text h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-green);
  border-radius: var(--radius-small);
  animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 60px;
    opacity: 1;
  }
}

.how-text p {
  font-size: var(--font-lg);
  color: var(--text-medium);
  line-height: var(--leading-relaxed);
  max-width: 800px;
  margin: 0 auto;
}

/* Container para imagem + cards */
.how-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

/* Lado da imagem */
.how-img {
  display: flex;
  justify-content: center;
  align-items: center;
  transform: perspective(1000px) rotateY(-5deg);
  transition: var(--transition-slow);
}

.how-img:hover {
  transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

.how-img img {
  width: 100%;
  max-width: 450px;
  height: auto;
  border-radius: var(--radius-medium);
  box-shadow:
    0 20px 40px var(--shadow-blue),
    0 10px 20px var(--shadow-medium);
  transition: var(--transition-slow);
  position: relative;
  z-index: 3;
}

/* Efeito de moldura tecnológica */
.how-img::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: var(--gradient-primary);
  border-radius: var(--radius-medium);
  z-index: 1;
  opacity: 0.1;
  transition: var(--transition);
}

.how-img:hover::before {
  opacity: 0.2;
  transform: scale(1.02);
}

/* Cards de características */
.how-features {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.how-feature {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--shadow-light);
  transition: var(--transition);
  border-left: 4px solid var(--primary-green);
  min-height: 70px;
}

.how-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-medium);
  border-left-color: var(--primary-blue);
}

.how-feature-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.how-feature-icon i {
  font-size: 1.4rem;
  color: var(--white);
}

.how-feature:hover .how-feature-icon {
  transform: scale(1.1);
}

.how-feature-text h4 {
  font-size: var(--font-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
  line-height: 1.2;
}

.how-feature-text p {
  font-size: var(--font-sm);
  color: var(--text-medium);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* Elementos decorativos flutuantes */
.tech-elements {
  position: absolute;
  top: 20%;
  right: 10%;
  width: 200px;
  height: 200px;
  opacity: 0.1;
  z-index: 1;
}

.tech-element {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-blue);
  border-radius: 50%;
  animation: float 3s ease-in-out infinite;
}

.tech-element:nth-child(1) {
  top: 0;
  left: 0;
  animation-delay: 0s;
}

.tech-element:nth-child(2) {
  top: 50px;
  right: 0;
  animation-delay: 0.5s;
  border-color: var(--primary-green);
}

.tech-element:nth-child(3) {
  bottom: 0;
  left: 50px;
  animation-delay: 1s;
  border-color: var(--accent-cyan);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Desktop grande */
@media (min-width: 1200px) {
  .how-content {
    gap: var(--spacing-3xl);
  }

  .how-feature {
    min-height: 80px;
    padding: var(--spacing-lg);
  }

  .how-feature-icon {
    width: 55px;
    height: 55px;
  }

  .how-feature-icon i {
    font-size: 1.5rem;
  }

  .how-feature-text h4 {
    font-size: var(--font-xl);
  }

  .how-feature-text p {
    font-size: var(--font-base);
  }
}

/* Tablet */
@media (max-width: 968px) {
  .flex-how {
    gap: var(--spacing-xl);
  }

  .how-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .how-img {
    transform: none;
    order: 1;
  }

  .how-features {
    order: 2;
  }

  .how-text h2 {
    font-size: var(--font-3xl);
  }
}

/* Mobile */
@media (max-width: 768px) {
  #como-operamos {
    padding: var(--spacing-2xl) 0;
  }

  .flex-how {
    gap: var(--spacing-lg);
  }

  .how-content {
    gap: var(--spacing-xl);
  }

  .how-text h2 {
    font-size: var(--font-2xl);
  }

  .how-text p {
    font-size: var(--font-base);
  }

  .how-features {
    gap: var(--spacing-sm);
  }

  .how-feature {
    padding: var(--spacing-md);
    min-height: 60px;
  }

  #como-operamos::before,
  #como-operamos::after {
    display: none;
  }
}

/* Mobile pequeno */
@media (max-width: 480px) {
  .how-img img {
    max-width: 320px;
    border-radius: var(--radius);
  }

  .how-feature {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-sm);
    min-height: auto;
    padding: var(--spacing-md);
  }

  .how-feature-icon {
    width: 40px;
    height: 40px;
  }

  .how-feature-icon i {
    font-size: 1.2rem;
  }

  .how-feature-text h4 {
    font-size: var(--font-base);
  }

  .how-feature-text p {
    font-size: var(--font-xs);
  }
}
