/* =================================================================
   Global & Base Styles
   ================================================================= */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: #f8fafc;
  margin: 0;
  color: #333;
}

main {
  max-width: 700px;
  margin: 1.5rem auto 0;
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  text-align: center;
}

main h2 {
  color: #003366;
  margin-bottom: 1rem;
}

main p {
  font-size: 1.05rem;
  line-height: 1.6;
}

main ul {
  list-style: none;
  padding: 0;
}

main li {
  font-size: 1.05rem;
  line-height: 2;
  font-weight: 400;
}

/* =================================================================
   Header
   ================================================================= */
header {
  background: #003366;
  color: #fff;
  padding: 0.8rem 0;
  border-bottom: 2px solid #0077b6;
}

.header-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-wrap {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo {
  background: #fff;
  color: #003366;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: bold;
  margin-right: 1rem;
  border: 2px solid #0077b6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  letter-spacing: 0.02em;
}

.company-name {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
}

nav {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

nav a {
  text-decoration: none;
  color: #fff;
  padding: 0.5rem 1.3rem;
  font-size: 1.05rem;
  border-radius: 2rem;
  transition: background 0.2s;
}

nav a:hover,
nav a.active {
  background: #225688;
}

/* =================================================================
   Home Page: Hero Image & Intro
   ================================================================= */
.hero-image {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 2.5rem;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.13);
  display: flex;
  align-items: center;
  min-height: 260px;
}

.hero-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  filter: brightness(0.72);
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff !important;
  text-align: center;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  width: 90%; /* 텍스트 컨테이너 너비를 이미지의 90%로 확장 */
  padding: 0 1rem; /* 좌우 여백으로 가독성 확보 */
  box-sizing: border-box; /* 패딩을 너비 계산에 포함 */
}

.hero-text h1 {
  font-size: 2.1rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
  font-weight: 700;
  color: #fff !important;
}

.hero-text p {
  font-size: 1.11rem;
  font-weight: 400;
  color: #fff !important;
}

.home-intro {
  margin-top: 1rem;
}

.home-intro h2 {
  color: #225688;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

/* =================================================================
   Product Page: Tree Structure
   ================================================================= */
.product-tree {
  padding: 0;
  max-width: 440px;
  margin: 1.7rem auto 0;
  background: #f5f7fa;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 40, 0.13);
  border: 1px solid #e5e9f2;
  overflow: hidden;
}

.product-tree > li {
  padding: 0.85rem 1.3rem;
  position: relative;
  border-bottom: 1px solid #e0e6ef;
  transition: background 0.18s;
}

.product-tree > li:last-child {
  border-bottom: none;
}

.main-cat {
  display: inline-block;
  font-weight: 700;
  font-size: 1.07rem;
  color: #184978;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg, #e3eefc 70%, #d6effc 100%);
  padding: 0.29em 0.85em 0.29em 0.6em;
  border-radius: 1rem 0.6rem 1.2rem 0.6rem;
  box-shadow: 0 3px 14px rgba(35, 86, 136, 0.06);
  margin-bottom: 0.4rem;
}

.product-tree > li > ul {
  margin: 0.4rem 0 0 0.4rem;
  padding-left: 0.95rem;
  list-style: none;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.product-tree > li > ul > li {
  background: #fff;
  border-radius: 1.2em;
  box-shadow: 0 1px 7px rgba(40, 64, 80, 0.07);
  font-weight: 500;
  font-size: 1.13rem;
  color: #256a8c;
  margin: 0.07rem 0 0.18rem;
  padding: 0.23em 0.78em;
  transition: box-shadow 0.14s, transform 0.14s;
}

.product-tree > li > ul > li:hover {
  box-shadow: 0 4px 14px rgba(40, 100, 180, 0.13);
  background: #f0f6fb;
  transform: translateY(-2px) scale(1.04);
}

/* =================================================================
   Organization Page: Card List
   ================================================================= */
.org-list {
  list-style: none;
  padding: 0;
  margin: 2rem auto 0;
  max-width: 520px; /* 최대 너비 증가 */
  width: 100%;
  background: #f4f7fa;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-size: 1.1rem; /* 기본 글씨 크기 증가 */
  word-break: keep-all;
}

.org-list li {
  display: flex;
  align-items: center;
  gap: 1em; /* 간격 증가 */
  padding: 1.2rem 1.4rem; /* 패딩 증가 */
  border-bottom: 1px solid #e6e9ed;
  flex-wrap: wrap;
  word-break: break-all;
  min-width: 0;
  width: 100%;
  font-size: 1.1rem; /* 기본 글씨 크기 증가 */
  box-sizing: border-box;
}

.org-list li:last-child {
  border-bottom: none;
}

.org-role {
  display: inline-block;
  min-width: 90px; /* 최소 너비 증가 */
  font-weight: 700;
  color: #225688;
  background: #eaf3fa;
  border-radius: 1em;
  padding: 0.3em 0.85em; /* 패딩 증가 */
  font-size: 1.1rem;
  margin-right: 0.8em; /* 마진 증가 */
  white-space: nowrap;
  word-break: keep-all;
  flex-shrink: 0;
}

/* =================================================================
   Contact Page
   ================================================================= */
.contact-info p {
  margin-bottom: 1.5rem;
}

.map-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%; /* 4:3 aspect ratio */
  overflow: hidden;
  border-radius: 12px;
  margin: 1.5rem auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.map-container .root_daum_roughmap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}


/* =================================================================
   Responsive (Media Queries)
   ================================================================= */

/* Medium screens (tablets, etc.) */
@media (max-width: 700px) {
  .header-content {
    flex-direction: column;
    gap: 0.7rem;
  }

  nav {
    margin-left: 0;
  }

  .hero-image,
  .hero-image img {
    height: 180px;
    min-height: 120px;
  }

  .hero-text h1 {
    font-size: 1.35rem;
  }

  .hero-text p {
    font-size: 0.97rem;
  }
}

/* Small screens (mobiles) */
@media (max-width: 600px) {
  main {
    padding: 1.2rem 1rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    width: auto;
  }

  nav a {
    padding: 0.5rem 0.8rem;
    font-size: 0.98rem;
  }

  /* Product Tree */
  .product-tree {
    max-width: 100%;
    border-radius: 12px;
  }

  .product-tree > li {
    padding: 0.65rem 0.7rem;
  }

  .product-tree > li > ul {
    gap: 0.14rem;
    padding-left: 0.25rem;
  }

  /* Org List */
  .org-list {
    max-width: 100%;
    padding: 0;
    font-size: 1.01rem;
    border-radius: 10px;
  }

  .org-list li {
    font-size: 0.97em;
    padding: 0.98rem 0.5rem;
    gap: 0.35em;
  }

  .org-role {
    min-width: unset;
    font-size: 0.995em;
    padding: 0.18em 0.7em;
    margin-right: 0.4em;
  }

  /* Map */
  .map-container {
    border-radius: 7px;
    margin: 1.2rem 0;
  }
}
