/* Estilos adicionais para acessibilidade e otimização */

/* Melhorias de acessibilidade */
:root {
    --focus-outline: 3px solid #4d90fe;
}

/* Foco visível para navegação por teclado */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

/* Skip to content link para acessibilidade */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--secondary-color);
    color: white;
    padding: 8px;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

/* Melhorias de contraste */
.high-contrast {
    --primary-color: #0a1622;
    --secondary-color: #0077a3;
    --accent-color: #cc5500;
    --light-bg: #ffffff;
    --dark-gray: #000000;
    --medium-gray: #333333;
    --light-gray: #666666;
}

/* Tamanho de fonte ajustável */
.font-size-controls {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.font-size-controls button {
    background: none;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    margin: 0 0.2rem;
    cursor: pointer;
    font-weight: bold;
    color: var(--medium-gray);
}

.font-size-controls button:hover {
    background-color: var(--light-bg);
}

/* Estilos para texto alternativo de imagens */
img[alt] {
    position: relative;
}

img:not([alt]) {
    border: 2px dashed red;
}

/* Melhorias de performance */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Otimização para impressão */
@media print {
    header, footer, .mobile-menu-btn, .search-bar, .filter-section, .pagination, .newsletter {
        display: none !important;
    }
    
    body {
        background-color: white;
        color: black;
        font-size: 12pt;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 90%;
    }
    
    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }
    
    .tool-card, .resource-item, .category-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 1rem;
    }
}

/* Melhorias de segurança para formulários */
input, textarea, select {
    box-sizing: border-box;
    max-width: 100%;
}

input[type="email"], input[type="text"], textarea {
    padding: 0.8rem;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    width: 100%;
    font-family: inherit;
}

/* Notificações de cookies e privacidade */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1rem;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-notice p {
    margin: 0;
    padding-right: 1rem;
}

.cookie-notice .btn {
    white-space: nowrap;
}

/* Melhorias de carregamento */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Melhorias para recursos */
.resource-item {
    display: flex;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.resource-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.resource-image {
    flex: 0 0 300px;
}

.resource-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resource-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.resource-meta {
    display: flex;
    margin-bottom: 0.8rem;
}

.resource-type, .resource-level {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    margin-right: 0.8rem;
}

.guide {
    background-color: #4caf50;
    color: white;
}

.article {
    background-color: #2196f3;
    color: white;
}

.case {
    background-color: #9c27b0;
    color: white;
}

.video {
    background-color: #f44336;
    color: white;
}

.ebook {
    background-color: #ff9800;
    color: white;
}

.beginner {
    background-color: #8bc34a;
    color: white;
}

.intermediate {
    background-color: #ffc107;
    color: var(--dark-gray);
}

.advanced {
    background-color: #ff5722;
    color: white;
}

.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.resource-date {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* Estilos para página de ferramentas */
.filter-section {
    background-color: var(--white);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    align-items: center;
}

.filter-group label {
    margin-right: 0.5rem;
    font-weight: 600;
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    background-color: var(--white);
}

.page-header {
    background: linear-gradient(rgba(26, 43, 60, 0.9), rgba(26, 43, 60, 0.8)), url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31') no-repeat center center/cover;
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination a {
    color: var(--dark-gray);
    padding: 0.5rem 1rem;
    margin: 0 0.3rem;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    transition: var(--transition);
}

.pagination a:hover, .pagination a.active {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

/* Newsletter section */
.newsletter {
    background-color: var(--primary-color);
    padding: 4rem 0;
    margin-top: 4rem;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.newsletter p {
    color: var(--light-gray);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 4px 0 0 4px;
}

.newsletter-form button {
    border-radius: 0 4px 4px 0;
}

/* Responsividade para recursos */
@media (max-width: 768px) {
    .resource-item {
        flex-direction: column;
    }
    
    .resource-image {
        flex: 0 0 auto;
        height: 200px;
    }
    
    .filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        flex: 1;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        border-radius: 4px;
        margin-bottom: 1rem;
    }
    
    .newsletter-form button {
        border-radius: 4px;
        width: 100%;
    }
}


/* DSR — Identidade institucional e visual */
:root {
    --primary-dark: #1A2942;
    --primary-medium: #2E5C8A;
    --primary-light: #4A90E2;
    --accent-gold: #D4AF37;
    --light-gold: #F0E68C;
    --accent-green: #2E8B57;
    --dsr-light-bg: #F5F7FA;
    --dsr-dark-bg: #2C3E50;
}

body {
    background: var(--dsr-light-bg);
}

header {
    background: var(--primary-dark);
    border-bottom: 3px solid var(--accent-gold);
}

header .container {
    gap: 1.25rem;
}

.logo {
    min-width: 285px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
}

.brand-link:hover {
    color: var(--white);
}

.brand-link img {
    display: block;
    width: 76px;
    height: 42px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong {
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
}

.brand-copy small {
    color: var(--light-gold);
    font-size: 0.72rem;
    margin-top: 0.25rem;
}

.menu a:hover, .menu a.active {
    color: var(--light-gold);
}

.search-bar button,
.secondary-btn {
    background-color: var(--primary-medium);
}

.search-bar button:hover,
.secondary-btn:hover {
    background-color: var(--primary-light);
}

.primary-btn {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

.primary-btn:hover {
    background: var(--light-gold);
    color: var(--primary-dark);
}

.outline-btn {
    border-color: var(--accent-gold);
    color: var(--primary-dark);
}

.outline-btn:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

.hero,
.page-header {
    background-image: linear-gradient(rgba(26, 41, 66, 0.88), rgba(26, 41, 66, 0.93)), url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31');
    border-bottom: 4px solid var(--accent-gold);
}

.hero h2,
.page-header h1 {
    letter-spacing: -0.02em;
}

.section-title::after {
    background: var(--accent-gold);
}

.category-icon,
.tool-category,
a {
    color: var(--primary-medium);
}

.category-card:hover,
.tool-card:hover,
.resource-card:hover {
    border-top: 3px solid var(--accent-gold);
}

.security-notice {
    background: #fffdf3;
    border-color: rgba(212, 175, 55, 0.45);
}

.security-notice h2 {
    color: var(--primary-dark);
}

footer {
    background: var(--primary-dark);
    border-top: 3px solid var(--accent-gold);
}

.footer-column h3,
.footer-contact h3 {
    color: var(--light-gold);
}

.footer-contact {
    max-width: 260px;
    margin-left: 2rem;
}

.footer-contact p {
    color: #d9e1ec;
    margin-bottom: 0.85rem;
}

.footer-contact a {
    color: var(--light-gold);
}

.dsr-contact-panel {
    padding: 3.5rem 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-medium));
    color: #fff;
}

.dsr-contact-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.dsr-contact-panel h2 {
    color: #fff;
    margin: 0.35rem 0 0.8rem;
}

.dsr-contact-panel p {
    max-width: 680px;
    color: #e4ebf4;
    margin-bottom: 0;
}

.eyebrow {
    color: var(--light-gold);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.dsr-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    flex-shrink: 0;
}

.light-outline {
    color: #fff;
    border-color: var(--light-gold);
}

.light-outline:hover {
    color: var(--primary-dark);
    background: var(--light-gold);
}

@media (max-width: 992px) {
    .logo {
        min-width: 0;
    }

    .dsr-contact-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-contact {
        margin: 0 0 2rem;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
