body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f9fbff;
}

header {
  color: #fff;
  text-align: center;
  padding-bottom: 40px;
}

/* --------------------
   Navbar
-------------------- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #ffffff;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid #eaeaea;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.logo {
  width: 180px;
  height: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #145bb5;
}

/* 햄버거 버튼 */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
}
.nav-links.active {
  display: flex;
}

h1, h2, h3 {
  margin: 20px 0 10px;
}

.section {
  padding: 40px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.tabs {
  display: flex;
  gap: 4px;
  margin: 20px 0;
  border-bottom: 2px solid #eee;
  justify-content: center;
  flex-wrap: wrap;
}

.tab {
  flex: 1;
  max-width: 200px;
  text-align: center;
  padding: 12px;
  border: 1px solid #eee;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: #f8f8f8;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tab.active {
  background: #0a5ff0;
  color: #fff;
  font-weight: 600;
}

.content {
  display: none;
}

.content.active {
  display: block;
}

.box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 24px;
  margin: 16px auto;
  width: 100%;
  max-width: 1000px;   /* 최대 넓이 고정 */
  height: 600px;       /* 높이 고정 */
  box-sizing: border-box;
  overflow-y: auto;    /* 내용 넘치면 스크롤 */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.box h2 {
  color: #0a5ff0;
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table, th, td {
  border: 1px solid #d6e4ff;
}

th, td {
  padding: 12px;
  text-align: center;
}

th {
  background: #f0f6ff;
  color: #0a5ff0;
}

footer {
  background: #f6f6f6;
  padding: 32px 20px;
  color: #444;
  font-size: 13px;
  margin-top: 40px;
}

footer .footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

footer .footer-bottom {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #777;
}

footer img {
  height: 28px;
  margin-right: 8px;
  vertical-align: middle;
}

/* --------------------
   반응형
-------------------- */

/* 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
  .logo {
    width: 150px;
  }
  .nav-links {
    gap: 1rem;
  }
  .box {
    height: auto; /* 고정 높이 해제 */
    max-width: 95%;
  }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
  }
  .menu-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: 70px;
    right: 20px;
    background: #fff;
    padding: 1rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  }

  .nav-links.active { display: flex; }

  .tabs {
    flex-direction: column;
  }
  .tab {
    max-width: 100%;
  }
  .box {
    height: auto;
    padding: 16px;
  }
  table, th, td {
    font-size: 12px;
    padding: 8px;
  }
  footer .footer-top {
    flex-direction: column;
    text-align: center;
  }
}
