/* ===================================
   BENTO GRID LAYOUT - iOS Style Refinado
   =================================== */

.bento-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  padding: calc(env(safe-area-inset-top) + 80px) 20px calc(env(safe-area-inset-bottom) + 90px);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Base para todos os items */
.bento-item {
  background: var(--glass);
  backdrop-filter: saturate(1.2) blur(20px);
  -webkit-backdrop-filter: saturate(1.2) blur(20px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.bento-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 47, 179, 0.03), rgba(122, 44, 255, 0.03));
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.bento-item:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255, 47, 179, 0.4);
  box-shadow: 0 16px 64px rgba(255, 47, 179, 0.25), 0 0 0 1px rgba(255, 47, 179, 0.1);
}

.bento-item:hover::before {
  opacity: 1;
}

.bento-item:active {
  transform: translateY(-3px) scale(1.01);
  transition: all 0.2s ease;
}

/* Hero Card - Grande e destacado */
.bento-hero {
  grid-column: span 6;
  grid-row: span 2;
  min-height: 420px;
  padding: 0;
  background: linear-gradient(135deg, rgba(122, 44, 255, 0.12), rgba(255, 47, 179, 0.12));
  border: 1px solid rgba(255, 47, 179, 0.15);
}

.bento-hero .hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.bento-hero .hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.bento-hero .particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.bento-hero .hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 24px;
}

.bento-hero .hero-text-simple {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 47, 179, 0.2);
  letter-spacing: 0.02em;
}

.bento-hero .hero-text-simple p {
  margin: 8px 0;
}

/* FlowOFF Card - Médio */
.bento-flowoff {
  grid-column: span 6;
  grid-row: span 2;
  min-height: 380px;
  background: linear-gradient(135deg, rgba(255, 47, 179, 0.1), rgba(0, 208, 255, 0.1));
  border: 1px solid rgba(255, 47, 179, 0.12);
}

.bento-flowoff .flowoff-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.bento-flowoff .flowoff-logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.bento-flowoff .flowoff-title h2 {
  font-size: 1.4rem;
  margin: 0 0 6px 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
}

.bento-flowoff .flowoff-subtitle {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
}

.bento-flowoff .flowoff-description {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 20px;
}

.bento-flowoff .flowoff-cta {
  margin-top: auto;
}

/* WebApp Card */
.bento-webapp {
  grid-column: span 3;
  min-height: 300px;
  background: linear-gradient(135deg, rgba(122, 44, 255, 0.1), rgba(255, 47, 179, 0.08));
  border: 1px solid rgba(122, 44, 255, 0.15);
}

.bento-webapp::after {
  content: '⚡';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.bento-webapp:hover::after {
  opacity: 0.6;
}

/* Dashboard Card */
.bento-dashboard {
  grid-column: span 3;
  min-height: 300px;
  background: linear-gradient(135deg, rgba(0, 208, 255, 0.1), rgba(122, 44, 255, 0.08));
  border: 1px solid rgba(0, 208, 255, 0.15);
}

.bento-dashboard::after {
  content: '📊';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.bento-dashboard:hover::after {
  opacity: 0.6;
}

/* Projetos Ecossistema */
.bento-projects {
  grid-column: span 6;
  min-height: 220px;
  background: linear-gradient(135deg, rgba(255, 47, 179, 0.08), rgba(122, 44, 255, 0.08));
  border: 1px solid rgba(255, 47, 179, 0.12);
}

.bento-projects .projects-logos-title {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px 0;
  text-align: center;
}

.bento-projects .projects-logos-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 16px;
  align-items: center;
  justify-items: center;
}

.bento-projects .project-logo {
  width: 100%;
  max-width: 80px;
  height: auto;
  object-fit: contain;
  filter: brightness(0.9) contrast(1.1);
  transition: all 0.3s ease;
}

.bento-projects .project-logo:hover {
  filter: brightness(1.2) contrast(1.2);
  transform: scale(1.1);
}

/* NEO Card */
.bento-neo {
  grid-column: span 3;
  min-height: 280px;
  background: linear-gradient(135deg, rgba(255, 47, 179, 0.1), rgba(0, 208, 255, 0.08));
  border: 1px solid rgba(255, 47, 179, 0.15);
}

.bento-neo::after {
  content: '🚀';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.bento-neo:hover::after {
  opacity: 0.6;
}

/* Contato Card */
.bento-contact {
  grid-column: span 3;
  min-height: 280px;
  background: linear-gradient(135deg, rgba(122, 44, 255, 0.1), rgba(255, 47, 179, 0.1));
  border: 1px solid rgba(122, 44, 255, 0.15);
}

.bento-contact::after {
  content: '💬';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.bento-contact:hover::after {
  opacity: 0.6;
}

/* NEOFLW Card - Interativo e Expandível */
.bento-neoflw {
  grid-column: span 6;
  grid-row: span 2;
  min-height: 320px;
  background: linear-gradient(135deg, rgba(0, 208, 255, 0.1), rgba(122, 44, 255, 0.1));
  border: 1px solid rgba(0, 208, 255, 0.2);
  cursor: default;
  overflow: visible;
}

.bento-neoflw:hover {
  border-color: rgba(0, 208, 255, 0.4);
}

.neoflw-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  cursor: pointer;
}

.neoflw-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 208, 255, 0.2), rgba(122, 44, 255, 0.2));
  border-radius: 12px;
  color: #00d0ff;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.bento-neoflw:hover .neoflw-icon {
  transform: rotate(360deg);
  background: linear-gradient(135deg, rgba(0, 208, 255, 0.3), rgba(122, 44, 255, 0.3));
}

.neoflw-title-section {
  flex: 1;
}

.neoflw-title-section h3 {
  margin: 0 0 4px 0;
  font-size: 1.4rem;
  color: var(--text);
  font-weight: 700;
  background: linear-gradient(90deg, #00d0ff, #7a2cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.neoflw-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  margin: 0;
}

.neoflw-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.neoflw-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(0, 208, 255, 0.4);
  transform: scale(1.1);
}

.neoflw-toggle svg {
  transition: transform 0.3s ease;
}

.bento-neoflw.expanded .neoflw-toggle svg {
  transform: rotate(180deg);
}

.neoflw-content-collapsed {
  opacity: 1;
  max-height: 200px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bento-neoflw.expanded .neoflw-content-collapsed {
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
}

.neoflw-teaser {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  font-weight: 600;
  font-style: italic;
  margin: 0;
  padding: 16px;
  background: rgba(0, 208, 255, 0.05);
  border-radius: 12px;
  border-left: 3px solid #00d0ff;
}

.neoflw-content-expanded {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bento-neoflw.expanded .neoflw-content-expanded {
  opacity: 1;
  max-height: 2000px;
  margin-top: 20px;
}

.neoflw-section {
  margin-bottom: 24px;
}

.neoflw-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.neoflw-badge-what {
  background: rgba(255, 47, 179, 0.1);
  border: 1px solid rgba(255, 47, 179, 0.2);
  color: #ff2fb3;
}

.neoflw-badge-is {
  background: rgba(0, 208, 255, 0.1);
  border: 1px solid rgba(0, 208, 255, 0.2);
  color: #00d0ff;
}

.badge-icon {
  font-size: 1rem;
}

.neoflw-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.neoflw-list li {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border-left: 2px solid rgba(0, 208, 255, 0.3);
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  transition: all 0.2s ease;
}

.neoflw-list li:hover {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: #00d0ff;
  transform: translateX(4px);
}

.neoflw-journey {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0;
  padding: 20px;
  background: rgba(0, 208, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(0, 208, 255, 0.1);
  overflow-x: auto;
}

.journey-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 100px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d0ff, #7a2cff);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 208, 255, 0.3);
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-content strong {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 600;
}

.step-content span {
  font-size: 0.75rem;
  color: var(--muted);
}

.journey-arrow {
  color: #00d0ff;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  animation: pulseArrow 2s ease-in-out infinite;
}

@keyframes pulseArrow {
  0%, 100% { opacity: 0.6; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(4px); }
}

.neoflw-when {
  margin: 24px 0;
}

.neoflw-when h4 {
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 16px 0;
  font-weight: 600;
}

.neoflw-triggers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.trigger-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(0, 208, 255, 0.1);
  font-size: 0.85rem;
  color: var(--muted);
  transition: all 0.2s ease;
}

.trigger-item:hover {
  background: rgba(0, 208, 255, 0.08);
  border-color: rgba(0, 208, 255, 0.3);
  transform: translateY(-2px);
}

.trigger-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.neoflw-faq {
  margin: 24px 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.neoflw-faq h4 {
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 16px 0;
  font-weight: 600;
}

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

.faq-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(0, 208, 255, 0.2);
  background: rgba(0, 208, 255, 0.05);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.faq-question:hover {
  color: #00d0ff;
}

.faq-question svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: rgba(255, 255, 255, 0.6);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  color: #00d0ff;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 16px;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 16px 16px;
}

.faq-answer p {
  margin: 0 0 12px 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer p strong {
  color: var(--text);
  font-weight: 600;
}

.faq-answer p em {
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

.faq-answer ul,
.faq-answer ol {
  margin: 8px 0 12px 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.faq-answer li {
  margin: 4px 0;
}

.faq-answer a {
  color: #00d0ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.faq-answer a:hover {
  color: #7a2cff;
  text-decoration: underline;
}

.neoflw-cta {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.neoflw-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(0, 208, 255, 0.2), rgba(122, 44, 255, 0.2));
  border: 1px solid rgba(0, 208, 255, 0.3);
  border-radius: 12px;
  color: #00d0ff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.neoflw-link:hover {
  background: linear-gradient(135deg, rgba(0, 208, 255, 0.3), rgba(122, 44, 255, 0.3));
  border-color: rgba(0, 208, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 208, 255, 0.2);
}

.neoflw-link svg {
  transition: transform 0.3s ease;
}

.neoflw-link:hover svg {
  transform: translateX(4px);
}

/* Responsivo para NEOFLW Card */
@media (max-width: 768px) {
  .bento-neoflw {
    grid-column: span 4;
    min-height: 280px;
  }

  .neoflw-journey {
    flex-direction: column;
    gap: 16px;
  }

  .journey-arrow {
    transform: rotate(90deg);
  }

  .neoflw-triggers {
    grid-template-columns: 1fr;
  }

  .faq-question {
    font-size: 0.85rem;
    padding: 12px 14px;
  }

  .faq-answer {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .bento-neoflw {
    grid-column: span 2;
    min-height: 240px;
  }

  .neoflw-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .neoflw-title-section h3 {
    font-size: 1.2rem;
  }

  .neoflw-journey {
    padding: 16px;
  }

  .journey-step {
    min-width: 90px;
  }

  .step-content strong {
    font-size: 0.75rem;
  }

  .step-content span {
    font-size: 0.7rem;
  }

  .step-number {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
}

/* Estilos comuns para cards com conteúdo */
.bento-item h3 {
  font-size: 1.25rem;
  margin: 0 0 14px 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.bento-item p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  flex-grow: 1;
}

/* Thumbs (imagens de preview) */
.bento-item .thumb {
  width: 100%;
  height: 140px;
  border-radius: 14px;
  margin-bottom: 18px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: brightness(0.85) contrast(1.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.bento-item:hover .thumb {
  transform: scale(1.05);
  filter: brightness(1) contrast(1.15);
}

/* Responsivo - Tablet */
@media (max-width: 768px) {
  .bento-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: calc(env(safe-area-inset-top) + 70px) 16px calc(env(safe-area-inset-bottom) + 80px);
  }

  .bento-hero {
    grid-column: span 4;
    min-height: 320px;
  }

  .bento-flowoff {
    grid-column: span 4;
    min-height: 300px;
  }

  .bento-neoflw {
    grid-column: span 4;
    min-height: 280px;
  }

  .bento-webapp,
  .bento-dashboard {
    grid-column: span 2;
    min-height: 240px;
  }

  .bento-projects {
    grid-column: span 4;
  }

  .bento-neo,
  .bento-contact {
    grid-column: span 2;
    min-height: 220px;
  }
}

/* Responsivo - Mobile */
@media (max-width: 480px) {
  .bento-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: calc(env(safe-area-inset-top) + 60px) 12px calc(env(safe-area-inset-bottom) + 70px);
  }
  
  .bento-item {
    padding: 20px;
  }

  .bento-hero {
    grid-column: span 2;
    min-height: 280px;
  }

  .bento-hero .hero-text-simple {
    font-size: 1rem;
  }

  .bento-flowoff {
    grid-column: span 2;
    min-height: 280px;
  }

  .bento-flowoff .flowoff-header {
    flex-direction: column;
    text-align: center;
  }

  .bento-webapp,
  .bento-dashboard,
  .bento-neo,
  .bento-contact {
    grid-column: span 2;
    min-height: 200px;
  }

  .bento-projects {
    grid-column: span 2;
  }

  .bento-projects .projects-logos-section {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .bento-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .bento-item p {
    font-size: 0.88rem;
  }
  
  .bento-item .thumb {
    height: 100px;
    margin-bottom: 12px;
  }
  
  .bento-item::after {
    font-size: 1.5rem;
    top: 16px;
    right: 16px;
  }
}

/* Animação de entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bento-item {
  animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) backwards;
}

.bento-item:nth-child(1) { animation-delay: 0.05s; }
.bento-item:nth-child(2) { animation-delay: 0.1s; }
.bento-item:nth-child(3) { animation-delay: 0.15s; }
.bento-item:nth-child(4) { animation-delay: 0.2s; }
.bento-item:nth-child(5) { animation-delay: 0.25s; }
.bento-item:nth-child(6) { animation-delay: 0.3s; }
.bento-item:nth-child(7) { animation-delay: 0.35s; }
.bento-item:nth-child(8) { animation-delay: 0.4s; }
