/* ============================================
   명상(明想) 홈페이지 - Bento Grid 레이아웃
   2025 Modern Design - Light Theme + Scrollytelling
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

:root {
  /* 라이트 테마 컬러 팔레트 */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;

  --accent-primary: #2563eb;
  --accent-secondary: #3b82f6;
  --accent-light: #dbeafe;
  --accent-glow: rgba(37, 99, 235, 0.15);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;

  /* 그리드 설정 */
  --grid-gap: 20px;
  --card-radius: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* 그림자 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ============================================
   기본 설정
   ============================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* ============================================
   스크롤 진행 표시기
   ============================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--border-color);
  z-index: 10001;
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-primary), #8b5cf6);
  transition: width 0.1s ease-out;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem 4rem;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 45%, rgba(15, 23, 42, 0.4) 100%),
    url('./images/hero-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  /* 모바일 호환성 */
  position: relative;
  overflow: hidden;
}

/* 패럴랙스 배경 도형들 */
.hero-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.4;
  /* 이미지 위에서 너무 튀지 않게 조정 */
}

.hero-bg-shapes .shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
}

.hero-bg-shapes .shape-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
}

.hero-bg-shapes .shape-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  top: 20%;
  right: 10%;
}

.hero-bg-shapes .shape-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
  bottom: 20%;
  left: 15%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffffff;
  /* 다크 배경 대비 화이트 */
  letter-spacing: 2px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #e2e8f0;
  /* 밝은 회색 */
  margin-bottom: 2.5rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* 스크롤 인디케이터 */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  transition: opacity 0.3s ease;
}

.scroll-indicator span {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.scroll-mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 13px;
  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
  0% {
    opacity: 1;
    top: 8px;
  }

  100% {
    opacity: 0;
    top: 22px;
  }
}

.btn-primary,
.btn-secondary {
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--accent-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  background: var(--accent-light);
  transform: translateY(-2px);
}

/* ============================================
   Bento Grid Container
   ============================================ */

.bento-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--grid-gap);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
}

/* ============================================
   Bento Cards - 기본 스타일
   ============================================ */

.bento-card {
  background: var(--bg-card);
  border-radius: var(--card-radius);
  padding: 2rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.bento-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-xl);
}

/* 카드 크기 */
.bento-small {
  grid-column: span 1;
}

.bento-medium {
  grid-column: span 2;
}

.bento-large {
  grid-column: span 3;
}

.bento-full {
  grid-column: span 4;
}

/* 카드 아이콘 */
.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* 아이콘 바운스 애니메이션 */
.animate-bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

/* 카드 제목 */
.bento-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.bento-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-primary);
}

/* ============================================
   성과 카드 (Highlight) - 카운트업
   ============================================ */

.bento-highlight {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent-light) 100%);
  border-color: var(--accent-light);
}

.bento-highlight:hover {
  border-color: var(--accent-secondary);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.count-up {
  display: inline-block;
}

.stat-suffix {
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   태그 리스트
   ============================================ */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag {
  padding: 0.6rem 1.2rem;
  background: var(--accent-light);
  border: 1px solid transparent;
  border-radius: 30px;
  font-size: 0.9rem;
  color: var(--accent-primary);
  font-weight: 500;
  transition: var(--transition);
}

.tag:hover {
  background: var(--accent-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

/* ============================================
   수상 카드
   ============================================ */

.bento-award {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fcd34d;
}

.bento-award:hover {
  border-color: #f59e0b;
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.15);
}

.bento-award h2 {
  color: #92400e;
}

.bento-award p {
  color: #a16207;
}

/* ============================================
   무료 리소스 카드
   ============================================ */

.bento-resource {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #6ee7b7;
  text-align: center;
}

.bento-resource:hover {
  border-color: #10b981;
  box-shadow: 0 20px 40px rgba(16, 185, 129, 0.15);
}

.resource-header {
  margin-bottom: 2rem;
}

.resource-badge {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 30px;
  font-size: 0.9rem;
  color: #059669;
  font-weight: 600;
  margin-bottom: 1rem;
}

.bento-resource h2 {
  color: #065f46;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.bento-resource>.resource-header>p {
  color: #047857;
  font-size: 1.05rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.resource-item {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.7);
  padding: 1.5rem 1rem;
  border-radius: 16px;
  transition: var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
}

.resource-item:active {
  transform: scale(0.98);
}

/* 프롬프트 모달 스타일 (제거됨 - 직접 다운로드로 변경) */

.resource-item:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-3px);
  border-color: #10b981;
}

.resource-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.resource-item h4 {
  font-size: 1rem;
  color: #065f46;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.resource-item p {
  font-size: 0.85rem;
  color: #047857;
  line-height: 1.5;
}

.resource-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.resource-download-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(16, 185, 129, 0.3);
}

/* 펄스 버튼 애니메이션 */
.pulse-btn {
  position: relative;
}

.pulse-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: inherit;
  animation: btnPulse 2s infinite;
  z-index: -1;
}

@keyframes btnPulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  70% {
    transform: scale(1.05);
    opacity: 0;
  }

  100% {
    transform: scale(1.05);
    opacity: 0;
  }
}

/* ============================================
   강의/컨설팅 CTA 카드
   ============================================ */

.bento-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fca5a5;
}

.bento-cta:hover {
  border-color: #ef4444;
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.15);
}

.cta-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.bento-cta h3 {
  font-size: 1.2rem;
  color: #991b1b;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.bento-cta p {
  font-size: 0.9rem;
  color: #b91c1c;
  margin-bottom: 1rem;
}

.cta-link {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}

.cta-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

/* ============================================
   역량 그리드
   ============================================ */

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.capability-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.capability-item:hover {
  background: var(--bg-card);
  border-color: var(--border-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.capability-item .cap-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.capability-item h3 {
  font-size: 1.2rem;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.capability-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ============================================
   타임라인 - 스크롤텔링 강화
   ============================================ */

.scrollytelling-timeline {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-primary), #8b5cf6, #10b981);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 2.5rem;
  opacity: 1;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 0.5rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 5px var(--accent-light);
  transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
  box-shadow: 0 0 0 8px var(--accent-light);
}

.timeline-year {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.timeline-content {
  background: var(--bg-card);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.timeline-item:hover .timeline-content {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.timeline-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
  font-weight: 600;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================
   저서 카드
   ============================================ */

.bento-book {
  display: flex;
  flex-direction: column;
}

.book-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.bento-book h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.book-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: auto;
  padding-bottom: 1.5rem;
}

.book-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.book-link span {
  transition: var(--transition);
}

.book-link:hover {
  color: var(--accent-secondary);
}

.book-link:hover span {
  transform: translateX(5px);
}

/* ============================================
   프로젝트 카드
   ============================================ */

.bento-project {
  text-align: center;
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border-color: #e9d5ff;
}

.bento-project:hover {
  border-color: #c084fc;
  box-shadow: 0 20px 40px rgba(168, 85, 247, 0.15);
}

.project-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  color: #dc2626;
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.bento-project h2 {
  color: #6b21a8;
}

.bento-project p {
  color: #7e22ce;
}

.project-btn {
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.project-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(139, 92, 246, 0.3);
}

/* ============================================
   연락처 카드
   ============================================ */

.bento-contact {
  text-align: center;
}

.contact-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.contact-item:hover {
  background: var(--accent-light);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.contact-icon {
  font-size: 1.2rem;
}

/* ============================================
   뉴스레터 섹션
   ============================================ */

.newsletter-section {
  background: linear-gradient(135deg, var(--accent-primary), #1d4ed8);
  padding: 5rem 2rem;
  margin-top: 2rem;
}

.newsletter-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.newsletter-badge {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  font-size: 0.9rem;
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
}

.newsletter-content h2 {
  font-size: 2.2rem;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.newsletter-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.newsletter-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.newsletter-benefits li {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  padding: 0.4rem 0;
  font-weight: 500;
}

.newsletter-form-wrapper {
  background: white;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.newsletter-form input[type="email"] {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--text-muted);
}

.newsletter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-btn:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
}

.newsletter-btn .btn-arrow {
  transition: var(--transition);
}

.newsletter-btn:hover .btn-arrow {
  transform: translateX(5px);
}

.newsletter-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.newsletter-success {
  text-align: center;
  padding: 2rem 0;
}

.newsletter-success .success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.newsletter-success h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.newsletter-success p {
  color: var(--text-secondary);
}

/* ============================================
   Footer
   ============================================ */

footer {
  text-align: center;
  padding: 3rem 2rem;
  padding-bottom: 120px;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}

/* ============================================
   챗봇 모달
   ============================================ */

.chatbot-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10000;
}

.chatbot-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.chatbot-modal-content {
  width: 90%;
  max-width: 900px;
  height: 80vh;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.4s ease;
  box-shadow: var(--shadow-xl);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chatbot-modal-header {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: white;
}

.chatbot-modal-header p {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.close-modal-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

#n8n-chatbot-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: white;
}

/* ============================================
   플로팅 챗봇
   ============================================ */

#chatbot-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 5px 25px rgba(139, 92, 246, 0.4);
  z-index: 1000;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

#chatbot-button:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 35px rgba(139, 92, 246, 0.5);
}

#chatbot-button .pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  animation: pulse 2s infinite;
  z-index: -1;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  70% {
    transform: scale(1.3);
    opacity: 0;
  }

  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

#chatbot-container {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 380px;
  height: 520px;
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: none;
  z-index: 999;
  background: var(--bg-primary);
  flex-direction: column;
  border: 1px solid var(--border-color);
}

#chatbot-container.active {
  display: flex;
  animation: slideUp 0.3s ease;
}

#chatbot-header {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
}

.chatbot-title .avatar {
  font-size: 1.5rem;
}

.chatbot-title .info h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.chatbot-title .info p {
  margin: 0;
  font-size: 0.75rem;
  opacity: 0.9;
}

#close-chatbot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

#close-chatbot:hover {
  background: rgba(255, 255, 255, 0.3);
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  max-width: 85%;
}

.chat-message.user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.chat-message.assistant {
  align-self: flex-start;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.chat-message.assistant .message-avatar {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border: none;
}

.message-bubble {
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-message.user .message-bubble {
  background: var(--accent-primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.assistant .message-bubble {
  background: var(--bg-card);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-color);
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

#chat-input-area {
  padding: 1rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

#chat-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.9rem;
  outline: none;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: var(--transition);
}

#chat-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

#chat-input::placeholder {
  color: var(--text-muted);
}

#chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

#chat-send-btn:hover:not(:disabled) {
  background: var(--accent-secondary);
}

#chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Desktop Layout Fixes */
.bento-award {
  grid-column: 2 / span 2;
}

.bento-project {
  grid-column: span 4;
}

.bento-contact {
  grid-column: span 2;
}

/* ============================================
   AI 교육 카드
   ============================================ */

.bento-ai-edu {
  background: linear-gradient(135deg, #ecfdf5 0%, #dbeafe 100%);
  border-color: #6ee7b7;
  display: flex;
  flex-direction: column;
}

.bento-ai-edu:hover {
  border-color: #10b981;
  box-shadow: 0 20px 40px rgba(16, 185, 129, 0.15);
}

.ai-edu-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.bento-ai-edu h3 {
  font-size: 1.3rem;
  color: #065f46;
  margin-bottom: 0.5rem;
}

.ai-edu-desc {
  color: #047857;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.ai-edu-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: auto;
  padding-bottom: 1.5rem;
}

.ai-edu-tags span {
  padding: 0.3rem 0.8rem;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 20px;
  font-size: 0.8rem;
  color: #059669;
  font-weight: 500;
}

.ai-edu-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #059669;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.ai-edu-link span {
  transition: var(--transition);
}

.ai-edu-link:hover {
  color: #047857;
}

.ai-edu-link:hover span {
  transform: translateX(5px);
}


/* ============================================
   반응형 디자인
   ============================================ */

@media (max-width: 1024px) {
  .bento-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-large,
  .bento-full,
  .bento-project,
  .bento-contact,
  .bento-award {
    grid-column: span 2;
  }

  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .newsletter-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero {
    min-height: 80vh;
  }
}

@media (max-width: 768px) {
  .bento-container {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .bento-small,
  .bento-medium,
  .bento-large,
  .bento-full {
    grid-column: span 1;
  }

  .capabilities-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .resource-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .hero {
    min-height: 70vh;
    padding: 3rem 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .newsletter-section {
    padding: 3rem 1.5rem;
  }

  .newsletter-content h2 {
    font-size: 1.8rem;
  }

  .newsletter-form-wrapper {
    padding: 1.5rem;
  }

  .scroll-indicator {
    display: none;
  }

  #chatbot-container {
    width: calc(100% - 30px);
    right: 15px;
    height: 60vh;
  }

  #chatbot-button {
    width: 52px;
    height: 52px;
    bottom: 20px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  .bento-card {
    padding: 1.5rem;
  }

  .hero-title {
    letter-spacing: 1px;
  }

  .contact-links {
    flex-direction: column;
  }

  .contact-item {
    justify-content: center;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  #chatbot-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  body.chatbot-open {
    overflow: hidden;
  }
}

/* 스크롤바 스타일 */
#chat-messages::-webkit-scrollbar {
  width: 5px;
}

#chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}