:root {
  --bg-base: #0A192F;       /* 진한 파란색 (Base Color) */
  --bg-card: #112240;       /* 카드 및 컨테이너 파란색 */
  --bg-alt: #071322;        /* 교차 섹션 배경색 */
  --key-burgundy: #800020;  /* 버건디 (Key Color) */
  --burgundy-hover: #9b0027;/* 버건디 호버 색상 */
  --accent-gold: #D4AF37;   /* 핵심 강조색 */
  --text-primary: #F3F4F6;  /* 주 텍스트 색상 */
  --text-secondary: #9CA3AF;/* 부 텍스트 색상 */
  --border-color: #1E2D4A;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background-color: rgba(10, 25, 47, 0.95);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #fff;
}

/* 기본 삼선 메뉴 버튼 스타일 */
.menu-toggle {
display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

/* 삼선 각각의 선 스타일 */
.menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--text-primary); /* 또는 #fff */
  border-radius: 2px;
  transition: all 0.3s ease-in-out; /* 부드러운 전환 효과 */
  transform-origin: center;
}

/* ==========================================
   메뉴가 열렸을 때 (active 클래스 추가 시 X로 변경)
   ========================================== */

/* 1. 맨 위 선: 아래로 이동 후 45도 회전 */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

/* 2. 중간 선: 투명하게 사라짐 */
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

/* 3. 맨 아래 선: 위로 이동 후 -45도 회전 */
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.badge {
  display: inline-block;
  background-color: var(--key-burgundy);
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero h1 {
  font-size: 2.3rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.hero p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn {
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-primary {
  background-color: var(--key-burgundy);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--burgundy-hover);
}

.btn-secondary {
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  background-color: var(--bg-card);
}

.hero-image-wrapper img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

/* Section Common */
.section {
  padding: 4.5rem 0;
}

.bg-alt {
  background-color: var(--bg-alt);
}

.section-title {
  text-align: center;
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.section-sub {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 1.5rem;
}

/* Features Cards */
.features-detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.feature-card {
  background-color: var(--bg-card);
  padding: 1.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--key-burgundy);
}

.feature-card.full-width {
  grid-column: 1 / -1;
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.feature-icon {
  font-size: 1.8rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  color: #fff;
}

.feature-list {
  list-style: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-list li {
  margin-bottom: 0.6rem;
  position: relative;
  padding-left: 1.2rem;
}

.feature-list li::before {
  content: "•";
  color: var(--key-burgundy);
  position: absolute;
  left: 0;
  font-size: 1.2rem;
  line-height: 1;
}

.horizontal-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

/* Tables Section */
.mt-section {
  margin-top: 3rem;
}

.table-caption {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tag {
  background-color: #1E2D4A;
  color: #64FFDA;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.tag-burgundy {
  background-color: var(--key-burgundy);
  color: #fff;
}

.tag-gold {
  background-color: #3D3200;
  color: var(--accent-gold);
}

.responsive-table {
  width: 100%;
  overflow-x: auto;
  background-color: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

th, td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: rgba(0,0,0,0.2);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

td {
  color: var(--text-secondary);
}

tr:hover td {
  background-color: rgba(255,255,255,0.02);
}

.badge-sm {
  background-color: #1E2D4A;
  color: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: monospace;
}

.badge-sm.highlight {
  background-color: var(--key-burgundy);
}

/* Incidents Section */
.flow-box {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--key-burgundy);
  margin-bottom: 2rem;
}

.flow-box h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.flow-steps {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.flow-step {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(0,0,0,0.2);
  padding: 0.8rem 1rem;
  border-radius: 6px;
}

.flow-num {
  background-color: var(--key-burgundy);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.flow-step p {
  font-size: 0.88rem;
  color: var(--text-primary);
}

.flow-arrow {
  color: var(--key-burgundy);
  font-size: 1.2rem;
  font-weight: bold;
}

.tool-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tool-card {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.tool-card h4 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.tool-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0.8rem;
}

.tool-card ul {
  list-style: square;
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* Backup / Log Section */
.feature-three-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.card h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0.6rem;
}

.card-highlight {
  border-left: 3px solid var(--key-burgundy);
  padding-left: 0.6rem;
  margin-top: 0.8rem;
  color: var(--text-primary) !important;
  font-size: 0.88rem !important;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.3s;
}

.gallery-item img:hover {
  transform: scale(1.03);
}

/* Installation Section */
.install-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: var(--bg-card);
  padding: 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.step-num {
  background-color: var(--key-burgundy);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.step h4 {
  color: #fff;
  margin-bottom: 0.3rem;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.file-structure-box {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.file-structure-box h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.code-block {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.code-block ul {
  list-style: none;
  margin: 0.5rem 0 1rem;
}

.code-block li {
  margin-bottom: 0.3rem;
}

.divider {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 1rem 0;
}

.clean-note {
  font-size: 0.82rem;
  color: #64FFDA;
}

code {
  background-color: rgba(255,255,255,0.1);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-family: monospace;
  color: #fff;
}

/* Footer */
.footer {
  padding: 2.5rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-sub {
  font-size: 0.8rem;
  margin-top: 0.4rem;
  opacity: 0.7;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.88);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 90%;
  max-height: 85%;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .install-container {
    grid-template-columns: 1fr;
  }
  .flow-arrow {
    display: none;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-base);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
  }

  .nav-links.active {
    display: flex;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .hero-btns {
    flex-direction: column;
  }
}

/* ==========================================
   특장점 세로 배치 (Vertical Feature Cards)
   ========================================== */
.vertical-feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card-v {
  background-color: var(--bg-card);
  padding: 1.8rem 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--key-burgundy);
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card-v:hover {
  transform: translateY(-2px);
  border-color: var(--key-burgundy);
}

.feature-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card-header h3 {
  font-size: 1.3rem;
  color: #fff;
  font-weight: 700;
}

.feature-tag {
  font-size: 0.75rem;
  background-color: rgba(128, 0, 32, 0.2);
  color: #ff6b81;
  border: 1px solid var(--key-burgundy);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-family: monospace;
  text-transform: uppercase;
}

/* ==========================================
   지원 DB 카드 (Supported DB Section)
   ========================================== */
.db-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.db-card {
  background-color: var(--bg-card);
  padding: 1.8rem 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.db-card.active:hover {
  border-color: var(--key-burgundy);
  box-shadow: 0 8px 20px rgba(128, 0, 32, 0.2);
}

.db-card.dev {
  opacity: 0.75;
  border-style: dashed;
}

.db-status-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.db-status-badge.supported {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid #10B981;
}

.db-status-badge.developing {
  background-color: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid #F59E0B;
}

.db-card h3 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.6rem;
}

.db-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
  .feature-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

/* ==========================================
   신규: 수치 수집 방법 및 기술서
   ========================================== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.tech-card {
  background-color: var(--bg-card);
  padding: 1.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  position: relative;
}

.tech-card.full-width {
  grid-column: 1 / -1;
}

.tech-num {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--key-burgundy);
  background-color: rgba(128, 0, 32, 0.15);
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(128, 0, 32, 0.3);
}

.tech-card h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.tech-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ==========================================
   갤러리 이미지 비율 가변 높이 대응 (여백 제거)
   ========================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: start; /* 카드들이 서로의 높이에 맞추지 않고 개별 높이를 갖도록 설정 */
}

.gallery-item {
  background-color: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  height: auto; /* 고정 높이 해제 */
}

/* 이미지 보관 박스 */
.gallery-img-box {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  font-size: 0;
}

.gallery-img-box img {
  width: 100%;
  height: auto; /* 이미지 원본 비율 유지 */
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-img-box img:hover {
  transform: scale(1.03);
}

.gallery-caption {
  padding: 0.8rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-primary);
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  margin: 0;
}

/* ==========================================
   푸터 및 상담문의 강조 스타일
   ========================================== */
.contact-box {
  background-color: var(--bg-card);
  border: 1px solid var(--key-burgundy);
  border-radius: 8px;
  padding: 1.2rem 2rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(128, 0, 32, 0.2);
}

.contact-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.contact-phone {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.2s ease;
}

.contact-phone:hover {
  color: #ff6b81;
}

@media (max-width: 768px) {
  .contact-phone {
    font-size: 1.3rem;
  }
}