/* Pretendard 폰트 로드 (jsDelivr CDN — 구글 폰트에는 Pretendard가 없음)
   포탈 페이지드이 style.css를 로드하므로 여기서 한 번만 정의 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* CSS Variables for White/Yellow/Green Theme */
:root {
    --primary-white: #ffffff;
    --off-white: #f8fcf8;
    --accent-yellow: #ffde59; /* Bright Yellow */
    --accent-green: #7ed957; /* Fresh Green */
    --text-dark: #333333;
    --text-gray: #666666;
    --shadow-color: rgba(126, 217, 87, 0.15);
    --border-radius: 16px;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--primary-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* Header (Glassmorphism) */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(126, 217, 87, 0.2);
    transition: all var(--transition-speed) ease;
}

header.scrolled {
    box-shadow: 0 4px 20px var(--shadow-color);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo span {
    color: var(--accent-green);
}

/* 로고 안의 대상 배지 (예: "for Preschool Teachers") — 초록 pill 형태 */
.logo .badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    background: var(--accent-green);
    border-radius: 20px;
    padding: 3px 10px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0;
}

.nav-menu ul {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: color var(--transition-speed) ease;
}

.nav-link:hover {
    color: var(--accent-green);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -6px;
    left: 0;
    background-color: var(--accent-yellow);
    transition: width var(--transition-speed) ease;
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--off-white) 0%, var(--primary-white) 100%);
    overflow: hidden;
    padding-top: 70px; /* Offset for header */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-title .highlight {
    color: var(--accent-green);
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 30%;
    bottom: 5px;
    left: 0;
    background-color: var(--accent-yellow);
    z-index: -1;
    opacity: 0.6;
    border-radius: 4px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 40px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    background-color: var(--accent-yellow);
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(255, 222, 89, 0.4);
    transition: all var(--transition-speed) ease;
}

.cta-button:hover {
    background-color: var(--accent-green);
    color: var(--primary-white);
    box-shadow: 0 6px 20px rgba(126, 217, 87, 0.4);
    transform: translateY(-3px);
}

/* Decorative Background Elements */
.decoration {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: rgba(126, 217, 87, 0.15);
    top: -100px;
    left: -100px;
}

.circle-2 {
    width: 300px;
    height: 300px;
    background: rgba(255, 222, 89, 0.2);
    bottom: -50px;
    right: -50px;
}

.circle-3 {
    width: 200px;
    height: 200px;
    background: rgba(126, 217, 87, 0.1);
    top: 50%;
    left: 60%;
    transform: translateY(-50%);
}

/* Reusable Section Styles */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    display: inline-block;
    position: relative;
}

.section-title .underline {
    width: 60px;
    height: 4px;
    background-color: var(--accent-green);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* About Section */
.about-section {
    background-color: var(--primary-white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background: var(--off-white);
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid rgba(126, 217, 87, 0.1);
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-gray);
}

.about-text strong {
    color: var(--accent-green);
    font-size: 1.2rem;
}

/* Projects Section */
.projects-section {
    background-color: var(--off-white);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--primary-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all var(--transition-speed) ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
    border-color: rgba(126, 217, 87, 0.3);
}

.card-img-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.green-bg { background-color: rgba(126, 217, 87, 0.1); }
.yellow-bg { background-color: rgba(255, 222, 89, 0.15); }
.white-bg { background-color: #f0f5f0; }

.card-content {
    padding: 30px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.card-content p {
    color: var(--text-gray);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.card-link {
    color: var(--accent-green);
    font-weight: 600;
    transition: color var(--transition-speed) ease;
}

.card-link:hover {
    color: var(--accent-yellow);
}

/* Contact Section */
.contact-section {
    background-color: var(--primary-white);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content > p {
    color: var(--text-gray);
    margin-bottom: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    background: var(--off-white);
    padding: 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border: 1px solid rgba(126, 217, 87, 0.1);
    transition: transform var(--transition-speed) ease;
}

.contact-item:hover {
    transform: scale(1.02);
    border-color: var(--accent-yellow);
}

.contact-item .icon {
    font-size: 1.5rem;
}

/* Footer */
footer {
    background-color: #fafdfa;
    padding: 30px 0;
    text-align: center;
    color: var(--text-gray);
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Responsive */
/* Responsive */
@media (max-width: 900px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .nav-menu ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    header .container {
        flex-direction: column;
        gap: 10px;
        height: auto;
        padding: 15px 20px;
    }
    .hero-section {
        padding-top: 100px;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .about-content {
        padding: 20px 15px;
    }
    .grid-container {
        grid-template-columns: 1fr;
    }
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    section {
        padding: 60px 0;
    }
    .card-img-placeholder {
        height: 150px;
    }
    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

/* --- Reusable Animation & Decoration Classes (From Portals) --- */
.chick-icon {
    font-size: 6rem;
    margin-bottom: 20px;
    display: inline-block;
}

/* AI 스파클 래퍼 */
.chick-ai-wrap {
    position: relative;
    display: inline-block;
}

.ai-sparkle {
    position: absolute;
    font-style: normal;
    color: #7C3AED;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    animation: sparkle-twinkle 2s infinite ease-in-out;
}

@keyframes sparkle-twinkle {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.55); }
}

/* 별 위치 & 크기 - 우측 상단 하나만 */
.sp1 { top: -6px; right: -8px; font-size: 1.6rem; color: #7C3AED; animation-delay: 0s; }


@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.bounce {
    animation: bounce 2s infinite ease-in-out;
}

.bounce-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-yellow);
}

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

.pulse {
    animation: pulse 2s infinite ease-in-out;
}

/* Clouds for cute themes */
.cloud-1, .cloud-2, .cloud-3 {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    filter: blur(15px);
    opacity: 0.6;
    z-index: 0;
}
.cloud-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -5%;
    background: rgba(255, 222, 89, 0.2);
}
.cloud-2 {
    width: 400px;
    height: 400px;
    bottom: -10%;
    right: -10%;
    background: rgba(167, 227, 138, 0.2);
}
.cloud-3 {
    width: 200px;
    height: 200px;
    top: 40%;
    right: 15%;
    background: rgba(255, 222, 89, 0.3);
}


/* Gateway Portal Cards Custom Themes */
.card-preschool {
    border: 3px dashed rgba(255, 222, 89, 0.5);
    background: #fffdf5;
}
.card-preschool .card-img-placeholder {
    background-color: rgba(167, 227, 138, 0.2);
}
.card-preschool .card-link {
    background-color: #a7e38a;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
}
.card-preschool .card-link:hover {
    background-color: #8ccf6f;
}
.card-preschool:hover {
    border-color: rgba(255, 222, 89, 0.8);
    box-shadow: 0 15px 30px rgba(255, 222, 89, 0.2);
}

.card-office {
    border: 3px solid rgba(44, 62, 80, 0.2);
    background: #f8f9fa;
}
.card-office .card-img-placeholder {
    background-color: rgba(44, 62, 80, 0.1);
}
.card-office .card-link {
    background-color: #2c3e50;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
}
.card-office .card-link:hover {
    background-color: #1a252f;
}
.card-office:hover {
    border-color: rgba(44, 62, 80, 0.5);
    box-shadow: 0 15px 30px rgba(44, 62, 80, 0.15);
}

.card-highschool {
    border: 3px solid rgba(142, 68, 173, 0.2);
    background: #fdfafb;
}
.card-highschool .card-img-placeholder {
    background-color: rgba(142, 68, 173, 0.1);
}
.card-highschool .card-link {
    background-color: #8e44ad;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
}
.card-highschool .card-link:hover {
    background-color: #732d91;
}
.card-highschool:hover {
    border-color: rgba(142, 68, 173, 0.5);
    box-shadow: 0 15px 30px rgba(142, 68, 173, 0.15);
}

/* ── 사용량 뱃지 (카드 하단) ─────────────────────────────────── */
.use-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #888;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 20px;
    padding: 3px 10px;
    margin-top: 8px;
    opacity: 0;                          /* 로딩 전 숨김 */
    transform: translateY(4px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.use-badge.loaded {
    opacity: 1;                          /* 데이터 로드 후 부드럽게 등장 */
    transform: translateY(0);
}

/* 카드 콘텐츠 영역에서 뱃지 배치 */
.card-content .badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

/* ── 도구 페이지 상단 사용 횟수 표시 ────────────────────────── */
.use-counter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 10px 20px;
    background: rgba(126, 217, 87, 0.06);
    border-bottom: 1px solid rgba(126, 217, 87, 0.15);
    font-size: 0.82rem;
    color: #777;
}

.use-counter-bar .counter-item {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.use-counter-bar .counter-item.loaded {
    opacity: 1;
    transform: translateY(0);
}

.use-counter-bar .counter-label {
    color: #aaa;
}

.use-counter-bar .counter-value {
    font-weight: 700;
    color: var(--accent-green, #7ed957);
}

/* ── 사용자 네비게이션 (로그인/로그아웃 버튼) ───────────────── */
.user-nav-login-btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--accent-yellow);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 222, 89, 0.3);
}
.user-nav-login-btn:hover {
    background: var(--accent-green);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(126, 217, 87, 0.3);
}

.user-nav-logged {
    position: relative;
}

.user-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-dark);
    background: rgba(126, 217, 87, 0.12);
    border: 1.5px solid rgba(126, 217, 87, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.user-nav-btn:hover {
    background: rgba(126, 217, 87, 0.22);
    border-color: var(--accent-green);
}

.user-nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.06);
    overflow: hidden;
    z-index: 999;
}
.user-nav-dropdown.open {
    display: block;
    animation: dropdownFade 0.15s ease;
}
@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}
.dropdown-item:hover {
    background: rgba(126, 217, 87, 0.1);
    color: var(--accent-green);
}
.dropdown-logout {
    border-top: 1px solid rgba(0,0,0,0.06);
    color: #e74c3c;
}
.dropdown-logout:hover {
    background: rgba(231, 76, 60, 0.08);
    color: #e74c3c;
}

/* ─────────────────────────────────────────────────────────
   업데이트 기록 (Changelog) 섹션
───────────────────────────────────────────────────────── */
.changelog-section {
    background: #fafafa;
    padding: 72px 0 60px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.section-subtitle {
    font-size: 0.95rem;
    color: #999;
    margin-top: 6px;
    text-align: center;
}

/* 타임라인 라인 */
.cl-timeline {
    position: relative;
    max-width: 680px;
    margin: 32px auto 0;
    padding-left: 28px;
}
.cl-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #7c3aed, #c4b5fd);
    border-radius: 2px;
}

/* 타임라인 아이템 */
.cl-item {
    position: relative;
    margin-bottom: 28px;
    animation: clFadeIn 0.4s ease both;
}
.cl-item:last-child { margin-bottom: 0; }

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

/* 도트 */
.cl-dot {
    position: absolute;
    left: -24px;
    top: 6px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #7c3aed;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #c4b5fd;
}
.cl-item--latest .cl-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 2px #fde68a;
    width: 14px; height: 14px;
    left: -25px; top: 5px;
}

/* 카드 */
.cl-content {
    background: white;
    border: 1.5px solid #f0f0f0;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.cl-item--latest .cl-content {
    border-color: #e9d5ff;
    box-shadow: 0 4px 20px rgba(124,58,237,0.1);
}
.cl-content:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.09);
    border-color: #c4b5fd;
}

/* 헤더 */
.cl-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.cl-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.cl-version {
    font-size: 0.8rem;
    font-weight: 700;
    color: #7c3aed;
}
.cl-date {
    font-size: 0.78rem;
    color: #bbb;
    margin-left: auto;
}
.cl-title {
    font-size: 1rem;
    font-weight: 800;
    color: #222;
    margin: 0 0 8px;
}
.cl-list {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}
.cl-list li {
    font-size: 0.87rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 2px;
}

/* 더보기 버튼 */
.cl-more-wrap {
    text-align: center;
    margin: 20px auto 0;
}
.cl-more-btn {
    background: none;
    border: 1.5px solid #c4b5fd;
    color: #7c3aed;
    padding: 9px 28px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.cl-more-btn:hover {
    background: #7c3aed;
    color: white;
    border-color: #7c3aed;
}

/* 전체 목록은 미리보기와 구분선 */
.cl-timeline--full {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #e9d5ff;
}
