/**
 * Correções Rápidas CSS - Instituto Bioma
 * Arquivo com ajustes visuais para problemas identificados na auditoria
 */

/* Garantir que o logo apareça corretamente */
.custom-logo {
    max-height: 60px;
    width: auto;
    display: block;
}

.custom-logo-link {
    display: inline-block;
    line-height: 1;
}

/* Melhorar espaçamento do header quando não há logo */
.site-header .site-branding {
    min-height: 60px;
    display: flex;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-green, #3D5F5C);
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

/* Corrigir espaçamento de widgets do rodapé */
.footer-widget {
    padding: 0 1rem;
}

.footer-widget h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 0.75rem;
    color: rgba(255,255,255,0.8);
}

/* Remover texto placeholder visível */
.textwidget p:empty {
    display: none;
}

/* Melhorar aparência de imagens placeholder */
img[src*="placeholder"],
img[src*="projeto-"],
img[src*="news-"] {
    background: var(--light-gray, #F5F5F5);
    border: 2px dashed #ddd;
}

/* Garantir que cards de projeto tenham altura uniforme */
.project-card-modern,
.news-card-modern {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card-modern .card-content,
.news-card-modern .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card-modern p,
.news-card-modern p {
    flex-grow: 1;
}

/* Melhorar contraste de textos */
.hero-description {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Garantir que botões tenham cursor pointer */
.btn,
button,
input[type="submit"] {
    cursor: pointer;
}

/* Melhorar aparência de formulários */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-green, #5CB85C);
}

/* Melhorar espaçamento de seções */
section {
    padding: 4rem 0;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
}

/* Garantir que links tenham cor correta */
a {
    color: var(--primary-green, #5CB85C);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dark-green, #3D5F5C);
}

/* Melhorar aparência de listas */
ul, ol {
    line-height: 1.8;
}

/* Garantir que imagens sejam responsivas */
img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   LINKS E BOTÕES
   ======================================== */

/* Remover outline/borda de foco em links e botões */
a:focus,
a:active,
button:focus,
button:active,
.elementor-button:focus,
.elementor-button:active,
.menu a:focus,
.menu a:active,
nav a:focus,
nav a:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Remover outline específico do menu */
.site-header a:focus,
.site-header a:active,
.site-header button:focus,
.site-header button:active,
.main-navigation a:focus,
.main-navigation a:active {
    outline: none !important;
    border: none !important;
}

/* Melhorar aparência de tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: var(--light-gray, #F5F5F5);
    font-weight: 600;
    color: var(--dark-green, #3D5F5C);
}

/* Melhorar aparência de blockquotes */
blockquote {
    border-left: 4px solid var(--primary-green, #5CB85C);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-gray, #6C757D);
}

/* Garantir que vídeos sejam responsivos */
iframe,
video {
    max-width: 100%;
    height: auto;
}

/* Melhorar aparência de código */
code {
    background: var(--light-gray, #F5F5F5);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

pre {
    background: var(--light-gray, #F5F5F5);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
}

/* Melhorar acessibilidade - foco visível */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-green, #5CB85C);
    outline-offset: 2px;
}

/* Skip to content link para acessibilidade */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-green, #5CB85C);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Melhorar aparência de mensagens de erro/sucesso */
.error,
.notice-error {
    background: #ffebee;
    border-left: 4px solid #f44336;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.success,
.notice-success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.warning,
.notice-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

/* Garantir que o menu mobile funcione */
@media (max-width: 768px) {
    .main-navigation {
        position: relative;
    }
    
    .menu-toggle {
        display: block;
        background: var(--primary-green, #5CB85C);
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        font-weight: 600;
    }
    
    .main-navigation.toggled .nav-menu {
        display: block;
    }
}

/* Melhorar aparência de paginação */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-green, #5CB85C);
    border-radius: 8px;
    color: var(--primary-green, #5CB85C);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    background: var(--primary-green, #5CB85C);
    color: white;
}

/* Garantir que breadcrumbs sejam visíveis */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-gray, #6C757D);
}

.breadcrumbs a {
    color: var(--primary-green, #5CB85C);
}

/* Melhorar aparência de tags e categorias */
.tags,
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag,
.category {
    background: var(--accent-light, #E8F5E9);
    color: var(--dark-green, #3D5F5C);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover,
.category:hover {
    background: var(--primary-green, #5CB85C);
    color: white;
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .menu-toggle,
    .btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: black;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}
