/* ============================================
   ANIMAÇÕES PREMIUM - Padronize Esquadrias
   ============================================ */

/* ============================================
   ANIMAÇÕES DE ENTRADA
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ANIMAÇÕES DE BRILHO E GLOW
   ============================================ */

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes goldShimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(201, 169, 98, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(201, 169, 98, 0.5);
    }
}

@keyframes accentGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 212, 170, 0.5);
    }
}

/* ============================================
   ANIMAÇÕES DE FLUTUAÇÃO
   ============================================ */

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes floatSubtle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* ============================================
   ANIMAÇÕES DE PULSO
   ============================================ */

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes pulseSoft {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ============================================
   ANIMAÇÕES DE ROTAÇÃO
   ============================================ */

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   ANIMAÇÕES DE LINHA/BORDA
   ============================================ */

@keyframes drawLine {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes expandWidth {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes borderGlow {
    0%, 100% {
        border-color: rgba(201, 169, 98, 0.3);
    }
    50% {
        border-color: rgba(201, 169, 98, 0.8);
    }
}

/* ============================================
   APLICAÇÃO DAS ANIMAÇÕES
   ============================================ */

/* Header */
.header {
    animation: fadeInDown 0.8s ease-out;
}

.header .logo h1 {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header .logo:hover h1 {
    transform: scale(1.03);
    filter: brightness(1.15);
}

/* Hero Section */
.hero-content {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero h1 {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero p {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-ctas {
    animation: fadeInUp 1s ease-out 0.8s both;
}

.hero-ctas a:nth-child(1) {
    animation: fadeInUp 0.8s ease-out 0.9s both;
}

.hero-ctas a:nth-child(2) {
    animation: fadeInUp 0.8s ease-out 1s both;
}

.hero-ctas a:nth-child(3) {
    animation: fadeInUp 0.8s ease-out 1.1s both;
}

/* CTAs Hover Effects */
.cta-primary,
.cta-secondary,
.cta-tertiary,
.cta-urgent {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cta-primary::before,
.cta-tertiary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.7s ease;
}

.cta-primary:hover::before,
.cta-tertiary:hover::before {
    left: 100%;
}

.cta-primary i,
.cta-secondary i,
.cta-tertiary i {
    transition: transform 0.3s ease;
}

.cta-primary:hover i,
.cta-secondary:hover i,
.cta-tertiary:hover i {
    transform: translateX(3px);
}

/* WhatsApp Flutuante */
.whatsapp-float {
    animation: floatSubtle 3s ease-in-out infinite;
}

.whatsapp-float i {
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    animation-play-state: paused;
}

.whatsapp-float:hover i {
    transform: scale(1.1);
}

/* Content Sections - Entrada Escalonada */
.content-section {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.content-section:nth-child(1) { animation-delay: 0.1s; }
.content-section:nth-child(2) { animation-delay: 0.15s; }
.content-section:nth-child(3) { animation-delay: 0.2s; }
.content-section:nth-child(4) { animation-delay: 0.25s; }
.content-section:nth-child(5) { animation-delay: 0.3s; }
.content-section:nth-child(6) { animation-delay: 0.35s; }
.content-section:nth-child(7) { animation-delay: 0.4s; }
.content-section:nth-child(8) { animation-delay: 0.45s; }
.content-section:nth-child(9) { animation-delay: 0.5s; }
.content-section:nth-child(10) { animation-delay: 0.55s; }
.content-section:nth-child(11) { animation-delay: 0.6s; }
.content-section:nth-child(12) { animation-delay: 0.65s; }
.content-section:nth-child(13) { animation-delay: 0.7s; }
.content-section:nth-child(14) { animation-delay: 0.75s; }
.content-section:nth-child(15) { animation-delay: 0.8s; }
.content-section:nth-child(16) { animation-delay: 0.85s; }

/* Títulos das Seções */
.content-section h2 {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-section:hover h2 {
    transform: translateX(8px);
}

.content-section h2::after {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* CTA Content */
.cta-content {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cta-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(201, 169, 98, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.cta-content:hover::before {
    left: 100%;
}

.cta-content i {
    transition: all 0.3s ease;
}

.cta-content:hover i {
    transform: translateX(4px);
    color: var(--accent);
}

/* Map Section */
.map-section {
    animation: fadeInUp 1s ease-out;
}

.map-section h2 {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.map-container {
    animation: scaleIn 0.8s ease-out 0.4s both;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-container:hover {
    transform: scale(1.01);
}

/* Footer */
.footer-info h3 {
    transition: all 0.3s ease;
}

.footer-info:hover h3 {
    transform: translateY(-2px);
}

.contact-info a {
    transition: all 0.3s ease;
    position: relative;
}

.contact-info a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.contact-info a:hover::after {
    width: 100%;
}

.footer-links a {
    transition: all 0.3s ease;
}

.footer-links a:hover {
    transform: translateX(5px);
}

/* Sitemap */
.sitemap-category {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.sitemap-category:nth-child(1) { animation-delay: 0.1s; }
.sitemap-category:nth-child(2) { animation-delay: 0.15s; }
.sitemap-category:nth-child(3) { animation-delay: 0.2s; }
.sitemap-category:nth-child(4) { animation-delay: 0.25s; }
.sitemap-category:nth-child(5) { animation-delay: 0.3s; }
.sitemap-category:nth-child(6) { animation-delay: 0.35s; }
.sitemap-category:nth-child(7) { animation-delay: 0.4s; }
.sitemap-category:nth-child(8) { animation-delay: 0.45s; }
.sitemap-category:nth-child(9) { animation-delay: 0.5s; }
.sitemap-category:nth-child(10) { animation-delay: 0.55s; }
.sitemap-category:nth-child(11) { animation-delay: 0.6s; }
.sitemap-category:nth-child(12) { animation-delay: 0.65s; }
.sitemap-category:nth-child(13) { animation-delay: 0.7s; }
.sitemap-category:nth-child(14) { animation-delay: 0.75s; }
.sitemap-category:nth-child(15) { animation-delay: 0.8s; }
.sitemap-category:nth-child(16) { animation-delay: 0.85s; }

.sitemap-category h2 i {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sitemap-category:hover h2 i {
    transform: rotate(10deg) scale(1.15);
    color: var(--accent);
}

.sitemap-category a {
    transition: all 0.3s ease;
}

.sitemap-category a:hover {
    transform: translateX(8px);
    color: var(--primary);
}

/* Botão Primary */
.btn-primary {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(201, 169, 98, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary i {
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(-4px);
}

/* ============================================
   EFEITOS DE FOCO - ACESSIBILIDADE
   ============================================ */

.cta-primary:focus-visible,
.cta-secondary:focus-visible,
.cta-tertiary:focus-visible,
.cta-content:focus-visible,
.btn-primary:focus-visible,
.whatsapp-float:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 3px;
}

a:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* ============================================
   MICRO-INTERAÇÕES ESPECIAIS
   ============================================ */

/* Efeito de hover suave em links */
.content-section p a {
    color: var(--primary);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.content-section p a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.content-section p a:hover {
    color: var(--secondary);
}

.content-section p a:hover::after {
    width: 100%;
}

/* Efeito de clique */
.cta-primary:active,
.cta-secondary:active,
.cta-tertiary:active,
.cta-content:active,
.btn-primary:active {
    transform: scale(0.97);
}

/* ============================================
   ANIMAÇÕES DE SCROLL REVEAL
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   LOADING STATE
   ============================================ */

.loading {
    opacity: 0;
}

.loaded .loading {
    animation: fadeIn 0.6s ease-out forwards;
}

/* ============================================
   PREFERÊNCIAS 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;
    }

    .content-section,
    .sitemap-category {
        opacity: 1;
    }

    .hero-content,
    .hero h1,
    .hero p,
    .hero-ctas,
    .hero-ctas a {
        animation: none;
        opacity: 1;
    }

    .whatsapp-float {
        animation: none;
    }

    .whatsapp-float::before {
        animation: none;
    }
}
