/* SEO e Acessibilidade CSS */

/* Screen reader only - oculta conteúdo visualmente mas mantém para leitores de tela */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Melhor foco para navegação por teclado - cores sutis */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #d69063;
    outline-offset: 2px;
}

/* Foco sutil para links de navegação */
#nav ul.links li a:focus,
#nav ul.icons li a:focus {
    background-color: rgba(214, 144, 99, 0.1);
    border-radius: 4px;
}

/* Foco para botões */
.button:focus {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Skip links visíveis no foco */
.skip-link:focus {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: #333;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

/* Otimização para Core Web Vitals */
img {
    max-width: 100%;
    height: auto;
}

/* Prevenção de layout shift */
.image.main img,
.image.fit img {
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Melhora de contraste para acessibilidade */
.button {
    min-height: 44px;
    min-width: 44px;
}

/* Otimização de performance - lazy loading nativo */
img[loading="lazy"] {
    content-visibility: auto;
}

/* ============================================
   NAVEGAÇÃO POR TECLADO - SEM MUDANÇA DE CORES
   ============================================ */

/* Manter estilos originais - apenas melhorar foco */
#nav ul.links li a {
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* ============================================
   NAVEGAÇÃO POR TECLADO E ORDEM DE TABULAÇÃO
   ============================================ */

/* Garantir ordem lógica de tabulação */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999999;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
}

/* Foco mínimo necessário para acessibilidade */
*:focus {
    scroll-margin-top: 2rem;
}

/* Cursor pointer para elementos interativos */
.button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
    cursor: pointer;
}

/* Foco discreto para ícones sociais */
.icons li a:focus {
    transform: scale(1.05);
    border-radius: 50%;
}

/* Breadcrumbs para SEO */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    list-style: none;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    padding: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Structured data highlighting */
[itemscope] {
    position: relative;
}

/* Melhor estrutura para títulos h1-h6 */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    word-wrap: break-word;
}

/* Meta informações visíveis */
.meta-info {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 1rem;
}

.meta-info .date,
.meta-info .author,
.meta-info .category {
    margin-right: 1rem;
}

/* Links de navegação acessível - ocultos por padrão */
.skip-link {
    position: absolute;
    left: -9999px;
    top: -9999px;
    z-index: 999999;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.3s ease;
    opacity: 0;
}

.skip-link:focus {
    left: 6px;
    top: 6px;
    opacity: 1;
}

/* Indicadores de loading para performance */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Otimizações para mobile-first */
@media (max-width: 768px) {
    .meta-info {
        font-size: 0.8em;
    }
    
    .breadcrumb {
        font-size: 0.9em;
        padding: 0.5rem 0.75rem;
    }
}

/* Print styles para SEO */
@media print {
    .no-print {
        display: none !important;
    }
    
    a::after {
        content: " (" attr(href) ")";
    }
    
    a[href^="javascript:"]::after,
    a[href^="#"]::after {
        content: "";
    }
}