/* ==========================================================================
   123 Protege - Artigos & Layout de Leitura Minimalista
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
picture,
figure {
    max-width: 100%;
}

.article-page {
    background-color: #fdfdfd;
    color: #2b2f38;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
}

/* Header Minimalista */
.article-header {
    background: #ffffff;
    border-bottom: 1px solid #eef2f6;
    padding: 1.1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.article-header-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.article-brand img {
    height: 36px;
    width: auto;
    transition: transform 0.2s ease;
}

.article-brand:hover img {
    transform: scale(1.02);
}

.article-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-500, #174382);
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border-radius: 20px;
    background: #eef3f9;
    transition: all 0.2s ease;
}

.article-nav-link:hover {
    background: #174382;
    color: #ffffff;
    text-decoration: none;
}

/* Container do Artigo */
.article-main {
    flex: 1 0 auto;
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.25rem 5rem 1.25rem;
    width: 100%;
}

/* Cabeçalho do Conteúdo */
.article-meta-top {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.article-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e8f0fe;
    color: #174382;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-read-time {
    font-size: 0.85rem;
    color: #718096;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.article-title {
    font-size: 2.35rem;
    line-height: 1.25;
    font-weight: 700;
    color: #141b2d;
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
}

.article-lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Imagem de Capa */
.article-featured-image {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 2.75rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    background: #0b1c36;
}

.article-featured-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.article-featured-image figcaption {
    padding: 0.6rem 0.9rem;
    font-size: 0.8rem;
    color: #718096;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
}

/* Corpo de Leitura Tipográfico */
.article-content {
    font-size: 1.08rem;
    line-height: 1.85;
    color: #2d3748;
}

.article-content p {
    margin-bottom: 1.6rem;
}

.article-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a202c;
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    line-height: 1.35;
    letter-spacing: -0.3px;
}

.article-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 1.75rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.6rem;
}

.article-content strong {
    color: #111827;
}

.article-highlight-box {
    background: #f0f7ff;
    border-left: 4px solid #174382;
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
}

.article-highlight-box p {
    margin: 0;
    font-size: 1.02rem;
    color: #1e3a8a;
}

.article-warning-box {
    background: #fff8eb;
    border-left: 4px solid #ff9f43;
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
}

.article-warning-box p {
    margin: 0;
    font-size: 1.02rem;
    color: #8c5300;
}

/* Seção de Referências */
.article-references {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.article-references-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-references ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.article-references li {
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
    color: #4a5568;
}

.article-references a {
    color: #174382;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    word-break: break-word;
}

.article-references a:hover {
    color: #0b203e;
}

/* Paginação / Próxima e Anterior */
.article-navigation {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .article-navigation {
        grid-template-columns: 1fr;
    }
}

.article-nav-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.article-nav-card:hover {
    border-color: #174382;
    box-shadow: 0 6px 20px rgba(23, 67, 130, 0.08);
    transform: translateY(-2px);
    text-decoration: none;
}

.article-nav-direction {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #718096;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.article-nav-target-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.4;
}

.article-nav-card.next {
    text-align: right;
    align-items: flex-end;
}

.article-nav-card.prev {
    text-align: left;
    align-items: flex-start;
}

.article-nav-card.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

/* CTA Box 123 Protege no final */
.article-cta-box {
    margin-top: 3.5rem;
    background: linear-gradient(135deg, #0f2b54 0%, #174382 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 2.25rem;
    text-align: center;
}

.article-cta-box h3 {
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.article-cta-box p {
    color: #d3e0ee;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.article-cta-btn {
    display: inline-block;
    background: #28c76f;
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-cta-btn:hover {
    background: #22a85e;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 199, 111, 0.35);
}

/* Footer Minimalista */
.article-footer {
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    padding: 2rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: #718096;
}

.article-footer a {
    color: #4a5568;
    text-decoration: none;
}

.article-footer a:hover {
    color: #174382;
    text-decoration: underline;
}

/* Listagem de Artigos (/artigos) */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.article-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.article-card-item:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.07);
    text-decoration: none;
}

.article-card-thumb {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #0f2b54;
}

.article-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: #174382;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.article-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.article-card-desc {
    font-size: 0.92rem;
    color: #4a5568;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem;
}

.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #718096;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.75rem;
}

.article-card-link-text {
    font-weight: 600;
    color: #174382;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Badges e Cards de Mídia Externa */
.article-badge-external {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.article-badge-video {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Card especial para Vídeo Embutido direto na página */
.article-video-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.article-video-card-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.article-video-frame-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: #0b1c36;
    overflow: hidden;
}

.article-video-frame-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Abas/Filtro do catálogo */
.articles-section-header {
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #eef2f6;
    padding-bottom: 0.75rem;
}

.articles-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0;
}

/* ==========================================================================
   Responsividade Mobile (Ajustes de Layout e Prevenção de Scroll Horizontal)
   ========================================================================== */
@media (max-width: 768px) {
    .article-header-container {
        padding: 0 1rem;
    }

    .article-brand img {
        height: 30px;
    }

    .article-nav-link {
        font-size: 0.82rem;
        padding: 0.4rem 0.75rem;
    }

    .article-main {
        padding: 2rem 1rem 3.5rem 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .article-title {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        word-break: break-word;
    }

    .article-lead {
        font-size: 1.05rem;
        line-height: 1.55;
        margin-bottom: 1.5rem;
    }

    .article-featured-image {
        margin-bottom: 2rem;
        border-radius: 8px;
    }

    .article-content {
        font-size: 1rem;
        line-height: 1.75;
        word-break: break-word;
    }

    .article-content h2 {
        font-size: 1.35rem;
        margin-top: 2rem;
        margin-bottom: 0.75rem;
    }

    .article-content h3 {
        font-size: 1.15rem;
    }

    .article-highlight-box,
    .article-warning-box {
        padding: 1rem 1.15rem;
        margin: 1.5rem 0;
    }

    .article-cta-box {
        padding: 1.75rem 1.25rem;
        margin-top: 2.5rem;
    }

    .article-cta-box h3 {
        font-size: 1.25rem;
    }

    .article-cta-box p {
        font-size: 0.95rem;
    }

    .article-cta-btn {
        width: 100%;
        max-width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
        box-sizing: border-box;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.5rem;
    }

    .article-meta-top {
        gap: 0.5rem;
    }

    .article-featured-image figcaption {
        font-size: 0.75rem;
        padding: 0.5rem 0.65rem;
    }
}

