/* ============================================
   OTIMIZAÇÕES GLOBAIS - SITE LEVE E SUAVE
   Melhora performance e deixa tudo mais tranquilo
   ============================================ */

/* ============================================
   PERFORMANCE GLOBAL
   ============================================ */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   TRANSFORMAÇÕES OTIMIZADAS
   ============================================ */
.event-card,
.btn,
.event-image {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ============================================
   REDUZIR SOMBRAS PESADAS
   ============================================ */
body {
    text-shadow: none;
}

/* ============================================
   ANIMAÇÕES SUAVES E LEVES
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   MELHORAR TRANSIÇÕES
   ============================================ */
a, button, .btn {
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

/* ============================================
   OTIMIZAR IMAGENS
   ============================================ */
img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
}

/* ============================================
   RESPONSIVIDADE OTIMIZADA
   ============================================ */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

/* ============================================
   PREFERÊNCIA DE MOVIMENTO REDUZIDO
   ============================================ */
@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;
    }
}

/* ============================================
   REDUZIR EFEITOS PESADOS EM MOBILE
   ============================================ */
@media (max-width: 480px) {
    .hero-modern {
        background-attachment: scroll !important;
    }
    
    /* Reduzir número de flocos de neve em mobile */
    #snow-container .snowflake:nth-child(n+50) {
        display: none;
    }
}

/* ============================================
   LAZY LOADING
   ============================================ */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ============================================
   REDUZIR BOX-SHADOWS PESADAS
   ============================================ */
@media (max-width: 768px) {
    .event-card {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
    }
    
    .event-card:hover {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    }
}

