<?php
/**
 * The footer for our theme.
 *
 * Displays: newsletter signup, footer links, bottom bar with
 * copyright, social icons, and funder logos.
 *
 * @package Northfield_Theatre
 * @since 1.0.0
 */
?>
</main><!-- #main-content -->

<?php get_template_part( 'template-parts/footer', 'newsletter' ); ?>

<footer class="site-footer" role="contentinfo">
	<div class="footer-main">
		<div class="footer-main__grid container">
			<!-- Column 1: About -->
			<div class="footer-column">
				<h3 class="footer-column__title"><?php esc_html_e( 'About', 'northfield-theatre' ); ?></h3>
				<ul class="footer-column__list" role="list">
					<li><a href="<?php echo esc_url( home_url( '/our-story/' ) ); ?>"><?php esc_html_e( 'Our Story', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/moorside/' ) ); ?>"><?php esc_html_e( 'Moorside Town Hall', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/news/' ) ); ?>"><?php esc_html_e( 'News', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/take-part/' ) ); ?>"><?php esc_html_e( 'Take Part', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/hire/' ) ); ?>"><?php esc_html_e( 'Hire Our Spaces', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/contact/' ) ); ?>"><?php esc_html_e( 'Contact', 'northfield-theatre' ); ?></a></li>
				</ul>
			</div>

			<!-- Column 2: Visit -->
			<div class="footer-column">
				<h3 class="footer-column__title"><?php esc_html_e( 'Visit', 'northfield-theatre' ); ?></h3>
				<ul class="footer-column__list" role="list">
					<li><a href="<?php echo esc_url( home_url( '/whats-on/' ) ); ?>"><?php esc_html_e( "What's On", 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/visit/' ) ); ?>"><?php esc_html_e( 'Plan Your Visit', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/seating-plan/' ) ); ?>"><?php esc_html_e( 'Seating Plan', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/access/' ) ); ?>"><?php esc_html_e( 'Access', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/visit/#getting-here' ) ); ?>"><?php esc_html_e( 'Getting Here', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/visit/#eat-drink' ) ); ?>"><?php esc_html_e( 'Eat & Drink', 'northfield-theatre' ); ?></a></li>
				</ul>
			</div>

			<!-- Column 3: Support Us -->
			<div class="footer-column">
				<h3 class="footer-column__title"><?php esc_html_e( 'Support Us', 'northfield-theatre' ); ?></h3>
				<ul class="footer-column__list" role="list">
					<li><a href="<?php echo esc_url( home_url( '/support/donate/' ) ); ?>"><?php esc_html_e( 'Donate', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/support/membership/' ) ); ?>"><?php esc_html_e( 'Membership', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/support/corporate/' ) ); ?>"><?php esc_html_e( 'Corporate Partners', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/support/volunteer/' ) ); ?>"><?php esc_html_e( 'Volunteer', 'northfield-theatre' ); ?></a></li>
				</ul>
			</div>

			<!-- Column 4: Contact & Legal -->
			<div class="footer-column">
				<h3 class="footer-column__title"><?php esc_html_e( 'Contact', 'northfield-theatre' ); ?></h3>
				<div class="footer-contact">
					<p class="footer-contact__item">
						<?php echo northfield_icon( 'phone', 16 ); ?>
						<span><?php esc_html_e( '01484 567 890', 'northfield-theatre' ); ?></span>
					</p>
					<p class="footer-contact__item">
						<?php echo northfield_icon( 'mail', 16 ); ?>
						<a href="mailto:hello@northfieldtheatre.co.uk">hello@northfieldtheatre.co.uk</a>
					</p>
				</div>
				<ul class="footer-column__list" role="list" style="margin-top: var(--space-md);">
					<li><a href="<?php echo esc_url( get_privacy_policy_url() ); ?>"><?php esc_html_e( 'Privacy Policy', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/terms/' ) ); ?>"><?php esc_html_e( 'Terms & Conditions', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/access/' ) ); ?>"><?php esc_html_e( 'Accessibility', 'northfield-theatre' ); ?></a></li>
					<li><a href="<?php echo esc_url( home_url( '/cookies/' ) ); ?>"><?php esc_html_e( 'Cookie Policy', 'northfield-theatre' ); ?></a></li>
				</ul>
			</div>
		</div>
	</div>

	<!-- Wordmark sign-off -->
	<div class="footer-wordmark" aria-hidden="true">
		<div class="footer-wordmark__inner container">
			<span>Northfield</span>
		</div>
	</div>

	<!-- Bottom Bar -->
	<div class="footer-bottom">
		<div class="footer-bottom__inner container">
			<p class="footer-bottom__copyright">
				<?php
				printf(
					/* translators: %1$s: current year, %2$s: site name */
					esc_html__( '&copy; %1$s %2$s. All rights reserved. Registered Charity No. 1234567.', 'northfield-theatre' ),
					esc_html( date_i18n( 'Y' ) ),
					esc_html( get_bloginfo( 'name' ) )
				);
				?>
			</p>

			<!-- Social Links -->
			<ul class="social-links" role="list">
				<li>
					<a href="https://facebook.com/northfieldtheatre"
					   class="social-links__link"
					   aria-label="<?php esc_attr_e( 'Facebook', 'northfield-theatre' ); ?>"
					   rel="noopener noreferrer"
					   target="_blank">
						<?php echo northfield_icon( 'facebook', 20 ); ?>
					</a>
				</li>
				<li>
					<a href="https://instagram.com/northfieldtheatre"
					   class="social-links__link"
					   aria-label="<?php esc_attr_e( 'Instagram', 'northfield-theatre' ); ?>"
					   rel="noopener noreferrer"
					   target="_blank">
						<?php echo northfield_icon( 'instagram', 20 ); ?>
					</a>
				</li>
				<li>
					<a href="https://twitter.com/northfieldthtr"
					   class="social-links__link"
					   aria-label="<?php esc_attr_e( 'Twitter', 'northfield-theatre' ); ?>"
					   rel="noopener noreferrer"
					   target="_blank">
						<?php echo northfield_icon( 'twitter', 20 ); ?>
					</a>
				</li>
				<li>
					<a href="https://youtube.com/@northfieldtheatre"
					   class="social-links__link"
					   aria-label="<?php esc_attr_e( 'YouTube', 'northfield-theatre' ); ?>"
					   rel="noopener noreferrer"
					   target="_blank">
						<?php echo northfield_icon( 'youtube', 20 ); ?>
					</a>
				</li>
			</ul>
		</div>
	</div>
</footer>

<!-- Cookie Consent Banner — GDPR compliant -->
<?php
$cookie_accepted = isset( $_COOKIE['northfield_cookies_accepted'] );
if ( ! $cookie_accepted ) :
?>
<div class="cookie-consent" id="cookie-consent" role="region" aria-label="<?php esc_attr_e( 'Cookie consent', 'northfield-theatre' ); ?>">
	<div class="cookie-consent__inner container">
		<p class="cookie-consent__text">
			<?php
			printf(
				/* translators: %s: link to cookie policy */
				esc_html__( 'We use cookies to improve your experience and analyse site traffic. By clicking "Accept all", you consent to our use of cookies. Read our %s for more information.', 'northfield-theatre' ),
				'<a href="' . esc_url( home_url( '/cookies/' ) ) . '">' . esc_html__( 'Cookie Policy', 'northfield-theatre' ) . '</a>'
			);
			?>
		</p>
		<div class="cookie-consent__actions">
			<button class="cookie-consent__accept" id="cookie-accept">
				<?php esc_html_e( 'Accept all', 'northfield-theatre' ); ?>
			</button>
			<button class="cookie-consent__settings" id="cookie-settings">
				<?php esc_html_e( 'Cookie settings', 'northfield-theatre' ); ?>
			</button>
		</div>
	</div>
</div>
<?php endif; ?>

<?php wp_footer(); ?>
</body>
</html>
