<?php
/**
 * Title: Footer
 * Slug: twentytwentyfive/footer
 * Categories: footer
 * Block Types: core/template-part/footer
 * Description: Custom coaching footer with editorial links and CTA.
 *
 * @package WordPress
 * @subpackage Twenty_Twenty_Five
 * @since Twenty Twenty-Five 1.0
 */

$coach_footer_links = [
    [
        'index' => '01',
        'label' => __('Services', 'twentytwentyfive'),
        'note'  => __('Offers and formats', 'twentytwentyfive'),
        'url'   => get_permalink(get_page_by_path('services')) ?: home_url('/services/'),
    ],
    [
        'index' => '02',
        'label' => __('About', 'twentytwentyfive'),
        'note'  => __('Approach and point of view', 'twentytwentyfive'),
        'url'   => get_permalink(get_page_by_path('about')) ?: home_url('/about/'),
    ],
    [
        'index' => '03',
        'label' => __('Insights', 'twentytwentyfive'),
        'note'  => __('Articles and reflections', 'twentytwentyfive'),
        'url'   => get_permalink(get_page_by_path('blog')) ?: home_url('/blog/'),
    ],
    [
        'index' => '04',
        'label' => __('Contact', 'twentytwentyfive'),
        'note'  => __('Questions and next steps', 'twentytwentyfive'),
        'url'   => get_permalink(get_page_by_path('contact')) ?: home_url('/contact/'),
    ],
];

$coach_book_url = get_permalink(get_page_by_path('book-session')) ?: home_url('/book-session/');
$coach_services_url = get_permalink(get_page_by_path('services')) ?: home_url('/services/');
?>
<!-- wp:group {"align":"full","className":"coach-site-footer-shell","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull coach-site-footer-shell coach-site-footer"><div class="wp-block-group__inner-container">
    <div class="coach-site-footer-inner">
        <div class="coach-site-footer-grid">
            <div class="coach-site-footer-copy">
                <p class="coach-eyebrow">12 / Footer</p>
                <h2><?php echo esc_html__('A calmer final step — with a clear way forward.', 'twentytwentyfive'); ?></h2>
                <p><?php echo esc_html__('Whether someone is still getting oriented or already ready to start, the footer should feel like a clean continuation of the page — not a generic dead end.', 'twentytwentyfive'); ?></p>
                <div class="coach-site-footer-actions">
                    <a class="coach-inline-link is-primary" href="<?php echo esc_url($coach_book_url); ?>"><?php echo esc_html__('Book a call', 'twentytwentyfive'); ?></a>
                    <a class="coach-inline-link" href="<?php echo esc_url($coach_services_url); ?>"><?php echo esc_html__('View services', 'twentytwentyfive'); ?></a>
                </div>
            </div>
            <div class="coach-site-footer-links" aria-label="<?php echo esc_attr__('Footer navigation', 'twentytwentyfive'); ?>">
                <?php foreach ($coach_footer_links as $coach_footer_link) : ?>
                    <a class="coach-site-footer-link" href="<?php echo esc_url($coach_footer_link['url']); ?>">
                        <span><?php echo esc_html($coach_footer_link['index']); ?></span>
                        <span><strong><?php echo esc_html($coach_footer_link['label']); ?></strong><br><em><?php echo esc_html($coach_footer_link['note']); ?></em></span>
                        <i aria-hidden="true">↗</i>
                    </a>
                <?php endforeach; ?>
            </div>
        </div>
        <div class="coach-site-footer-meta">
            <span><?php echo esc_html(get_bloginfo('name')); ?> · <?php echo esc_html(get_bloginfo('description')); ?></span>
            <span>© <?php echo esc_html(wp_date('Y')); ?> <?php echo esc_html(get_bloginfo('name')); ?></span>
        </div>
    </div>
</div></div>
<!-- /wp:group -->
