/**
 * Homepage Custom Styles
 * Modern design with dark violet theme
 *
 * @package Astra Child
 */

:root {
	--homepage-primary: #6A0DAD;
	--homepage-secondary: #8B2DD9;
	--homepage-bg: #1A0B2E;
	--homepage-card: #2D1B4E;
	--homepage-card-hover: #3A1F5E;
	--homepage-text: #FFFFFF;
	--homepage-text-light: #E0D5F0;
	--homepage-text-muted: #B8A5D9;
	--homepage-gradient: linear-gradient(135deg, #6A0DAD 0%, #8B2DD9 100%);
	--homepage-shadow: rgba(106, 13, 173, 0.3);
	--homepage-shadow-strong: rgba(106, 13, 173, 0.6);
}

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

/* Full width for homepage */
.homepage-main {
	overflow-x: hidden;
	width: 100%;
	max-width: 100%;
}

/* Override container width for homepage sections */
.homepage-main .container,
.homepage-main .ast-container {
	max-width: 100%;
	width: 100%;
	padding: 0;
}

/* Inner content container for homepage sections */
.homepage-section .container,
.homepage-section .ast-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.homepage-section {
	padding: 80px 0;
	position: relative;
	width: 100%;
}

/* ============================================
   Hero Section
   ============================================ */

.homepage-hero {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: var(--homepage-gradient);
	width: 100%;
	max-width: 100%;
}

.hero-background {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--homepage-gradient);
	z-index: 1;
}

.hero-background::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
	animation: pulse-glow 20s infinite;
}

.hero-background::after {
	content: '';
	position: absolute;
	bottom: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle, rgba(139, 45, 217, 0.2) 0%, transparent 70%);
	animation: pulse-glow 25s infinite reverse;
}

.hero-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(26, 11, 46, 0.3);
	z-index: 2;
}

.hero-content {
	position: relative;
	z-index: 3;
	width: 100%;
	text-align: center;
	padding: 40px 20px;
}

.hero-inner {
	max-width: 800px;
	margin: 0 auto;
}

.hero-title {
	font-size: 56px;
	font-weight: 800;
	color: var(--homepage-text);
	margin: 0 0 24px 0;
	line-height: 1.2;
	text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
	font-size: 20px;
	color: var(--homepage-text-light);
	margin: 0 0 40px 0;
	line-height: 1.6;
	animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
	display: flex;
	gap: 20px;
	justify-content: center;
	flex-wrap: wrap;
	animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 32px;
	border-radius: 12px;
	font-size: 18px;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	border: 2px solid transparent;
	cursor: pointer;
	position: relative;
	overflow: hidden;
}

.btn-primary {
	background: var(--homepage-text);
	color: var(--homepage-primary);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
	background: transparent;
	border: 2px solid var(--homepage-text);
	color: var(--homepage-text);
}

.btn-secondary:hover {
	background: var(--homepage-text);
	color: var(--homepage-primary);
	transform: translateY(-3px);
}

.btn-large {
	padding: 20px 40px;
	font-size: 20px;
}

.btn-outline {
	background: transparent;
	border: 2px solid var(--homepage-secondary);
	color: var(--homepage-secondary);
}

.btn-outline:hover {
	background: var(--homepage-secondary);
	color: var(--homepage-text);
}

.hero-scroll-indicator {
	position: absolute;
	bottom: 40px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	animation: bounce 2s infinite;
}

.scroll-arrow {
	display: block;
	width: 24px;
	height: 24px;
	border-right: 3px solid var(--homepage-text);
	border-bottom: 3px solid var(--homepage-text);
	transform: rotate(45deg);
	opacity: 0.8;
}

/* ============================================
   Section Headers
   ============================================ */

.section-header {
	text-align: center;
	margin-bottom: 60px;
}

.section-title {
	font-size: 42px;
	font-weight: 800;
	color: var(--homepage-text);
	margin: 0 0 16px 0;
	line-height: 1.2;
}

.section-subtitle {
	font-size: 18px;
	color: var(--homepage-text-muted);
	margin: 0;
	line-height: 1.6;
}

.section-footer {
	text-align: center;
	margin-top: 60px;
}

/* ============================================
   Featured Courses Section
   ============================================ */

.featured-courses-section {
	background: var(--homepage-bg);
	color: var(--homepage-text);
	width: 100%;
	max-width: 100%;
}

/* ============================================
   All Courses Section
   ============================================ */

.all-courses-section {
	background: var(--homepage-card);
	color: var(--homepage-text);
	width: 100%;
	max-width: 100%;
}

.courses-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 30px;
	margin-top: 40px;
}

.course-card {
	background: var(--homepage-card);
	border-radius: 20px;
	overflow: hidden;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	border: 1px solid rgba(139, 45, 217, 0.2);
	box-shadow: 0 8px 24px var(--homepage-shadow);
	height: 100%;
	display: flex;
	flex-direction: column;
}

.course-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 16px 48px var(--homepage-shadow-strong);
	border-color: rgba(139, 45, 217, 0.4);
}

.course-card-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.course-thumbnail {
	position: relative;
	overflow: hidden;
	background: var(--homepage-gradient);
}

.course-thumbnail img,
.course-image-placeholder {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.course-image-placeholder {
	background: var(--homepage-gradient);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--homepage-text);
	font-size: 48px;
}

.course-card:hover .course-thumbnail img {
	transform: scale(1.1);
}

.course-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(106, 13, 173, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.course-card:hover .course-overlay {
	opacity: 1;
}

.view-course {
	color: var(--homepage-text);
	font-size: 18px;
	font-weight: 700;
}

.course-badge {
	position: absolute;
	top: 16px;
	right: 16px;
	background: var(--homepage-text);
	color: var(--homepage-primary);
	padding: 6px 12px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	z-index: 2;
}

.course-content {
	padding: 24px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.course-title {
	margin: 0 0 12px 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
}

.course-title a {
	color: var(--homepage-text);
	text-decoration: none;
	transition: color 0.3s ease;
}

.course-title a:hover {
	color: var(--homepage-secondary);
}

.course-instructor {
	margin-bottom: 16px;
}

.instructor-name {
	color: var(--homepage-text-muted);
	font-size: 14px;
}

.course-meta {
	display: flex;
	gap: 20px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.course-students,
.course-duration {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--homepage-text-muted);
	font-size: 14px;
}

.course-students svg,
.course-duration svg {
	fill: currentColor;
}

.course-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid rgba(139, 45, 217, 0.2);
}

.course-price {
	font-size: 20px;
	font-weight: 700;
	color: var(--homepage-secondary);
}

.course-price .price.free {
	color: #4ADE80;
}

.btn-course {
	padding: 10px 20px;
	background: var(--homepage-gradient);
	color: var(--homepage-text);
	border-radius: 8px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	transition: all 0.3s ease;
}

.btn-course:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 16px var(--homepage-shadow);
}

/* ============================================
   Features Section
   ============================================ */

.features-section {
	background: var(--homepage-card);
	color: var(--homepage-text);
	width: 100%;
	max-width: 100%;
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 40px;
	margin-top: 40px;
}

.feature-item {
	text-align: center;
	padding: 40px 24px;
	background: rgba(45, 27, 78, 0.6);
	backdrop-filter: blur(20px);
	border: 1px solid rgba(139, 45, 217, 0.3);
	border-radius: 20px;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover {
	transform: translateY(-8px);
	box-shadow: 0 16px 48px var(--homepage-shadow-strong);
	border-color: rgba(139, 45, 217, 0.5);
	background: rgba(45, 27, 78, 0.8);
}

.feature-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--homepage-gradient);
	border-radius: 50%;
	color: var(--homepage-text);
	box-shadow: 0 8px 24px var(--homepage-shadow);
}

.feature-icon svg {
	width: 48px;
	height: 48px;
	fill: currentColor;
}

.feature-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--homepage-text);
	margin: 0 0 16px 0;
}

.feature-description {
	font-size: 16px;
	color: var(--homepage-text-light);
	line-height: 1.6;
	margin: 0;
}

/* ============================================
   Testimonials Section
   ============================================ */

.testimonials-section {
	background: var(--homepage-bg);
	color: var(--homepage-text);
	width: 100%;
	max-width: 100%;
}

.testimonials-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
	margin-top: 40px;
}

.testimonial-item {
	background: rgba(45, 27, 78, 0.6);
	backdrop-filter: blur(20px);
	border: 1px solid rgba(139, 45, 217, 0.3);
	border-radius: 20px;
	padding: 32px;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
}

.testimonial-item:hover {
	transform: translateY(-8px);
	box-shadow: 0 16px 48px var(--homepage-shadow-strong);
	border-color: rgba(139, 45, 217, 0.5);
}

.testimonial-content {
	flex: 1;
	margin-bottom: 24px;
}

.testimonial-stars {
	display: flex;
	gap: 4px;
	margin-bottom: 16px;
}

.testimonial-stars svg {
	fill: #FFD700;
	width: 20px;
	height: 20px;
}

.testimonial-text {
	font-size: 16px;
	color: var(--homepage-text-light);
	line-height: 1.8;
	margin: 0;
}

.testimonial-author {
	display: flex;
	align-items: center;
	gap: 16px;
	padding-top: 24px;
	border-top: 1px solid rgba(139, 45, 217, 0.2);
}

.author-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--homepage-gradient);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.avatar-placeholder {
	color: var(--homepage-text);
	font-size: 24px;
	font-weight: 700;
}

.author-info {
	flex: 1;
}

.author-name {
	font-size: 18px;
	font-weight: 700;
	color: var(--homepage-text);
	margin: 0 0 4px 0;
}

.author-role {
	font-size: 14px;
	color: var(--homepage-text-muted);
	margin: 0;
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
	background: var(--homepage-gradient);
	color: var(--homepage-text);
	text-align: center;
	position: relative;
	overflow: hidden;
	width: 100%;
	max-width: 100%;
}

.cta-section::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
	animation: pulse-glow 20s infinite;
}

.cta-content {
	position: relative;
	z-index: 1;
	max-width: 700px;
	margin: 0 auto;
}

.cta-title {
	font-size: 48px;
	font-weight: 800;
	color: var(--homepage-text);
	margin: 0 0 20px 0;
	line-height: 1.2;
	text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cta-subtitle {
	font-size: 20px;
	color: var(--homepage-text-light);
	margin: 0 0 40px 0;
	line-height: 1.6;
}

.cta-buttons {
	display: flex;
	gap: 20px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes pulse-glow {
	0%, 100% {
		transform: scale(1) rotate(0deg);
		opacity: 0.5;
	}
	50% {
		transform: scale(1.2) rotate(180deg);
		opacity: 0.8;
	}
}

@keyframes bounce {
	0%, 100% {
		transform: translateX(-50%) translateY(0);
	}
	50% {
		transform: translateX(-50%) translateY(-10px);
	}
}

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

@media (max-width: 1024px) {
	.hero-title {
		font-size: 48px;
	}
	
	.section-title {
		font-size: 36px;
	}
	
	.courses-grid {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
		gap: 24px;
	}
	
	.features-grid {
		grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
		gap: 30px;
	}
}

@media (max-width: 768px) {
	.homepage-section {
		padding: 60px 0;
	}
	
	.hero-title {
		font-size: 36px;
	}
	
	.hero-subtitle {
		font-size: 18px;
	}
	
	.hero-buttons {
		flex-direction: column;
		width: 100%;
	}
	
	.btn {
		width: 100%;
	}
	
	.section-title {
		font-size: 32px;
	}
	
	.section-subtitle {
		font-size: 16px;
	}
	
	.courses-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.features-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	
	.testimonials-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	
	.cta-title {
		font-size: 36px;
	}
	
	.cta-subtitle {
		font-size: 18px;
	}
	
	.cta-buttons {
		flex-direction: column;
	}
	
	.cta-buttons .btn {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.container {
		padding: 0 15px;
	}
	
	.hero-title {
		font-size: 28px;
	}
	
	.hero-subtitle {
		font-size: 16px;
	}
	
	.section-title {
		font-size: 28px;
	}
	
	.course-content {
		padding: 20px;
	}
	
	.feature-item {
		padding: 32px 20px;
	}
	
	.testimonial-item {
		padding: 24px;
	}
	
	.cta-title {
		font-size: 28px;
	}
}

/* ============================================
   RTL Support
   ============================================ */

[dir="rtl"] .course-badge {
	right: auto;
	left: 16px;
}

[dir="rtl"] .hero-buttons,
[dir="rtl"] .cta-buttons {
	direction: rtl;
}

[dir="rtl"] .course-footer {
	direction: rtl;
}

[dir="rtl"] .testimonial-author {
	direction: rtl;
}
