/* ================= ANIMATIONS ================= */

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader-finish {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    /* Sem posicionamento relativo ou animações */
}

.logo-loader {
    width: 120px;
    height: auto;
    animation: pulse-logo 2s ease-in-out infinite alternate;
    position: absolute !important;
    top: 55% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

@keyframes pulse-logo {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

/* Mantendo o loader original para compatibilidade */
.loader {
    width: 8rem;
    height: 8rem;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    position: relative;
    animation: spin 1s ease-in-out infinite;
}

.loader:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6rem;
    height: 6rem;
    border: 5px solid transparent;
    border-radius: 50%;
    border-bottom-color: var(--light-color);
    animation: spin-reverse 0.8s ease-in-out infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

/* Success Message Animation */
.success-message {
    text-align: center;
    padding: 3rem;
    animation: fadeIn 0.5s ease;
}

.success-message i {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 2rem;
    animation: bounceIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Hover Animations */
.nav-link {
    position: relative;
    transition: var(--transition);
}

.nav-link::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
}

/* Card Hover Effect */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Button Hover Effect */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

/* Sliding Animation for Hero */
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-content h1,
.hero-content h2,
.hero-content p {
    opacity: 0;
    animation: slideUp 0.8s forwards;
}

.hero-content h2 {
    animation-delay: 0.2s;
}

.hero-content h1 {
    animation-delay: 0.4s;
}

.hero-content p {
    animation-delay: 0.6s;
}

/* Botão não terá efeito de fade-in */
.hero-content .btn {
    opacity: 1; /* Sempre visível */
}

/* Social Media Icons Animation */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
}

/* Pulse Effect for CTA Button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(71, 139, 153, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(71, 139, 153, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(71, 139, 153, 0);
    }
}

.hero-content .btn {
    animation: pulse 2s infinite;
}

/* Form Input Focus Animation */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(71, 139, 153, 0.2);
}

/* Floating Animation for Service Icons */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.service-icon {
    animation: float 4s ease-in-out infinite;
}

/* Section Title Underline Animation */
.section-title h2::after {
    width: 0;
    transition: width 1s ease;
}

.section-title.animated h2::after {
    width: 60px;
}

/* Highlight Animation */
@keyframes highlight {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

.highlight {
    position: relative;
    display: inline-block;
}

.highlight::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 8px;
    bottom: 5px;
    left: 0;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    background-size: 200% 100%;
    z-index: -1;
    animation: highlight 3s ease-in-out infinite;
}

/* Subtle Text Shadow for important headings */
.text-shadow {
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
}

/* Value Cards Tilt Effect */
.values-list li {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    perspective: 1000px;
}

/* Removed counter animations - replaced with slogan card */

/* Typed.js cursor styling */
.typed-cursor {
    color: var(--accent-color);
    font-weight: 400;
    font-size: 5.6rem;
}