/* ==================== CSS Variables ==================== */
:root {
	/* Brand Colors */
	--color-primary: #7B68EE;      /* 보라 */
	--color-secondary: #FF6B35;    /* 오렌지 */
	--color-tertiary: #2C3E50;     /* 네이비 */

	/* Neutral Colors */
	--color-black: #000000;
	--color-dark: #141414;
	--color-white: #FFFFFF;

	/* Gradients */
	--gradient-purple: linear-gradient(45deg, #7B68EE, #9370DB, #8B7FE8, #7B68EE);
	--gradient-orange: linear-gradient(45deg, #FF6B35, #FF8C42, #FF7A3D, #FF6B35);
	--gradient-navy: linear-gradient(45deg, #2C3E50, #34495E, #3A4A5C, #2C3E50);

	/* Layout */
	--footer-height-mobile: 36px;
	--footer-height-desktop: 45px;

	/* Typography */
	--font-primary: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	/* Transitions */
	--transition-base: all 0.3s ease;
	--transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== Reset & Base Styles ==================== */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: var(--font-primary);
	height: 100vh;
	overflow: hidden;
	background: var(--color-black);
}

/* ==================== Main Container ==================== */
.main-container {
	height: calc(100vh - var(--footer-height-mobile));
	display: flex;
	flex-direction: column;
}

/* ==================== Service Cards ==================== */
.service-card {
	flex: 1;
	display: flex;
	flex-direction: column;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	opacity: 0;
	animation: fadeInUp 0.6s ease-out forwards;
}

/* Animation Delays */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }

/* ==================== Mobile Styles (Default) ==================== */

/* Hide image sections on mobile */
.image-section,
.background-image,
.image-overlay {
	display: none;
}

/* Content Section */
.content-section {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 30px 20px;
	position: relative;
}

/* Service-specific backgrounds with shadows for depth */
.service-card.online .content-section {
	background: var(--gradient-purple);
	background-size: 400% 400%;
	animation: gradientMove 12s ease infinite;
	box-shadow: 
		inset 0 3px 10px rgba(255, 255, 255, 0.3),
		inset 0 -3px 10px rgba(0, 0, 0, 0.4);
}

.service-card.academy .content-section {
	background: var(--gradient-orange);
	background-size: 400% 400%;
	animation: gradientMove 12s ease infinite;
	animation-delay: 2s;
	box-shadow: 
		inset 0 3px 10px rgba(255, 255, 255, 0.3),
		inset 0 -3px 10px rgba(0, 0, 0, 0.4);
}

.service-card.bookstore .content-section {
	background: var(--gradient-navy);
	background-size: 400% 400%;
	animation: gradientMove 12s ease infinite;
	animation-delay: 4s;
	box-shadow: 
		inset 0 3px 10px rgba(255, 255, 255, 0.2),
		inset 0 -3px 10px rgba(0, 0, 0, 0.5);
}

/* Service Content */
.service-content {
	text-align: center;
	color: var(--color-white);
	width: 100%;
}

.service-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	opacity: 0.9;
	margin-bottom: 12px;
}

.service-title {
	font-size: 22px;
	font-weight: 900;
	margin-bottom: 12px;
	line-height: 1.2;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.service-description {
	font-size: 13px;
	line-height: 1.4;
	opacity: 0.95;
	margin-bottom: 15px;
}

/* Click Indicator */
.click-indicator {
	width: 35px;
	height: 35px;
	border: 2px solid rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	margin: 0 auto;
	position: relative;
	transition: var(--transition-base);
}

.click-indicator::after {
	content: '→';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 16px;
	color: var(--color-white);
	font-weight: bold;
}

/* ==================== Interactive States ==================== */
.service-card:hover {
	transform: scale(1.02);
}

.service-card:hover .click-indicator {
	background: rgba(255, 255, 255, 0.2);
	border-color: var(--color-white);
	animation: pulse 1s ease infinite;
}

/* ==================== Footer ==================== */
.footer-container-intro {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	height: var(--footer-height-mobile);
	background: rgba(20, 20, 20, 0.8);
	backdrop-filter: blur(15px);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
	z-index: 10000;
}

.footer-since {
	color: rgba(255, 255, 255, 0.7);
	font-size: 11px;
	font-weight: 500;
}

.footer-catchphrase {
	display: none; /* Hidden on mobile */
}

.footer-logo {
	color: #8B7FE8;
	font-size: 13px;
	font-weight: 600;
}

/* ==================== Loading Overlay ==================== */
.loading-overlay {
	position: fixed;
	inset: 0;
	background: linear-gradient(135deg, var(--color-primary), #9370DB);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: var(--transition-smooth);
	z-index: 20000;
}

.loading-overlay.active {
	opacity: 1;
	visibility: visible;
}

.loader {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-top-color: var(--color-white);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

.loading-text {
	color: var(--color-white);
	font-size: 16px;
	font-weight: 600;
	margin-top: 15px;
}

/* Transition Effects */
.main-container.transitioning .service-card.active {
	transform: scale(1.05);
	z-index: 100;
}

.main-container.transitioning .service-card:not(.active) {
	transform: scale(0.95);
	opacity: 0.5;
}

/* ==================== Animations ==================== */
@keyframes fadeInUp {
	from { 
		opacity: 0; 
		transform: translateY(20px); 
	}
	to { 
		opacity: 1; 
		transform: translateY(0); 
	}
}

@keyframes gradientMove {
	0% { background-position: 0% 50%; }
	25% { background-position: 100% 50%; }
	50% { background-position: 100% 100%; }
	75% { background-position: 0% 100%; }
	100% { background-position: 0% 50%; }
}

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

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

/* ==================== Desktop Styles (769px+) ==================== */
@media (min-width: 769px) {
	/* Layout Adjustments */
	.main-container {
		height: calc(100vh - var(--footer-height-desktop));
		flex-direction: row;
	}

	/* Show Image Sections on Desktop */
	.image-section {
		display: block;
		height: 45%;
		position: relative;
		overflow: hidden;
	}

	.background-image {
		display: block;
		width: 100%;
		height: 100%;
		background-size: cover;
		background-position: center;
		transition: transform 0.4s ease;
		filter: /*blur(2px)*/ brightness(0.6);
	}

	/* Service-specific Images */
	.service-card.online .background-image {
		/* TODO: Replace with actual image path */
		background-image: url('/img/intro/001.jpg');
	}

	.service-card.academy .background-image {
		/* TODO: Replace with actual image path */
		background-image: url('/img/intro/002.jpg');
	}

	.service-card.bookstore .background-image {
		/* TODO: Replace with actual image path */
		background-image: url('/img/intro/003.jpg');
	}

	/* Image Overlays */
	.image-overlay {
		display: block;
		position: absolute;
		inset: 0;
	}

	.service-card.online .image-overlay {
		background: linear-gradient(180deg, 
			rgba(123, 104, 238, 0.1) 0%,
			rgba(123, 104, 238, 0.25) 20%,
			rgba(123, 104, 238, 0.45) 50%,
			rgba(123, 104, 238, 0.70) 80%,
			rgba(123, 104, 238, 0.90) 100%);
	}

	.service-card.academy .image-overlay {
		background: linear-gradient(180deg, 
			rgba(255, 107, 53, 0.1) 0%,
			rgba(255, 107, 53, 0.25) 20%,
			rgba(255, 107, 53, 0.45) 50%,
			rgba(255, 107, 53, 0.70) 80%,
			rgba(255, 107, 53, 0.90) 100%);
	}

	.service-card.bookstore .image-overlay {
		background: linear-gradient(180deg, 
			rgba(44, 62, 80, 0.1) 0%,
			rgba(44, 62, 80, 0.25) 20%,
			rgba(44, 62, 80, 0.45) 50%,
			rgba(44, 62, 80, 0.70) 80%,
			rgba(44, 62, 80, 0.90) 100%);
	}

	/* Content Section Positioning */
	.content-section {
		height: 65%;
		padding: 40px 20px;
		align-items: center;
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
	}

	/* Desktop Background Gradients */
	.service-card.online .content-section {
		background: linear-gradient(180deg, 
			rgba(123, 104, 238, 0.95) 0%, 
			#7B68EE 20%, 
			#9370DB 100%);
	}

	.service-card.academy .content-section {
		background: linear-gradient(180deg, 
			rgba(255, 107, 53, 0.95) 0%, 
			#FF6B35 20%, 
			#FF8C42 100%);
	}

	.service-card.bookstore .content-section {
		background: linear-gradient(180deg, 
			rgba(44, 62, 80, 0.95) 0%, 
			#2C3E50 20%, 
			#34495E 100%);
	}

	/* Typography Adjustments */
	.service-label {
		font-size: 13px;
		margin-bottom: 20px;
	}

	.service-title {
		font-size: 34px;
		margin-bottom: 20px;
		white-space: nowrap;
	}

	.service-description {
		font-size: 15px;
		max-width: 240px;
		margin: 0 auto 20px;
	}

	/* Click Indicator */
	.click-indicator {
		width: 40px;
		height: 40px;
	}

	.click-indicator::after {
		font-size: 18px;
	}

	/* Hover Effects */
	.service-card:hover {
		transform: scale(1.05);
		z-index: 10;
	}

	.service-card:hover .background-image {
		transform: scale(1.05);
	}

	.service-card.online:hover {
		box-shadow: 0 25px 60px rgba(123, 104, 238, 0.5);
	}

	.service-card.academy:hover {
		box-shadow: 0 25px 60px rgba(255, 107, 53, 0.5);
	}

	.service-card.bookstore:hover {
		box-shadow: 0 25px 60px rgba(44, 62, 80, 0.5);
	}

	/* Footer Adjustments */
	.footer-container-intro {
		height: var(--footer-height-desktop);
		gap: 25px;
		padding: 0 30px;
	}

	.footer-since {
		font-size: 12px;
	}

	.footer-catchphrase {
		display: block;
		color: rgba(255, 255, 255, 0.9);
		font-size: 14px;
		font-weight: 400;
	}

	.footer-logo {
		font-size: 15px;
		font-weight: 700;
	}
}