<?php
$pro_purchase_url = 'https://fireflythemes.com/themes/mediora-pro';
$doc_url          = 'https://fireflythemes.com/documentation/mediora';
$support_url      = 'https://fireflythemes.com/support/';
$theme            = wp_get_theme();
$theme_name       = $theme->get( 'Name' );
?>
<div class="mediora--about-page--wrapper">
	<div id="mediora-admin-about-page">
		<div class="mediora-admin-card-header">
			<div class="mediora-header-left">
				<h2><?php echo esc_html( $theme_name ); ?></h2>
				<p><?php echo esc_html__( 'Multipurpose WordPress Full Site Editing Theme', 'mediora' ); ?></p>
			</div>

			<div class="mediora-header-right">
				<div class="mediora-card-header-button-group">
					<a href="<?php echo esc_url( $pro_purchase_url ); ?>" class="mediora-admin-button pro-button" target="_blank" rel="noreferrer">
						<?php
						echo esc_html(
							sprintf(
								/* translators: %s: Theme name. */
								__( 'Get %s Pro', 'mediora' ),
								$theme_name
							)
						);
						?>
					</a>

					<a href="<?php echo esc_url( $doc_url ); ?>" class="mediora-admin-button premium-button" target="_blank" rel="noreferrer">
						<?php echo esc_html__( 'Documentation', 'mediora' ); ?>
					</a>

					<a href="<?php echo esc_url( $support_url ); ?>" class="mediora-admin-button primary large" target="_blank" rel="noreferrer">
						<?php echo esc_html__( 'Get Support', 'mediora' ); ?>
					</a>
				</div>
			</div>
		</div>

		<div class="mediora-pro-upsell-banner" style="background: linear-gradient(135deg, #1e3a5f 0%, #2d6a9f 100%); border-radius: 8px; padding: 28px 32px; margin: 20px 0; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;">
			<div style="flex: 1; min-width: 260px;">
				<h3 style="margin: 0 0 8px; font-size: 1.4em; color: #fff;">
					<?php
					echo esc_html(
						sprintf(
							/* translators: %s: Theme name. */
							__( '🚀 Unlock the Full Power of %s Pro', 'mediora' ),
							$theme_name
						)
					);
					?>
				</h3>
				<p style="margin: 0 0 16px; opacity: 0.9; font-size: 0.95em; line-height: 1.6;">
					<?php esc_html_e( 'Take your website to the next level. Pro gives you premium patterns, advanced blocks, carousel sliders, masonry galleries, and priority support — everything you need to build a stunning, professional site.', 'mediora' ); ?>
				</p>
				<ul style="margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px;">
					<?php
					$upsell_points = array(
						__( '✅ 20+ Pro Patterns', 'mediora' ),
						__( '✅ Custom Blocks (Slider, Tabs, Masonry)', 'mediora' ),
						__( '✅ Priority Support', 'mediora' ),
						__( '✅ Lifetime Updates', 'mediora' ),
					);
					foreach ( $upsell_points as $point ) :
						?>
						<li style="font-size: 0.9em; opacity: 0.95;"><?php echo esc_html( $point ); ?></li>
					<?php endforeach; ?>
				</ul>
			</div>
			<div style="text-align: center; flex-shrink: 0;">
				<a href="<?php echo esc_url( $pro_purchase_url ); ?>" class="mediora-admin-button pro-button" target="_blank" rel="noreferrer" style="display: inline-block; background: #f0a500; color: #1a1a1a; font-weight: 700; font-size: 1em; padding: 12px 28px; border-radius: 6px; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,0.25); transition: transform 0.2s;">
					<?php
					echo esc_html(
						sprintf(
							/* translators: %s: Theme name. */
							__( 'Get %s Pro →', 'mediora' ),
							$theme_name
						)
					);
					?>
				</a>
				<p style="margin: 8px 0 0; font-size: 0.8em; opacity: 0.75;"><?php esc_html_e( 'One-time purchase or subscription plans available', 'mediora' ); ?></p>
			</div>
		</div>

		<div class="feature-list">
			<div class="mediora-about-container">
				<div class="mediora-admin-card features">
					<div class="mediora-about-container mediora-compare-table">
						<div class="about-compare-table">
							<h3>
								<?php
								echo esc_html(
									sprintf(
										/* translators: %s: Theme name. */
										__( '%s Free Vs Pro', 'mediora' ),
										$theme_name
									)
								);
								?>
							</h3>

							<table>
								<thead>
									<tr>
										<th><?php echo esc_html__( 'Mediora Free', 'mediora' ); ?></th>
										<th><?php echo esc_html__( 'Features', 'mediora' ); ?></th>
										<th><?php echo esc_html__( 'Mediora Pro', 'mediora' ); ?></th>
									</tr>
								</thead>

								<tbody>
									<?php
									$features = array(
										array( true, esc_html__( 'Responsive', 'mediora' ), true ),
										array( true, esc_html__( 'Super Easy Setup', 'mediora' ), true ),
										array( true, esc_html__( 'Color Options for various sections', 'mediora' ), true ),
										array( true, esc_html__( 'Pattern: 404 Error Page', 'mediora' ), true ),
										array( true, esc_html__( 'Pattern: Archive Title', 'mediora' ), true ),
										array( true, esc_html__( 'Pattern: Default Footer', 'mediora' ), true ),
										array( true, esc_html__( 'Pattern: Default Header', 'mediora' ), true ),
										array( true, esc_html__( 'Pattern: Latest News', 'mediora' ), true ),
										array( true, esc_html__( 'Pattern: Main Banner', 'mediora' ), true ),
										array( true, esc_html__( 'Pattern: Services', 'mediora' ), true ),
										array( true, esc_html__( 'Pattern: What We Do', 'mediora' ), true ),
										array( true, esc_html__( 'Pattern: Hero Content', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Call to Action', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Gallery Masonry', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Hero Content Two', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Key Feature', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Main Slider', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Post Title', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Recent Work Carousel', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Recent Works', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Services Carousel', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Skills', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Tabs', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Teams', 'mediora' ), true ),
										array( false, esc_html__( 'Pattern: Testimonials Carousel', 'mediora' ), true ),
										array( false, esc_html__( 'Block: Skills', 'mediora' ), true ),
										array( false, esc_html__( 'Block: Masonry', 'mediora' ), true ),
										array( false, esc_html__( 'Block: Popup Video', 'mediora' ), true ),
										array( false, esc_html__( 'Block: Header Search', 'mediora' ), true, esc_html__( 'More', 'mediora' ) ),
										array( false, esc_html__( 'Block: Header Social', 'mediora' ), true ),
										array( false, esc_html__( 'Block: Icons', 'mediora' ), true ),
										array( false, esc_html__( 'Block: Slider', 'mediora' ), true ),
										array( false, esc_html__( 'Block: Tabs', 'mediora' ), true ),
									);

									foreach ( $features as $feature ) :
										$free_enabled = (bool) $feature[0];
										$feature_name = isset( $feature[1] ) ? $feature[1] : '';
										$pro_enabled  = (bool) $feature[2];
										$extra_text   = isset( $feature[3] ) ? $feature[3] : '';
										?>
										<tr>
											<td>
												<i class="dashicons <?php echo esc_attr( $free_enabled ? 'dashicons-yes' : 'dashicons-no' ); ?>"></i>
											</td>
											<td><?php echo esc_html( $feature_name ); ?></td>
											<td>
												<i class="dashicons <?php echo esc_attr( $pro_enabled ? 'dashicons-yes' : 'dashicons-no' ); ?>"></i>
												<?php echo esc_html( $extra_text ); ?>
											</td>
										</tr>
									<?php endforeach; ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="mediora-card-header-button-group footer-buttons">
		<a href="<?php echo esc_url( $pro_purchase_url ); ?>" class="mediora-admin-button pro-button" target="_blank" rel="noreferrer">
			<i class="fa fa-paint-brush"></i>
			<?php
			echo esc_html(
				sprintf(
					/* translators: %s: Theme name. */
					__( 'Get %s Pro', 'mediora' ),
					$theme_name
				)
			);
			?>
		</a>

		<a href="<?php echo esc_url( $doc_url ); ?>" class="mediora-admin-button premium-button" target="_blank" rel="noreferrer">
			<i class="fa fa-book"></i>
			<?php echo esc_html__( 'Documentation', 'mediora' ); ?>
		</a>

		<a href="<?php echo esc_url( $support_url ); ?>" class="mediora-admin-button primary large" target="_blank" rel="noreferrer">
			<?php echo esc_html__( 'Get Support', 'mediora' ); ?>
		</a>
	</div>
</div>
