/*
Theme Name: Astra Child
Template: astra
Version: 1.0
*/


/* ─── 공통: 고정 헤더 ─── */
.main-header-bar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  color: white;
  transition: all 0.3s ease;
}

/* 스크롤 시: 데스크톱용 흰 배경 + 검정 텍스트 */
.main-header-bar.scrolled {
  background-color: white;
  color: black;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-header-bar a {
  color: white;
  transition: color 0.3s ease;
}

.main-header-bar.scrolled a {
  color: black !important;
}

/* ─── 데스크탑 전용 (1025px 이상) ─── */
@media (min-width: 1025px) {

  .main-header-bar {
    background-color: transparent !important;
  }

  .main-header-bar.scrolled {
    background-color: white !important;
  }

  .main-header-menu a {
    color: white !important;
  }

  .main-header-bar.scrolled .main-header-menu a {
    color: black !important;
  }

  .main-header-menu li {
    position: relative;
  }

  .main-header-menu .sub-menu {
    min-width: 250px;
    width: auto; /* 텍스트 길이에 따라 확장 */
    padding: 10px 0;
    background-color: white !important;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: absolute !important;
    top: calc(100% + 30px); /* 메뉴 아래 여유 */
    left: 0;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  /* 마우스 올렸을 때 부드럽게 등장 */
  .main-header-menu li:hover > .sub-menu {
    visibility: visible;
    opacity: 1;
  }

  /* 서브메뉴 항목 */
  .main-header-menu .sub-menu li {
    border: none !important; /* 검정 줄 제거 */
  }

  .main-header-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    white-space: nowrap; /* 한 줄 유지 */
    text-align: left;
    color: black !important;
    border: none !important; /* a에도 줄 제거 */
  }

  .main-header-menu .sub-menu a:hover {
    background-color: #f0f0f0 !important;
  }
}

/* ─── 모바일/태블릿 전용 (1024px 이하) ─── */
@media (max-width: 1024px) {

  .main-header-bar {
    background-color: white !important;
    color: black !important;
    box-shadow: 0 2px 2px rgba(0,0,0,0.1);
  }

  .main-header-menu a {
    color: black !important;
  }

  /* 모바일 메뉴 펼쳤을 때 */
  .main-header-menu .sub-menu {
    background-color: transparent !important;
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding-left: 20px; /* 들여쓰기해서 하위메뉴 표시 */
    box-shadow: none !important;
  }

  .main-header-menu .sub-menu li {
    border: none !important; /* 검정 줄 제거 */
  }

  .main-header-menu .sub-menu a {
    padding: 10px 20px;
    color: black !important;
    white-space: normal; /* 줄바꿈 허용 */
    border: none !important;
  }

  .ast-mobile-header-wrap .menu-toggle {
    color: black !important;
  }

  body {
    padding-top: 78px; /* 헤더 높이만큼 공간 */
  }
}

/* ─── 모바일 메뉴 펼침 위치 조정 ─── */
.ast-header-break-point .main-header-bar-navigation {
  position: fixed;
  top: 78px; /* 헤더 높이 */
  left: 0;
  width: 100%;
  z-index: 999;
  background-color: white !important;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ast-header-break-point .main-header-bar-navigation ul li a {
  color: black !important;
}