/* ========================================
   Modern Footer Design
   تصميم Footer حديث وعصري
   ======================================== */

/* ========================================
   Main Footer Container
   ======================================== */
.footer {
	background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
	border-top: 1px solid rgba(0, 106, 255, 0.1);
	padding: 60px 0 30px;
	margin-top: 80px;
	position: relative;
	overflow: hidden;
	transition: all 0.3s ease;
}

/* Decorative gradient bar at top */
.footer::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, 
		#006aff 0%, 
		#0080ff 25%, 
		#00d4ff 50%, 
		#0080ff 75%, 
		#006aff 100%);
	background-size: 200% 100%;
	animation: gradientMove 8s linear infinite;
}

@keyframes gradientMove {
	0% { background-position: 0% 0; }
	100% { background-position: 200% 0; }
}

/* Dark Mode Footer */
[data-theme="dark"] .footer {
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	border-top-color: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .footer::before {
	background: linear-gradient(90deg, 
		#6366f1 0%, 
		#8b5cf6 25%, 
		#a855f7 50%, 
		#8b5cf6 75%, 
		#6366f1 100%);
	background-size: 200% 100%;
}

/* ========================================
   Footer Container
   ======================================== */
.footer__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 40px;
}

@media (max-width: 768px) {
	.footer__container {
		padding: 0 20px;
	}
}

/* ========================================
   Footer Content Grid
   ======================================== */
.footer__content {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 60px;
	margin-bottom: 50px;
}

@media (max-width: 1024px) {
	.footer__content {
		grid-template-columns: 1fr 1fr;
		gap: 40px;
	}
}

@media (max-width: 640px) {
	.footer__content {
		grid-template-columns: 1fr;
		gap: 35px;
	}
}

/* ========================================
   Footer About Section
   ======================================== */
.footer__about {
	padding-right: 20px;
}

.footer__logo {
	display: flex;
	align-items: center;
	margin-bottom: 20px;
	font-size: 24px;
	font-weight: 700;
	color: #006aff;
	text-decoration: none;
	transition: all 0.3s ease;
}

[data-theme="dark"] .footer__logo {
	color: #a5b4fc;
}

.footer__logo:hover {
	transform: translateX(5px);
}

.footer__logo svg,
.footer__logo img {
	height: 40px;
	width: auto;
	margin-right: 12px;
}

.footer__description {
	color: #64748b;
	font-size: 15px;
	line-height: 1.7;
	margin-bottom: 25px;
}

[data-theme="dark"] .footer__description {
	color: #94a3b8;
}

/* Social Links */
.footer__social {
	display: flex;
	gap: 10px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.footer__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: rgba(0, 106, 255, 0.1);
	border-radius: 10px;
	color: #006aff;
	text-decoration: none;
	transition: all 0.3s ease;
}

.footer__social-link:hover {
	background: #006aff;
	color: white;
	transform: translateY(-3px);
	box-shadow: 0 4px 12px rgba(0, 106, 255, 0.3);
}

[data-theme="dark"] .footer__social-link {
	background: rgba(99, 102, 241, 0.15);
	color: #a5b4fc;
}

[data-theme="dark"] .footer__social-link:hover {
	background: #6366f1;
	color: white;
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.footer__social-link svg {
	width: 20px;
	height: 20px;
}

/* ========================================
   Footer Column (Links)
   ======================================== */
.footer__column {
	display: flex;
	flex-direction: column;
}

.footer__title {
	font-size: 16px;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 20px;
	position: relative;
	padding-bottom: 12px;
}

[data-theme="dark"] .footer__title {
	color: #f1f5f9;
}

.footer__title::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 40px;
	height: 3px;
	background: linear-gradient(90deg, #006aff, transparent);
	border-radius: 3px;
}

[data-theme="dark"] .footer__title::after {
	background: linear-gradient(90deg, #6366f1, transparent);
}

.footer__links {
	display: flex;
	flex-direction: column;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer__link {
	color: #64748b;
	text-decoration: none;
	font-size: 14.5px;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	position: relative;
	padding-left: 0;
}

.footer__link::before {
	content: '→';
	position: absolute;
	left: 0;
	opacity: 0;
	transform: translateX(-10px);
	transition: all 0.3s ease;
	color: #006aff;
}

.footer__link:hover {
	color: #006aff;
	padding-left: 20px;
}

.footer__link:hover::before {
	opacity: 1;
	transform: translateX(0);
}

[data-theme="dark"] .footer__link {
	color: #94a3b8;
}

[data-theme="dark"] .footer__link::before {
	color: #a5b4fc;
}

[data-theme="dark"] .footer__link:hover {
	color: #a5b4fc;
}

/* ========================================
   Footer Bottom
   ======================================== */
.footer__bottom {
	border-top: 1px solid rgba(0, 106, 255, 0.1);
	padding-top: 30px;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
}

[data-theme="dark"] .footer__bottom {
	border-top-color: rgba(99, 102, 241, 0.2);
}

@media (max-width: 640px) {
	.footer__bottom {
		flex-direction: column;
		text-align: center;
		gap: 15px;
	}
}

.footer__copy {
	color: #64748b;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 8px;
}

[data-theme="dark"] .footer__copy {
	color: #94a3b8;
}

.footer__copy svg {
	width: 16px;
	height: 16px;
	color: #ef4444;
	animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
	0%, 100% { transform: scale(1); }
	10%, 30% { transform: scale(1.1); }
	20%, 40% { transform: scale(1); }
}

.footer__credits {
	display: flex;
	align-items: center;
	gap: 15px;
	font-size: 14px;
	color: #64748b;
}

[data-theme="dark"] .footer__credits {
	color: #94a3b8;
}

.footer__credits a {
	color: #006aff;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
}

.footer__credits a:hover {
	color: #0080ff;
	text-decoration: underline;
}

[data-theme="dark"] .footer__credits a {
	color: #a5b4fc;
}

[data-theme="dark"] .footer__credits a:hover {
	color: #c4b5fd;
}

/* ========================================
   Newsletter Section (Optional)
   ======================================== */
.footer__newsletter {
	background: linear-gradient(135deg, rgba(0, 106, 255, 0.05), rgba(0, 128, 255, 0.05));
	border-radius: 16px;
	padding: 30px;
	margin-bottom: 50px;
	border: 1px solid rgba(0, 106, 255, 0.1);
}

[data-theme="dark"] .footer__newsletter {
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
	border-color: rgba(99, 102, 241, 0.2);
}

/* Cloudflare Turnstile Container */
.newsletter-turnstile-container {
	display: none;
	justify-content: center;
	align-items: center;
	margin: 20px 0;
	padding: 20px;
	background: rgba(255, 255, 255, 0.8);
	border-radius: 12px;
	border: 2px dashed rgba(0, 106, 255, 0.3);
	opacity: 0;
	transform: translateY(-10px);
	transition: all 0.4s ease;
}

.newsletter-turnstile-container[style*="display: flex"] {
	opacity: 1;
	transform: translateY(0);
}

[data-theme="dark"] .newsletter-turnstile-container {
	background: rgba(30, 41, 59, 0.8);
	border-color: rgba(99, 102, 241, 0.4);
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.footer__newsletter-title {
	font-size: 20px;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 8px;
}

[data-theme="dark"] .footer__newsletter-title {
	color: #f1f5f9;
}

.footer__newsletter-description {
	color: #64748b;
	font-size: 14px;
	margin-bottom: 20px;
}

[data-theme="dark"] .footer__newsletter-description {
	color: #94a3b8;
}

.footer__newsletter-form {
	display: flex;
	gap: 12px;
	max-width: 600px;
	flex-wrap: wrap;
}

@media (max-width: 640px) {
	.footer__newsletter-form {
		flex-direction: column;
	}
}

/* Enhanced Input Field with Icons */
.footer__newsletter-input-wrapper {
	position: relative;
	flex: 1;
	min-width: 320px;
	display: flex;
	align-items: center;
}

.footer__newsletter-input {
	width: 100%;
	padding: 20px 65px 20px 58px !important;
	border: 2px solid rgba(0, 106, 255, 0.2);
	border-radius: 12px !important;
	font-size: 16px;
	font-weight: 500;
	background: white;
	color: #1e293b;
	transition: all 0.3s ease;
	box-shadow: 0 4px 12px rgba(0, 106, 255, 0.1);
	outline: none;
	line-height: 1.5;
	height: 60px;
}

/* Email Icon (left side) */
.input-icon {
	position: absolute;
	left: 22px;
	width: 22px;
	height: 22px;
	color: #006aff;
	pointer-events: none;
	transition: all 0.3s ease;
	z-index: 1;
	opacity: 0.7;
}

/* Status Icons (right side) */
.input-status {
	position: absolute;
	right: 22px;
	width: 24px;
	height: 24px;
	opacity: 0;
	transform: scale(0.8);
	transition: all 0.3s ease;
	pointer-events: none;
	z-index: 1;
}

.input-valid {
	color: #10b981;
}

.input-invalid {
	color: #ef4444;
}

/* Show valid icon */
.footer__newsletter-input:valid:not(:placeholder-shown) ~ .input-valid {
	opacity: 1;
	transform: scale(1);
	animation: checkBounce 0.5s ease;
}

/* Show invalid icon */
.footer__newsletter-input:invalid:not(:placeholder-shown):not(:focus) ~ .input-invalid {
	opacity: 1;
	transform: scale(1);
	animation: errorShake 0.5s ease;
}

@keyframes checkBounce {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.2); }
}

@keyframes errorShake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-3px); }
	75% { transform: translateX(3px); }
}

.footer__newsletter-input::placeholder {
	color: #94a3b8;
	font-weight: 400;
}

/* Hover State */
.footer__newsletter-input-wrapper:hover .footer__newsletter-input {
	border-color: rgba(0, 106, 255, 0.4);
	box-shadow: 0 6px 16px rgba(0, 106, 255, 0.15);
	transform: translateY(-1px);
}

.footer__newsletter-input-wrapper:hover .input-icon {
	color: #006aff;
	opacity: 1;
	transform: scale(1.1);
}

/* Focus State */
.footer__newsletter-input:focus {
	border-color: #006aff;
	box-shadow: 0 0 0 4px rgba(0, 106, 255, 0.1), 0 6px 20px rgba(0, 106, 255, 0.2);
	transform: translateY(-2px);
}

.footer__newsletter-input:focus ~ .input-icon {
	color: #006aff;
	opacity: 1;
	transform: scale(1.15);
}

/* Invalid State */
.footer__newsletter-input.invalid {
	border-color: #ef4444;
	background: rgba(239, 68, 68, 0.05);
}

.footer__newsletter-input.invalid:focus {
	box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.footer__newsletter-input.invalid ~ .input-icon {
	color: #ef4444;
}

/* Dark Mode */
[data-theme="dark"] .footer__newsletter-input {
	background: rgba(15, 23, 42, 0.6);
	border-color: rgba(99, 102, 241, 0.3);
	color: #f1f5f9;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .footer__newsletter-input::placeholder {
	color: #64748b;
}

[data-theme="dark"] .input-icon {
	color: #818cf8;
	opacity: 0.8;
}

[data-theme="dark"] .footer__newsletter-input-wrapper:hover .input-icon {
	color: #a5b4fc;
	opacity: 1;
	transform: scale(1.1);
}

[data-theme="dark"] .footer__newsletter-input-wrapper:hover .footer__newsletter-input {
	border-color: rgba(99, 102, 241, 0.5);
	box-shadow: 0 6px 16px rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .footer__newsletter-input:focus {
	border-color: #6366f1;
	box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), 0 6px 20px rgba(99, 102, 241, 0.25);
}

[data-theme="dark"] .footer__newsletter-input:focus ~ .input-icon {
	color: #c7d2fe;
	opacity: 1;
	transform: scale(1.15);
}

/* Enhanced Submit Button */
.footer__newsletter-button {
	padding: 20px 40px;
	background: linear-gradient(135deg, #006aff 0%, #0080ff 100%);
	color: white;
	border: none;
	border-radius: 12px !important;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(0, 106, 255, 0.3);
	position: relative;
	overflow: hidden;
	height: 60px;
}

.footer__newsletter-button::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
	transition: left 0.5s ease;
}

.footer__newsletter-button:hover::before {
	left: 100%;
}

.footer__newsletter-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 106, 255, 0.4);
	background: linear-gradient(135deg, #0080ff 0%, #00a0ff 100%);
}

.footer__newsletter-button:active {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 106, 255, 0.3);
}

.footer__newsletter-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	box-shadow: 0 2px 8px rgba(0, 106, 255, 0.2);
}

[data-theme="dark"] .footer__newsletter-button {
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

[data-theme="dark"] .footer__newsletter-button:hover {
	background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
	box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

/* Loading State */
.footer__newsletter-button.loading {
	pointer-events: none;
}

.footer__newsletter-button.loading::after {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	top: 50%;
	left: 50%;
	margin-left: -8px;
	margin-top: -8px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: white;
	animation: buttonSpin 0.6s linear infinite;
}

@keyframes buttonSpin {
	to { transform: rotate(360deg); }
}

/* Newsletter Success Message */
.newsletter-success-message {
	background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
	border: 2px solid rgba(16, 185, 129, 0.3);
	border-radius: 16px;
	padding: 40px 30px;
	text-align: center;
	opacity: 0;
	transform: translateY(20px);
	transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.newsletter-success-message.show {
	opacity: 1;
	transform: translateY(0);
}

.success-icon {
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, #10b981, #059669);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
	font-size: 32px;
	color: white;
	font-weight: bold;
	box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
	animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
	0% {
		transform: scale(0);
		opacity: 0;
	}
	50% {
		transform: scale(1.1);
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.success-title {
	font-size: 24px;
	font-weight: 700;
	color: #059669;
	margin: 0 0 10px 0;
}

.success-text {
	font-size: 16px;
	color: #047857;
	margin: 0;
	line-height: 1.6;
}

[data-theme="dark"] .newsletter-success-message {
	background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
	border-color: rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .success-title {
	color: #34d399;
}

[data-theme="dark"] .success-text {
	color: #6ee7b7;
}

/* Mobile Responsive */
@media (max-width: 640px) {
	.footer__newsletter-input-wrapper {
		min-width: 100%;
	}
	
	.footer__newsletter-input {
		min-width: 100%;
		padding: 22px 65px 22px 58px !important;
		font-size: 16px;
		border-radius: 12px !important;
		height: 64px;
	}
	
	.input-icon {
		left: 20px;
		width: 26px;
		height: 26px;
	}
	
	.input-status {
		right: 20px;
		width: 26px;
		height: 26px;
	}
	
	.footer__newsletter-button {
		width: 100%;
		padding: 22px 40px;
		font-size: 16px;
		border-radius: 12px !important;
		height: 64px;
	}
}

/* ========================================
   Back to Top Button
   ======================================== */
.footer__back-to-top {
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: 50px;
	height: 50px;
	background: linear-gradient(135deg, #006aff, #0080ff);
	color: white;
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(20px);
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(0, 106, 255, 0.3);
	z-index: 999;
}

.footer__back-to-top.visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.footer__back-to-top:hover {
	transform: translateY(-5px);
	box-shadow: 0 6px 20px rgba(0, 106, 255, 0.5);
}

[data-theme="dark"] .footer__back-to-top {
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

[data-theme="dark"] .footer__back-to-top:hover {
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.footer__back-to-top svg {
	width: 24px;
	height: 24px;
}

@media (max-width: 768px) {
	.footer__back-to-top {
		width: 45px;
		height: 45px;
		bottom: 20px;
		right: 20px;
	}
	
	.footer__back-to-top svg {
		width: 20px;
		height: 20px;
	}
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
	.footer {
		padding: 50px 0 25px;
		margin-top: 60px;
	}
	
	.footer__about {
		padding-right: 0;
	}
}

@media (max-width: 640px) {
	.footer {
		padding: 40px 0 20px;
		margin-top: 50px;
	}
	
	.footer__newsletter {
		padding: 25px 20px;
		margin-bottom: 40px;
	}
	
	.footer__social {
		justify-content: center;
	}
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
	.footer__social,
	.footer__newsletter,
	.footer__back-to-top {
		display: none;
	}
	
	.footer {
		margin-top: 30px;
		padding: 20px 0;
		border-top: 1px solid #000;
		background: none;
	}
}

/* ========================================
   Accessibility
   ======================================== */
.footer a:focus,
.footer button:focus {
	outline: 2px solid #006aff;
	outline-offset: 2px;
}

[data-theme="dark"] .footer a:focus,
[data-theme="dark"] .footer button:focus {
	outline-color: #6366f1;
}

/* Screen reader only text */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

