/* ======== 전체 공통 설정 ======== */
body, html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'Segoe UI', sans-serif;
  color: #333;
}

/* ======== 고정 헤더 ======== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  box-sizing: border-box;
}

.logo img {
  height: 40px;
}

nav {
  display: flex;
  align-items: center;
}

nav .menu-item {
  position: relative;
  margin-left: 40px;
}

nav .menu-item a {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  padding: 10px 12px;
  display: block;
  text-decoration: none;
  line-height: 40px;
}

nav .submenu {
  position: absolute;
  top: 60px;
  left: 0;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  background: #fff;
  padding: 10px 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10000;
}

nav .menu-item:hover .submenu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

nav .submenu a {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 0;
}

/* ======== 푸터 ======== */
footer {
  background-color: #000;
  color: #ccc;
  padding: 60px 40px 20px;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-logo {
  flex: 1 1 200px;
  margin-bottom: 20px;
}

.footer-logo img {
  height: 30px;
}

.footer-section {
  flex: 1 1 150px;
  margin-bottom: 20px;
}

.footer-section h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 10px;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section li {
  margin-bottom: 6px;
}

.footer-section a {
  font-size: 14px;
  color: #ccc;
  text-decoration: none;
}

.footer-section a:hover {
  text-decoration: underline;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 10px;
}

.social-icons img {
  height: 24px;
  filter: brightness(0.9);
}

footer .copyright {
  width: 100%;
  margin-top: 30px;
  font-size: 13px;
  text-align: center;
  color: #888;
}

/* ======== 공통 섹션 ======== */
.section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: auto;
}

main {
  padding: 150px 20px;
  display: flex;
  justify-content: center;
}

.org-container {
  position: relative;
  max-width: 1200px;
  width: 100%;
}

.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.ceo {
  background: #003366;
  color: white;
  padding: 16px 32px;
  border-radius: 12px;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 2;
  position: relative;
}

.connector-line {
  width: 2px;
  height: 40px;
  background-color: #003366;
  margin-top: -2px;
  position: relative;
  z-index: 1;
}

.branches {
  display: flex;
  justify-content: center;
  gap: 250px;
  margin-top: 20px;
  position: relative;
}

.branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.branch:first-child::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 100%;
  width: 50%;
  height: 40px;
  border-left: 2px solid #003366;
  transform: translateX(-100%);
}

.branch:nth-child(2)::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  width: 2px;
  height: 40px;
  background-color: #003366;
  transform: translateX(-50%);
}

.branch:last-child::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50;
  width: 0%;
  height: 40px;
  border-right: 2px solid #003366;
  border-bottom: 2px solid #003366;
}


.dept-box {
  background-color: #005baa;
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tasks {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tasks div {
  background: white;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  min-width: 120px;
  text-align: center;
}

/* 선 연결을 위한 H자 수평선 */
.branches::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 8%;
  width: 84%;
  height: 2px;
  background-color: #003366;
  z-index: 0;
}

body {
  margin: 0;
  font-family: 'Noto Sans KR', sans-serif;
  background-color: #f7f7f7;
}

/* ======== 모바일 최적화: PC 레이아웃 유지, 크기만 축소 ======== */
@media (max-width: 768px) {
  html {
    font-size: 14px; /* 전체 글자 약간 축소 */
  }

  header {
    padding: 0 20px;
    height: 56px;
  }

  .logo img {
    height: 32px;
  }

  nav {
    gap: 10px;
  }

  nav .menu-item {
    margin-left: 16px;
  }

  nav .menu-item a {
    font-size: 14px;
    padding: 8px 10px;
  }

  nav .submenu {
    top: 56px;
    padding: 6px 14px;
    border-radius: 3px;
  }

  nav .submenu a {
    font-size: 13px;
    padding: 4px 0;
  }

  .overlay-text {
    font-size: 2em;  /* 상대적으로 줄였지만 레이아웃은 유지 */
    padding: 0 10px;
    text-align: center;
  }

  footer {
    padding: 40px 20px 20px;
  }

  .footer-logo img {
    height: 24px;
  }

  .footer-logo p {
    font-size: 13px;
    line-height: 1.5;
  }

  .footer-section h4 {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .footer-section a {
    font-size: 13px;
  }

  .social-icons {
    gap: 16px;
  }

  .social-icons img {
    height: 20px;
  }

  footer .copyright {
    font-size: 12px;
  }
}

