/**
 * News Display Component Styles
 * Estilos para exibição de notícias com suporte a idiomas
 */

.news-display-container {
    width: 100%;
}

/* Barra de seleção de idioma */
.news-language-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 69, 19, 0.3);
    border-radius: 8px;
    margin-bottom: 20px;
}

.news-language-label {
    color: #c9a55c;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 14px;
}

.news-language-flags {
    display: flex;
    gap: 8px;
}

.news-language-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 26px;
    padding: 3px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(139, 69, 19, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.news-language-flag:hover {
    opacity: 1;
    border-color: rgba(139, 69, 19, 0.6);
    transform: scale(1.05);
}

.news-language-flag.active {
    opacity: 1;
    border-color: #c9a55c;
    background: rgba(139, 69, 19, 0.3);
    box-shadow: 0 0 8px rgba(201, 165, 92, 0.3);
}

.news-language-flag img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

/* Lista de notícias */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-style: italic;
}

/* Artigo de notícia */
.news-article {
    background: linear-gradient(135deg, rgba(36, 6, 6, 0.9) 0%, rgba(20, 3, 3, 0.95) 100%);
    border: 1px solid rgba(139, 69, 19, 0.4);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.news-article-header {
    position: relative;
    padding: 15px 20px;
    background: linear-gradient(180deg, rgba(100, 30, 30, 0.6) 0%, rgba(60, 18, 18, 0.4) 100%);
    border-bottom: 1px solid rgba(139, 69, 19, 0.3);
}

.news-toggle {
    position: absolute;
    top: 12px;
    right: 15px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(201, 165, 92, 0.5);
    background: rgba(0, 0, 0, 0.4);
    color: #c9a55c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    line-height: 1;
}

.news-toggle:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: #c9a55c;
    transform: scale(1.05);
}

.news-toggle-icon {
    transform: translateY(-1px);
}

.news-article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #999;
}

.news-article-date {
    color: #c9a55c;
}

.news-article-author a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

.news-article-author a:hover {
    color: #c9a55c;
}

.news-article-title {
    margin: 0;
    color: #e8d5a3;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.3em;
    font-weight: normal;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Bandeiras de traduções disponíveis */
.news-article-translations {
    position: absolute;
    top: 15px;
    right: 50px;
    display: flex;
    gap: 5px;
}

.news-translation-flag {
    display: inline-flex;
    width: 22px;
    height: 15px;
    opacity: 0.4;
    border-radius: 2px;
    overflow: hidden;
    padding: 0;
    border: none;
    background: transparent;
}

.news-translation-flag.current {
    opacity: 1;
    box-shadow: 0 0 5px rgba(201, 165, 92, 0.5);
}

.news-translation-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-translation-flag-button {
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.news-translation-flag-button:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Conteúdo da notícia */
.news-article-content {
    padding: 20px;
    line-height: 1.6;
    font-size: 14px;
}

/* Estilo pergaminho para conteúdo de notícias */
.news-article-content.news-detail-text {
    background: #e2bb8d;
    border-radius: 8px;
    margin: 0 15px 15px 15px;
    padding: 20px;
    box-shadow: inset 0 0 15px rgba(139, 69, 19, 0.2);
}

/* Estilo padrão para news-content-body */
.news-content-body {
    line-height: 1.6;
    font-size: 14px;
}

/* Reduzir espaçamento entre parágrafos do TinyMCE */
.news-content-body p,
.news-article-content p {
    margin: 0 0 0.5em 0;
}

.news-content-body p:last-child,
.news-article-content p:last-child {
    margin-bottom: 0;
}

/* Parágrafos vazios (quebras de linha do TinyMCE) */
.news-content-body p:empty,
.news-article-content p:empty,
.news-content-body p br:only-child,
.news-article-content p br:only-child {
    margin: 0;
    line-height: 0.8;
}

.news-article.collapsed .news-article-content {
    display: none;
}

/* Paginação */
.news-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.news-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid rgba(139, 69, 19, 0.4);
    background: rgba(0, 0, 0, 0.35);
    color: #c9a55c;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.news-page-link:hover {
    background: rgba(0, 0, 0, 0.55);
    border-color: rgba(201, 165, 92, 0.6);
}

.news-page-link.active {
    background: rgba(139, 69, 19, 0.35);
    border-color: #c9a55c;
    color: #fff;
}

.news-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 10px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
}

.news-article-content img:hover {
    transform: scale(1.35);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
    position: relative;
}

/* Inline icons should NOT zoom */
.news-article-content img[style*="vertical-align"]:hover {
    transform: none;
    box-shadow: none;
    cursor: default;
}

/* Preservar imagens inline com vertical-align (ícones) */
.news-article-content img[style*="vertical-align"] {
    display: inline !important;
    margin: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.news-article-content a {
    color: #c9a55c;
    text-decoration: none;
}

.news-article-content a:hover {
    text-decoration: underline;
}

.news-article-content center {
    margin: 15px 0;
}

/* Video hover zoom */
.news-article-content video {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
}

.news-article-content video:hover {
    transform: scale(1.35);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
    position: relative;
}

/* YouTube embed */
.news-article-content .youtube {
    max-width: 640px;
    margin: 15px auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
}

.news-article-content .youtube:hover {
    transform: scale(1.35);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
    position: relative;
}

.news-article-content .youtube .aspectratio {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.news-article-content .youtube .aspectratio iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 6px;
}

/* Responsivo */
@media (max-width: 768px) {
    .news-language-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .news-article-header {
        padding: 12px 15px;
    }

    .news-article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .news-article-translations {
        position: static;
        margin-top: 10px;
    }

    .news-article-content {
        padding: 15px;
    }

    .news-article-title {
        font-size: 1.1em;
    }

    .news-article-content img:hover,
    .news-article-content video:hover,
    .news-article-content .youtube:hover {
        transform: scale(2);
    }

    .news-article-content img[style*="vertical-align"]:hover {
        transform: none;
    }
}
