/**
 * paginas.css — Estilos das páginas criadas pelo Page Builder
 * Template: page-default.php
 * Não alterar o CSS global do sistema. Usar apenas para páginas dinâmicas.
 */

/* ══════════════════════════════════════════════════════════════
   HERO DA PÁGINA
   ══════════════════════════════════════════════════════════════ */
.pd-page-hero {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 64px 24px;
    text-align: center;
}

.pd-page-hero__inner {
    max-width: 800px;
    margin: 0 auto;
}

.pd-page-hero__title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary, #111);
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.02em;
}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.pd-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: var(--text-muted, #999);
}

.pd-breadcrumb a {
    color: var(--text-muted, #999);
    text-decoration: none;
    transition: color 0.15s;
}

.pd-breadcrumb a:hover {
    color: var(--primary-color, #6366f1);
}

.pd-breadcrumb__sep {
    font-size: 0.75rem;
    color: var(--border-color);
}

.pd-breadcrumb__current {
    color: var(--text-secondary, #555);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* ══════════════════════════════════════════════════════════════
   CONTAINER DE CONTEÚDO
   ══════════════════════════════════════════════════════════════ */
.pd-page-section {
    background: var(--bg-primary);
    padding-bottom: 80px;
}

/* ── Imagem de Capa (campo sidebar do editor) ─────────────────── */
.pd-cover-image {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px 0;
}

.pd-cover-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.pd-page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 64px 24px;
}

/* ══════════════════════════════════════════════════════════════
   BLOCO BASE
   ══════════════════════════════════════════════════════════════ */
.bloco {
    margin-bottom: 48px;
}

/* Divisor não duplica margem com o wrapper .bloco */
.bloco.bloco-divisor {
    margin-bottom: 0;
    margin-top: 0;
}

/* ══════════════════════════════════════════════════════════════
   BLOCO: TEXTO RICO
   ══════════════════════════════════════════════════════════════ */
.bloco-texto {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text-secondary);
}

.bloco-texto h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary, #111);
    margin: 32px 0 14px;
}

.bloco-texto h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary, #111);
    margin: 24px 0 10px;
}

.bloco-texto h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #111);
    margin: 20px 0 8px;
}

.bloco-texto p {
    margin-bottom: 24px;
}

.bloco-texto ul,
.bloco-texto ol {
    padding-left: 26px;
    margin-bottom: 24px;
}

.bloco-texto li {
    margin-bottom: 8px;
}

.bloco-texto a {
    color: var(--primary-color, #6366f1);
    text-decoration: none;
}

.bloco-texto a:hover {
    text-decoration: underline;
}

.bloco-texto blockquote {
    border-left: 4px solid var(--primary-color, #6366f1);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-muted, #888);
}

.bloco-texto strong {
    font-weight: 700;
    color: var(--text-primary, #111);
}

/* ══════════════════════════════════════════════════════════════
   BLOCO: IMAGEM
   ══════════════════════════════════════════════════════════════ */
.bloco-imagem {
    text-align: center;
}

/* Reset margin nativa do browser APENAS no <figure> interno */
figure.bloco-imagem {
    margin: 0;
}

.bloco-imagem img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.bloco-imagem figcaption {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    line-height: 1.5;
}

/* Largura total */
.bloco-imagem-full {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.bloco-imagem-full img {
    border-radius: 0;
    aspect-ratio: 21 / 9;
    max-height: 520px;
}

/* ══════════════════════════════════════════════════════════════
   BLOCO: VÍDEO
   ══════════════════════════════════════════════════════════════ */
/* O wrapper externo .bloco.bloco-video NÃO deve ter margin: 0 auto
   (zeraria o margin-bottom: 48px do .bloco). O centering fica no filho. */
.bloco-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
}

/* Centralizar e limitar largura apenas no inner div (filho direto de .bloco) */
.bloco > .bloco-video {
    max-width: 800px;
    margin: 0 auto;
}

.bloco-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ══════════════════════════════════════════════════════════════
   BLOCO: CALL TO ACTION (CTA)
   ══════════════════════════════════════════════════════════════ */
.bloco-cta {
    padding: 56px 40px;
    border-radius: 12px;
    text-align: center;
    color: #fff;
    background-color: var(--cor-principal, var(--primary-color, #6366f1));
}

.bloco-cta h2 {
    margin: 0 0 12px;
    font-size: 1.85rem;
    font-weight: 700;
    color: inherit;
    line-height: 1.25;
}

.bloco-cta p {
    margin: 0 0 28px;
    font-size: 1.05rem;
    opacity: 0.9;
    line-height: 1.65;
}

.bloco-cta-btn {
    display: inline-block;
    padding: 14px 32px;
    background: rgba(255, 255, 255, .15);
    border: 2px solid rgba(255, 255, 255, .6);
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.bloco-cta-btn:hover {
    background: rgba(255, 255, 255, .28);
    border-color: rgba(255, 255, 255, .8);
}

/* ══════════════════════════════════════════════════════════════
   BLOCO: BOTÃO
   ══════════════════════════════════════════════════════════════ */
.bloco-botao.align-left   { text-align: left; }
.bloco-botao.align-center { text-align: center; }
.bloco-botao.align-right  { text-align: right; }

.bloco-botao-link {
    display: inline-block;
    padding: 14px 32px;
    background-color: var(--cor-principal, var(--primary-color, #6366f1));
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid transparent;
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.bloco-botao-link:hover {
    opacity: 0.87;
    transform: translateY(-2px);
}

/* Estilo secundário (outline) */
.bloco-botao-link.botao-secundario {
    background-color: transparent;
    color: var(--cor-principal, var(--primary-color, #6366f1));
    border-color: var(--cor-principal, var(--primary-color, #6366f1));
}

.bloco-botao-link.botao-secundario:hover {
    background-color: var(--cor-principal, var(--primary-color, #6366f1));
    color: #fff;
    opacity: 1;
}

/* ══════════════════════════════════════════════════════════════
   BLOCO: DIVISOR
   ══════════════════════════════════════════════════════════════ */
.bloco-divisor {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0;
    display: block;
}

/* ══════════════════════════════════════════════════════════════
   BLOCO: FORMULÁRIO
   ══════════════════════════════════════════════════════════════ */
.bloco-formulario {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
}

.form-titulo {
    margin: 0 0 28px;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary, #111);
    line-height: 1.3;
}

.form-bloco {
    display: grid;
    gap: 20px;
}

.form-field-wrap label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary, #111);
}

.req-star {
    color: #ef4444;
}

.form-field-wrap input:not([type=checkbox]):not([type=file]),
.form-field-wrap textarea,
.form-field-wrap select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.form-field-wrap input:focus,
.form-field-wrap textarea:focus,
.form-field-wrap select:focus {
    outline: none;
    border-color: var(--primary-color, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.form-field-wrap textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary, #111);
}

.checkbox-label input {
    width: auto;
    accent-color: var(--primary-color, #6366f1);
}

.form-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--cor-principal, var(--primary-color, #6366f1));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.form-submit-btn:hover {
    opacity: 0.87;
}

.form-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.form-msg {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.form-msg.error {
    background: rgba(220, 38, 38, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.form-success {
    text-align: center;
    padding: 36px 20px;
    font-size: 1.05rem;
    color: var(--text-primary, #111);
}

.form-success i {
    color: #22c55e;
    font-size: 2.2rem;
    display: block;
    margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════════════════
   COMPATIBILIDADE RETROATIVA (sem blocos)
   ══════════════════════════════════════════════════════════════ */
.pd-compat-text {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-secondary, #555);
    margin-bottom: 28px;
    text-align: center;
}

.pd-compat-rich {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary, #555);
}

.pd-compat-rich img          { max-width: 100%; border-radius: 8px; margin: 20px 0; }
.pd-compat-rich h2,
.pd-compat-rich h3           { color: var(--text-primary, #111); margin-top: 28px; margin-bottom: 12px; }
.pd-compat-rich p            { margin-bottom: 20px; }
.pd-compat-rich ul,
.pd-compat-rich ol           { margin-bottom: 20px; padding-left: 22px; }
.pd-compat-rich li           { margin-bottom: 8px; }
.pd-compat-rich blockquote   { border-left: 4px solid var(--primary-color, #6366f1); padding-left: 18px; margin: 20px 0; font-style: italic; color: var(--text-muted, #888); }
.pd-compat-rich a            { color: var(--primary-color, #6366f1); }

.pd-empty {
    text-align: center;
    color: var(--text-muted, #999);
    font-size: 1rem;
    padding: 32px 0;
}

/* ── Botão Voltar ──────────────────────────────────────────── */
/* Sem border-top — o divisor do admin já é suficiente como separador visual */
.pd-back-btn {
    text-align: center;
    margin-top: 56px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVIDADE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .pd-page-hero {
        padding: 40px 20px;
    }

    .pd-page-hero__title {
        font-size: 1.65rem;
    }

    .pd-page-content {
        padding: 40px 16px;
    }

    .bloco {
        margin-bottom: 36px;
    }

    .bloco-texto {
        font-size: 16px;
    }

    .bloco-cta {
        padding: 40px 24px;
    }

    .bloco-cta h2 {
        font-size: 1.4rem;
    }

    .bloco-imagem-full {
        margin-left: 0;
        margin-right: 0;
    }

    .bloco-imagem-full img {
        border-radius: 8px;
        aspect-ratio: 16 / 9;
    }

    .bloco-formulario {
        padding: 28px 20px;
    }

    .form-bloco {
        gap: 16px;
    }

    /* Campos em coluna única no mobile — já é padrão com grid de 1 coluna */
}

@media (max-width: 480px) {
    .pd-page-hero__title {
        font-size: 1.4rem;
    }

    .pd-breadcrumb__current {
        max-width: 140px;
    }
}