<?php
/**
 * Landing Page Home Content - Template landing_v1
 * Contém: Hero, Features, Pricing, Testimonials, CTA
 */

// Carregar planos se não existirem
if (!isset($plans)) {
    $plans = $pdo->query("SELECT * FROM plans WHERE is_active = 1 ORDER BY sort_order ASC")->fetchAll(PDO::FETCH_ASSOC);
}

// Hero
$showHero = getLandingConfig($pdo, 'show_hero', '1') !== '0';
$heroBadge = getLandingConfig($pdo, 'hero_badge', '+2.500 lojas criadas');
$heroTitle = getLandingConfig($pdo, 'hero_title', 'Sua loja virtual no proximo nivel');
$heroSubtitle = getLandingConfig($pdo, 'hero_subtitle', 'Crie sua loja online em minutos. Sem codigo, sem complicacao.');
$heroCtaPrimary = getLandingConfig($pdo, 'hero_cta_primary', 'Comecar Gratis');
$heroCtaSecondary = getLandingConfig($pdo, 'hero_cta_secondary', 'Ver Recursos');
$heroImage = getLandingConfig($pdo, 'hero_image', '');
$heroStats = json_decode(getLandingConfig($pdo, 'hero_stats', '{}'), true) ?: [
    'lojas' => '2.500+', 'lojas_label' => 'Lojas Criadas',
    'vendas' => 'R$ 15M+', 'vendas_label' => 'Em Vendas',
    'avaliacao' => '4.9/5', 'avaliacao_label' => 'Avaliacao'
];

// Features
$showFeatures = getLandingConfig($pdo, 'show_features', '1') !== '0';
$featuresTitle = getLandingConfig($pdo, 'features_title', 'Tudo que voce precisa');
$featuresSubtitle = getLandingConfig($pdo, 'features_subtitle', 'Ferramentas poderosas para seu negocio crescer');
$featuresItems = json_decode(getLandingConfig($pdo, 'features_items', '[]'), true) ?: [];

// Pricing
$showPricing = getLandingConfig($pdo, 'show_pricing', '1') !== '0';
$pricingTitle = getLandingConfig($pdo, 'pricing_title', 'Escolha o plano ideal');
$pricingSubtitle = getLandingConfig($pdo, 'pricing_subtitle', 'Comece gratis e evolua conforme cresce');

// Testimonials
$showTestimonials = getLandingConfig($pdo, 'show_testimonials', '1') !== '0';
$testimonialsTitle = getLandingConfig($pdo, 'testimonials_title', 'O que nossos clientes dizem');
$testimonialsItems = json_decode(getLandingConfig($pdo, 'testimonials_items', '[]'), true) ?: [];

// CTA
$showCta = getLandingConfig($pdo, 'show_cta', '1') !== '0';
$ctaTitle = getLandingConfig($pdo, 'cta_title', 'Pronto para comecar?');
$ctaSubtitle = getLandingConfig($pdo, 'cta_subtitle', 'Junte-se a milhares de empreendedores');
$ctaButton = getLandingConfig($pdo, 'cta_button', 'Criar Minha Loja Gratis');
?>

<style>
/* Content Styles */
.hero{min-height:100vh;display:flex;align-items:center;padding:8rem 2rem 4rem;background:radial-gradient(ellipse at top right,rgba(<?php echo hexdec(substr($themeColors['primary'],1,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],3,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],5,2)); ?>,0.15) 0%,transparent 50%),var(--bg-dark)}
.hero-inner{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:1fr 1fr;gap:4rem;align-items:center}
.hero-badge{display:inline-flex;align-items:center;gap:.5rem;background:rgba(<?php echo hexdec(substr($themeColors['primary'],1,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],3,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],5,2)); ?>,0.15);border:1px solid rgba(<?php echo hexdec(substr($themeColors['primary'],1,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],3,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],5,2)); ?>,0.3);padding:.5rem 1rem;border-radius:50px;font-size:.875rem;color:var(--gold);margin-bottom:1.5rem}
.hero h1{font-size:3.5rem;font-weight:800;line-height:1.1;margin-bottom:1.5rem}
.hero h1 span{background:var(--gradient-gold);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.hero p{font-size:1.25rem;color:var(--text-secondary);margin-bottom:2rem;max-width:500px}
.hero-buttons{display:flex;gap:1rem;margin-bottom:3rem}
.hero-stats{display:flex;gap:3rem}
.stat-value{font-size:2rem;font-weight:800;color:var(--gold)}
.stat-label{font-size:.875rem;color:var(--text-muted)}
.hero-mockup{background:var(--bg-card);border-radius:20px;padding:1.5rem;border:1px solid var(--border);box-shadow:0 20px 60px rgba(0,0,0,0.3);animation:float 3s ease-in-out infinite}
.mockup-header{display:flex;gap:.5rem;margin-bottom:1rem}
.mockup-dot{width:12px;height:12px;border-radius:50%}
.mockup-dot.red{background:#FF5F56}.mockup-dot.yellow{background:#FFBD2E}.mockup-dot.green{background:#27CA40}
.mockup-content{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.mockup-card{background:rgba(<?php echo hexdec(substr($themeColors['primary'],1,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],3,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],5,2)); ?>,0.1);padding:1rem;border-radius:12px;text-align:center}
.mockup-card iconify-icon{font-size:2rem;color:var(--gold);margin-bottom:.5rem}
.mockup-card span{font-size:.75rem;color:var(--text-muted);display:block}
.section{padding:6rem 2rem}
.section-dark{background:var(--bg-darker)}
.container{max-width:1200px;margin:0 auto}
.section-header{text-align:center;margin-bottom:4rem}
.section-tag{display:inline-block;background:rgba(<?php echo hexdec(substr($themeColors['primary'],1,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],3,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],5,2)); ?>,0.15);color:var(--gold);padding:.5rem 1rem;border-radius:50px;font-size:.875rem;font-weight:600;margin-bottom:1rem}
.section-title{font-size:2.5rem;font-weight:800;margin-bottom:1rem}
.section-subtitle{font-size:1.125rem;color:var(--text-secondary);max-width:600px;margin:0 auto}
.features-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2rem}
.feature-card{background:var(--bg-card);border:1px solid var(--border);border-radius:16px;padding:2rem;transition:all .3s}
.feature-card:hover{border-color:rgba(<?php echo hexdec(substr($themeColors['primary'],1,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],3,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],5,2)); ?>,0.5);transform:translateY(-5px)}
.feature-icon{width:60px;height:60px;background:rgba(<?php echo hexdec(substr($themeColors['primary'],1,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],3,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],5,2)); ?>,0.15);border-radius:12px;display:flex;align-items:center;justify-content:center;margin-bottom:1.5rem}
.feature-icon iconify-icon{font-size:1.75rem;color:var(--gold)}
.feature-card h3{font-size:1.25rem;margin-bottom:.75rem}
.feature-card p{color:var(--text-secondary);font-size:.95rem}
.pricing-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1.5rem;align-items:stretch}
.pricing-card{background:var(--bg-card);border:1px solid var(--border);border-radius:20px;padding:2rem;position:relative;transition:all .3s;display:flex;flex-direction:column}
.pricing-card:hover{transform:translateY(-10px);border-color:rgba(<?php echo hexdec(substr($themeColors['primary'],1,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],3,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],5,2)); ?>,0.5)}
.pricing-card.featured{border:2px solid var(--gold);transform:scale(1.05);}
.pricing-badge{position:absolute;top:-12px;left:50%;transform:translateX(-50%);background:var(--gradient-gold);color:#000;padding:.4rem 1.25rem;border-radius:50px;font-size:.75rem;font-weight:700;text-transform:uppercase}.pricing-trial-badge{position:absolute;top:-12px;right:10px;background:linear-gradient(135deg, #10b981, #059669);color:white;padding:.35rem 1rem;border-radius:50px;font-size:.7rem;font-weight:600;display:flex;align-items:center;gap:4px;box-shadow:0 2px 8px rgba(16,185,129,.3)}
.pricing-header{text-align:center;padding-bottom:1.5rem;border-bottom:1px solid var(--border);margin-bottom:1.5rem}
.pricing-name{font-size:1.25rem;font-weight:700;margin-bottom:.5rem}
.pricing-desc{font-size:.875rem;color:var(--text-muted);margin-bottom:1rem}
.pricing-price{display:flex;align-items:baseline;justify-content:center;gap:.25rem}
.pricing-currency{font-size:1.5rem;font-weight:700;color:var(--gold)}
.pricing-value{font-size:3.5rem;font-weight:800;color:var(--gold);line-height:1}
.pricing-period{font-size:1rem;color:var(--text-muted)}
.pricing-yearly{font-size:.8rem;color:var(--success);margin-top:.5rem}
.pricing-features{list-style:none;margin-bottom:2rem}
.pricing-features li{display:flex;align-items:center;gap:.75rem;padding:.75rem 0;border-bottom:1px solid var(--border);font-size:.95rem}
.pricing-features li:last-child{border-bottom:none}
.pricing-features{flex-grow:1}
.pricing-card .btn{margin-top:auto}
.pricing-features iconify-icon{color:var(--success);font-size:1.25rem}
.pricing-card .btn{width:100%;justify-content:center}
.testimonials-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:2rem}
.testimonial-card{background:var(--bg-card);border:1px solid var(--border);border-radius:16px;padding:2rem}
.testimonial-stars{color:var(--gold);font-size:1.25rem;margin-bottom:1rem}
.testimonial-text{font-size:1rem;line-height:1.7;color:var(--text-secondary);margin-bottom:1.5rem}
.testimonial-author{display:flex;align-items:center;gap:1rem}
.testimonial-avatar{width:48px;height:48px;border-radius:50%;background:var(--gradient-gold);display:flex;align-items:center;justify-content:center;font-weight:700;color:#000}
.testimonial-info h4{font-size:1rem;margin-bottom:.25rem}
.testimonial-info span{font-size:.875rem;color:var(--text-muted)}
.cta{padding:6rem 2rem;background:linear-gradient(135deg,rgba(<?php echo hexdec(substr($themeColors['primary'],1,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],3,2)); ?>,<?php echo hexdec(substr($themeColors['primary'],5,2)); ?>,0.1) 0%,transparent 100%);text-align:center}
.cta h2{font-size:2.5rem;font-weight:800;margin-bottom:1rem}
.cta p{font-size:1.25rem;color:var(--text-secondary);margin-bottom:2rem}
.cta .btn{background:var(--gradient-gold);color:#000}

/* Responsive */
@media(max-width:767px){
.hero{padding:5rem 1rem 3rem;min-height:auto}
.hero-inner{grid-template-columns:1fr;text-align:center;gap:2.5rem}
.hero-image{order:-1;max-width:400px;margin:0 auto;margin-top:50px}
.hero h1{font-size:2.25rem;line-height:1.2};
.hero p{font-size:1.1rem;margin:0 auto 1.5rem;max-width:100%}
.hero-buttons{justify-content:center;flex-wrap:wrap}
.hero-stats{flex-wrap:wrap;gap:2rem;justify-content:center}
.stat-value{font-size:1.5rem}
.mockup-content{grid-template-columns:repeat(2,1fr)}
.section{padding:3rem 1rem}
.section-title{font-size:1.75rem}
.section-subtitle{font-size:1rem}
.features-grid{grid-template-columns:1fr}
.pricing-grid{grid-template-columns:1fr;max-width:400px;margin:0 auto}
.pricing-card{margin-bottom:1rem}
.pricing-card.featured{transform:none;margin-bottom:1.5rem}
.testimonials-grid{grid-template-columns:1fr}
.cta{padding:3rem 1rem}
.cta h2{font-size:1.75rem}
.cta p{font-size:1.05rem}
}
@media(max-width:575px){
.hero{padding:4rem 1rem 2rem}
.hero h1{font-size:1.875rem}
.hero p{font-size:1rem}
.hero-badge{font-size:0.8rem;padding:0.4rem 0.8rem}
.hero-stats{gap:1.5rem}
.stat-value{font-size:1.25rem}
.stat-label{font-size:0.8rem}
.mockup-content{grid-template-columns:repeat(2,1fr);gap:0.75rem}
.mockup-card{padding:0.75rem}
.mockup-card iconify-icon{font-size:1.5rem}
.mockup-card span{font-size:0.7rem}
.section{padding:2.5rem 1rem}
.section-title{font-size:1.5rem}
.section-subtitle{font-size:0.95rem}
.section-tag{font-size:0.8rem;padding:0.4rem 0.8rem}
.feature-card{padding:1.5rem}
.feature-icon{width:50px;height:50px}
.feature-icon iconify-icon{font-size:1.5rem}
.feature-card h3{font-size:1.1rem}
.feature-card p{font-size:0.9rem}
.pricing-card{padding:1.5rem}
.pricing-value{font-size:2.5rem}
.pricing-name{font-size:1.1rem}
.testimonial-card{padding:1.5rem}
.testimonial-text{font-size:0.95rem}
.cta h2{font-size:1.5rem}
.cta p{font-size:0.95rem}
}
@media(max-width:479px){
.hero h1{font-size:1.625rem}
.hero-buttons{flex-direction:column;width:100%}
.hero-buttons .btn{width:100%}
.hero-stats{flex-direction:column;gap:1rem;width:100%}
.stat{text-align:center;width:100%}
.mockup-content{grid-template-columns:1fr;gap:0.5rem}
.section-title{font-size:1.375rem}
.pricing-grid{max-width:100%}
.pricing-value{font-size:2rem}
}
</style>

<?php if ($showHero): ?>
<section class="hero">
<div class="hero-inner">
<div class="hero-content">
<?php if ($heroBadge): ?>
<div class="hero-badge"><iconify-icon icon="mdi:star"></iconify-icon><?php echo htmlspecialchars($heroBadge); ?></div>
<?php endif; ?>
<h1><?php
$titleParts = explode(' ', $heroTitle);
$lastWord = array_pop($titleParts);
echo htmlspecialchars(implode(' ', $titleParts));
?> <span><?php echo htmlspecialchars($lastWord); ?></span></h1>
<p><?php echo htmlspecialchars($heroSubtitle); ?></p>
<div class="hero-buttons">
<a href="#precos" class="btn btn-primary btn-large"><iconify-icon icon="mdi:rocket-launch"></iconify-icon><?php echo htmlspecialchars($heroCtaPrimary); ?></a>
<a href="#recursos" class="btn btn-outline btn-large"><?php echo htmlspecialchars($heroCtaSecondary); ?></a>
</div>
<div class="hero-stats">
<div class="stat"><div class="stat-value"><?php echo htmlspecialchars($heroStats['lojas'] ?? '2.500+'); ?></div><div class="stat-label"><?php echo htmlspecialchars($heroStats['lojas_label'] ?? 'Lojas'); ?></div></div>
<div class="stat"><div class="stat-value"><?php echo htmlspecialchars($heroStats['vendas'] ?? 'R$ 15M+'); ?></div><div class="stat-label"><?php echo htmlspecialchars($heroStats['vendas_label'] ?? 'Vendas'); ?></div></div>
<div class="stat"><div class="stat-value"><?php echo htmlspecialchars($heroStats['avaliacao'] ?? '4.9'); ?></div><div class="stat-label"><?php echo htmlspecialchars($heroStats['avaliacao_label'] ?? 'Avaliacao'); ?></div></div>
</div>
</div>
<div class="hero-image">
<?php if (!empty($heroImage)): ?>
<img src="<?php echo htmlspecialchars($heroImage); ?>" alt="Hero Banner" class="hero-banner-img" style="max-width: 100%; height: auto; border-radius: 20px; animation: float 3s ease-in-out infinite;">
<?php else: ?>
<div class="hero-mockup">
<div class="mockup-header"><span class="mockup-dot red"></span><span class="mockup-dot yellow"></span><span class="mockup-dot green"></span></div>
<div class="mockup-content">
<div class="mockup-card"><iconify-icon icon="mdi:shopping"></iconify-icon><span>Produtos</span></div>
<div class="mockup-card"><iconify-icon icon="mdi:cart"></iconify-icon><span>Pedidos</span></div>
<div class="mockup-card"><iconify-icon icon="mdi:account-group"></iconify-icon><span>Clientes</span></div>
<div class="mockup-card"><iconify-icon icon="mdi:chart-line"></iconify-icon><span>Relatorios</span></div>
<div class="mockup-card"><iconify-icon icon="mdi:credit-card"></iconify-icon><span>Pagamentos</span></div>
<div class="mockup-card"><iconify-icon icon="mdi:truck-delivery"></iconify-icon><span>Entregas</span></div>
</div>
</div>
<?php endif; ?>
</div>
</div>
</section>
<?php endif; ?>

<?php if ($showFeatures && !empty($featuresItems)): ?>
<section class="section section-dark" id="recursos">
<div class="container">
<div class="section-header">
<span class="section-tag">Recursos</span>
<h2 class="section-title"><?php echo htmlspecialchars($featuresTitle); ?></h2>
<p class="section-subtitle"><?php echo htmlspecialchars($featuresSubtitle); ?></p>
</div>
<div class="features-grid">
<?php foreach ($featuresItems as $feature): ?>
<article class="feature-card">
<div class="feature-icon"><iconify-icon icon="<?php echo htmlspecialchars($feature['icon'] ?? 'mdi:star'); ?>"></iconify-icon></div>
<h3><?php echo htmlspecialchars($feature['title'] ?? ''); ?></h3>
<p><?php echo htmlspecialchars($feature['description'] ?? ''); ?></p>
</article>
<?php endforeach; ?>
</div>
</div>
</section>
<?php endif; ?>

<?php if ($showPricing && !empty($plans)): ?>
<section class="section" id="precos">
<div class="container">
<div class="section-header">
<span class="section-tag">Precos</span>
<h2 class="section-title"><?php echo htmlspecialchars($pricingTitle); ?></h2>
<p class="section-subtitle"><?php echo htmlspecialchars($pricingSubtitle); ?></p>
</div>
<div class="pricing-grid">
<?php foreach ($plans as $plan):
$isFeatured = !empty($plan['is_featured']);
$price = floatval($plan['price_monthly']);
$priceYearly = floatval($plan['price_yearly']);
$economy = $price > 0 ? round((($price * 12) - $priceYearly) / ($price * 12) * 100) : 0;

// Montar lista de features - SOMENTE as configuradas no superadmin
$allFeatures = [];

// Limites (sempre com check se tiver valor)
if (!empty($plan['max_products'])) {
    $allFeatures[] = ['enabled' => true, 'label' => $plan['max_products'] . ' produtos'];
} else {
    $allFeatures[] = ['enabled' => true, 'label' => 'Produtos ilimitados'];
}

if (!empty($plan['max_staff_users'])) {
    $allFeatures[] = ['enabled' => true, 'label' => $plan['max_staff_users'] . ' usuarios'];
} else {
    $allFeatures[] = ['enabled' => true, 'label' => 'Usuarios ilimitados'];
}

if (!empty($plan['max_orders_per_month'])) {
    $allFeatures[] = ['enabled' => true, 'label' => $plan['max_orders_per_month'] . ' pedidos/mes'];
} else {
    $allFeatures[] = ['enabled' => true, 'label' => 'Pedidos ilimitados'];
}

// Features configuráveis do superadmin (exatamente igual ao painel)
$allFeatures[] = ['enabled' => (bool)($plan['whatsapp_integration'] ?? false), 'label' => 'Integracao WhatsApp'];
$allFeatures[] = ['enabled' => (bool)($plan['custom_domain'] ?? false), 'label' => 'Dominio Personalizado'];
$allFeatures[] = ['enabled' => (bool)($plan['control_panel'] ?? false), 'label' => 'Painel de Controle'];
$allFeatures[] = ['enabled' => (bool)($plan['full_reports'] ?? false), 'label' => 'Relatorios Completos'];
$allFeatures[] = ['enabled' => (bool)($plan['dedicated_support'] ?? false), 'label' => 'Suporte Dedicado'];

// Ordenar: ativados primeiro, desativados depois
usort($allFeatures, function($a, $b) {
    return $b['enabled'] <=> $a['enabled'];
});
?>
<div class="pricing-card <?php echo $isFeatured ? 'featured' : ''; ?>">
<?php if ($isFeatured): ?><div class="pricing-badge">Mais Popular</div><?php endif; ?>
<?php if ($plan['has_trial'] ?? false): ?><div class="pricing-trial-badge"><iconify-icon icon="solar:clock-circle-bold"></iconify-icon> <?php echo $plan['trial_days']; ?> dias grátis</div><?php endif; ?>
<div class="pricing-header">
<div class="pricing-name"><?php echo htmlspecialchars($plan['name']); ?></div>
<div class="pricing-desc"><?php echo htmlspecialchars($plan['description'] ?? ''); ?></div>
<div class="pricing-price">
<span class="pricing-currency">R$</span>
<span class="pricing-value"><?php echo $price == 0 ? '0' : number_format($price, 0, ',', '.'); ?></span>
<span class="pricing-period">/mes</span>
</div>
<?php if ($economy > 0): ?><div class="pricing-yearly">Anual: R$ <?php echo number_format($priceYearly, 2, ',', '.'); ?> (<?php echo $economy; ?>% off)</div><?php endif; ?>
</div>
<ul class="pricing-features">
<?php foreach ($allFeatures as $feature): ?>
<li style="<?php echo $feature['enabled'] ? '' : 'opacity:0.5;text-decoration:line-through'; ?>">
<iconify-icon icon="<?php echo $feature['enabled'] ? 'mdi:check-circle' : 'mdi:close-circle'; ?>" style="color:<?php echo $feature['enabled'] ? 'var(--success)' : 'var(--danger)'; ?>"></iconify-icon>
<?php echo $feature['label']; ?>
</li>
<?php endforeach; ?>
</ul>
<a href="/pages/cadastro/?plano=<?php echo $plan['id']; ?>" class="btn <?php echo $isFeatured ? 'btn-primary' : 'btn-outline'; ?>"><?php echo $price == 0 ? 'Comecar Gratis' : 'Assinar Agora'; ?></a>
</div>
<?php endforeach; ?>
</div>
</div>
</section>
<?php endif; ?>

<?php if ($showTestimonials && !empty($testimonialsItems)): ?>
<section class="section section-dark" id="depoimentos">
<div class="container">
<div class="section-header">
<span class="section-tag">Depoimentos</span>
<h2 class="section-title"><?php echo htmlspecialchars($testimonialsTitle); ?></h2>
</div>
<div class="testimonials-grid">
<?php foreach ($testimonialsItems as $testimonial):
$initials = '';
$nameParts = explode(' ', $testimonial['name'] ?? '');
if (count($nameParts) >= 2) {
    $initials = strtoupper(substr($nameParts[0], 0, 1) . substr(end($nameParts), 0, 1));
} else {
    $initials = strtoupper(substr($testimonial['name'] ?? 'U', 0, 2));
}
$rating = intval($testimonial['rating'] ?? 5);
$stars = str_repeat('★', $rating) . str_repeat('☆', 5 - $rating);
?>
<article class="testimonial-card">
<div class="testimonial-stars"><?php echo $stars; ?></div>
<p class="testimonial-text">"<?php echo htmlspecialchars($testimonial['text'] ?? ''); ?>"</p>
<div class="testimonial-author">
<div class="testimonial-avatar"><?php echo $initials; ?></div>
<div class="testimonial-info">
<h4><?php echo htmlspecialchars($testimonial['name'] ?? ''); ?></h4>
<span><?php echo htmlspecialchars($testimonial['role'] ?? ''); ?></span>
</div>
</div>
</article>
<?php endforeach; ?>
</div>
</div>
</section>
<?php endif; ?>

<?php if ($showCta): ?>
<section class="cta">
<div class="container">
<h2><?php echo htmlspecialchars($ctaTitle); ?></h2>
<p><?php echo htmlspecialchars($ctaSubtitle); ?></p>
<a href="#precos" class="btn btn-large"><iconify-icon icon="mdi:rocket-launch"></iconify-icon><?php echo htmlspecialchars($ctaButton); ?></a>
</div>
</section>
<?php endif; ?>
