/* ACESSIBILIDADE - EDUCAÇÃO QUE REFLETE */

/* ===== FOCUS VISIBLE ===== */
.nav-item:focus,
.social-item:focus,
.rede-social-link:focus,
.nav-toggle:focus,
button:focus,
a:focus {
    outline: 3px solid #3a86ff;
    outline-offset: 3px;
    border-radius: 2px;
}

/* Remove outline padrão e aplica custom */
*:focus {
    outline: none;
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .hero-text h1 {
        color: #000000;
        text-shadow: 2px 2px 0 #ffffff;
    }
    
    .hero-text p,
    .hero-destaque {
        color: #000000;
        background-color: rgba(255, 255, 255, 0.9);
        padding: 0.5rem;
        border-radius: 4px;
    }
    
    .nav-item {
        border: 1px solid #000;
    }
}

/* ===== 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;
    }
    
    .loading-spinner {
        animation: none !important;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .conteudo-fallback {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .fallback-text a {
        color: #63b3ed;
    }
}

/* ===== FALLBACK STYLES ===== */
.conteudo-fallback {
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.conteudo-fallback h2 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.conteudo-fallback p {
    color: #4a5568;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.fallback-text {
    font-size: 0.9rem !important;
    color: #718096 !important;
}

.fallback-text a {
    color: #4299e1;
    text-decoration: underline;
    font-weight: 600;
}

.fallback-text a:hover,
.fallback-text a:focus {
    color: #3182ce;
}

/* Loading Spinner Acessível */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Esconder fallback quando conteúdo carregar */
.conteudo-carregado .conteudo-fallback {
    display: none;
}

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

/* ===== FONT SIZE RESPECT ===== */
@media (prefers-reduced-data: reduce) {
    .hero-image img {
        display: none;
    }
    
    .hero-overlay {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
}

/* ===== TOUCH TARGETS ===== */
@media (max-width: 768px) {
    .nav-item,
    .social-item,
    .rede-social-link {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .nav-principal,
    .redes-footer,
    .conteudo-fallback {
        display: none !important;
    }
    
    .hero-text h1 {
        color: #000 !important;
        text-shadow: none !important;
    }
}