/* MD-1000 웹사이트 공통 스타일 */

/* CSS Variables */
:root {
  --brand: #2563EB;        /* Primary Blue */
  --accent: #22d3ee;       /* Cyan Accent */
  --ink: #e8ecf1;          /* Primary Text */
  --muted: #94a3b8;        /* Secondary Text */
  --bg: #0b1220;           /* Background */
  --card: #0f172a;         /* Card Background */
  --card-bg: rgba(255,255,255,.02);  /* Card Overlay */
  --border: rgba(255,255,255,.08);    /* Borders */
}

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 24px);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: clamp(60px, 8vw, 70px);
  gap: clamp(12px, 3vw, 20px);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.logo-area a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.logo-area a:hover {
  opacity: 0.8;
}

.logo-img {
  width: 96px;
  height: 32px;
  border-radius: 8px;
  background-image: url('../images/entec-logo-1.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Navigation */
nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
}

nav a { 
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  opacity: 0.85;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

nav a:hover {
  opacity: 1;
  color: #6dffc6;
}

nav a.active {
  color: #fff;
  background: rgba(34, 211, 238, 0.2);
  border: 1px solid rgba(34, 211, 238, 0.4);
  opacity: 1;
}

.main-nav {
  display: flex;
  align-items: center;
  position: relative;
}

.main-nav.show {
  display: flex;
}

/* Language Selector */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-selector select {
  background: var(--card);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(34, 211, 238, 0.05));
  position: relative;
  margin-top: clamp(15px, 2vw, 20px);
}

.hero-content {
  text-align: center;
  padding: clamp(40px, 10vw, 80px) 0;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(34, 211, 238, 0.15);
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

/* Typography */
h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: 800;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
  font-weight: 700;
}

h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #fff;
}

h4 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #fff;
}

.lead {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto 32px;
}

.section-intro {
  font-size: 18px;
  color: var(--muted);
  max-width: 700px;
  margin-bottom: 48px;
}

/* Sections */
section {
  padding: clamp(60px, 12vw, 100px) 0;
}

section.dark {
  background: var(--card);
}

/* Grid System */
.grid {
  display: grid;
  gap: 24px;
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  font-size: 15px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #1e40af);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* Cards */
.card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.card-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.card p {
  color: var(--muted);
  font-size: 15px;
}

/* Stats */
.stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-badge {
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-size: 13px;
}

/* Feature List */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 12px;
  font-size: 24px;
}

.feature-text h4 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #fff;
}

.feature-text p {
  color: var(--muted);
  font-size: 14px;
}

/* Footer */
footer {
  background: #060913;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-img {
  width: 150px;
  height: 50px;
  border-radius: 10px;
  background-image: url('../images/entec-logo-1.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.footer-slogan {
  font-size: 16px;
  color: var(--muted);
  font-style: italic;
  margin-top: 8px;
}

.footer-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.footer-col h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 960px) {
  .header-content {
    gap: 12px;
    height: auto;
    padding: 12px 0;
  }

  .lang-selector {
    margin-left: auto;
  }

  .nav-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    width: 44px;
    height: 44px;
    cursor: pointer;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    background: #0b1220;
    border-bottom: 1px solid var(--border);
    padding: 18px 24px 24px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
    border-radius: 0 0 16px 16px;
    z-index: 90;
  }

  .main-nav.show {
    display: block;
    animation: fadeSlide 0.25s ease both;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 6px;
  }

  .main-nav a {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* Accessibility */
.btn:focus,
nav a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

/* 다국어 시스템 (i18n) */
[data-i18n] {
  transition: opacity 0.2s ease;
}

/* 언어별 폰트 최적화 */
[lang="zh"] {
  font-family: "PingFang SC", "Hiragino Sans", "Microsoft YaHei", sans-serif;
}

[lang="ja"] {
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}

[lang="ko"] {
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

/* 아랍어 RTL 지원 */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .header-content {
  flex-direction: row-reverse;
}

[dir="rtl"] nav ul {
  flex-direction: row-reverse;
}

/* 언어 선택기 스타일 */
.lang-selector {
  position: relative;
}

.lang-selector select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 32px;
}

/* 언어 변경 애니메이션 */
.language-changing [data-i18n] {
  opacity: 0.7;
  transform: translateY(2px);
}

/* 번역 로딩 상태 */
.translating {
  position: relative;
}

.translating::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -20px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translateY(-50%);
}

@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}
