/* Tailwind automatically handles baseline resets, but we can add specific custom CSS for animations and UI quirks here */

/* =========================================================================
   1. ORGANIC ANIMATIONS & TRANSITIONS
   ========================================================================= */

/* Reveal Element on Scroll (Fade-in Up) */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

.reveal-element.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 200ms; }
.reveal-delay-2 { transition-delay: 400ms; }

/* Pulse Animation for CTA Buttons */
@keyframes soft-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 160, 122, 0.4); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 15px rgba(255, 160, 122, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 160, 122, 0); }
}

.btn-pulse {
    animation: soft-pulse 3s infinite;
}

/* Very slow pulse for security badge abstract element */
@keyframes pulse-slow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* =========================================================================
   2. INFINITE CAROUSEL (MARQUEE)
   ========================================================================= */

.marquee-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    padding: 20px 0;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: scroll-marquee 30s linear infinite;
}

/* Pause animation on wrapper hover */
.marquee-wrapper:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes scroll-marquee {
    0% { transform: translateX(0); }
    /* Transform to exactly half the track width (assuming duplicated elements) */
    100% { transform: translateX(calc(-50% - 12px)); } /* -12px accounts for half the gap */
}

/* Hover Dim Effect for Carousel Items */
/* When hovering the track, dim all overlays */
.marquee-track:hover .niche-card .card-overlay {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Highlight the hovered card */
.marquee-track .niche-card:hover .card-overlay {
    background-color: transparent !important;
}

.niche-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.niche-card:hover {
    transform: scale(1.05);
    z-index: 10;
}


/* =========================================================================
   3. BACKGROUND PATTERNS & GLASSMORPHISM
   ========================================================================= */

/* Organic Path line for 'Como Funciona' Section */
/* We use an SVG mask to make it look like a dotted organic trail */
.organic-path {
    mask-image: repeating-linear-gradient(transparent, transparent 10px, black 10px, black 20px);
    -webkit-mask-image: repeating-linear-gradient(transparent, transparent 10px, black 10px, black 20px);
    border-radius: 999px;
}

/* Dots pattern for Security background */
.pattern-dots {
    background-image: radial-gradient(rgba(255,255,255,0.7) 2px, transparent 2px);
    background-size: 30px 30px;
}

/* Header States handled by JS classes */
.header-scrolled {
    background-color: #4A90E2 !important; /* Azul da Identidade */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-hidden {
    transform: translateY(-100%);
    pointer-events: none;
}

/* Removemos as propriedades específicas de hover em a:first-child porque agora são imagens PNG de lojas. */
