/* ==============================================
   SEGMENTOS.CSS — Estilos para páginas de segmento
   Usado em: template-fixee.php, template-segmentos.php
   Renderizado via: fixee_parse_custom_tags() no functions.php
   ============================================== */

/* ==================================================
   1. SEÇÕES — estrutura full-width
   Tags: !section classe conteúdo section!
   Gera: <section class="segmento-section classe">
           <div class="segmento-section-inner">...content...</div>
         </section>
   ================================================== */

.segmento-section {
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    padding: 6rem 0;
}

.segmento-section-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Backgrounds por seção — padrão home */
.segmento-section.segmento-section--1 {
    background: var(--accent);
    color: var(--white);
}

.segmento-section.segmento-section--1 h2,
.segmento-section.segmento-section--1 h3 {
    color: var(--white);
}

.segmento-section.segmento-section--1 p {
    color: var(--white);
}

.segmento-section.segmento-section--1 a {
    color: var(--white);
    text-decoration-color: rgba(255, 255, 255, 0.5);
}

.segmento-section.segmento-section--1 li {
    color: var(--white);
}

.segmento-section.segmento-section--1 li::before {
    color: var(--white);
}

.segmento-section.segmento-section--1 strong,
.segmento-section.segmento-section--1 b {
    color: var(--white);
}

.segmento-section--2 {
    background: #f9fafb;
}

.segmento-section.segmento-section--3 {
    background: var(--secondary);
    color: var(--white);
}

.segmento-section.segmento-section--3 h2,
.segmento-section.segmento-section--3 h3 {
    color: var(--white);
}

.segmento-section.segmento-section--3 p {
    color: var(--white);
}

.segmento-section.segmento-section--3 a {
    color: var(--accent);
}

.segmento-section.segmento-section--3 li {
    color: var(--white);
}

.segmento-section.segmento-section--3 li::before {
    color: var(--accent);
}

.segmento-section.segmento-section--3 strong,
.segmento-section.segmento-section--3 b {
    color: var(--white);
}

.segmento-section--4 {
    background: var(--white);
}

/* Fallback para seções extras */
.segmento-section--5 {
    background: #f9fafb;
}

.segmento-section--6 {
    background: var(--secondary);
    color: var(--white);
}

/* Variantes de background explícitas */
.segmento-section--light {
    background: var(--white) !important;
}

.segmento-section--gray {
    background: var(--bg-page) !important;
}

.segmento-section--dark {
    background: var(--secondary) !important;
    color: var(--white);
}

.segmento-section--dark h2 {
    color: var(--white);
}

.segmento-section--dark p {
    color: #dbeafe;
}

/* ==================================================
   2. TIPOGRAFIA — headings, parágrafos, links
   Consistente com .section-header e .benefit-card do global.css
   ================================================== */

/* --- Dentro de .content-main --- */
.content-main h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--secondary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.content-main h2 {
    font-size: clamp(1.375rem, 3vw, 1.875rem);
    color: var(--secondary);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.content-main h2:first-child {
    margin-top: 0;
}

.content-main h3 {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.content-main p {
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.content-main p:last-child {
    margin-bottom: 0;
}

.content-main a {
    color: var(--secondary);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.content-main a:hover {
    color: var(--accent);
}

/* --- Dentro de .segmento-section-inner --- */
.segmento-section h2 {
    font-size: clamp(1.375rem, 5vw, 2.6rem);
    color: var(--secondary);
    margin-bottom: 1.25rem;
    line-height: 1.15;
}

.segmento-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.segmento-section p {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    max-width: 800px;
}

.segmento-section h3 + p,
.segmento-section h2 + p {
    margin-top: 0;
}

.segmento-section a {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.segmento-section a:hover {
    color: var(--accent);
}

/* ==================================================
   3. LISTAS GENÉRICAS
   Tags: !ul classe conteúdo ul!  !li classe texto li!
   ================================================== */

/* --- Dentro de .content-main --- */
.content-main ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.content-main li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
    padding-left: 1rem;
    position: relative;
}

.content-main li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    flex-shrink: 0;
}

/* Reset dentro de listas já aninhadas (evita duplicação de pseudo) */
.content-main ul ul li::before {
    display: none;
    content: none;
}

/* --- Dentro de .segmento-section-inner --- */
.segmento-section ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.segmento-section li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    padding-left: 1.5rem;
    position: relative;
}

.segmento-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    flex-shrink: 0;
}

/* ==================================================
   4. FAQ — perguntas e respostas
   Tags: !faq-section → !faq-item → !faq-question → + !faq-answer
   Alinhado com .faq do global.css (home)
   ================================================== */

/* FAQ section — mesma aparência da home */
.segmento-section--faq {
    padding: 6rem 0;
    background: var(--white) !important;
}

.segmento-section--faq .segmento-section-inner {
    max-width: 800px;
}

.segmento-section--faq h2 {
    text-align: center;
    margin-bottom: 3rem;
}

/* Container do FAQ */
.content-main .faq-container,
.segmento-section .faq-container {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

/* Reset do li dentro do FAQ — anula estilos genéricos */
.content-main .faq-container li,
.segmento-section .faq-container li {
    display: block;
    padding-left: 0;
    position: static;
}

.content-main .faq-container li::before,
.segmento-section .faq-container li::before {
    display: none;
    content: none;
}

/* FAQ item */
.content-main .faq-item,
.segmento-section .faq-item {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.content-main .faq-item:hover,
.segmento-section .faq-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

/* FAQ question button */
.content-main .faq-question,
.segmento-section .faq-question {
    all: unset;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
    background: var(--bg-light);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    user-select: none;
}

.content-main .faq-question:hover,
.segmento-section .faq-question:hover {
    background: var(--bg);
}

.content-main .faq-question.active,
.segmento-section .faq-question.active {
    background: linear-gradient(135deg, rgba(208, 94, 38, 0.1), rgba(208, 94, 38, 0.05));
    color: var(--accent);
}

/* FAQ icon */
.content-main .faq-icon,
.segmento-section .faq-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    font-size: 1.25rem;
}

.content-main .faq-question.active .faq-icon,
.segmento-section .faq-question.active .faq-icon {
    transform: rotate(180deg);
}

/* FAQ answer */
.js .content-main .faq-answer,
.js .segmento-section .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--white);
}

.js .content-main .faq-answer.active,
.js .segmento-section .faq-answer.active {
    max-height: 1000px;
}

/* FAQ answer content */
.content-main .faq-answer-content,
.segmento-section .faq-answer-content {
    padding: 1.5rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.content-main .faq-answer-content ul,
.segmento-section .faq-answer-content ul {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.content-main .faq-answer-content li,
.segmento-section .faq-answer-content li {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.content-main .faq-answer-content li::before,
.segmento-section .faq-answer-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* ==================================================
   5. CHECKLIST
   Tag: !ul.segmento-checklist !li texto li! ul!
   ================================================== */

.segmento-checklist {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.segmento-checklist li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.segmento-checklist li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: rgba(208, 94, 38, 0.12);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ==================================================
   6. CARDS DE CONTEÚDO
   Tag: !div.card !h3 ... h3! !ul ... ul! !div!
   Alinhado com .benefit-card do global.css
   ================================================== */

.segmento-card {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.segmento-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(208, 94, 38, 0.1);
    transform: translateY(-4px);
}

.segmento-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.segmento-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.segmento-card li {
    font-size: 0.95rem;
    line-height: 1.6;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-muted);
}

.segmento-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.75rem;
}

/* ==================================================
   7. GRID DE CARDS — duas colunas no desktop
   Uso: !div.segmento-cards !ul ... ul! !div!
   ================================================== */

.segmento-cards ul {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .segmento-cards ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

.segmento-cards .card {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    color: var(--text-muted);
    line-height: 1.7;
    transition: all 0.3s ease;
}

.segmento-cards .card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(208, 94, 38, 0.1);
    transform: translateY(-4px);
}

/* ==================================================
   8. INTRO BLOCK
   Tag: !intro-block conteúdo intro-block!
   ================================================== */

.segmento-intro-block {
    margin-bottom: 2rem;
}

.segmento-intro-block h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--secondary);
    margin-bottom: 1.5rem;
    line-height: 1.15;
}

.segmento-intro-block p {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.segmento-intro-block ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.segmento-intro-block li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.segmento-intro-block li::before {
    content: '→';
    color: var(--accent);
    font-weight: bold;
    flex-shrink: 0;
}

/* ==================================================
   9. SIGNATURE BAR
   Uso: !ul.signature ... ul!
   ================================================== */

.signature {
    list-style: none;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dark);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    margin-bottom: 0;
}

.signature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.signature-item::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 0.625rem;
    font-weight: bold;
}

/* ==================================================
   10. ELEMENTOS ADICIONAIS DE CONTEÚDO
   ================================================== */

/* Blockquote */
.content-main blockquote,
.segmento-section-inner blockquote {
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-light);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: var(--text-dark);
}

.content-main blockquote p:last-child,
.segmento-section-inner blockquote p:last-child {
    margin-bottom: 0;
}

/* Código inline */
.content-main code,
.segmento-section-inner code {
    background: var(--bg-light);
    padding: 0.15em 0.4em;
    border-radius: 0.35rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
    color: var(--accent);
}

/* Bloco de código */
.content-main pre,
.segmento-section-inner pre {
    background: var(--secondary);
    color: #e5e7eb;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.content-main pre code,
.segmento-section-inner pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Imagem dentro do conteúdo */
.content-main img,
.segmento-section-inner img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    display: block;
    margin: 1.5rem 0;
}

/* Separador horizontal */
.content-main hr,
.segmento-section-inner hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 2rem 0;
}

/* Texto forte e ênfase */
.content-main strong,
.content-main b,
.segmento-section-inner strong,
.segmento-section-inner b {
    color: var(--text-dark);
    font-weight: 600;
}

/* ==================================================
   11. RESPONSIVO
   ================================================== */

@media (max-width: 767px) {
    .content-main h1 { font-size: 1.75rem; }
    .content-main h2 { font-size: 1.375rem; margin-top: 2rem; }
    .segmento-section { padding: 4rem 0; }
    .segmento-section h2 { font-size: clamp(1.25rem, 4vw, 1.75rem); }
    .content-main .faq-question,
    .segmento-section .faq-question { font-size: 0.9375rem; padding: 1rem 1.25rem; }
    .segmento-section-inner { padding: 0 1rem; }
    .segmento-cards ul { grid-template-columns: 1fr; }
    .signature { flex-direction: column; gap: 0.5rem; }
}
