<?php

use app\modules\subscription\models\SubscriptionPrice;
use app\modules\subscription\models\SubscriptionProduct;
use yii\helpers\Url;

/* @var $intervals array */
/** @var $monthlyAndYearlyPrices SubscriptionPrice[] */

$this->title = Yii::$app->settings->get('app.name');

?>
<!-- Preloader -->
<div class="preloader">
    <div class="spinner-border text-primary" role="status">
        <span class="sr-only"><?= Yii::t('app', 'Loading...') ?></span>
    </div>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="modal-cookies" data-backdrop="false" aria-labelledby="modal-cookies" aria-hidden="true">
    <div class="modal-dialog modal-dialog-aside left-4 right-4 bottom-4">
        <div class="modal-content bg-dark-dark">
            <div class="modal-body">
                <!-- Text -->
                <p class="text-sm text-white mb-3">
                    <?= Yii::t('app', 'We use cookies to be more useful. By using our website, you agree to our use of cookies.') ?>
                </p>
                <!-- Buttons -->
                <a href="#" class="btn btn-sm btn-white" target="_blank"><?= Yii::t('app', 'Learn more') ?></a>
                <button type="button" class="btn btn-sm btn-primary mr-2" data-dismiss="modal"><?= Yii::t('app', 'OK') ?></button>
            </div>
        </div>
    </div>
</div>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
    <div class="container">
        <!-- Brand -->
        <a class="navbar-brand" href="<?= Url::home() ?>">
            <img alt="Image placeholder" src="<?= Url::to('@web/modules/subscription/assets/img/brand/white-logo.svg') ?>" id="navbar-logo">
        </a>
        <!-- Toggler -->
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <!-- Collapse -->
        <div class="collapse navbar-collapse" id="navbarCollapse">
            <ul class="navbar-nav mt-4 mt-lg-0 ml-auto">
                <li class="nav-item">
                    <a class="nav-link text-white" href="#overview"><?= Yii::t('app', 'Overview') ?></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-white" href="#pricing"><?= Yii::t('app', 'Pricing') ?></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-white" href="#contact-us"><?= Yii::t('app', 'Contact Us') ?></a>
                </li>
            </ul>
            <!-- Button -->
            <?php if (Yii::$app->user->isGuest): ?>
                <?php if (Yii::$app->settings->get('app.anyoneCanRegister')): ?>
                <a class="navbar-btn btn btn-sm btn-primary d-none d-lg-inline-block ml-3" href="<?= Url::to(['/user/registration/register']) ?>">
                    <?= Yii::t('app', 'Sign Up') ?>
                </a>
                <?php endif; ?>
                <a class="navbar-btn btn btn-sm btn-secondary d-none d-lg-inline-block ml-3" href="<?= Url::to(['/user/security/login']) ?>">
                    <?= Yii::t('app', 'Login') ?>
                </a>
            <?php else: ?>
                <a class="navbar-btn btn btn-sm btn-primary d-none d-lg-inline-block ml-3" href="<?= Url::to(['/dashboard']) ?>">
                    <?= Yii::t('app', 'Dashboard') ?>
                </a>
            <?php endif; ?>

            <!-- Mobile button -->
            <?php if (Yii::$app->user->isGuest): ?>
                <?php if (Yii::$app->settings->get('app.anyoneCanRegister')): ?>
                <div class="d-lg-none text-center">
                    <a href="<?= Url::to(['/user/registration/register']) ?>" class="btn btn-block btn-sm btn-primary">
                        <?= Yii::t('app', 'Sign Up') ?>
                    </a>
                </div>
                <?php endif; ?>
            <?php else: ?>
                <div class="d-lg-none text-center">
                    <a href="<?= Url::to(['/dashboard']) ?>" class="btn btn-block btn-sm btn-primary">
                        <?= Yii::t('app', 'Dashboard') ?>
                    </a>
                </div>
            <?php endif; ?>
        </div>
    </div>
</nav>
<!-- Main content -->
<section class="slice py-7">
    <div class="container">
        <div class="row row-grid align-items-center">
            <div class="col-12 col-md-5 col-lg-6 order-md-2 text-center">
                <!-- Image -->
                <figure class="w-100">
                    <img alt="Image placeholder" src="<?= Url::to('@web/modules/subscription/assets/img/svg/illustrations/illustration-3.svg') ?>" class="img-fluid mw-md-120">
                </figure>
            </div>
            <div class="col-12 col-md-7 col-lg-6 order-md-1 pr-md-5">
                <!-- Heading -->
                <h1 class="display-4 text-center text-md-left mb-3">
                    <?= Yii::t('app', 'Easy-to-use {startTag}online form builder{endTag} for every need.', [
                            'startTag' => '<strong class="text-primary">',
                            'endTag' => '</strong>',
                    ]) ?>
                </h1>
                <!-- Text -->
                <p class="lead text-center text-md-left text-muted">
                    <?= Yii::t('app', 'Create online forms and publish them. Get an email for each response. Collect valuable data.') ?>
                </p>
                <!-- Buttons -->
                <div class="text-center text-md-left mt-5">
                    <a href="#overview" class="btn btn-primary btn-icon">
                        <span class="btn-inner--text"><?= Yii::t('app', 'Get started') ?></span>
                        <span class="btn-inner--icon"><i data-feather="chevron-right"></i></span>
                    </a>
                </div>
            </div>
        </div>
    </div>
</section>
<section class="slice slice-lg pt-lg-6 pb-0 pb-lg-6 bg-section-secondary" id="overview">
    <div class="container">
        <!-- Title -->
        <!-- Section title -->
        <div class="row mb-5 justify-content-center text-center">
            <div class="col-lg-6">
                    <span class="badge badge-soft-success badge-pill badge-lg">
                        <?= Yii::t('app', 'Get started') ?>
                    </span>
                <h2 class=" mt-4"><?= Yii::t('app', 'Build powerful online forms') ?></h2>
                <div class="mt-2">
                    <p class="lead lh-180"><?= Yii::t('app', 'Build powerful online forms and customize them to your heart\'s delight. Our form builder gives you a intuitive interface, easy customization, templates and reporting. Check out some of our most popular features.') ?></p>
                </div>
            </div>
        </div>
        <!-- Card -->
        <div class="row mt-5">
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body pb-5">
                        <div class="pt-4 pb-5">
                            <img src="<?= Url::to('@web/modules/subscription/assets/img/svg/illustrations/illustration-6.svg') ?>" class="img-fluid img-center" style="height: 150px;" alt="Illustration" />
                        </div>
                        <h5 class="h4 lh-130 mb-3"><?= Yii::t('app', 'Easy-to-use form builder') ?></h5>
                        <p class="text-muted mb-0"><?= Yii::t('app', 'Easily create the forms you need to collect data, files and payments — without write a single line of code.') ?></p>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body pb-5">
                        <div class="pt-4 pb-5">
                            <img src="<?= Url::to('@web/modules/subscription/assets/img/svg/illustrations/illustration-16.svg') ?>" class="img-fluid img-center" style="height: 150px;" alt="Illustration" />
                        </div>
                        <h5 class="h4 lh-130 mb-3"><?= Yii::t('app', 'Accept online payments') ?></h5>
                        <p class="text-muted mb-0"><?= Yii::t('app', 'Process online payments through one of our payment partners, like PayPal, Stripe and Adyen.') ?></p>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body pb-5">
                        <div class="pt-4 pb-5">
                            <img src="<?= Url::to('@web/modules/subscription/assets/img/svg/illustrations/illustration-7.svg') ?>" class="img-fluid img-center" style="height: 150px;" alt="Illustration" />
                        </div>
                        <h5 class="h4 lh-130 mb-3"><?= Yii::t('app', 'Unique form experiences') ?></h5>
                        <p class="text-muted mb-0"><?= Yii::t('app', 'Design beautiful forms that match the look and feel of your brand or website, with or without CSS.') ?></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<section class="slice slice-lg">
    <div class="container">
        <div class="py-6">
            <div class="row row-grid justify-content-between align-items-center">
                <div class="col-lg-5 order-lg-2">
                    <h5 class="h3"><?= Yii::t('app', 'Configure workflows to save time') ?></h5>
                    <p class="lead my-4">
                        <?= Yii::t('app', 'With dozens of integrations and countless ways to configure workflows, you can spend less time on tedious tasks and focus on more important things.') ?>
                    </p>
                    <ul class="list-unstyled mb-0">
                        <li class="py-2">
                            <div class="d-flex align-items-center">
                                <div>
                                    <div class="icon icon-shape bg-primary text-white icon-sm rounded-circle mr-3">
                                        <i class="fas fa-puzzle-piece"></i>
                                    </div>
                                </div>
                                <div>
                                    <span class="h6 mb-0"><?= Yii::t('app', 'Integrations') ?></span>
                                </div>
                            </div>
                        </li>
                        <li class="py-2">
                            <div class="d-flex align-items-center">
                                <div>
                                    <div class="icon icon-shape bg-primary text-white icon-sm rounded-circle mr-3">
                                        <i class="fas fa-tasks"></i>
                                    </div>
                                </div>
                                <div>
                                    <span class="h6 mb-0"><?= Yii::t('app', 'Workflows') ?></span>
                                </div>
                            </div>
                        </li>
                        <li class="py-2">
                            <div class="d-flex align-items-center">
                                <div>
                                    <div class="icon icon-shape bg-primary text-white icon-sm rounded-circle mr-3">
                                        <i class="fas fa-code-branch"></i>
                                    </div>
                                </div>
                                <div>
                                    <span class="h6 mb-0"><?= Yii::t('app', 'Branching & Logic') ?></span>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="col-lg-6 order-lg-1">
                    <div class="card mb-0 mr-lg-5">
                        <div class="card-body p-2">
                            <img alt="Image placeholder" src="<?= Url::to('@web/modules/subscription/assets/img/theme/app/screen-5.png') ?>" class="img-fluid shadow rounded">
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="py-6">
            <div class="row row-grid justify-content-between align-items-center">
                <div class="col-lg-5">
                    <h5 class="h3"><?= Yii::t('app', 'Analyze data as a PRO') ?></h5>
                    <p class="lead my-4">
                        <?= Yii::t('app', 'Analyze your data with ease and in whatever way suits you best without effort.') ?>
                    </p>
                    <ul class="list-unstyled mb-0">
                        <li class="py-2">
                            <div class="d-flex align-items-center">
                                <div>
                                    <div class="icon icon-shape bg-primary text-white icon-sm rounded-circle mr-3">
                                        <i class="fas fa-database"></i>
                                    </div>
                                </div>
                                <div>
                                    <span class="h6 mb-0"><?= Yii::t('app', 'Submission Management') ?></span>
                                </div>
                            </div>
                        </li>
                        <li class="py-2">
                            <div class="d-flex align-items-center">
                                <div>
                                    <div class="icon icon-shape bg-primary text-white icon-sm rounded-circle mr-3">
                                        <i class="fas fa-chart-pie"></i>
                                    </div>
                                </div>
                                <div>
                                    <span class="h6 mb-0"><?= Yii::t('app', 'Custom Reports') ?></span>
                                </div>
                            </div>
                        </li>
                        <li class="py-2">
                            <div class="d-flex align-items-center">
                                <div>
                                    <div class="icon icon-shape bg-primary text-white icon-sm rounded-circle mr-3">
                                        <i class="fas fa-download"></i>
                                    </div>
                                </div>
                                <div>
                                    <span class="h6 mb-0"><?= Yii::t('app', 'Data Export') ?></span>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="col-lg-6">
                    <div class="card mb-0 ml-lg-5">
                        <div class="card-body p-2">
                            <img alt="Image placeholder" src="<?= Url::to('@web/modules/subscription/assets/img/theme/app/screen-3.png') ?>" class="img-fluid shadow rounded">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<section class="slice slice-lg bg-section-dark pt-5 pt-lg-8">
    <!-- SVG separator -->
    <div class="shape-container shape-line shape-position-top shape-orientation-inverse">
        <svg width="2560px" height="100px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="none" x="0px" y="0px" viewBox="0 0 2560 100" style="enable-background:new 0 0 2560 100;" xml:space="preserve" class="">
                <polygon points="2560 0 2560 100 0 100"></polygon>
            </svg>
    </div>
    <!-- Container -->
    <div class="container position-relative zindex-100">
        <div class="col">
            <div class="row justify-content-center">
                <div class="col-md-10 text-center">
                    <div class="mt-4 mb-6">
                        <h2 class="h1 text-white">
                            <?= Yii::t('app', 'Ready to get started?') ?>
                        </h2>
                        <h4 class="text-white mt-3"><?= Yii::t('app', 'Start a free trial to see how {appName} can help you simplify your day and achieve efficiency in the workplace.', [
                                'appName' => Yii::$app->settings->get('app.name')
                            ]) ?></h4>
                        <!-- Play button -->
                        <?php if (Yii::$app->settings->get('app.anyoneCanRegister')): ?>
                        <a href="<?= Url::to(['/user/registration/register']) ?>" class="btn btn-primary btn-icon mt-4"><?= Yii::t('app', 'Try It Free') ?></a>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<section class="slice pt-0">
    <div class="container position-relative zindex-100">
        <div class="row">
            <div class="col-xl-4 col-sm-6 mt-n7">
                <div class="card">
                    <div class="d-flex p-5">
                        <div>
                            <span class="badge badge-warning badge-pill"><?= Yii::t('app', 'Easy') ?></span>
                        </div>
                        <div class="pl-4">
                            <h5 class="lh-130"><?= Yii::t('app', 'Forms in minutes') ?></h5>
                            <p class="text-muted mb-0">
                                <?= Yii::t('app', 'No coding knowledge is needed. Just drag and drop.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xl-4 col-sm-6 mt-sm-n7">
                <div class="card">
                    <div class="d-flex p-5">
                        <div>
                            <span class="badge badge-success badge-pill"><?= Yii::t('app', 'Smart') ?></span>
                        </div>
                        <div class="pl-4">
                            <h5 class="lh-130"><?= Yii::t('app', 'Conditional logic') ?></h5>
                            <p class="text-muted mb-0">
                                <?= Yii::t('app', 'Hide fields, perform math, format text and much more.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xl-4 col-md-12 col-sm-6 mt-xl-n7">
                <div class="card">
                    <div class="d-flex p-5">
                        <div>
                            <span class="badge badge-danger badge-pill"><?= Yii::t('app', 'Social') ?></span>
                        </div>
                        <div class="pl-3">
                            <h5 class="lh-130"><?= Yii::t('app', 'Publish anywhere') ?></h5>
                            <p class="text-muted mb-0">
                                <?= Yii::t('app', 'Link to your form or Embed it on your site (inline or as pop-up)') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xl-4 col-sm-6">
                <div class="card">
                    <div class="d-flex p-5">
                        <div>
                            <span class="badge badge-warning badge-pill"><?= Yii::t('app', 'Safe') ?></span>
                        </div>
                        <div class="pl-4">
                            <h5 class="lh-130"><?= Yii::t('app', 'Secure Forms') ?></h5>
                            <p class="text-muted mb-0">
                                <?= Yii::t('app', 'Password protection, authorized urls, invisible honeypot and more.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xl-4 col-sm-6">
                <div class="card">
                    <div class="d-flex p-5">
                        <div>
                            <span class="badge badge-success badge-pill"><?= Yii::t('app', 'Leads') ?></span>
                        </div>
                        <div class="pl-4">
                            <h5 class="lh-130"><?= Yii::t('app', 'Email notifications') ?></h5>
                            <p class="text-muted mb-0">
                                <?= Yii::t('app', 'Receives real-time notifications based on form completions.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xl-4 col-md-12 col-sm-6">
                <div class="card">
                    <div class="d-flex p-5">
                        <div>
                            <span class="badge badge-danger badge-pill"><?= Yii::t('app', 'Sales') ?></span>
                        </div>
                        <div class="pl-3">
                            <h5 class="lh-130"><?= Yii::t('app', 'Collect payments') ?></h5>
                            <p class="text-muted mb-0">
                                <?= Yii::t('app', 'Securely and easily sell products and accept donations.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<section class="slice slice-lg">
    <div class="container">
        <div class="row">
            <div class="col-lg-6">
                <span class="badge badge-primary badge-pill"><?= Yii::t('app', 'Key features') ?></span>
                <h5 class="lh-180 mt-4 mb-6"><?= Yii::t('app', 'Basic or advanced, we have all the features you need to quickly create powerful online forms.') ?></h5>
            </div>
        </div>
        <!-- Features -->
        <div class="row mx-lg-n4">
            <!-- Features - Col 1 -->
            <div class="col-lg-4 col-md-6 px-lg-4">
                <div class="card shadow-none">
                    <div class="p-3 d-flex">
                        <div>
                            <div class="icon icon-shape rounded-circle bg-warning text-white mr-4">
                                <i data-feather="check"></i>
                            </div>
                        </div>
                        <div>
                            <span class="h6"><?= Yii::t('app', '100% Responsive') ?></span>
                            <p class="text-sm text-muted mb-0">
                                <?= Yii::t('app', 'Built to be customized.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 px-lg-4">
                <div class="card shadow-none">
                    <div class="p-3 d-flex">
                        <div>
                            <div class="icon icon-shape rounded-circle bg-primary text-white mr-4">
                                <i data-feather="check"></i>
                            </div>
                        </div>
                        <div>
                            <span class="h6"><?= Yii::t('app', 'Drag & Drop Form Builder') ?></span>
                            <p class="text-sm text-muted mb-0">
                                <?= Yii::t('app', 'Create custom forms in minutes.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 px-lg-4">
                <div class="card shadow-none">
                    <div class="p-3 d-flex">
                        <div>
                            <div class="icon icon-shape rounded-circle bg-danger text-white mr-4">
                                <i data-feather="check"></i>
                            </div>
                        </div>
                        <div>
                            <span class="h6"><?= Yii::t('app', 'File Uploads') ?></span>
                            <p class="text-sm text-muted mb-0">
                                <?= Yii::t('app', 'Capturing multiple files at once.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 px-lg-4">
                <div class="card shadow-none">
                    <div class="p-3 d-flex">
                        <div>
                            <div class="icon icon-shape rounded-circle bg-success text-white mr-4">
                                <i data-feather="check"></i>
                            </div>
                        </div>
                        <div>
                            <span class="h6"><?= Yii::t('app', 'Multi-Page Forms') ?></span>
                            <p class="text-sm text-muted mb-0">
                                <?= Yii::t('app', 'Get more responses with long forms.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 px-lg-4">
                <div class="card shadow-none">
                    <div class="p-3 d-flex">
                        <div>
                            <div class="icon icon-shape rounded-circle bg-info text-white mr-4">
                                <i data-feather="check"></i>
                            </div>
                        </div>
                        <div>
                            <span class="h6"><?= Yii::t('app', 'Conditional Logic') ?></span>
                            <p class="text-sm text-muted mb-0">
                                <?= Yii::t('app', 'Control what fields your users see.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 px-lg-4">
                <div class="card shadow-none">
                    <div class="p-3 d-flex">
                        <div>
                            <div class="icon icon-shape rounded-circle bg-warning text-white mr-4">
                                <i data-feather="check"></i>
                            </div>
                        </div>
                        <div>
                            <span class="h6"><?= Yii::t('app', 'Calculations') ?></span>
                            <p class="text-sm text-muted mb-0">
                                <?= Yii::t('app', 'Let your forms do the math for you.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <!-- Features - Col 3 -->
            <div class="col-lg-4 col-md-6 px-lg-4">
                <div class="card shadow-none">
                    <div class="p-3 d-flex">
                        <div>
                            <div>
                                <div class="icon icon-shape rounded-circle bg-info text-white mr-4">
                                    <i data-feather="check"></i>
                                </div>
                            </div>
                        </div>
                        <div>
                            <span class="h6"><?= Yii::t('app', 'Electronic Signatures') ?></span>
                            <p class="text-sm text-muted mb-0">
                                <?= Yii::t('app', 'Collect signatures on any device.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 px-lg-4">
                <div class="card shadow-none">
                    <div class="p-3 d-flex">
                        <div>
                            <div>
                                <div class="icon icon-shape rounded-circle bg-danger text-white mr-4">
                                    <i data-feather="check"></i>
                                </div>
                            </div>
                        </div>
                        <div>
                            <span class="h6"><?= Yii::t('app', 'Style your forms') ?></span>
                            <p class="text-sm text-muted mb-0">
                                <?= Yii::t('app', 'With a plethora of fonts and colors.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 px-lg-4">
                <div class="card shadow-none">
                    <div class="p-3 d-flex">
                        <div>
                            <div>
                                <div class="icon icon-shape rounded-circle bg-primary text-white mr-4">
                                    <i data-feather="check"></i>
                                </div>
                            </div>
                        </div>
                        <div>
                            <span class="h6"><?= Yii::t('app', 'Website Embedding') ?></span>
                            <p class="text-sm text-muted mb-0">
                                <?= Yii::t('app', 'Embed any form into your website.') ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<section class="slice slice-lg bg-section-secondary" id="pricing">
    <div class="container text-center">
        <div class="row justify-content-center mb-6">
            <div class="col-lg-8">
                <!-- Title -->
                <h2 class="h1 strong-600">
                    <?= Yii::t('app', 'Complete features at your hand') ?>
                </h2>
                <!-- Text -->
                <p class="text-muted">
                    <?= Yii::t('app', 'Thousands of people around the world have already made Easy Forms the main tool for building forms.') ?>
                </p>
            </div>
        </div>
        <!-- Pricing Switcher -->
        <div class="row justify-content-center mb-5">
            <div class="col">
                <div class="pricing-switcher">
                    <div class="fieldset">
                        <input type="radio" name="duration" value="month" id="month" checked>
                        <label for="month"><?= Yii::t('app', 'Monthly') ?></label>
                        <input type="radio" name="duration" value="year" id="year">
                        <label for="year"><?= Yii::t('app', 'Yearly') ?></label>
                        <span class="switch"></span>
                    </div>
                </div>
            </div>
        </div>
        <!-- Pricing -->
        <div class="row justify-content-center">
        <?php foreach ($monthlyAndYearlyPrices as $price): ?>
            <?php if ($price->product->status === SubscriptionProduct::ON): ?>
                <?php $recommended = $price->product->recommended === SubscriptionProduct::ON; ?>
                <div class="col-lg-4 col-md <?= $price->interval ?>">
                    <div class="card card-pricing text-center px-3 hover-scale-110 <?php if ($recommended): ?> recommended<?php endif; ?>">
                        <div class="card-header py-5 border-0 delimiter-bottom">
                            <div class="h1 text-center mb-0<?php if ($recommended): ?> text-dark<?php endif; ?>"><?= $price->getCurrencySymbol() ?><span class="price font-weight-bolder"><?= $price->getFormattedAmount() ?></span></div>
                            <span class="h6<?php if ($recommended): ?> text-dark<?php else: ?> text-muted<?php endif; ?>"><?= $price->product->name ?></span>
                        </div>
                        <div class="card-body">
                            <ul class="list-unstyled text-sm mb-4">
                                <?php $details = explode("\n", str_replace("\r", "", $price->product->details)); ?>
                                <?php foreach ($details as $detail): ?>
                                <li class="py-2<?php if ($recommended): ?> text-dark<?php endif; ?>"><?= $detail ?></li>
                                <?php endforeach; ?>
                            </ul>
                            <?php if (Yii::$app->settings->get('app.anyoneCanRegister')): ?>
                            <a href="<?= Url::to(['/user/registration/register', 'p' => $price->id]) ?>" class="btn btn-sm<?php if ($recommended): ?> btn-primary<?php else: ?> btn-warning<?php endif; ?> hover-translate-y-n3 hover-shadow-lg mb-3"><?= Yii::t('app', 'Sign up now') ?></a>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
            <?php endif; ?>
        <?php endforeach; ?>
        </div>
        <div class="mt-5 text-center" id="contact-us">
            <p class="mb-2">
                <?= Yii::t('app', 'All plans contains free support. Need more?') ?>
            </p>
            <a href="#" class="text-primary text-underline--dashed"><?= Yii::t('app', 'Contact us') ?><i data-feather="arrow-right" class="ml-2"></i></a>
        </div>
    </div>
</section>
<footer class="position-relative" id="footer-main">
    <div class="footer pt-lg-7 footer-dark bg-dark">
        <!-- SVG shape -->
        <div class="shape-container shape-line shape-position-top shape-orientation-inverse">
            <svg width="2560px" height="100px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="none" x="0px" y="0px" viewBox="0 0 2560 100" style="enable-background:new 0 0 2560 100;" xml:space="preserve" class=" fill-section-secondary">
                    <polygon points="2560 0 2560 100 0 100"></polygon>
                </svg>
        </div>
        <!-- Footer -->
        <div class="container pt-4">
            <div class="row">
                <div class="col-lg-4 mb-5 mb-lg-0">
                    <!-- Theme's logo -->
                    <a href="#">
                        <img alt="Image placeholder" src="<?= Url::to('@web/modules/subscription/assets/img/brand/white-logo.svg') ?>" id="footer-logo" style="height: 45px">
                    </a>
                    <!-- Mission -->
                    <p class="mt-4 text-sm opacity-8 pr-lg-4"><?= Yii::t('app', 'A complete and customizable solution for building professional online forms.') ?></p>
                    <!-- Social -->
                    <ul class="nav mt-4">
                        <li class="nav-item">
                            <a class="nav-link pl-0" href="#" target="_blank">
                                <i class="fab fa-dribbble"></i>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#" target="_blank">
                                <i class="fab fa-github"></i>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#" target="_blank">
                                <i class="fab fa-instagram"></i>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#" target="_blank">
                                <i class="fab fa-facebook"></i>
                            </a>
                        </li>
                    </ul>
                </div>
                <div class="col-lg-2 col-6 col-sm-4 ml-lg-auto mb-5 mb-lg-0">
                    <h6 class="heading mb-3"><?= Yii::t('app', 'Account') ?></h6>
                    <ul class="list-unstyled">
                        <?php if (Yii::$app->user->isGuest): ?>
                            <?php if (Yii::$app->settings->get('app.anyoneCanRegister')): ?>
                                <li>
                                    <a href="<?= Url::to(['/user/registration/register']) ?>">
                                        <?= Yii::t('app', 'Sign Up') ?>
                                    </a>
                                </li>
                            <?php endif ?>
                            <li>
                                <a href="<?= Url::to(['/user/security/login']) ?>">
                                    <?= Yii::t('app', 'Login') ?>
                                </a>
                            </li>
                        <?php else: ?>
                        <li>
                            <a href="<?= Url::to(['/dashboard']) ?>">
                                <?= Yii::t('app', 'Dashboard') ?>
                            </a>
                        </li>
                        <li>
                            <a href="<?= Url::to(['/user/settings/profile']) ?>">
                                <?= Yii::t('app', 'Profile') ?>
                            </a>
                        </li>
                        <li>
                            <a href="<?= Url::to(['/subscription/user/index']) ?>">
                                <?= Yii::t('app', 'Billing') ?>
                            </a>
                        </li>
                        <?php endif; ?>

                    </ul>
                </div>
                <div class="col-lg-2 col-6 col-sm-4 mb-5 mb-lg-0">
                    <h6 class="heading mb-3"><?= Yii::t('app', 'About') ?></h6>
                    <ul class="list-unstyled">
                        <li><a href="#overview"><?= Yii::t('app', 'Overview') ?></a></li>
                        <li><a href="#pricing"><?= Yii::t('app', 'Pricing') ?></a></li>
                        <li><a href="#contact-us"><?= Yii::t('app', 'Contact') ?></a></li>
                    </ul>
                </div>
                <div class="col-lg-2 col-6 col-sm-4 mb-5 mb-lg-0">
                    <h6 class="heading mb-3"><?= Yii::t('app', 'Company') ?></h6>
                    <ul class="list-unstyled">
                        <li><a href="#"><?= Yii::t('app', 'Community') ?></a></li>
                        <li><a href="#"><?= Yii::t('app', 'Help center') ?></a></li>
                        <li><a href="#"><?= Yii::t('app', 'Support') ?></a></li>
                    </ul>
                </div>
            </div>
            <hr class="divider divider-fade divider-dark my-4">
            <div class="row align-items-center justify-content-md-between pb-4">
                <div class="col-md-6">
                    <div class="copyright text-sm font-weight-bold text-center text-md-left">
                        &copy; 2021 <a href="#" class="font-weight-bold" target="_blank">Easy Forms</a>. All rights reserved
                    </div>
                </div>
                <div class="col-md-6">
                    <ul class="nav justify-content-center justify-content-md-end mt-3 mt-md-0">
                        <li class="nav-item">
                            <a class="nav-link" href="#">
                                <?= Yii::t('app', 'Terms') ?>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">
                                <?= Yii::t('app', 'Privacy') ?>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">
                                <?= Yii::t('app', 'Cookies') ?>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</footer>

<?php

$styles = <<<CSS

/* Preloader */
@keyframes hidePreloader {
    0% {
        width: 100%;
        height: 100%;
    }

    100% {
        width: 0;
        height: 0;
    }
}

body>div.preloader {
    position: fixed;
    background: #313941;
    width: 100%;
    height: 100%;
    z-index: 1071;
    opacity: 0;
    transition: opacity .5s ease;
    overflow: hidden;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

body:not(.loaded)>div.preloader {
    opacity: 1;
}

body:not(.loaded) {
    overflow: hidden;
}

body.loaded>div.preloader {
    animation: hidePreloader .5s linear .5s forwards;
}

/* Pricing switcher */

.pricing-switcher {
    text-align: center;
    margin-bottom: 15px;
}
.pricing-switcher .fieldset {
    display: inline-block;
    position: relative;
    padding: 2px;
    border-radius: 50em;
    border: 1px solid #92a1ad;
}
.pricing-switcher input[type="radio"] {
    position: absolute;
    opacity: 0;
}
.pricing-switcher label {
    position: relative;
    z-index: 1;
    display: inline-block;
    float: left;
    width: 90px;
    height: 36px;
    line-height: 36px;
    cursor: pointer;
    margin: 0;
}
.pricing-switcher .switch {
    /* floating background */
    position: absolute;
    top: 2px;
    left: 2px;
    height: 36px;
    width: 90px;
    background-color: #009eda;
    border-radius: 50em;
    -webkit-transition: -webkit-transform 0.5s;
    -moz-transition: -moz-transform 0.5s;
    transition: transform 0.5s;
}
.pricing-switcher input[type="radio"]:checked + label + .switch,
.pricing-switcher input[type="radio"]:checked + label:nth-of-type(n) + .switch {
    /* use label:nth-of-type(n) to fix a bug on safari with multiple adjacent-sibling selectors*/
    -webkit-transform: translateX(90px);
    -moz-transform: translateX(90px);
    -ms-transform: translateX(90px);
    -o-transform: translateX(90px);
    transform: translateX(90px);
}
.pricing-switcher input[type="radio"]:checked+label{
    color: #FFFFFF;
}
.no-js .pricing-switcher {
    display: none;
}


CSS;

$this->registerCss($styles);

$script = <<<JS

window.addEventListener("load", function() {
    setTimeout(function() {
        document.querySelector('body').classList.add('loaded');
    }, 300);
});

feather.replace({
    'width': '1em',
    'height': '1em'
})

$(document).ready(function(){

    // Handlers
    var togglePlans = function () {
        if ($("#month").is(":checked") === true) {
            $(".year").hide();
            $(".month").fadeIn(600);
        } else {
            $(".month").hide();
            $(".year").fadeIn(600);
        }
    };

    $('input[name="duration"]').click(function(){
        togglePlans()
    });

    togglePlans();

});

JS;

$this->registerJs($script, $this::POS_END);

?>