/* Efeitos visuais modernos para o site Mosaico das Crianças */

.lazy {
  background-color: #f3f4f6; /* Placeholder cor durante carregamento */
  min-height: 256px; /* Altura mínima para evitar layout shift */
}

/* Padrão sutil de background para seções */
.bg-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Animações para elementos da página */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.float-animation {
  animation: float 6s ease-in-out infinite;
}

/* Efeitos de texto moderno */
.text-shadow-sm {
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.text-glow {
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Efeito de brilho para cartões */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  opacity: 0;
  transform: rotate(30deg);
  background: rgba(255, 255, 255, 0.13);
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.13) 0%,
    rgba(255, 255, 255, 0.13) 77%,
    rgba(255, 255, 255, 0.5) 92%,
    rgba(255, 255, 255, 0.0) 100%
  );
}

.shine-effect:hover::after {
  opacity: 1;
  left: 130%;
  transition: all 0.7s ease-in-out;
}

/* Melhorias visuais para botões */
.pulse-effect:hover {
  animation: pulse 1s;
  box-shadow: 0 0 0 1em rgba(255, 255, 255, 0);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

/* Efeito de sublinhado animado */
.animated-underline {
  position: relative;
}

.animated-underline::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #FFBB38;
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.animated-underline:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Efeito de gradiente animado para fundos */
.animated-gradient {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Gradientes suaves para mosaicos */
.soft-gradient {
  background-image: linear-gradient(
    to right, 
    rgba(254, 226, 226, 0.6), 
    rgba(254, 202, 202, 0.4), 
    rgba(254, 240, 220, 0.5)
  );
  backdrop-filter: blur(8px);
}

.soft-gradient-light {
  background-image: linear-gradient(
    to right, 
    rgba(255, 248, 248, 0.6), 
    rgba(248, 248, 250, 0.5), 
    rgba(252, 252, 252, 0.6)
  );
  backdrop-filter: blur(5px);
}

/* Efeito sutíl de sobreposição para imagens */
.soft-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to bottom, 
    transparent 70%, 
    rgba(0, 0, 0, 0.03) 100%
  );
  opacity: 0.4;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.soft-overlay:hover::before {
  opacity: 0;
}

/* Variação para imagens redondas */
.soft-overlay.rounded-full::before {
  border-radius: 50%;
  background-image: radial-gradient(
    circle, 
    transparent 60%, 
    rgba(0, 0, 0, 0.02) 100%
  );
}

/* Efeitos para o sistema de apadrinhamento */

/* Animação da barra de progresso */
@keyframes progressFill {
  from { width: 0%; }
  to { width: var(--progress-width); }
}

.progress-bar-animated {
  animation: progressFill 1s ease-out forwards;
}

/* Efeito de pulsação para indicar vagas disponíveis */
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.pulse-available {
  animation: pulseGlow 2s infinite;
}

/* Animação de entrada do modal */
@keyframes modalSlideIn {
  from { 
    opacity: 0; 
    transform: scale(0.9) translateY(-20px); 
  }
  to { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

.modal-enter {
  animation: modalSlideIn 0.3s ease-out forwards;
}

/* Estado de carregamento com shimmer */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.loading-shimmer {
  position: relative;
  overflow: hidden;
  background-color: #f3f4f6;
}

.loading-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

/* Indicador de vaga completa */
.fully-sponsored {
  background: linear-gradient(135deg, #10b981, #059669);
  position: relative;
}

.fully-sponsored::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 1.2em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
