<?php

declare(strict_types=1);

use Fisharebest\Webtrees\I18N;

?>

<h4 class="border-bottom p-2 mb-4">
    <?= I18N::translate('Total families') ?>
    <span class="badge bg-secondary rounded-pill float-end">#totalFamilies#</span>
</h4>

<div class="row mb-3 row-cols-1 row-cols-lg-2 g-3">
    <div class="col">
        <div class="d-grid gap-3">
            <div class="card">
                <h5 class="card-header border-bottom-0">
                    <?= I18N::translate('Total marriages') ?>
                    <span class="badge bg-secondary rounded-pill float-end">#totalMarriages#</span>
                </h5>
            </div>

            <div class="card">
                <h5 class="card-header">
                    <?= I18N::translate('Marriages by century') ?>
                </h5>
                <div class="card-body">
                    #statsMarr#
                </div>
            </div>

            <div class="row row-cols-1 row-cols-md-2 row-cols-lg-1 g-3">
                <div class="col">
                    <div class="card">
                        <h5 class="card-header">
                            <?= I18N::translate('Earliest marriage') ?>
                        </h5>
                        <div class="card-body">
                            #firstMarriage#
                        </div>
                    </div>
                </div>

                <div class="col">
                    <div class="card">
                        <h5 class="card-header">
                            <?= I18N::translate('Latest marriage') ?>
                        </h5>
                        <div class="card-body">
                            #lastMarriage#
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="col">
        <div class="d-grid gap-3">
            <div class="card m-0">
                <h5 class="card-header border-bottom-0">
                    <?= I18N::translate('Total divorces') ?>
                    <span class="badge bg-secondary rounded-pill float-end">#totalDivorces#</span>
                </h5>
            </div>

            <div class="card m-0">
                <h5 class="card-header">
                    <?= I18N::translate('Divorces by century') ?>
                </h5>
                <div class="card-body">
                    #statsDiv#
                </div>
            </div>

            <div class="row row-cols-1 row-cols-md-2 row-cols-lg-1 g-3">
                <div class="col">
                    <div class="card">
                        <h5 class="card-header">
                            <?= I18N::translate('Earliest divorce') ?>
                        </h5>
                        <div class="card-body">
                            #firstDivorce#
                        </div>
                    </div>
                </div>
    
                <div class="col">
                    <div class="card">
                        <h5 class="card-header">
                            <?= I18N::translate('Latest divorce') ?>
                        </h5>
                        <div class="card-body">
                            #lastDivorce#
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
