/**
 * TranspNet - Accessibility CSS
 * Versao: 1.0.0
 * Data: 2026-02-08
 *
 * Inclui:
 * - Skip link para navegacao por teclado
 * - Classe .sr-only para screen readers
 * - Focus visible melhorado
 * - Correcoes de contraste
 * - Reduced motion support
 */

/* =============================================
   SKIP LINK
   ============================================= */

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #FF6600;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.3s ease;
    border-radius: 0 0 0.5rem 0;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* =============================================
   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;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* =============================================
   FOCUS VISIBLE
   ============================================= */

/* Remove outline padrao em todos elementos */
:focus {
    outline: none;
}

/* Adiciona outline apenas quando navegando por teclado */
:focus-visible {
    outline: 3px solid #FF6600;
    outline-offset: 4px;
}

/* Focus especifico para links */
a:focus-visible {
    outline: 3px solid #FF6600;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Focus especifico para botoes */
button:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid #FF6600;
    outline-offset: 4px;
}

/* Focus para inputs */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #FF6600;
    outline-offset: 0;
    border-color: #FF6600;
}

/* =============================================
   CORRECOES DE CONTRASTE
   ============================================= */

/* Texto em fundo escuro - WCAG AA (4.5:1 minimo) */
.text-on-dark {
    color: #ffffff !important;
}

.text-muted-on-dark {
    color: #b8bfc7 !important; /* Ratio 4.6:1 */
}

.text-light-on-dark {
    color: #e5e7eb !important; /* Ratio 7.1:1 */
}

/* Glass card com contraste melhorado */
.glass-card-accessible {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.glass-card-accessible p,
.glass-card-accessible li {
    color: #e5e7eb; /* WCAG AAA */
}

/* =============================================
   REDUCED MOTION
   ============================================= */

@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;
    }
}

/* =============================================
   HOVER LIFT PADRONIZADO
   ============================================= */

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Para cards em fundo escuro */
.hover-lift-dark:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* =============================================
   BLOG CARDS - HOVER MELHORADO
   ============================================= */

.blog-card-hover {
    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.blog-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* =============================================
   ICONES ACESSIVEIS
   ============================================= */

/* Icones decorativos - esconder de screen readers */
[data-lucide][aria-hidden="true"] {
    pointer-events: none;
}

/* =============================================
   TABELAS RESPONSIVAS
   ============================================= */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 600px;
}

/* =============================================
   HIGH CONTRAST MODE (Windows)
   ============================================= */

@media (forced-colors: active) {
    .btn-primary,
    .btn-secondary {
        border: 2px solid currentColor;
    }

    :focus-visible {
        outline: 3px solid currentColor;
    }
}
