/* O Globo стили - приближены к оригинальному сайту */
:root {
    --oglobo-red: #C4170C;
    --oglobo-dark-red: #9B0E07;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --bg-white: #ffffff;
    --bg-light: #f5f5f5;
    --border-color: #e0e0e0;
    --link-color: #C4170C;
    --link-hover: #9B0E07;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-white);
    font-size: 18px;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header в стиле O Globo */
.header {
    background-color: var(--oglobo-red);
    color: white;
    padding: 1rem 0;
    border-bottom: 3px solid var(--oglobo-dark-red);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: 'Georgia', serif;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.nav {
    display: flex;
    align-items: center;
}

.section-name {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main content */
.main {
    padding: 2rem 0;
    background-color: var(--bg-white);
    min-height: calc(100vh - 200px);
}

/* News feed в стиле O Globo */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.news-item {
    background-color: var(--bg-white);
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.news-item:last-child {
    border-bottom: none;
}

.news-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Заголовки новостей как на O Globo */
.news-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 1rem 0;
    font-family: 'Georgia', serif;
}

.news-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
}

.news-title a:hover {
    color: var(--link-color);
}

/* Описание/лид */
.news-lead {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0.5rem 0;
    font-family: 'Georgia', serif;
}

.news-resumo {
    background-color: var(--bg-light);
    border-left: 4px solid var(--oglobo-red);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.7;
    font-family: 'Georgia', serif;
    font-style: italic;
}

/* Изображения новостей */
.news-image {
    margin: 1.5rem 0;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--bg-light);
}

.news-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

/* Мета информация */
.news-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.news-date {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 400;
}

.news-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.news-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* No news message */
.no-news {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--bg-light);
}

.no-news p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.no-news .hint {
    font-size: 1rem;
    color: var(--text-tertiary);
    font-style: italic;
    margin: 0.5rem 0;
}

.no-news code {
    background-color: var(--bg-white);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

/* Footer */
.footer {
    background-color: var(--oglobo-dark-red);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.social-link svg {
    width: 24px;
    height: 24px;
}

.social-link.facebook:hover {
    background-color: #1877F2;
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-link.twitter:hover {
    background-color: #1DA1F2;
}

.social-link.tiktok:hover {
    background-color: #000000;
}

.footer-note {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.footer-note a {
    color: var(--link-color);
    text-decoration: none;
}

.footer-note a:hover {
    text-decoration: underline;
}

/* Responsive design */
/* Only change header and footer colors (as on index), keep underline border */
:root { --celeste: #6CB4EE; }
.header {
    background-color: var(--celeste) !important;
    color: #ffffff !important;
}
.header a, .logo { color: #ffffff !important; }
.footer {
    background-color: var(--celeste) !important;
    color: #ffffff !important;
}
.footer a { color: #ffffff !important; }
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .logo {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }

    .news-title {
        font-size: 1.5rem;
    }

    .news-lead {
        font-size: 1rem;
    }
    
    .news-image img {
        max-height: 300px;
    }

    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.75rem;
    }
    
    .news-title {
        font-size: 1.25rem;
    }
    
    .news-image img {
        max-height: 250px;
    }
}

/* Страница отдельной статьи */
.article-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    font-family: 'Georgia', serif;
    color: var(--text-primary);
}

.article-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
}

.article-date {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}


.article-image {
    margin: 2rem 0;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    display: block;
}


.article-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-primary);
    margin: 2rem 0;
}

.article-content p {
    margin-bottom: 1.5rem;
    font-family: 'Georgia', serif;
    line-height: 1.9;
}

.article-content p.lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Ссылки в тексте статьи удаляются при парсинге, стили оставлены на случай если появятся */
.article-content a {
    color: var(--text-primary);
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: none;
}

/* Стили для форматированного текста */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    font-family: 'Georgia', serif;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
    color: var(--text-primary);
}

.article-content h1 {
    font-size: 2rem;
}

.article-content h2 {
    font-size: 1.75rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content h4 {
    font-size: 1.25rem;
}

.article-content h5,
.article-content h6 {
    font-size: 1.1rem;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    font-family: 'Georgia', serif;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--oglobo-red);
    background-color: var(--bg-light);
    font-style: italic;
    color: var(--text-secondary);
    font-family: 'Georgia', serif;
}

.article-content blockquote p {
    margin-bottom: 0.5rem;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-content strong,
.article-content b {
    font-weight: 700;
    color: var(--text-primary);
}

.article-content em,
.article-content i {
    font-style: italic;
}

.article-content u {
    text-decoration: underline;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 4px;
    display: block;
}

.article-content figure {
    margin: 2rem 0;
    text-align: center;
}

.article-content figure img {
    margin: 0 auto;
}

.article-content figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-style: italic;
}

.article-content div {
    margin-bottom: 1rem;
}

.article-content br {
    line-height: 1.8;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    gap: 1rem;
    flex-wrap: wrap;
}

.back-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Пагинация */
.pagination-wrapper {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Georgia', serif;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--oglobo-red);
    color: white;
    border-color: var(--oglobo-red);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.pagination-number {
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Georgia', serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-number:hover {
    background-color: var(--bg-light);
    border-color: var(--oglobo-red);
}

.pagination-number.active {
    background-color: var(--oglobo-red);
    color: white;
    border-color: var(--oglobo-red);
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: var(--text-tertiary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .pagination-number {
        min-width: 35px;
        height: 35px;
        font-size: 0.85rem;
        padding: 0.25rem;
    }
    
    .social-links {
        gap: 1.5rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .social-link svg {
        width: 20px;
        height: 20px;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-image img {
        max-height: 400px;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* Стили для уменьшения расстояний между заголовком, временем публикации и изображением */
.news-title {
    margin-bottom: 0.15rem !important;
}

.news-meta {
    margin-bottom: 0.15rem !important;
    margin-top: 0 !important;
}

.news-image {
    margin-top: 0.25rem !important;
    margin-bottom: 0.5rem !important;
}

.news-content {
    gap: 0.25rem !important;
}

/* Превью новости: форматирование как у основного текста */
.news-preview { margin-top: 0.35rem; }
.news-preview-text {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}
.news-read-more {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.25rem;
}
.news-read-more:hover { text-decoration: underline; }
