/**
 * Professional eLearning Header & Footer Styles
 * 
 * Modern, responsive styles for header and footer
 * Compatible with RTL languages
 *
 * @package kadence
 */

/* ============================================
   HEADER STYLES
   ============================================ */

.elearning-header {
	position: sticky;
	top: 0;
	z-index: 9999;
	width: 100%;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	transition: all 0.3s ease;
}

.elearning-header.sticky {
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header-main-content {
	padding: 15px 0 !important;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 15px;
	flex-wrap: nowrap;
	width: 100%;
	overflow: hidden; /* Prevent overflow */
}

/* Logo */
.header-logo {
	flex-shrink: 0;
	min-width: 0; /* Allow logo to shrink if needed */
}

.header-logo img {
	max-height: 50px;
	width: auto;
	height: auto;
}

.logo-text {
	font-size: 1.8rem;
	font-weight: 700;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin: 0;
	letter-spacing: -0.5px;
}

/* Navigation */
.header-navigation {
	flex: 1;
	display: flex;
	justify-content: center;
	min-width: 0; /* Allow shrinking */
	overflow: hidden; /* Prevent overflow */
}

.main-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 20px;
	align-items: center;
	flex-wrap: nowrap;
}

.main-menu li {
	position: relative;
	margin: 0;
	padding: 0;
}

.main-menu li.menu-item-has-children {
	position: relative;
}

.main-menu li.menu-item-has-children::after {
	content: '▼';
	font-size: 0.7rem;
	margin-left: 5px;
	color: #999;
	transition: transform 0.3s ease;
}

.main-menu li.menu-item-has-children:hover::after {
	transform: rotate(180deg);
}

/* Submenu Support */
.main-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
	min-width: 200px;
	list-style: none;
	margin: 0;
	padding: 8px 0;
	z-index: 1000;
	margin-top: 10px;
}

.main-menu li:hover > .sub-menu {
	display: block;
}

.main-menu .sub-menu li {
	margin: 0;
	padding: 0;
}

.main-menu .sub-menu a {
	padding: 10px 20px;
	display: block;
	color: #333;
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9rem;
	transition: all 0.3s ease;
	border-radius: 0;
}

.main-menu .sub-menu a:hover {
	background: rgba(102, 126, 234, 0.08);
	color: #667eea;
	padding-left: 25px;
}

/* Submenu Level 2 */
.main-menu .sub-menu .sub-menu {
	top: 0;
	left: 100%;
	margin-top: 0;
	margin-left: 10px;
}

.main-menu .sub-menu .sub-menu a {
	padding: 8px 20px;
	font-size: 0.85rem;
}

.main-menu a {
	color: #333;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	transition: all 0.3s ease;
	padding: 6px 10px;
	display: block;
	position: relative;
	border-radius: 6px;
	white-space: nowrap; /* Prevent text wrapping */
}

.main-menu a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background: #667eea;
	transition: width 0.3s ease;
}

.main-menu a:hover::after,
.main-menu .current-menu-item > a::after,
.main-menu .current-page-ancestor > a::after {
	width: 100%;
}

.main-menu a:hover {
	color: #667eea;
	background: rgba(102, 126, 234, 0.08);
	transform: translateY(-1px);
}

.main-menu .current-menu-item > a,
.main-menu .current-page-ancestor > a {
	color: #667eea;
}

/* Header Actions */
.header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	white-space: nowrap; /* Prevent wrapping */
}

/* Search */
.header-search {
	position: relative;
}

.search-toggle {
	background: none;
	border: none;
	font-size: 1.3rem;
	color: #333;
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
}

.search-toggle:hover {
	transform: scale(1.1);
}

.search-form-wrapper {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 10px;
	background: #fff;
	padding: 20px;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
	min-width: 300px;
	z-index: 1000;
	animation: slideDown 0.3s ease;
}

.search-form-wrapper.active {
	display: block;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.search-form-wrapper input[type="search"] {
	flex: 1;
	padding: 10px 15px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 0.95rem;
	outline: none;
	transition: border-color 0.3s ease;
}

.search-form-wrapper input[type="search"]:focus {
	border-color: #667eea;
}

.search-form-wrapper button[type="submit"] {
	background: #667eea;
	color: #fff;
	padding: 10px 20px;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s ease, transform 0.3s ease;
}

.search-form-wrapper button[type="submit"]:hover {
	background: #5568d3;
	transform: translateY(-2px);
}

/* Cart */
.header-cart {
	position: relative;
	text-decoration: none;
	color: #333;
	font-size: 1.3rem;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
}

.header-cart:hover {
	transform: scale(1.1);
}

.cart-count {
	position: absolute;
	top: 0;
	right: 0;
	background: #667eea;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 600;
	padding: 2px 6px;
	border-radius: 10px;
	min-width: 18px;
	text-align: center;
	line-height: 1.4;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.1);
	}
}

/* User Menu */
.header-user {
	position: relative;
}

.user-menu-toggle {
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 10px;
	border-radius: 25px;
	transition: background 0.3s ease;
}

.user-menu-toggle:hover {
	background: #f8f9fa;
}

.user-avatar {
	width: 35px;
	height: 35px;
	border-radius: 50%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 600;
	font-size: 0.9rem;
}

.user-menu-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 10px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
	min-width: 200px;
	z-index: 1000;
	overflow: hidden;
	animation: slideDown 0.3s ease;
}

.user-menu-dropdown.active {
	display: block;
}

.user-menu-header {
	padding: 15px;
	background: #f8f9fa;
	border-bottom: 1px solid #e0e0e0;
}

.user-info {
	font-weight: 600;
	color: #333;
	margin-bottom: 5px;
}

.user-email {
	font-size: 0.85rem;
	color: #666;
}

.user-menu-item {
	display: block;
	padding: 12px 20px;
	color: #333;
	text-decoration: none;
	transition: background 0.3s ease;
}

.user-menu-item:hover {
	background: #f8f9fa;
}

.user-menu-divider {
	height: 1px;
	background: #e0e0e0;
	margin: 5px 0;
}

/* Login Button */
.header-login-btn {
	background: #667eea;
	color: #fff;
	padding: 10px 25px;
	border-radius: 25px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	transition: transform 0.3s ease, background 0.3s ease;
}

.header-login-btn:hover {
	transform: translateY(-2px);
	background: #5568d3;
}

/* Mobile Menu */
.mobile-menu-toggle {
	display: none;
	background: none;
	border: none;
	font-size: 1.5rem;
	color: #333;
	cursor: pointer;
	padding: 8px;
	transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
	transform: rotate(90deg);
}

.elearning-mobile-nav {
	display: none;
	background: #fff;
	border-top: 1px solid #e0e0e0;
	padding: 20px;
}

.elearning-mobile-nav.active {
	display: block;
}

.mobile-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-menu li {
	border-bottom: 1px solid #e0e0e0;
}

.mobile-menu li:last-child {
	border-bottom: none;
}

.mobile-menu a {
	display: block;
	padding: 15px 0;
	color: #333;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-menu a:hover {
	color: #667eea;
	padding-left: 10px;
}

/* ============================================
   FOOTER STYLES
   ============================================ */

.elearning-footer {
	position: relative;
	width: 100%;
}

/* Footer Main */
.footer-main {
	background: #2c3e50;
	color: #fff;
	padding: 80px 0 40px;
}

.footer-content-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 40px;
	margin-bottom: 60px;
}

.footer-column {
	min-width: 0;
}

.footer-logo {
	margin-bottom: 20px;
}

.footer-logo img {
	max-height: 50px;
	width: auto;
	filter: brightness(0) invert(1);
}

.footer-logo-text {
	font-size: 1.8rem;
	font-weight: 700;
	margin: 0;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.footer-description {
	color: #bdc3c7;
	line-height: 1.7;
	margin-bottom: 25px;
	font-size: 0.95rem;
}

.footer-title {
	font-size: 1.2rem;
	font-weight: 700;
	margin-bottom: 20px;
	color: #fff;
}

.footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-links li {
	margin-bottom: 12px;
}

.footer-links a {
	color: #bdc3c7;
	text-decoration: none;
	transition: color 0.3s ease, padding-left 0.3s ease;
	font-size: 0.95rem;
	display: inline-block;
}

.footer-links a:hover {
	color: #667eea;
	padding-left: 5px;
}

/* Social Icons */
.footer-social {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
}

.social-icon {
	width: 40px;
	height: 40px;
	background: rgba(255,255,255,0.1);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	text-decoration: none;
	transition: background 0.3s ease, transform 0.3s ease;
	font-size: 1.2rem;
}

.social-icon:hover {
	background: rgba(255,255,255,0.2);
	transform: translateY(-3px);
}

/* Newsletter */
.footer-newsletter-desc {
	color: #bdc3c7;
	line-height: 1.7;
	margin-bottom: 20px;
	font-size: 0.95rem;
}

.footer-newsletter-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.footer-newsletter-form input[type="email"] {
	padding: 12px 15px;
	border: none;
	border-radius: 8px;
	font-size: 0.95rem;
	outline: none;
	transition: box-shadow 0.3s ease;
}

.footer-newsletter-form input[type="email"]:focus {
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.footer-newsletter-form button[type="submit"] {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	padding: 12px 20px;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.footer-newsletter-form button[type="submit"]:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Payment Methods */
.footer-payment-methods {
	margin-top: 25px;
}

.footer-payment-methods p {
	color: #bdc3c7;
	font-size: 0.85rem;
	margin-bottom: 10px;
}

.payment-icons {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.payment-icons span {
	font-size: 1.5rem;
	opacity: 0.8;
	transition: opacity 0.3s ease;
}

.payment-icons span:hover {
	opacity: 1;
}

/* Footer Bottom */
.footer-bottom {
	background: #1a252f;
	padding: 25px 0;
	border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
	text-align: center;
}

.footer-copyright {
	color: #95a5a6;
	font-size: 0.9rem;
}

.footer-copyright p {
	margin: 0;
}

.footer-legal-links {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	justify-content: center;
}

.footer-legal-links a {
	color: #95a5a6;
	text-decoration: none;
	font-size: 0.9rem;
	transition: color 0.3s ease;
}

.footer-legal-links a:hover {
	color: #667eea;
}

/* Back to Top Button */
.back-to-top {
	display: none;
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: 50px;
	height: 50px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border: none;
	border-radius: 50%;
	font-size: 1.5rem;
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
	z-index: 999;
	transition: transform 0.3s ease, opacity 0.3s ease;
	opacity: 0;
}

.back-to-top.show {
	display: block;
	opacity: 1;
}

.back-to-top:hover {
	transform: translateY(-5px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1024px) {
	.header-navigation {
		display: none;
	}
	
	.mobile-menu-toggle {
		display: block !important;
	}
	
	.user-name {
		display: none !important;
	}
	
	.footer-content-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.header-main-content {
		padding: 15px 0 !important;
		flex-wrap: wrap; /* Allow wrapping on mobile only */
	}
	
	.header-logo .logo-text {
		font-size: 1.5rem !important;
	}
	
	.header-actions {
		gap: 10px;
	}
	
	.footer-content-grid {
		grid-template-columns: 1fr !important;
		gap: 30px !important;
	}
	
	.footer-bottom-content {
		flex-direction: column;
		text-align: center;
	}
	
	.footer-legal-links {
		flex-direction: column;
		gap: 10px !important;
	}
	
	.back-to-top {
		bottom: 20px;
		right: 20px;
		width: 45px;
		height: 45px;
		font-size: 1.3rem;
	}
}

@media (max-width: 480px) {
	.main-menu {
		gap: 15px;
	}
	
	.header-actions {
		gap: 8px;
	}
	
	.search-form-wrapper {
		min-width: 250px;
		right: -50px;
	}
	
	.user-menu-dropdown {
		min-width: 180px;
		right: -20px;
	}
}

/* ============================================
   LANGUAGE SWITCHER STYLES
   ============================================ */

.language-switcher {
	position: relative;
	display: inline-block;
}

.lang-switcher-toggle {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 6px 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
	color: #333;
	transition: all 0.3s ease;
	font-family: inherit;
	font-weight: 500;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.lang-switcher-toggle:hover {
	border-color: #667eea;
	color: #667eea;
	background: rgba(102, 126, 234, 0.08);
	box-shadow: 0 2px 6px rgba(102, 126, 234, 0.15);
	transform: translateY(-1px);
}

.current-lang {
	font-weight: 700;
	color: #667eea;
	font-size: 0.9rem;
}

.lang-arrow {
	font-size: 0.7rem;
	color: #999;
	transition: transform 0.3s ease;
}

.language-switcher.active .lang-arrow {
	transform: rotate(180deg);
}

.lang-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 8px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
	min-width: 180px;
	list-style: none;
	margin: 0;
	padding: 8px 0;
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.3s ease;
}

.language-switcher.active .lang-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.lang-dropdown li {
	margin: 0;
	padding: 0;
}

.lang-dropdown a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px;
	color: #333;
	text-decoration: none;
	transition: background 0.3s ease;
	font-size: 0.9rem;
}

.lang-dropdown a:hover {
	background: #f8f9fa;
	color: #667eea;
}

.lang-dropdown li.active a {
	background: rgba(102, 126, 234, 0.1);
	color: #667eea;
	font-weight: 600;
}

.lang-code {
	font-weight: 600;
	margin-right: 8px;
	font-size: 0.85rem;
}

.lang-name {
	color: #666;
	font-size: 0.85rem;
}

.lang-dropdown li.active .lang-name {
	color: #667eea;
}

/* Language Switcher Responsive */
@media (max-width: 768px) {
	.lang-switcher-toggle {
		padding: 5px 10px;
		font-size: 0.8rem;
	}
	
	.lang-dropdown {
		right: auto;
		left: 0;
		min-width: 160px;
	}
}

@media (max-width: 480px) {
	.lang-switcher-toggle {
		padding: 4px 8px;
		font-size: 0.75rem;
	}
	
	.current-lang {
		font-size: 0.75rem;
	}
	
	.lang-dropdown {
		min-width: 140px;
	}
	
	.lang-dropdown a {
		padding: 8px 12px;
		font-size: 0.85rem;
	}
}

