/* Estilos customizados - Design Moderno 2025 */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animações suaves */
.transition-all {
    transition: all 0.2s ease;
}

/* Inputs e elementos de formulário */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="file"],
select,
textarea {
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Botões com hover suave */
button,
a[class*="bg-"] {
    transition: all 0.2s ease;
}

button:hover,
a[class*="bg-"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:active,
a[class*="bg-"]:active {
    transform: translateY(0);
}

/* Scrollbar customizada - Mobile friendly */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Melhorias para mobile */
@media (max-width: 640px) {
    /* Aumentar área de toque em mobile */
    button,
    a[class*="bg-"],
    input[type="submit"],
    .btn-mobile {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Espaçamento adequado para touch */
    .space-y-4 > * + * {
        margin-top: 1rem;
    }
    
    /* Reduzir padding em containers */
    .max-w-7xl,
    .max-w-4xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Cards full-width em mobile */
    .bg-white.rounded-xl {
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Botões full-width em mobile quando necessário */
    .btn-mobile-full {
        width: 100%;
        display: block;
    }
    
    /* Melhorar legibilidade de texto */
    body {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
    }
    
    /* Inputs maiores em mobile */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="time"],
    input[type="file"],
    select,
    textarea {
        font-size: 16px; /* Evita zoom automático no iOS */
        padding: 0.75rem 1rem;
    }
    
    /* Modais full-screen em mobile */
    .modal-mobile {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    /* Grid responsivo - sempre stack em mobile */
    .grid-mobile-stack {
        grid-template-columns: 1fr !important;
    }
    
    /* Tabelas scrolláveis em mobile */
    .table-mobile-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Melhorar espaçamento de cards */
    .card-mobile {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Texto truncado em mobile */
    .text-mobile-truncate {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Botões de ação em mobile */
    .action-buttons-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .action-buttons-mobile button,
    .action-buttons-mobile a {
        width: 100%;
        justify-content: center;
    }
}

/* Botões de ação no desktop */
@media (min-width: 640px) {
    .action-buttons-mobile {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }
    
    .action-buttons-mobile button,
    .action-buttons-mobile a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Menu hamburger mobile */
.mobile-menu-toggle {
    display: none;
}

.mobile-menu,
.mobile-menu-overlay {
    display: none !important;
}

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        padding: 0.5rem;
        cursor: pointer;
        color: #374151;
        z-index: 50;
    }
    
    .mobile-menu {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: white;
        z-index: 1000;
        padding: 1rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-menu.active {
        display: block !important;
    }
    
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .mobile-menu-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .mobile-menu-links a {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.75rem;
        padding: 1rem;
        border-radius: 0.5rem;
        color: #374151;
        text-decoration: none;
        font-weight: 500;
        transition: background-color 0.2s;
        width: 100%;
        text-align: left;
    }
    
    .mobile-menu-links a:hover,
    .mobile-menu-links a.active {
        background-color: #f3f4f6;
        color: #4f46e5;
    }
    
    .mobile-menu-overlay {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(2px);
    }
    
    .mobile-menu-overlay.active {
        display: block !important;
    }
}

/* Garantir que menu não apareça no desktop */
@media (min-width: 1025px) {
    .mobile-menu-toggle,
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Melhorias para telas muito pequenas */
@media (max-width: 375px) {
    .px-4 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .py-6 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
}

/* Cards com hover sutil */
.bg-white.rounded-xl {
    transition: all 0.2s ease;
}

.bg-white.rounded-xl:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Estados de loading */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Melhorias de acessibilidade */
:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Seleção de texto */
::selection {
    background-color: #6366f1;
    color: white;
}

/* Melhorias para inputs de arquivo */
input[type="file"] {
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background-color: #e5e7eb;
}

/* Melhorias para selects */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Melhorias para textareas */
textarea {
    resize: vertical;
    min-height: 80px;
}

/* Estados de erro e sucesso */
.bg-red-50 {
    border-left: 4px solid #ef4444;
}

.bg-green-50 {
    border-left: 4px solid #10b981;
}

/* Navbar sticky melhorada */
.sticky {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Transições suaves para todos os elementos interativos */
a, button, input, select, textarea {
    transition: all 0.2s ease;
}

/* Melhorias de tipografia */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
}

/* Espaçamento consistente */
.space-y-6 > * + * {
    margin-top: 1.5rem;
}

/* Estilos de Impressão */
@media print {
    /* Ocultar tudo exceto a área de impressão */
    body * {
        visibility: hidden;
    }
    
    #printArea,
    #printArea * {
        visibility: visible;
    }
    
    #printArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    /* Estilos para o conteúdo de impressão */
    .print-content {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        padding: 2cm;
    }
    
    .qr-code-print {
        text-align: center;
        page-break-inside: avoid;
    }
    
    .print-qr-image {
        width: auto !important;
        height: auto !important;
        max-width: 100%;
        max-height: 100%;
        margin: 0 auto 20px;
        border: none !important;
        padding: 0 !important;
        background: transparent !important;
        display: block;
        object-fit: contain;
    }
    
    .print-title {
        font-size: 24px;
        font-weight: bold;
        margin-bottom: 10px;
        color: #000;
    }
    
    .print-url {
        font-size: 14px;
        color: #666;
        word-break: break-all;
        margin-top: 10px;
    }
    
    /* Estilos para informações de emergência */
    .emergency-header {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .emergency-title {
        font-size: 64px;
        font-weight: 900;
        color: #dc2626;
        margin: 0 0 15px 0;
        text-transform: uppercase;
        letter-spacing: 4px;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .emergency-subtitle {
        font-size: 28px;
        font-weight: 900;
        color: #991b1b;
        margin: 0;
        text-transform: uppercase;
        letter-spacing: 2px;
    }
    
    .qr-code-container {
        border: 4px solid #dc2626;
        border-radius: 12px;
        padding: 20px;
        margin: 30px auto;
        display: inline-block;
        background-color: #fff;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-width: 500px;
    }
    
    .qr-code-container .print-qr-image {
        margin: 0;
        border: none !important;
        padding: 0 !important;
    }
    
    .emergency-instructions {
        margin-top: 40px;
        padding: 30px;
        background-color: #fef2f2;
        border: 3px solid #fecaca;
        border-radius: 8px;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .instruction-text {
        font-size: 22px;
        color: #7f1d1d;
        margin: 12px 0;
        font-weight: 900;
        line-height: 1.6;
    }
    
    /* Remover margens da página */
    @page {
        margin: 0;
        size: A4;
    }
    
    /* Ocultar elementos de navegação e outros */
    nav,
    button,
    .no-print {
        display: none !important;
    }
}

/* ============================================
   ESTILOS PARA LANDING PAGE DE ALTA CONVERSÃO
   ============================================ */

/* Animações de fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Animação de slide in */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slideIn 0.4s ease-out forwards;
}

/* Animação de pulso para elementos de urgência */
@keyframes pulse-urgent {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.animate-pulse-urgent {
    animation: pulse-urgent 2s ease-in-out infinite;
}

/* Efeito de brilho para CTAs */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.cta-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* Badge animado */
.badge-animated {
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.badge-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: badge-shine 3s infinite;
}

@keyframes badge-shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Contador animado */
.counter-animated {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

/* Efeito hover melhorado para cards */
.card-hover-effect {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-effect:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* CTA sticky com transição suave */
#stickyCta {
    transition: transform 0.3s ease-in-out;
    transform: translateY(-100%);
}

#stickyCta:not(.hidden) {
    transform: translateY(0);
}

/* Efeito de gradiente animado no background */
.gradient-animated {
    background: linear-gradient(-45deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Estilo para inputs com foco */
input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Efeito de loading no botão */
@keyframes button-loading {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

button:disabled {
    animation: button-loading 1.5s ease-in-out infinite;
    cursor: not-allowed;
}

/* Estilo para notificações de atividade */
.activity-notification {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Efeito de brilho nos números */
.number-glow {
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Badge de urgência com efeito */
.urgency-badge {
    position: relative;
    overflow: hidden;
}

.urgency-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: urgency-sweep 2s infinite;
}

@keyframes urgency-sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Estilo para timer */
.timer-display {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.1em;
    font-weight: 700;
}

/* Efeito de partículas no hero (opcional, pode ser removido se muito pesado) */
.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float 15s infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Melhorias de acessibilidade para animações */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Estilo para scroll suave */
html {
    scroll-behavior: smooth;
}

/* Melhorias para elementos de prova social */
.testimonial-card {
    transition: all 0.3s ease;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 60px;
    color: rgba(99, 102, 241, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

/* Efeito de hover nos badges de confiança */
.trust-badge {
    transition: all 0.3s ease;
}

.trust-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Estilo para formulário inline no hero */
#registerFormInline {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efeito de destaque nos números de estatísticas */
.stat-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Melhorias para mobile - landing page */
@media (max-width: 640px) {
    /* Ajustar tamanho de fonte no hero */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    /* Formulário full width em mobile */
    #registerFormInline {
        margin-top: 1.5rem;
    }
    
    /* Ajustar espaçamento de seções */
    .section-spacing {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Timer menor em mobile */
    .timer-display {
        font-size: 1.5rem;
    }
    
    /* CTA sticky melhorado para mobile */
    #stickyCta {
        padding: 0.5rem 0.75rem;
    }
    
    /* Badge de autoridade no hero - melhor posicionamento mobile */
    .absolute.top-2.right-2 {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        max-width: calc(100% - 4rem);
    }
    
    /* Grid de estatísticas em mobile */
    .grid.md\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Grid de certificações em mobile */
    .grid.md\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Cards de comparação antes/depois */
    .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    /* Ajustar padding em containers grandes */
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Melhorar legibilidade de texto em mobile */
    body {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
    }
    
    /* Inputs maiores em mobile para evitar zoom */
    input[type="text"],
    input[type="email"],
    input[type="password"] {
        font-size: 16px;
        min-height: 44px;
    }
    
    /* Botões com área de toque adequada */
    button,
    a[class*="bg-"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Espaçamento entre elementos em mobile */
    .space-y-3 > * + *,
    .space-y-4 > * + * {
        margin-top: 0.75rem;
    }
    
    /* Badges de confiança em mobile */
    .flex.flex-wrap {
        gap: 0.75rem;
    }
    
    /* Ajustar tamanho de ícones em mobile */
    svg.w-5.h-5 {
        width: 1rem;
        height: 1rem;
    }
    
    /* Melhorar contraste em mobile */
    .text-indigo-100,
    .text-indigo-200 {
        color: rgba(255, 255, 255, 0.9);
    }
}

/* Efeito de loading skeleton (para quando necessário) */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Estilo para links de âncora */
a[href^="#"] {
    scroll-margin-top: 100px;
}

/* Melhorias de performance */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Melhorias adicionais para mobile-first */
@media (max-width: 375px) {
    /* Telas muito pequenas */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Padding reduzido */
    .px-4 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Espaçamento vertical reduzido */
    .py-12 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* Garantir que elementos não quebrem em mobile */
@media (max-width: 640px) {
    /* Prevenir overflow horizontal */
    body {
        overflow-x: hidden;
    }
    
    /* Texto não quebra palavras longas */
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Imagens responsivas */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Tabelas scrolláveis */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Formulários full width */
    form {
        width: 100%;
    }
    
    /* Containers não ultrapassam viewport */
    .max-w-7xl,
    .max-w-4xl {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Melhorias de acessibilidade em mobile */
@media (max-width: 640px) {
    /* Área de toque mínima de 44x44px */
    a, button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Espaçamento entre links clicáveis */
    nav a + a {
        margin-left: 0.5rem;
    }
    
    /* Foco visível em mobile */
    :focus-visible {
        outline: 3px solid #6366f1;
        outline-offset: 2px;
        border-radius: 0.25rem;
    }
}