/* ============================================
   GLOBAL.CSS
   Variáveis, Reset e classes estruturais
   ============================================ */

/* VARIÁVEIS */
:root {
    --primary-color: #3bbcb3;
    --primary-dark: #2a8a83;
    --accent-color: #333333;
    --text-color: #444444;
    --text-light: #777777;
    --bg-light: #eef2f6;
    --white: #ffffff;
}

/* RESET E BASE */
html { scroll-behavior: smooth; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    color: var(--text-color);
    background-color: #f8fafd;
    line-height: 1.6;
}

/* Garante que o header fixo não cubra o topo das seções ao navegar */
section[id] {
    scroll-margin-top: 90px;
}

/* CLASSES ESTRUTURAIS */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 90px 0;
}

.section-title {
    text-align: center;
    font-size: 2.6rem;
    margin-bottom: 60px;
    color: var(--primary-dark);
    font-weight: 700;
}

/* ============================================
   ACESSIBILIDADE - SKIP LINK
   ============================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   ACESSIBILIDADE - FOCO VISÍVEL
   ============================================ */
*:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Foco específico para botões e links */
a:focus-visible,
button:focus-visible {
    box-shadow: 0 0 0 4px rgba(59, 188, 179, 0.3);
    border-radius: 4px;
}

/* ============================================
   ANIMAÇÕES DE ENTRADA NO SCROLL
   ============================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: var(--delay, 0ms);
    will-change: opacity, transform;
}

.animate-on-scroll.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Variações de direção para animações */
.animate-on-scroll.from-left {
    transform: translateX(-40px);
}

.animate-on-scroll.from-right {
    transform: translateX(40px);
}

.animate-on-scroll.from-left.animate-visible,
.animate-on-scroll.from-right.animate-visible {
    transform: translateX(0);
}

.animate-on-scroll.scale {
    transform: scale(0.9);
}

.animate-on-scroll.scale.animate-visible {
    transform: scale(1);
}

/* Reduzir motion para quem prefere */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        transition: none;
        opacity: 1;
        transform: none;
    }
    
    .animate-on-scroll.animate-visible {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   ANIMAÇÕES DE ENTRADA SUAVES (KEYFRAMES)
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Classes utilitárias para animações manuais */
.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Stagger delays para animações em grupo */
.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; }

/* ============================================
   HOVER REFINADO EM LINKS
   ============================================ */
a:not(.btn-primary):not(.whatsapp-float) {
    transition: color 0.2s ease, transform 0.2s ease;
}

a:not(.btn-primary):not(.whatsapp-float):hover {
    color: var(--primary-color);
}

/* ============================================
   SMOOTH SCROLLING REFINADO
   ============================================ */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}
