/* 기본 설정 */
body {
  font-family: 'Noto Sans KR', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #e0e0e0;
  color: #000;
  scroll-behavior: smooth;
}

/* 헤더 */
header {
  background: #002b5c;
  color: #fff;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

header h1 {
  margin: 0;
  font-size: 1.6rem;
}

/* 네비게이션 - 자동 균등 분배 */
nav {
  background-color: rgba(0, 123, 255, 0.5);
  padding: 10px 20px;
  border-radius: 8px;
  display: inline-block;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

nav ul li {
  margin-left: 5px;
}

/* 드롭다운 메뉴 */
nav ul li {
  position: relative;
}

/* 서브메뉴 박스 크기 줄이기 */
nav ul li .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #002b5c;
  padding: 5px 0;       /* 위아래 여백 줄임 */
  border-radius: 6px;
  min-width: 150px;     /* 기본 폭 줄임 (기존 180px → 140px) */
}

nav ul li .submenu li a {
  display: block;
  padding: 5px 10px;    /* 내부 여백 줄임 */
  font-size: 0.85rem;   /* 글씨 크기 조금 작게 */
  font-weight: 300;     /* 글씨 가늘게 */
  color: #fff;
  text-decoration: none;
  line-height: 1.2;     /* 줄 간격 줄임 */
}

nav ul li .submenu li a:hover {
  background-color: #1976d2;
}
nav ul li .submenu li a:hover {
  background-color: #1976d2;
}

/* 마우스 올렸을 때 서브메뉴 표시 */
nav ul li.dropdown:hover .submenu {
  display: block;
}
nav ul li a {
  font-weight: 600;
  font-size: 1rem;
  color: #ffffff;
  text-decoration: none;
  padding: 8px 20px;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  text-decoration: underline;
}

/* 현재 페이지 강조 */
body#business nav ul li a[href="./business.html"],
body#company nav ul li a[href="./company.html"],
body#index nav ul li a[href="./index.html"],
body#portfolio nav ul li a[href="./portfolio.html"],
body#news nav ul li a[href="./news.html"],
body#contact nav ul li a[href="./contact.html"] {
  background-color: #2196f3;
  color: #fff;
  border-radius: 6px;
}

/* Hero 영역 */
.hero {
  text-align: left;
  padding: 150px 20px;
  color: #fff;
}

/* 페이지별 Hero 배경 */
body#index .hero {
  background: url('./images/main-bg.jpg') no-repeat center center/cover;
}
body#company .hero {
  background: url('./images/company-bg.jpg') no-repeat center center/cover;
}
body#business .hero {
  background: url('./images/business-bg.jpg') no-repeat center center/cover;
}
body#portfolio .hero {
  background: url('./images/portfolio-bg.jpg') no-repeat center center/cover;
}
body#news .hero {
  background: url('./images/news-bg.jpg') no-repeat center center/cover;
}
body#contact .hero {
  background: url('./images/contact-bg.jpg') no-repeat center center/cover;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #fff;
}

.highlight-text {
  display: inline-block;
  background-color: rgba(85,85,85,0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 1.2rem;
}

/* 버튼 */
.highlight .btn,
.cards .card .btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #808080;
  color: #ffffff;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.highlight .btn:hover,
.cards .card .btn:hover {
  background-color: #1976d2;
  color: #ffeb3b;
}

/* 섹션 */
section {
  padding: 30px 20px;
  max-width: 1200px;
  margin: auto;
}
section h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #002b5c;
}
.about-text {
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* 섹션 내부 네비게이션 메뉴 */
.sub-nav ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  gap: 15px;
}

.sub-nav ul li a {
  display: inline-block;
  padding: 8px 16px;
  background-color: #002b5c;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.sub-nav ul li a:hover {
  background-color: #1976d2;
}

/* 카드 레이아웃 */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 80%;
  margin: auto;
}
.card {
  background: #444444;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  text-align: center;
  color: #fff;
  transition: all 0.3s ease;
}
.card:hover {
  background: #222222;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transform: translateY(-5px);
}
.cards .card h3 a {
  color: #ff5722;
  text-decoration: none;
  transition: color 0.3s ease;
}
.cards .card h3 a:hover {
  color: #ffd700;
}

/* 구분선 */
hr {
  border: none;
  border-top: 2px solid #002b5c;
  margin: 30px auto;
  width: 80%;
}

/* Footer */
footer {
  background-color: #002b5c;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
  margin-top: 40px;
}
footer p {
  margin: 5px 0;
}
.welcome p {
  text-align: center;
}

.partners {
  text-align: center; /* 전체 가운데 정렬 */
  margin-top: 20px;
}
.partners h3 {
  font-size: 1.2em;       /* 글씨 크기 키우기 */
  font-weight: bold;      /* 굵게 */
  color: #2c3e50;         /* 색상 변경 (예: 진한 남색) */
  text-align: center;     /* 가운데 정렬 */
  margin-bottom: 20px;    /* 아래쪽 여백 */
  border-bottom: 2px solid #ccc; /* 밑줄 효과 */
  padding-bottom: 10px;
}
.partner-logos {
  margin-top: 15px; /* 제목과 로고 사이 간격 */
}

.partner-logo {
  width: 150px;   /* 일정한 크기 */
  height: auto;   /* 비율 유지 */
  margin: 0 10px; /* 로고 사이 간격 */
}


.partners {
  display: flex;
  gap: 20px;              /* 카드 사이 간격 */
  justify-content: center; /* 가운데 정렬 */
  flex-wrap: wrap;         /* 화면이 좁아지면 줄바꿈 */
  margin-top: 20px;
}

.partner-card {
  background: #fff;        /* 카드 배경 */
  border: 1px solid #ddd;  /* 테두리 */
  border-radius: 8px;      /* 모서리 둥글게 */
  padding: 15px;
  width: 180px;            /* 카드 너비 */
  text-align: center;      /* 내용 가운데 정렬 */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* 그림자 효과 */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-card:hover {
  transform: translateY(-5px); /* 살짝 위로 올라가는 효과 */
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.partner-logo {
  max-width: 100%;
  height: auto;
}

.partner-name {
  margin-top: 10px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}


/* SARM 페이지 */
body#sarm main {
  text-align: center;
}
body#sarm section {
  text-align: center;
}
body#sarm .hero {
  background: url('./images/sarm.jpg') no-repeat center center;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  color: #fff;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Sophia 페이지 본문 위치 조정 */
body#sophia main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body#sophia section {
  margin-top: 0 !important;
  padding-top: 0 !important;   /* 위쪽 패딩 제거 */
  padding-right: 20px !important;
  padding-bottom: 20px !important;
  padding-left: 20px !important;
  text-align: center; /* 글씨 중앙 정렬 */
}

/* Sophia 페이지 Hero 배경 */
body#sophia .hero {
  background: url('./images/sophia1.jpg') no-repeat top center;
  background-size: contain;
  color: #fff;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* 위쪽으로 붙임 */
  align-items: center;
  padding-top: 20px; /* 텍스트가 너무 위로 붙지 않도록 */
}

body#kenautics .hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* 아래쪽으로 배치 */
  align-items: flex-start;
  padding: 40px 60px;
  min-height: 400px;
  background: url('./images/kenautics-main.jpg') no-repeat center center/cover;
  color: #fff;
}

/* Kenautics 페이지 본문 중앙 정렬 */
body#kenautics section {
  text-align: center;
}

/* Kenautics 네비게이션 메뉴 스타일 */
.sub-nav {
  background-color: #87ceeb;   /* 하늘색 */
  display: inline-block;       /* 박스 크기를 내용에 맞게 줄임 */
  padding: 5px 10px;           /* 내부 여백 줄임 */
  margin-top: 10px;            /* 위쪽 간격 줄임 */
  border-radius: 4px;          /* 모서리 둥글게 */
}

.sub-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sub-nav ul li a {
  font-size: 0.9rem;           /* 글씨 조금 작게 */
  font-weight: 400;            /* 글씨 가늘게 */
  color: #fff;
  text-decoration: none;
}