/* ===== SISTEMA DE TRANSIÇÕES ENTRE PÁGINAS ===== */

/* Page Transition Container */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-lilac) 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease-in-out;
}

.page-transition.active {
    opacity: 1;
    visibility: visible;
}

.page-transition-content {
    text-align: center;
    color: white;
}

.page-transition-logo {
    width: 96px; /* Aumentado 20% de 80px */
    height: 96px; /* Aumentado 20% de 80px */
    margin: 0 auto 1rem;
    animation: pulse-scale 1.5s ease-in-out infinite;
}

.page-transition-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Removido o filtro que deixava o logo branco */
}

.page-transition-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.page-transition-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

/* Page Content Animations */
.page-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.page-content.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animation for Elements */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.stagger-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-item:nth-child(3) { transition-delay: 0.3s; }
.stagger-item:nth-child(4) { transition-delay: 0.4s; }
.stagger-item:nth-child(5) { transition-delay: 0.5s; }
.stagger-item:nth-child(6) { transition-delay: 0.6s; }

/* Slide Transitions */
.slide-in-left {
    transform: translateX(-100%);
    transition: transform 0.5s ease-out;
}

.slide-in-left.active {
    transform: translateX(0);
}

.slide-in-right {
    transform: translateX(100%);
    transition: transform 0.5s ease-out;
}

.slide-in-right.active {
    transform: translateX(0);
}

.slide-in-up {
    transform: translateY(100%);
    transition: transform 0.5s ease-out;
}

.slide-in-up.active {
    transform: translateY(0);
}

.slide-in-down {
    transform: translateY(-100%);
    transition: transform 0.5s ease-out;
}

.slide-in-down.active {
    transform: translateY(0);
}

/* Fade Transitions */
.fade-in-slow {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-in-slow.active {
    opacity: 1;
}

.fade-in-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s ease-out;
}

.fade-in-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Rotation Transitions */
.rotate-in {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
    transition: all 0.6s ease-out;
}

.rotate-in.active {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Bounce Transitions */
.bounce-in {
    opacity: 0;
    transform: scale(0.3);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bounce-in.active {
    opacity: 1;
    transform: scale(1);
}

/* Flip Transitions */
.flip-in-x {
    opacity: 0;
    transform: perspective(400px) rotateX(-90deg);
    transition: all 0.6s ease-out;
}

.flip-in-x.active {
    opacity: 1;
    transform: perspective(400px) rotateX(0deg);
}

.flip-in-y {
    opacity: 0;
    transform: perspective(400px) rotateY(-90deg);
    transition: all 0.6s ease-out;
}

.flip-in-y.active {
    opacity: 1;
    transform: perspective(400px) rotateY(0deg);
}

/* Loading Animations */
.loading-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: loading-dots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes loading-dots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 9998;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Smooth Page Transitions */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease-out;
}

.page-exit {
    opacity: 1;
    transform: translateY(0);
}

.page-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease-in;
}

/* Hover Transitions */
.hover-lift {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.hover-scale {
    transition: transform 0.3s ease-out;
}

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

.hover-rotate {
    transition: transform 0.3s ease-out;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Keyframe Animations */
@keyframes pulse-scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInDown {
    0% {
        transform: translateY(-30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animation Classes */
.animate-slideInLeft {
    animation: slideInFromLeft 0.6s ease-out;
}

.animate-slideInRight {
    animation: slideInFromRight 0.6s ease-out;
}

.animate-slideInTop {
    animation: slideInFromTop 0.6s ease-out;
}

.animate-slideInBottom {
    animation: slideInFromBottom 0.6s ease-out;
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fadeInDown {
    animation: fadeInDown 0.6s ease-out;
}

.animate-zoomIn {
    animation: zoomIn 0.6s ease-out;
}

.animate-bounceIn {
    animation: bounceIn 0.8s ease-out;
}

/* Delay Classes */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* Responsive Animations */
@media (max-width: 768px) {
    .page-transition-logo {
        width: 60px;
        height: 60px;
    }
    
    .page-transition-text {
        font-size: 1rem;
    }
    
    .page-transition-loader {
        width: 30px;
        height: 30px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .page-transition,
    .stagger-item,
    .slide-in-left,
    .slide-in-right,
    .slide-in-up,
    .slide-in-down,
    .fade-in-slow,
    .fade-in-scale,
    .rotate-in,
    .bounce-in,
    .flip-in-x,
    .flip-in-y {
        transition: none;
        animation: none;
    }
    
    .page-content {
        opacity: 1;
        transform: none;
    }
}

