/**
 * Posts Relacionados - Estilos CSS
 * Versão: 1.0.0
 * Responsivo e otimizado para todos os dispositivos
 */

.relacionados {
    position: relative;
    margin: 42px 0px 21px !important;
    padding: 1.5em 0;
    border: 1px solid #eceff1;
    border-left: 0;
    border-right: 0;
    font-size: 14px;
    line-height: 1.8em;
}

.relacionados a {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
    color: #f89000;
    text-decoration: none;
    transition: all 0.3s ease;
}

.relacionados a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.relacionados b {
    font-size: 13px;
    font-weight: 400;
    margin: 0;
    padding: 2px 14px;
    background-color: #fefefe;
    border: 1px solid #e6e6e6;
    border-radius: 15px;
    position: absolute;
    top: -15.5px;
    left: 20px;
    white-space: nowrap;
}

.relacionados ul {
    margin: 8px 0 0;
    padding-left: 20px;
    list-style: none;
}

.relacionados li {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='translate(12.000000, 12.000000) rotate(-90.000000) translate(-12.000000, -12.000000) translate(6.500000, 3.000000)'%3E%3Cline fill='none' stroke='%23f89000' x1='5.3939' y1='9.7001' x2='5.3939' y2='0.7501'%3E%3C/line%3E%3Cpath fill='none' stroke='%23f89000' d='M5.3998,17.3539 C6.6558,17.3539 10.6708,10.9899 9.9488,10.2679 C9.2268,9.5459 1.6418,9.4769 0.8508,10.2679 C0.0598,11.0599 4.1448,17.3539 5.3998,17.3539 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E") left center / 20px no-repeat;
    list-style-type: none;
    padding: 0 25px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f89000;
    transition: all 0.4s ease;
    margin-bottom: 8px;
}

.relacionados li:hover {
    margin-left: 5px;
}

/* Responsividade para tablets */
@media screen and (max-width: 768px) {
    .relacionados {
        margin: 32px 0;
        padding: 1.2em 0;
        font-size: 13px;
    }
    
    .relacionados b {
        font-size: 12px;
        padding: 2px 12px;
        left: 15px;
    }
    
    .relacionados ul {
        padding-left: 15px;
    }
    
    .relacionados li {
        padding: 0 20px;
        background-size: 18px;
        margin-bottom: 6px;
    }
}

/* Responsividade para smartphones */
@media screen and (max-width: 480px) {
    .relacionados {
        margin: 24px 0;
        padding: 1em 0;
        font-size: 12px;
        line-height: 1.6em;
    }
    
    .relacionados b {
        font-size: 11px;
        padding: 2px 10px;
        left: 10px;
        top: -13px;
    }
    
    .relacionados ul {
        padding-left: 10px;
        margin: 12px 0 0;
    }
    
    .relacionados li {
        padding: 0 18px;
        background-size: 16px;
        margin-bottom: 5px;
        line-height: 1.5em;
    }
    
    .relacionados li:hover {
        margin-left: 3px;
    }
}

/* Suporte para telas muito pequenas */
@media screen and (max-width: 320px) {
    .relacionados {
        margin: 20px 0;
        font-size: 11px;
    }
    
    .relacionados b {
        font-size: 10px;
        padding: 1px 8px;
    }
    
    .relacionados li {
        padding: 0 16px;
        background-size: 14px;
    }
}

/* Modo escuro (opcional) */
@media (prefers-color-scheme: dark) {
    .relacionados {
        border-color: #eceff1;
    }
    
    .relacionados b {
    background-color: #fefefe;
    border-color: #eceff1;
    color: #767676;
    }
}

/* Acessibilidade - foco para navegação por teclado */
.relacionados a:focus {
    outline: 2px solid #f89000;
    outline-offset: 2px;
}

/* Melhoria para impressão */
@media print {
    .relacionados {
        border-color: #000;
    }
    
    .relacionados li {
        background: none;
        padding-left: 0;
    }
    
    .relacionados li:before {
        content: "→ ";
        color: #000;
    }
}
