/* Global Variables */
:root {
    --primary-color: #105bd8; /* Logo Blue */
    --primary-dark: #0d4aa8;
    --primary-light: #e6f0ff;
    --secondary-color: #ffc107; /* Active Yellow */
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --max-width: 1200px;
    --header-height: 80px;
}

/* Reset & Base Types */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 2rem;
    text-align: center;
}

.section-title span {
    color: var(--primary-color);
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.9); /* Semi-transparent header */
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 48px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 1.1rem;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 1; /* Thinner aspect ratio (approx 70% of 21:9 vertical) */
    min-height: 300px; /* 최소 높이 설정 */
    max-height: 400px; /* Absolute limit */
    overflow: hidden;
    background: var(--bg-color);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill container */
    object-position: center;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 800px;
}

.slide-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 30px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Quick Menu */
.quick-menu {
    padding: 3rem 0;
    margin-top: -3rem; /* Overlap slider slightly */
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.85); /* Semi-transparent */
    backdrop-filter: blur(10px); /* Glassmorphism */
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.quick-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.quick-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.quick-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.quick-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.quick-item p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Featured Courses */
.featured-courses {
    padding: 5rem 0;
}

.course-grid {
    display: grid;
    /* Mobile-first: 1 column, then responsive columns */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-img {
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
}

.course-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.course-img .course-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}

.course-img.video-playing img {
    opacity: 0;
}

.course-img.video-playing .course-video {
    opacity: 1;
}

.course-info {
    padding: 1.5rem;
}

.course-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.course-info h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    min-height: 3.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    min-height: 2.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.info-box {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* Notice & News Tabs (Inside Info Section) */
.info-tabs {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    height: 100%;
}

.tab-header {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-light);
    position: relative;
    top: 2px;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.mini-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.mini-list li:last-child {
    border-bottom: none;
}

.mini-list a {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 1rem;
}
.mini-list a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.mini-date {
    font-size: 0.85rem;
    color: #999;
}

/* Footer */
footer {
    background: #222;
    color: #aaa;
    padding: 4rem 0 2rem;
}


.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-info p {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Add menu toggle logic later */
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-slider {
        min-height: 220px;
        max-height: 300px;
    }

    .slide-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .slide-content p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .quick-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== 스크롤 애니메이션 ========== */
.scroll-animate {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.fade-up { transform: translateY(40px); }
.scroll-animate.fade-left { transform: translateX(-40px); }
.scroll-animate.fade-right { transform: translateX(40px); }

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* 순차 애니메이션 딜레이 */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }
