/* ===================================
   Konap - Estilos Principais
   =================================== */

/* Fontes e Base */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #FFFFFF;
    color: #333333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.95;
        transform: scale(1.02);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Slide from Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide from Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Reveal Animation */
@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

.animate-pulse {
    animation: pulse 3s ease-in-out infinite;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease-out forwards;
}

/* Reveal on Scroll */
.reveal {
    opacity: 0 !important;
    transform: translateY(60px);
    transition: opacity 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1 !important;
    transform: translateY(0);
}

/* Delay variants para efeito cascata */
.reveal-delay-1 {
    transition-delay: 0.2s;
}

.reveal-delay-2 {
    transition-delay: 0.4s;
}

.reveal-delay-3 {
    transition-delay: 0.6s;
}

.reveal-delay-4 {
    transition-delay: 0.8s;
}

.reveal-delay-5 {
    transition-delay: 1s;
}

/* Variantes de animação */
.reveal-fade {
    transform: none;
    transition: opacity 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-fade.active {
    opacity: 1 !important;
}

.reveal-scale {
    opacity: 0 !important;
    transform: scale(0.85);
    transition: opacity 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-scale.active {
    opacity: 1 !important;
    transform: scale(1);
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* Cards com Hover */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 35px -5px rgba(10, 34, 64, 0.2), 0 15px 15px -5px rgba(10, 34, 64, 0.1);
}

.icon-wrapper {
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-hover:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

/* Shimmer Effect nos Ícones */
.icon-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-hover:hover .icon-wrapper::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

/* Feature Icons com Shimmer */
.feature-icon {
    position: relative;
    overflow: hidden;
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-hover:hover .feature-icon::before {
    opacity: 1;
    animation: shimmer 1.2s ease-in-out;
}

/* Navegação */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #FF6700;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Botões */
.btn-primary {
    background-color: #FF6700;
    color: #FFFFFF;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #E55A00;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(255, 103, 0, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: #0A2240;
    border: 2px solid #0A2240;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #0A2240;
    color: white;
}

/* Ícones de Features */
.feature-icon {
    background: linear-gradient(135deg, #FF6700 0%, #FF8533 100%);
}

/* Classes de Cores */
.bg-primary {
    background-color: #0A2240;
}

.bg-secondary {
    background-color: #FF6700;
}

.text-primary {
    color: #0A2240;
}

.text-secondary {
    color: #FF6700;
}

.border-primary {
    border-color: #0A2240;
}

.border-secondary {
    border-color: #FF6700;
}

/* Focus Indicators Melhorados */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #FF6700;
    outline-offset: 2px;
    border-radius: 4px;
}

.btn-primary:focus,
.btn-secondary:focus {
    outline: 3px solid #FF6700;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(255, 103, 0, 0.3);
}

.nav-link:focus {
    outline: 2px solid #FF6700;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus\\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Mobile Menu Animations */
.mobile-menu {
    transition: all 0.3s ease-in-out;
}

.mobile-menu.hidden {
    transform: translateY(-10px);
    opacity: 0;
}

.mobile-menu:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
}

/* Logo */
header img[alt="Logo Konap"] {
    max-height: 48px;
    height: auto;
    width: auto;
    object-fit: contain;
}

footer img[alt="Logo Konap"] {
    max-height: 40px;
    height: auto;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Torna a logo branca no footer escuro */
}

/* Responsividade Melhorada */

/* Mobile First - Base Styles */
@media (max-width: 640px) {
    .card-hover:hover {
        transform: translateY(-2px);
    }
    
    header img[alt="Logo Konap"] {
        max-height: 36px;
    }
    
    /* Hero section adjustments */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    /* Padding adjustments */
    .section-padding {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Button adjustments */
    .btn-mobile {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    /* Grid adjustments */
    .grid-mobile {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 768px) {
    .card-hover:hover {
        transform: translateY(-4px);
    }
    
    header img[alt="Logo Konap"] {
        max-height: 40px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-padding {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* Desktop Small */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-padding {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* Desktop Large */
@media (min-width: 1025px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    .card-hover:hover {
        transform: none;
    }
    
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Increase touch targets */
    .mobile-menu-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
    }
    
    .faq-button {
        min-height: 64px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Crisp logos and icons */
    header img[alt*="Logo"] {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Preference - DESABILITADO para manter animações sempre ativas */
/* @media (prefers-reduced-motion: reduce) {
    Comentado para garantir que as animações funcionem independentemente das configurações do sistema
} */

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Preserve light theme for now, but provide hooks for future dark mode */
    :root {
        --color-scheme: light;
    }
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #FF6700 0%, #FF8533 100%);
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 2px 4px rgba(255, 103, 0, 0.3);
}

/* Parallax Elements */
.parallax-slow {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.parallax-medium {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Print Styles */
@media print {
    .no-print,
    .mobile-menu,
    .back-to-top,
    .scroll-progress,
    .faq-button::after {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
    
    a[href^="tel:"]::after,
    a[href^="mailto:"]::after {
        content: " (" attr(href) ")";
    }
}
