/* Portal Educativo IA & Tecnologia - Estilos Personalizados */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Variáveis CSS customizadas */
:root {
  --sidebar-width: 280px;
  --header-height: 70px;
  --ai-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --ai-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animações personalizadas */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(99, 102, 241, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
  }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Layout responsivo */
.sidebar-mobile-overlay {
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.5);
}

/* Efeitos visuais para cards */
.ai-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--ai-shadow);
  transition: var(--transition-smooth);
}

.ai-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
}

/* Botões com gradiente IA */
.ai-button-primary {
  background: var(--ai-gradient);
  transition: var(--transition-smooth);
}

.ai-button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

/* Tags e badges */
.ai-tag {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #6366f1;
}

/* Galeria de imagens */
.image-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.image-item {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px;
  position: relative;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.image-item:hover img {
  transform: scale(1.05);
}

/* Loading animations */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Navegação - Estilos específicos */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #374151;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
  white-space: normal;
}

.nav-item:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.nav-item.active {
  background: linear-gradient(to right, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
  color: #6366f1;
  border-right: 2px solid #6366f1;
  font-weight: 500;
}

.nav-item i {
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.nav-item span {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #4b5563;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
  text-decoration: none;
  margin-bottom: 0.25rem;
  word-wrap: break-word;
  white-space: normal;
}

.category-item:hover {
  background-color: #f3f4f6;
}

.category-item i {
  flex-shrink: 0;
}

.category-item span {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

/* Responsive design */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 260px;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 100%;
    --header-height: 60px;
  }
  
  .sidebar-mobile {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar-mobile.active {
    transform: translateX(0);
  }
}