/* 
 * 생각이 보이는 교실 - 메인 스타일시트
 * Main stylesheet for Visible Thinking Classroom
 */

/* ===== CSS 변수 정의 ===== */
:root {
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --secondary-color: #7b68ee;
    --accent-color: #ff6b6b;
    --success-color: #51cf66;
    --warning-color: #ffd43b;
    --background-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --card-hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    --text-primary: #2c3e50;
    --text-secondary: #546e7a;
    --text-light: #78909c;
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 전역 스타일 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', '맑은 고딕', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background-gradient);
    min-height: 100vh;
    transition: var(--transition);
}

/* ===== 헤더 스타일 ===== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--background-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(74, 144, 226, 0.1);
}

/* ===== 히어로 섹션 ===== */
.hero {
    padding: 4rem 0;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero .subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero .description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
    opacity: 0.8;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* ===== 메인 컨텐츠 ===== */
.main-content {
    background: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin-top: -2rem;
    position: relative;
    z-index: 10;
    min-height: 70vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== 도구 카드 ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--background-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.tool-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tool-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.tool-features {
    list-style: none;
    margin-bottom: 2rem;
}

.tool-features li {
    padding: 0.5rem 0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-features li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
}

.tool-button {
    background: var(--background-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.tool-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ===== 통계 섹션 ===== */
.stats-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    padding: 4rem 0;
    margin: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* ===== 소개 섹션 ===== */
.about-section {
    background: white;
    padding: 4rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-features {
    list-style: none;
}

.about-features li {
    padding: 0.8rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.about-features li::before {
    content: '🎯';
    font-size: 1.2rem;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--border-radius);
    color: white;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.about-visual::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

/* ===== 푸터 ===== */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    line-height: 1.6;
}

.footer-section a {
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

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

/* ===== 포커스 스타일 ===== */
.keyboard-navigation *:focus-visible,
.keyboard-navigation *:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 4px;
}

*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.mouse-navigation *:focus {
    outline: none;
}

/* ===== 신규 배지 ===== */
.new-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.5);
    animation: pulse-badge 2s infinite;
}

/* ===== 특별 효과 ===== */
.sparkle {
    position: relative;
}

.sparkle::before {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    animation: sparkle 2s ease-in-out infinite;
}

/* ===== 스크롤 애니메이션 ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
