/* ==========================================================================
   Light "SaaS" Theme - UEDU Modern
   ========================================================================== */

/* 1. 폰트 및 기본 설정 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&family=Poppins:wght@600;700&display=swap');

:root {
    --header-height: 80px;
    --banner-max-width: 1720px; /* 배너 최대 너비 */
    --banner-radius: 50px;      /* 둥근 모서리 */
    /* Main Color Palette */
    --primary-color: #3B82F6; /* Tailwind Blue 500 */
    --primary-dark: #2563EB;  /* Tailwind Blue 600 */
    --accent-color: #F59E0B;   /* Tailwind Amber 500 */
    --accent-dark: #D97706;    /* Tailwind Amber 600 */

    /* Neutrals */
    --text-heading: #1E293B; /* Slate 800 */
    --text-body: #334155;    /* Slate 700 */
    --text-muted: #64748B;   /* Slate 500 */
    --bg-body: #F8FAFC;      /* Slate 50 */
    --bg-card: #FFFFFF;
    --border-color: #E2E8F0; /* Slate 200 */

    /* UI Styles */
    --header-height: 80px;
    --card-radius: 12px;
    --button-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-body);
    line-height: 1.6;
    background-color: var(--bg-body);
    word-break: keep-all;
    overflow-x: hidden;
}

a { text-decoration: none; color: var(--primary-color); transition: color 0.3s ease; }
a:hover { color: var(--primary-dark); }
ul, li { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-heading);
    font-weight: 700;
}

/* ===============================
   Layout & Container
================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}
/* 상단 헤더 때문에 가려지는 현상 방지 */
body > .container { margin-top: 60px; margin-bottom: 60px; min-height: 600px; }

/* 메인 배너와 다음 섹션 사이 간격 */
body > .hero + .section { margin-top: 50px; }

/* ===============================
   Header
================================ */
.site-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex; align-items: center;
}
.header-inner {
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
    height: 100%;
}
.logo a {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
}
.gnb {padding-left: 80px;display: flex;align-items: center;gap: 80px;}
.gnb a { font-size: 18px; font-weight: 500; color: var(--text-body); }
.gnb a:hover { color: var(--primary-color); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.user-info { color: var(--text-muted); font-size: 14px; }
.user-info strong { font-weight: 700; color: var(--text-body); }
.link-admin { color: var(--accent-color) !important; font-weight: 700; }
.link-admin:hover { color: var(--accent-dark) !important; }

/* ===============================
   Buttons
================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px;
    font-size: 1rem; font-weight: 500;
    border-radius: var(--button-radius);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-primary:hover { background-color: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background-color: var(--bg-card); color: var(--text-body); border-color: var(--border-color); }
.btn-secondary:hover { background-color: #f1f5f9; border-color: #cbd5e1; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ===============================
  New Main Visual Slider (Adapted for Light Theme)
================================ */
.hero {
    position: relative;
    width: 100%;
    padding-top: var(--header-height); /* 헤더 높이만큼 띄움 */
    padding-bottom: 0;
    background-color: #fff; 
}

/* 1. 실제 슬라이더 컨테이너 (둥근 모서리) */
.main-visual-con {
    position: relative;
    width: 100%;
    max-width: var(--banner-max-width); /* 1720px */
    height: 750px; /* 배너 높이 고정 */
    margin: 0 auto;
    border-radius: var(--banner-radius); /* 50px */
    overflow: hidden; /* 둥근 모서리 밖으로 이미지 나가지 않게 자름 */
    background: #000; /* 로딩 전 배경색 */
    z-index: 1;
}

/* [중요] Slick Slider 내부 요소 높이 강제 지정 (이미지 짤림 방지) */
.main-visual-con .slick-list,
.main-visual-con .slick-track {
    height: 100% !important;
}

/* 2. 개별 슬라이드 아이템 */
.main-visual-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: none;
}

/* 3. 배경 이미지 (Zoom 애니메이션) */
.main-visual-img {
    width: 100%;
    height: 100%;
    
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
    
    transform: scale(1.15);
    transition: transform 1s; 
}
/* 활성화 시 애니메이션 */
.active-item .main-visual-img {
    animation: image-zoom-out 6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes image-zoom-out { from { transform: scale(1.15); } to { transform: scale(1.0); } }

/* 이미지 위 오버레이 (그라데이션) */
.main-visual-item::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

/* 4. 텍스트 영역 */
.main-visual-txt-con {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2; pointer-events: none;
}
.main-visual-txt-box {
    display: flex; flex-direction: column; justify-content: center;
    width: 100%; height: 100%;
    padding-left: 100px; padding-right: 20px;
}
.main-visual-txt-inner { margin-top: -50px; }

.main-visual-txt1 {
    display: block; font-size: 70px; line-height: 1.1; letter-spacing: -0.02em; color: #fff; font-weight: 700;
    margin-bottom: 20px; opacity: 0; transform: translateX(-50px);
}
.main-visual-txt2 {
    display: block; font-size: 22px; color: rgba(255,255,255,0.9); font-weight: 400;
    opacity: 0; transform: translateX(-50px);
}

/* 텍스트도 active-item 클래스가 붙을 때만 등장 */
.active-item .main-visual-txt1 { animation: txtAni 1s cubic-bezier(0.4, 0, 0.2, 1) both 0.3s; }
.active-item .main-visual-txt2 { animation: txtAni 1s cubic-bezier(0.4, 0, 0.2, 1) both 0.5s; }

@keyframes txtAni { 
    from { opacity: 0; transform: translateX(-50px); } 
    to { opacity: 1; transform: translateX(0); } 
}

/* 5. 하단 컨트롤 바 (위치 조정) */
.main-visual-counter {
    position: absolute; bottom: 60px; left: 0; width: 100%; z-index: 10;
}
.main-visual-counter .area {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; 
    padding-left: 150px; /* 텍스트 시작점과 라인 맞춤 */
    padding-right: 150px;
}

.main-visual-num-box { display: flex; align-items: center; gap: 20px; color: #fff; font-weight: 500; }
.cur-num { font-size: 20px; font-weight: 700; }
.total-num { opacity: 0.6; }
.middle-line { width: 1px; height: 12px; background: rgba(255,255,255,0.4); }

.main-visual-arrow { display: flex; gap: 10px; margin-right: 20px; }
.main-visual-arrow button {
    width: 30px; height: 30px; border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.main-visual-arrow button:hover { background: #fff; color: #000; border-color: #fff; }

.main-visual-bar { flex: 1; height: 2px; background: rgba(255,255,255,0.2); margin-left: 50px; position: relative; }
.bar-fill { display: block; height: 100%; width: 0%; background: #fff; }


/* 6. 스크롤 아이콘 (위치 조정) */
.main-scroll-icon {
    position: absolute; bottom: 80px; left: 40px; z-index: 9;
    display: flex; flex-direction: column; align-items: center;
}
.main-scroll-icon .txt {
    writing-mode: vertical-rl; text-orientation: mixed;
    font-size: 13px; font-weight: 700; letter-spacing: 2px;
    margin-bottom: 20px; color: #000;
}
.scroll-arrow-ani { font-size: 18px; color: #000; animation: scrollBounce 1.5s infinite; }
@keyframes scrollBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* 반응형 */
@media (max-width: 1800px) {
    .site-header .header-inner { max-width: 100%; }
    .main-visual-con { max-width: calc(100% - 100px); }
    .main-scroll-icon { left: 10px; }
}
@media (max-width: 1280px) {
    .main-visual-con { height: 600px; max-width: calc(100% - 40px); }
    .main-visual-txt1 { font-size: 50px; }
    .main-visual-txt-box, .main-visual-counter .area { padding-left: 60px; padding-right: 60px; }
    .main-scroll-icon { display: none; }
}
@media (max-width: 768px) {
    .main-visual-con { border-radius: 20px; height: 500px; max-width: calc(100% - 30px); }
    .main-visual-txt1 { font-size: 36px; }
    .main-visual-counter { bottom: 30px; }
    .main-visual-bar { display: none; }
}

/* ==========================================================================
   [섹션 1] Products
   ========================================================================== */
#mainContent1 {
    position: relative;
    padding: 100px 0 150px;
    background-color: #f9f9f9;
    overflow: hidden;
}

/* 배경 장식 (옵션) */
#mainContent1::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://www.transparenttextures.com/patterns/cubes.png'); /* 패턴 예시 */
    opacity: 0.05; pointer-events: none;
}

/* 1. 상단 타이틀 영역 */
.main-prd-top-box {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 60px;
    position: relative; z-index: 2;
}

.main-tit-box { width: 100%; }
.main-tit-en {
    display: block; font-size: 20px; color: var(--primary-navy); font-weight: 700;
    margin-bottom: 10px; text-transform: uppercase;
}

.prd-tit-box { display: flex; align-items: flex-end; gap: 40px; }
.main-tit {
    font-size: 80px; line-height: 1; color: #222; font-weight: 700; margin: 0;
    letter-spacing: -2px;
}
.main-txt {
    font-size: 18px; color: #666; font-weight: 500; line-height: 1.6;
    margin-bottom: 10px;
}

/* 더보기 버튼 */
.main-btn-box .main-btn {
    display: inline-flex; justify-content: space-between; align-items: center;
    width: 180px; height: 50px; padding: 0 25px;
    border: 2px solid #222; 
    border-radius: 50px; /* [수정] 둥근 모서리 강제 적용 */
    font-size: 16px; font-weight: 700; color: #222;
    transition: 0.3s; background: transparent;
}
.main-btn-box .main-btn:hover {
    background: #222; color: #fff;
}
/* ==========================================================================
   Sections, Course Cards & Filters
   ========================================================================== */
.content-section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag { display: inline-block; padding: 6px 16px; background-color: var(--primary-color); color: #fff; font-size: 14px; font-weight: 500; border-radius: 99px; margin-bottom: 16px; font-family: 'Poppins', sans-serif; }
.section-title { font-size: 2.5rem; font-weight: 700; color: var(--text-heading); margin: 0 0 16px; }
.section-footer { text-align: center; margin-top: 64px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.vision-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.course-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--card-radius); text-align: left; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-img-wrap img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 24px; }
.card-title { font-size: 1.25rem; font-weight: 600; margin: 0 0 8px; color: var(--text-heading); }
.card-text { font-size: 1rem; color: var(--text-body); margin-bottom: 16px; }
.card-price { font-size: 1.1rem; font-weight: 700; color: var(--primary-color); text-align: right; }
.course-filters { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn { padding: 10px 20px; font-size: 1rem; font-weight: 500; border: 1px solid var(--border-color); background-color: var(--bg-card); color: var(--text-body); border-radius: 99px; cursor: pointer; transition: all 0.2s ease; }
.filter-btn:hover { border-color: #cbd5e1; background-color: #f1f5f9; }
.filter-btn.active { background-color: var(--primary-color); color: #fff; border-color: var(--primary-color); font-weight: 600; }

/* ==========================================================================
   Login Page
   ========================================================================== */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background-color: var(--bg-body); padding: 24px; }
.login-form__wrapper { width: 100%; max-width: 420px; background: var(--bg-card); padding: 48px; border-radius: var(--card-radius); box-shadow: var(--shadow-lg); }
.login-form__logo { text-align: center; margin-bottom: 24px; }
.login-form__logo a { font-size: 32px; font-weight: 700; color: var(--primary-color); }
.login-form__title { font-size: 24px; text-align: center; margin: 0 0 8px; }
.login-form__subtitle { font-size: 1rem; text-align: center; color: var(--text-muted); margin-bottom: 32px; }
.login-form__error { background-color: #FECACA; color: #991B1B; border-radius: var(--button-radius); padding: 12px 16px; margin-bottom: 24px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: var(--text-body); }
.form-input-group { position: relative; border: 1px solid var(--border-color); border-radius: var(--button-radius); background-color: var(--bg-card); transition: border-color 0.2s, box-shadow 0.2s; }
.form-input-group:hover { border-color: #94a3b8; }
.form-input-group:focus-within { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.form-input-group i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #94a3b8; transition: color 0.2s; }
.form-input-group:focus-within i { color: var(--primary-color); }
.form-control { box-sizing: border-box; width: 100%; height: 48px; padding: 0 16px 0 48px; font-size: 1rem; border: none; border-radius: var(--button-radius); background-color: white; color: var(--text-body); }
.form-control:focus { outline: none; }
.form-control::placeholder { color: #94a3b8; }
.btn-block { width: 100%; height: 48px; font-size: 1rem; font-weight: 600; }
.login-form__footer { text-align: center; margin-top: 32px; font-size: 14px; color: var(--text-muted); }
.login-form__footer a { font-weight: 500; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: #fff;
    color: var(--text-muted);
    padding: 50px 0;
    margin-top: 100px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}
.footer-logo { font-size: 24px; font-weight: 700; color: var(--text-heading); }
.footer-links a { margin: 0 12px; color: var(--text-body); }
.footer-links a:hover { color: var(--primary-color); }


/* ==========================================================================
   Mobile Menu Navigation
   ========================================================================== */
.mobile-menu-trigger {
    display: none; /* 평상시엔 숨김 */
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 1002;
}

.mobile-menu-trigger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-heading);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.mobile-menu-trigger span:nth-child(1) { top: 0; }
.mobile-menu-trigger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.mobile-menu-trigger span:nth-child(3) { bottom: 0; }

/* 모바일 메뉴 활성화 시 Trigger (X 모양) */
.is-mobile-menu-active .mobile-menu-trigger span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.is-mobile-menu-active .mobile-menu-trigger span:nth-child(2) {
    opacity: 0;
}
.is-mobile-menu-active .mobile-menu-trigger span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* 모바일 메뉴 컨테이너 */
.mobile-gnb {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(5px);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.is-mobile-menu-active .mobile-gnb {
    opacity: 1;
    visibility: visible;
}

.mobile-gnb a {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    padding: 15px 0;
    text-align: center;
    width: 100%;
    transition: background-color 0.3s ease;
}

.mobile-gnb a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 992px) {
    /* --- Header --- */
    .gnb { display: none; } /* Hide navigation on medium screens */
    .header-inner { padding: 0 20px; }
    .mobile-menu-trigger { display: block; }


    /* --- Sections --- */
    .content-section { padding: 80px 0; }
    .section-title { font-size: 2rem; }
    .course-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
    .vision-cards { grid-template-columns: 1fr; }

    /* --- Main Product Section --- */
    .main-prd-top-box { flex-direction: column; align-items: flex-start; gap: 30px; }
    .prd-tit-box { flex-direction: column; align-items: flex-start; gap: 10px; }
    .main-tit { font-size: 60px; }
    .main-btn-box { padding-left: 0; }
}

@media (max-width: 768px) {
    /* --- General Layout --- */
    body > .container { margin-top: 40px; margin-bottom: 40px; }
    .container { padding: 0 15px; }
    :root { --header-height: 70px; }

    /* --- Header --- */
    .site-header { height: var(--header-height); }
    .logo a { font-size: 24px; }
    .header-actions { gap: 10px; }
    .btn-sm { padding: 6px 12px; font-size: 13px; }

    /* --- Hero Section --- */
    .main-visual-txt-box { padding-left: 30px; padding-right: 30px; }
    .main-visual-txt1 { font-size: 32px; }
    .main-visual-txt2 { font-size: 18px; }
    .main-visual-counter .area { padding-left: 30px; padding-right: 30px; }
    .main-visual-arrow { display: none; }

    /* --- Sections & Cards --- */
    .section-header { margin-bottom: 48px; }
    .content-section { padding: 60px 0; }
    .course-grid { grid-template-columns: 1fr; gap: 20px; }
    .card-body { padding: 20px; }
    .card-title { font-size: 1.15rem; }
    
    /* --- Main Product Section --- */
    #mainContent1 { padding: 80px 0; }
    .main-tit { font-size: 48px; }
    .main-txt { font-size: 16px; }

    /* --- Login Page --- */
    .login-page { padding: 15px; }
    .login-form__wrapper { padding: 32px; }

    /* --- Footer --- */
    .site-footer { padding: 40px 0; margin-top: 60px; }
    .footer-links { display: flex; flex-direction: column; gap: 10px; }
    .footer-links a { margin: 0; }
}