/* 미가건설 스타일 레이아웃 CSS */

/* 헤더 스타일 */
.header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 0.35rem 0;
  z-index: 1000;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50 !important;
  text-decoration: none;
  padding-top: 0.2rem !important;
  padding-bottom: 0.2rem !important;
}

/* 로고 크기 확대 */
.header .navbar-brand img {
  max-height: 42px !important;
  height: auto;
  width: auto;
  object-fit: contain;
}

.navbar-nav .nav-link {
  color: #2c3e50;
  font-weight: 500;
  padding: 0.5rem 1.5rem !important;
  transition: color 0.3s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #7FC4E0;
}

/* 메인 컨텐츠 */
.main-content {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
}

body.has-subpage-header .main-content {
  margin-top: 0;
}

/* 서브페이지 헤더 */
.subpage-header {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  margin-top: 70px;
  z-index: 1;
  box-sizing: border-box;
}

body.has-subpage-header {
  padding-top: 0;
}

.subpage-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subpage-header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.subpage-header-text {
  color: #fff;
  font-size: 2.5rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
}

@media (max-width: 768px) {
  .header {
    padding: 0.3rem 0;
  }
  .header .navbar-brand img {
    max-height: 36px !important;
  }
  .subpage-header {
    height: 180px;
    margin-top: 70px;
  }
  .subpage-header-text {
    font-size: 1.8rem;
  }
}

/* 페이지 섹션 */
.page-section {
  padding: 1rem 0;
}

/* 카드 스타일 */
.card {
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 2rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
}

/* 푸터 */
footer {
  background-color: #2c3e50;
  color: #fff;
  padding: 2rem 0;
  margin-top: 3rem;
}

footer a {
  color: #fff;
  text-decoration: none;
}

footer a:hover {
  color: #7FC4E0;
}

/* 모바일 사이드바 스타일 */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  z-index: 1050;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.mobile-sidebar.active {
  right: 0;
}

.mobile-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.mobile-sidebar-header img {
  max-height: 42px;
  height: auto;
  width: auto;
  object-fit: contain;
}

.mobile-sidebar-header h4 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: bold;
  color: #2c3e50;
}

.mobile-sidebar-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #2c3e50;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s;
}

.mobile-sidebar-close:hover {
  color: #7FC4E0;
}

.mobile-sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-sidebar-menu li {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-link {
  display: block;
  padding: 1.2rem 1.5rem;
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.3s;
}

.mobile-nav-link:hover {
  background: #f8f9fa;
  color: #7FC4E0;
  padding-left: 2rem;
}

.mobile-nav-link.active {
  background: #e7f3ff;
  color: #7FC4E0;
  border-left: 4px solid #7FC4E0;
}

/* 모바일에서만 표시 */
@media (min-width: 992px) {
  .mobile-sidebar,
  .mobile-menu-overlay {
    display: none !important;
  }
}

/* 반응형 조정 */
@media (max-width: 768px) {
  .page-section {
    padding: 2rem 0;
  }
  
  .main-content {
    margin-top: 70px;
  }
}
