/*
 Theme Name:   Astra Child - Tech Dev Solutions
 Theme URI:    https://wpastra.com/
 Description:  Astra子主题 - 软件开发公司官网定制主题
 Author:       Tech Dev Solutions
 Author URI:   https://example.com
 Template:     astra
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  astra-child-tech-dev
 Tags:         technology, software, business, responsive
*/

/* ========================================
   CSS变量定义 - 科技感配色方案
   ======================================== */
:root {
	--primary-color: #0066FF;
	--primary-dark: #0052CC;
	--secondary-color: #1A1A2E;
	--accent-color: #6C63FF;
	--text-primary: #2D3748;
	--text-secondary: #718096;
	--bg-light: #F7FAFC;
	--bg-dark: #16213E;
	--white: #FFFFFF;
	--gradient-primary: linear-gradient(135deg, #0066FF 0%, #6C63FF 100%);
	--shadow-sm: 0 2px 8px rgba(0, 102, 255, 0.08);
	--shadow-md: 0 4px 16px rgba(0, 102, 255, 0.12);
	--shadow-lg: 0 8px 32px rgba(0, 102, 255, 0.15);
	--transition: all 0.3s ease;
}

/* ========================================
   全局样式重置与基础设置
   ======================================== */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont,
		"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
		"Helvetica Neue", Helvetica, Arial, sans-serif;
	color: var(--text-primary);
	line-height: 1.6;
	overflow-x: hidden;
}

/* ========================================
   标题样式优化
   ======================================== */
h1, h2, h3, h4, h5, h6 {
	font-weight: 600;
	line-height: 1.3;
	color: var(--secondary-color);
}

h1 {
	font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
	font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
	font-size: clamp(1.25rem, 3vw, 1.75rem);
}

/* ========================================
   链接样式
   ======================================== */
a {
	color: var(--primary-color);
	text-decoration: none;
	transition: var(--transition);
}

a:hover {
	color: var(--primary-dark);
}

/* ========================================
   按钮样式 - 科技感渐变效果
   ======================================== */
.btn-primary,
.button-primary,
.wp-block-button__link {
	background: var(--gradient-primary) !important;
	border: none !important;
	color: var(--white) !important;
	padding: 14px 32px !important;
	border-radius: 8px !important;
	font-weight: 500 !important;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: var(--transition) !important;
	box-shadow: var(--shadow-md) !important;
}

.btn-primary:hover,
.button-primary:hover,
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg) !important;
	opacity: 0.95;
}

/* ========================================
   英雄区域样式
   ======================================== */
.hero-section {
	background: var(--gradient-primary);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
}

.hero-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
	background-size: cover;
}

.hero-content {
	position: relative;
	z-index: 1;
	text-align: center;
	color: var(--white);
	max-width: 900px;
	padding: 0 20px;
}

.hero-title {
	font-size: clamp(2.5rem, 6vw, 4rem);
	font-weight: 700;
	margin-bottom: 20px;
	animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
	font-size: clamp(1.1rem, 2.5vw, 1.5rem);
	margin-bottom: 40px;
	opacity: 0.9;
	animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta {
	animation: fadeInUp 0.8s ease 0.4s both;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ========================================
   服务卡片样式
   ======================================== */
.service-card {
	background: var(--white);
	border-radius: 16px;
	padding: 40px 30px;
	text-align: center;
	transition: var(--transition);
	box-shadow: var(--shadow-sm);
	border: 1px solid rgba(0, 102, 255, 0.08);
	height: 100%;
}

.service-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--shadow-lg);
	border-color: var(--primary-color);
}

.service-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 24px;
	background: var(--gradient-primary);
	border-radius: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	color: var(--white);
}

.service-title {
	font-size: 1.5rem;
	margin-bottom: 16px;
	color: var(--secondary-color);
}

.service-description {
	color: var(--text-secondary);
	line-height: 1.8;
}

/* ========================================
   案例作品网格
   ======================================== */
.portfolio-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 30px;
	padding: 40px 0;
}

.portfolio-item {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--shadow-md);
	transition: var(--transition);
}

.portfolio-item:hover {
	transform: scale(1.02);
	box-shadow: var(--shadow-lg);
}

.portfolio-image {
	width: 100%;
	height: 280px;
	object-fit: cover;
}

.portfolio-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(26, 26, 46, 0.95), transparent);
	padding: 30px 20px 20px;
	color: var(--white);
}

.portfolio-title {
	font-size: 1.25rem;
	margin-bottom: 8px;
}

.portfolio-category {
	font-size: 0.875rem;
	opacity: 0.8;
}

/* ========================================
   GitHub仓库卡片
   ======================================== */
.github-repo-card {
	background: var(--white);
	border-radius: 12px;
	padding: 24px;
	box-shadow: var(--shadow-sm);
	border: 1px solid rgba(0, 102, 255, 0.1);
	transition: var(--transition);
}

.github-repo-card:hover {
	box-shadow: var(--shadow-md);
	border-color: var(--primary-color);
}

.repo-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.repo-icon {
	width: 40px;
	height: 40px;
	background: var(--secondary-color);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--white);
}

.repo-name {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--secondary-color);
}

.repo-description {
	color: var(--text-secondary);
	font-size: 0.9rem;
	margin-bottom: 16px;
	line-height: 1.6;
}

.repo-stats {
	display: flex;
	gap: 20px;
	margin-bottom: 16px;
}

.stat-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.875rem;
	color: var(--text-secondary);
}

.stat-item svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.repo-links {
	display: flex;
	gap: 12px;
}

.repo-link {
	padding: 8px 16px;
	background: var(--bg-light);
	border-radius: 6px;
	font-size: 0.875rem;
	color: var(--primary-color);
	transition: var(--transition);
}

.repo-link:hover {
	background: var(--primary-color);
	color: var(--white);
}

/* ========================================
   技术栈Logo墙
   ======================================== */
.tech-stack {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 40px;
	padding: 40px 0;
}

.tech-item {
	width: 100px;
	height: 100px;
	background: var(--white);
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-sm);
	transition: var(--transition);
	padding: 16px;
}

.tech-item:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-md);
}

.tech-logo {
	width: 48px;
	height: 48px;
	margin-bottom: 8px;
}

.tech-name {
	font-size: 0.75rem;
	color: var(--text-secondary);
	text-align: center;
}

/* ========================================
   客户评价卡片
   ======================================== */
.testimonial-card {
	background: var(--white);
	border-radius: 16px;
	padding: 32px;
	box-shadow: var(--shadow-sm);
	position: relative;
}

.testimonial-card::before {
	content: '"';
	position: absolute;
	top: 20px;
	left: 24px;
	font-size: 4rem;
	color: var(--primary-color);
	opacity: 0.1;
	font-family: Georgia, serif;
	line-height: 1;
}

.testimonial-text {
	font-size: 1rem;
	line-height: 1.8;
	color: var(--text-primary);
	margin-bottom: 24px;
	font-style: italic;
}

.testimonial-author {
	display: flex;
	align-items: center;
	gap: 16px;
}

.author-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--primary-color);
}

.author-info h4 {
	font-size: 1rem;
	margin-bottom: 4px;
	color: var(--secondary-color);
}

.author-info p {
	font-size: 0.875rem;
	color: var(--text-secondary);
}

/* ========================================
   CTA区域
   ======================================== */
.cta-section {
	background: var(--gradient-primary);
	padding: 80px 20px;
	text-align: center;
	color: var(--white);
}

.cta-title {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	margin-bottom: 16px;
	color: var(--white);
}

.cta-description {
	font-size: 1.1rem;
	margin-bottom: 32px;
	opacity: 0.9;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

.cta-button {
	display: inline-block;
	padding: 16px 40px;
	background: var(--white);
	color: var(--primary-color);
	border-radius: 8px;
	font-weight: 600;
	font-size: 1.1rem;
	transition: var(--transition);
	box-shadow: var(--shadow-md);
}

.cta-button:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
	background: var(--white);
	color: var(--primary-dark);
}

/* ========================================
   页眉导航优化
   ======================================== */
.site-header {
	box-shadow: var(--shadow-sm);
	background: var(--white);
}

.main-header-menu a {
	color: var(--text-primary);
	font-weight: 500;
	transition: var(--transition);
}

.main-header-menu a:hover {
	color: var(--primary-color);
}

/* ========================================
   页脚样式
   ======================================== */
.site-footer {
	background: var(--secondary-color);
	color: var(--white);
	padding: 60px 0 30px;
}

.footer-widget h3 {
	color: var(--white);
	margin-bottom: 24px;
	font-size: 1.25rem;
}

.footer-widget ul li a {
	color: rgba(255, 255, 255, 0.7);
	transition: var(--transition);
}

.footer-widget ul li a:hover {
	color: var(--white);
	padding-left: 8px;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	margin-top: 40px;
	padding-top: 30px;
	text-align: center;
	color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
	.portfolio-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.tech-stack {
		gap: 24px;
	}
}

@media (max-width: 768px) {
	.hero-section {
		min-height: 80vh;
		padding: 60px 20px;
	}
	
	.portfolio-grid {
		grid-template-columns: 1fr;
	}
	
	.service-card {
		padding: 30px 20px;
	}
	
	.tech-item {
		width: 80px;
		height: 80px;
	}
	
	.tech-logo {
		width: 36px;
		height: 36px;
	}
	
	.cta-section {
		padding: 60px 20px;
	}
}

@media (max-width: 480px) {
	.hero-title {
		font-size: 2rem;
	}
	
	.hero-subtitle {
		font-size: 1rem;
	}
	
	.btn-primary,
	.button-primary {
		padding: 12px 24px !important;
		font-size: 0.9rem;
	}
	
	.tech-stack {
		gap: 16px;
	}
	
	.tech-item {
		width: 70px;
		height: 70px;
	}
}

/* ========================================
   动画类（配合JS使用）
   ======================================== */
.fade-in {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
	opacity: 1;
	transform: translateY(0);
}

.slide-in-left {
	opacity: 0;
	transform: translateX(-50px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.visible {
	opacity: 1;
	transform: translateX(0);
}

.slide-in-right {
	opacity: 0;
	transform: translateX(50px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.visible {
	opacity: 1;
	transform: translateX(0);
}
