/**
 * Congresso AVAG 2027 — Template genérico de página (page.php)
 */

.theme-page {
    padding: 3.5rem 0 5rem;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(14, 43, 92, 0.07), transparent 55%),
        linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-body) 40%, var(--bg-alt) 100%);
}

.theme-page > .container {
    max-width: 920px;
}

.theme-page-article {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.75rem 2.5rem 3rem;
}

.theme-page-header {
    max-width: 40rem;
    margin: 0 auto 2.25rem;
    text-align: center;
}

.theme-page-eyebrow {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--avag-gold);
    margin: 0 0 0.75rem;
}

.theme-page-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 800;
    color: var(--avag-primary);
    line-height: 1.2;
    margin: 0;
}

.theme-page-header::after {
    content: '';
    display: block;
    width: 3.5rem;
    height: 3px;
    margin: 1.25rem auto 0;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--avag-gold), var(--avag-yellow));
}

/* Conteúdo editorial — sobrescreve o reset global (padding/margin 0) */
.theme-page-content {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-body);
}

.theme-page-content > :first-child {
    margin-top: 0;
}

.theme-page-content > :last-child {
    margin-bottom: 0;
}

.theme-page-content h2,
.theme-page-content h3,
.theme-page-content h4 {
    font-family: var(--font-heading);
    color: var(--avag-primary);
    font-weight: 700;
    line-height: 1.3;
    margin: 2rem 0 0.85rem;
}

.theme-page-content h2 {
    font-size: clamp(1.35rem, 2.5vw, 1.55rem);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.theme-page-content h3 {
    font-size: 1.2rem;
    color: var(--text-heading);
}

.theme-page-content h4 {
    font-size: 1.05rem;
    color: var(--text-heading);
}

.theme-page-content p {
    margin: 0 0 1.15rem;
}

.theme-page-content a {
    color: var(--avag-primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(14, 43, 92, 0.28);
    text-underline-offset: 0.15em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.theme-page-content a:hover {
    color: var(--avag-gold-hover);
    text-decoration-color: rgba(197, 155, 39, 0.7);
}

.theme-page-content strong,
.theme-page-content b {
    color: var(--text-heading);
    font-weight: 700;
}

.theme-page-content ul,
.theme-page-content ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}

.theme-page-content li {
    margin-bottom: 0.45rem;
    padding-left: 0.25rem;
}

.theme-page-content ul {
    list-style: disc;
}

.theme-page-content ol {
    list-style: decimal;
}

.theme-page-content li::marker {
    color: var(--avag-gold);
    font-weight: 700;
}

.theme-page-content blockquote,
.theme-page-content .wp-block-quote {
    margin: 1.75rem 0;
    padding: 1.15rem 1.35rem;
    border-left: 4px solid var(--avag-gold);
    background: var(--avag-gold-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-heading);
}

.theme-page-content blockquote p,
.theme-page-content .wp-block-quote p {
    margin: 0 0 0.5rem;
    font-size: 1.08rem;
    font-style: italic;
    line-height: 1.6;
}

.theme-page-content blockquote cite,
.theme-page-content .wp-block-quote cite {
    display: block;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.theme-page-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--bg-alt);
    color: var(--avag-primary);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.theme-page-content figure {
    margin: 1.5rem 0;
}

.theme-page-content table,
.theme-page-content .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.theme-page-content th,
.theme-page-content td,
.theme-page-content .wp-block-table th,
.theme-page-content .wp-block-table td {
    border: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
    text-align: left;
    vertical-align: top;
}

.theme-page-content thead th,
.theme-page-content .wp-block-table thead th {
    background: var(--avag-primary);
    color: var(--text-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    border-color: var(--avag-primary-dark);
}

.theme-page-content tbody tr:nth-child(even) {
    background: var(--bg-alt);
}

.theme-page-content img {
    border-radius: var(--radius-md);
    margin: 1.25rem 0;
}

.theme-page-content hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

/* Documentos Complianz embutidos */
.theme-page-content #cmplz-document,
.theme-page-content .cmplz-document {
    max-width: 100%;
}

@media (max-width: 768px) {
    .theme-page {
        padding: 2.25rem 0 3.5rem;
    }

    .theme-page-article {
        padding: 1.75rem 1.25rem 2rem;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }

    .theme-page-content {
        font-size: 1rem;
    }

    .theme-page-content table,
    .theme-page-content .wp-block-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
