/* ═══════════════════════════════════════════════
   inst-page.css — CSS reutilizável para páginas
   institucionais internas (simulador, crm, etc.)
   Depende de: tokens.css, institucional.css (header/footer)
   ═══════════════════════════════════════════════ */

/* ── BREADCRUMB ── */
.inst-breadcrumb {
    max-width: 1200px; margin: 0 auto;
    padding: 100px 32px 0;
    font-size: 13px; color: var(--text-muted);
}
.inst-breadcrumb a {
    color: var(--text-secondary); text-decoration: none;
    transition: color var(--transition);
}
.inst-breadcrumb a:hover { color: var(--primary); }
.inst-breadcrumb .sep { margin: 0 8px; opacity: 0.5; }

/* ── PAGE HERO ── */
.inst-page-hero {
    max-width: 1200px; margin: 0 auto;
    padding: 40px 32px 60px;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 48px; align-items: center;
}
.inst-page-hero-text { max-width: 560px; }
.inst-page-hero h1 {
    font-size: clamp(28px, 4vw, 42px); font-weight: 800;
    color: var(--text-primary); line-height: 1.15;
    margin-bottom: 16px; letter-spacing: -0.5px;
}
.inst-page-hero h1 span { color: var(--primary); }
.inst-page-hero-desc {
    font-size: 17px; color: var(--text-secondary);
    line-height: 1.7; margin-bottom: 28px;
}
.inst-page-hero-img {
    width: 100%; border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

/* ── SECTION (conteúdo genérico) ── */
.inst-page-section {
    max-width: 1200px; margin: 0 auto;
    padding: 60px 32px;
}
.inst-page-section:nth-child(even) {
    background: var(--bg-light);
    max-width: 100%; padding-left: calc((100% - 1200px) / 2 + 32px);
    padding-right: calc((100% - 1200px) / 2 + 32px);
}
.inst-page-section h2 {
    font-size: clamp(22px, 3vw, 32px); font-weight: 800;
    color: var(--text-primary); margin-bottom: 16px;
    letter-spacing: -0.3px;
}
.inst-page-section h2 span { color: var(--primary); }
.inst-page-section > p {
    font-size: 16px; line-height: 1.7;
    color: var(--text-secondary); max-width: 720px;
    margin-bottom: 32px;
}

/* ── FEATURE GRID (2x3 ou 3x2) ── */
.inst-page-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.inst-page-feature {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 28px;
    transition: transform var(--transition), box-shadow var(--transition);
}
.inst-page-feature:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-lg);
}
.inst-page-feature-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.inst-page-feature-icon.orange { background: var(--primary-light); color: var(--primary); }
.inst-page-feature-icon.blue { background: var(--secondary-light); color: var(--secondary); }
.inst-page-feature-icon.green { background: var(--success-light); color: var(--success); }
.inst-page-feature-icon.purple { background: rgba(139,92,246,0.1); color: #8B5CF6; }
.inst-page-feature-icon.cyan { background: rgba(6,182,212,0.1); color: #06B6D4; }
.inst-page-feature-icon.red { background: var(--danger-light); color: var(--danger); }
.inst-page-feature-icon svg { width: 24px; height: 24px; }

.inst-page-feature h3 {
    font-size: 16px; font-weight: 700;
    color: var(--text-primary); margin-bottom: 8px;
}
.inst-page-feature p {
    font-size: 14px; color: var(--text-secondary);
    line-height: 1.6;
}

/* ── COMPARISON TABLE ── */
.inst-page-table-wrap {
    overflow-x: auto; margin: 24px 0;
    border-radius: 12px; border: 1px solid var(--border);
}
.inst-page-table {
    width: 100%; border-collapse: collapse;
    font-size: 14px;
}
.inst-page-table th {
    background: var(--secondary); color: #fff;
    padding: 14px 20px; text-align: left;
    font-weight: 700; font-size: 13px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.inst-page-table td {
    padding: 12px 20px; border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.inst-page-table tr:last-child td { border-bottom: none; }
.inst-page-table tr:hover td { background: var(--bg-hover); }

/* ── FAQ ACCORDION ── */
.inst-page-faq { max-width: 720px; }
.inst-page-faq details {
    border: 1px solid var(--border); border-radius: 12px;
    margin-bottom: 12px; overflow: hidden;
    transition: box-shadow var(--transition);
}
.inst-page-faq details[open] {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.inst-page-faq summary {
    padding: 18px 24px; font-size: 15px; font-weight: 700;
    color: var(--text-primary); cursor: pointer;
    list-style: none; display: flex;
    align-items: center; justify-content: space-between;
    transition: background var(--transition);
}
.inst-page-faq summary:hover { background: var(--bg-hover); }
.inst-page-faq summary::after {
    content: '+'; font-size: 20px; font-weight: 400;
    color: var(--primary); transition: transform 0.2s;
    flex-shrink: 0; margin-left: 16px;
}
.inst-page-faq details[open] summary::after {
    content: '−';
}
.inst-page-faq .faq-answer {
    padding: 0 24px 20px;
    font-size: 14px; color: var(--text-secondary);
    line-height: 1.7;
}

/* ── PAGE CTA ── */
.inst-page-cta {
    text-align: center; padding: 80px 32px;
    background: var(--gradient-blue);
}
.inst-page-cta h2 {
    font-size: clamp(24px, 3.5vw, 36px); font-weight: 800;
    color: #fff; margin-bottom: 12px;
}
.inst-page-cta p {
    font-size: 16px; color: rgba(255,255,255,0.8);
    margin-bottom: 28px; max-width: 500px;
    margin-left: auto; margin-right: auto;
}

/* ── INLINE IMAGE SECTION ── */
.inst-page-img-section {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 48px; align-items: center;
    margin: 32px 0;
}
.inst-page-img-section.reverse { direction: rtl; }
.inst-page-img-section.reverse > * { direction: ltr; }
.inst-page-img-section img {
    width: 100%; border-radius: 16px;
    box-shadow: var(--shadow-md);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .inst-breadcrumb { padding-top: 80px; }
    .inst-page-hero {
        grid-template-columns: 1fr;
        padding: 24px 20px 40px;
        gap: 32px;
    }
    .inst-page-section {
        padding: 40px 20px;
    }
    .inst-page-section:nth-child(even) {
        padding-left: 20px; padding-right: 20px;
    }
    .inst-page-img-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .inst-page-img-section.reverse { direction: ltr; }
    .inst-page-cta { padding: 50px 20px; }
    .inst-page-features {
        grid-template-columns: 1fr;
    }
}
