/**
 * Optimized Footer Styles
 * Performance-optimized, accessible, and SEO-friendly
 *
 * @package Dent-All
 * @since 1.0.0
 */

/* ============================================
   Footer Container
   ============================================ */

#footer {
	background-color: #1a1a1a;
	color: #ffffff;
	font-size: 14px;
	line-height: 1.6;
	will-change: auto;
}

/* ============================================
   Footer Widgets
   ============================================ */

.footer_widgets {
	padding: 60px 0 40px;
	background-color: #1a1a1a;
}

.footer_widgets .widget {
	margin-bottom: 30px;
}

.footer_widgets .widget-title,
.footer_widgets .widgettitle {
	color: #ffffff;
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 20px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.footer_widgets ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer_widgets ul li {
	margin-bottom: 10px;
	padding-left: 0;
}

.footer_widgets a {
	color: #d4d4d4; /* Changed to solid color for WCAG AA compliance */
	text-decoration: underline; /* Required for WCAG - links must be distinguishable without color */
	transition: color 0.3s ease;
}

.footer_widgets a:hover,
.footer_widgets a:focus {
	color: #5dcdff; /* Bright blue for excellent contrast and visibility */
	text-decoration: none;
}

.footer_widgets a:focus {
	outline: 2px solid #5dcdff; /* Match hover color */
	outline-offset: 2px;
}

/* ============================================
   Footer Text Widget
   ============================================ */

.footer_widgets .textwidget p {
	margin-bottom: 15px;
	color: #d4d4d4; /* Changed to solid color for WCAG AA compliance */
}

/* ============================================
   Footer Navigation
   ============================================ */

.footer_widgets .menu {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer_widgets .menu li {
	margin-bottom: 8px;
}

.footer_widgets .menu a {
	display: inline-block;
	padding: 5px 0;
	position: relative;
}

.footer_widgets .menu a::before {
	content: '›';
	margin-right: 8px;
	color: #5dcdff; /* Updated to match improved link hover color */
	font-weight: bold;
}

/* ============================================
   Footer Images
   ============================================ */

.footer_widgets img {
	height: auto;
	max-width: 100%;
	display: block;
}

/* Lazy loading placeholder */
.footer_widgets img[data-src] {
	background: rgba(255, 255, 255, 0.1);
	min-height: 100px;
}

/* ============================================
   Copyright Section
   ============================================ */

.copyright {
	background-color: #0f0f0f;
	padding: 20px 0;
	text-align: center;
	color: #cccccc; /* Changed from rgba for better contrast - meets WCAG AA */
	font-size: 13px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright p {
	margin: 0;
}

.copyright a {
	color: #ffffff; /* White for maximum contrast on any dark background - WCAG AAA compliant */
	text-decoration: underline; /* Required for WCAG - links must be distinguishable without color */
	transition: color 0.3s ease;
	font-weight: 500; /* Slightly bolder for better visibility */
}

.copyright a:hover,
.copyright a:focus {
	color: #5dcdff; /* Bright blue for hover state */
	text-decoration: underline;
}

/* ============================================
   Social Links
   ============================================ */

.footer-social-links {
	display: flex;
	gap: 15px;
	justify-content: center;
	align-items: center;
	margin-top: 15px;
}

.footer-social-links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background-color: rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	color: #ffffff;
	text-decoration: none;
	transition: all 0.3s ease;
}

.footer-social-links a:hover,
.footer-social-links a:focus {
	background-color: #18afd3;
	transform: translateY(-3px);
}

.footer-social-links a:focus {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

/* ============================================
   Contact Info Widget
   ============================================ */

.footer-contact-info {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-contact-info li {
	margin-bottom: 15px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.footer-contact-info li::before {
	content: '';
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin-top: 4px;
}

.footer-contact-info .phone::before {
	content: '📞';
}

.footer-contact-info .email::before {
	content: '✉️';
}

.footer-contact-info .address::before {
	content: '📍';
}

.footer-contact-info a {
	color: rgba(255, 255, 255, 0.9);
}

.footer-contact-info a:hover {
	color: #18afd3;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 991px) {
	.footer_widgets {
		padding: 50px 0 30px;
	}

	.footer_widgets .widget {
		margin-bottom: 40px;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.footer_widgets {
		padding: 40px 0 20px;
	}

	.footer_widgets .widget {
		text-align: center;
	}

	.footer_widgets .menu a::before {
		display: none;
	}

	.footer-social-links {
		justify-content: center;
	}

	.footer-contact-info li {
		justify-content: center;
		text-align: left;
	}
}

/* ============================================
   Accessibility
   ============================================ */

/* Focus visible for keyboard navigation */
#footer a:focus-visible {
	outline: 2px solid #18afd3;
	outline-offset: 2px;
	background-color: rgba(24, 175, 211, 0.1);
}

/* Screen reader only text */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal !important;
}

/* Skip to top link */
.skip-to-top {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background-color: #18afd3;
	color: #ffffff;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: none;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	z-index: 1000;
	transition: all 0.3s ease;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.skip-to-top.visible {
	display: flex;
}

.skip-to-top:hover,
.skip-to-top:focus {
	background-color: #bd9e53;
	transform: translateY(-5px);
}

.skip-to-top::before {
	content: '↑';
	font-size: 24px;
	font-weight: bold;
}

/* ============================================
   Performance Optimizations
   ============================================ */

/* Prevent layout shift */
#footer {
	min-height: 200px;
}

/* GPU acceleration */
.footer-social-links a,
.skip-to-top {
	will-change: transform;
	backface-visibility: hidden;
	-webkit-font-smoothing: antialiased;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
	#footer a,
	.footer-social-links a,
	.skip-to-top {
		transition-duration: 0.01ms !important;
	}

	.skip-to-top:hover {
		transform: none !important;
	}
}

/* Print styles */
@media print {
	#footer {
		page-break-inside: avoid;
	}

	.footer-social-links,
	.skip-to-top {
		display: none !important;
	}

	.copyright {
		border-top: 1px solid #000;
	}
}

/* ============================================
   Dark Mode Support
   ============================================ */

@media (prefers-color-scheme: dark) {
	/* Footer is already dark, no changes needed */
}

/* ============================================
   High Contrast Mode
   ============================================ */

@media (prefers-contrast: high) {
	#footer {
		border-top: 3px solid #ffffff;
	}

	.footer_widgets a {
		text-decoration: underline;
	}

	.copyright {
		border-top: 2px solid #ffffff;
	}
}
