/* =========================
   1) 사이트 전체 배경
========================= */
html,
body,
.site,
.site-content,
.ast-separate-container,
.ast-container {
  background-color: #000000 !important;
}


/* =========================
   2) 헤더 배경
========================= */
header#masthead,
.site-header,
.ast-primary-header-bar,
.ast-main-header-bar,
.main-header-bar,
.main-header-bar-wrap {
  background-color: #000000 !important;
}


/* =========================
   3) 메뉴 영역 배경 / 글자색
========================= */
.main-header-bar-navigation,
.ast-builder-menu,
.ast-builder-menu .main-header-menu {
  background-color: transparent !important;
}

.main-header-menu > li:not(.current-menu-item):not(.current-menu-ancestor):not(.current_page_item) > a,
.ast-builder-menu .main-header-menu > li:not(.current-menu-item):not(.current-menu-ancestor):not(.current_page_item) > a {
  color: #ffffff !important;
}

.main-header-menu > li > a:hover,
.ast-builder-menu .main-header-menu > li > a:hover {
  color: #d0d0d0 !important;
}


/* =========================
   4) 로고 배경 제거
========================= */
.custom-logo,
.site-logo img,
.site-branding img,
header#masthead img.custom-logo,
.custom-logo-link,
.site-branding .custom-logo-link {
  background-color: transparent !important;
}


/* =========================
   5) 헤더 고정 + 본문 시작 위치
========================= */
header#masthead,
.site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  margin: 0 !important;
}


/* =========================
   6) 본문 텍스트 여백
   - 문단, 목록, 왼쪽 정렬 제목만 안쪽 여백
   - 가운데 정렬 제목은 제외
========================= */
.entry-content p,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  padding-left: 50px !important;
  padding-right: 50px !important;
	padding-top: 20px !important;
}

.entry-content ul,
.entry-content ol {
  padding-left: 65px !important;
  padding-right: 50px !important;
}

/* 가운데 정렬 제목은 여백 제외 */
.entry-content h2[style*="text-align:center"],
.entry-content h2[style*="text-align: center"],
.entry-content h3[style*="text-align:center"],
.entry-content h3[style*="text-align: center"],
.entry-content h4[style*="text-align:center"],
.entry-content h4[style*="text-align: center"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}


/* =========================
   7) 갤러리 오버레이 제거
========================= */
.wp-block-gallery .blocks-gallery-item::before,
.wp-block-image::before,
figure.wp-block-image::before {
  display: none !important;
  background: none !important;
  opacity: 0 !important;
}


/* =========================
   8) Contact Form 7
========================= */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
  color: #ffffff !important;
  background-color: #000000 !important;
  border: 1px solid #555 !important;
}

.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
  color: #bbbbbb !important;
}

.wpcf7-form label {
  color: #ffffff !important;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  max-width: 350px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.wpcf7-form p {
  text-align: left;
}


/* =========================
   9) 라이브 스케치 폼
========================= */
.live-sketch-form {
  max-width: 520px;
  margin: 60px auto;
  padding: 32px 28px;
  background: #333333;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.live-sketch-form h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.live-sketch-form p {
  margin-bottom: 18px;
}

.live-sketch-form label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.live-sketch-form input[type="text"],
.live-sketch-form textarea {
  width: 100%;
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 15px;
}

.live-sketch-form textarea {
  min-height: 90px;
}

.live-sketch-form input[type="file"] {
  margin-top: 6px;
}

.live-sketch-form .wpcf7-list-item {
  margin-right: 12px;
}

.live-sketch-form input[type="submit"] {
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  background: #1f6fff;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
}

.live-sketch-form input[type="submit"]:hover {
  background: #1558d6;
}


/* =========================
   10) 갤러리 높이 통일
========================= */
.entry-content .wp-block-gallery .blocks-gallery-item,
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image {
  height: 350px !important;
  overflow: hidden !important;
}


/* =========================
   11) 모바일
========================= */
@media (max-width: 768px) {

  /* 본문 시작 위치 */
  .site-content {
    padding-top: 80px !important;
  }

  /* 기존 모바일 상단 마진 꼬임 방지 */
  .entry-header,
  .entry-content,
  .site-main,
  .ast-container {
    margin-top: 0 !important;
  }

  /* 모바일 본문 텍스트 크기 */
  html,
  body,
  .site,
  .site-content,
  .entry-content,
  .entry-content p,
  .entry-content li {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  h1, .entry-content h1 { font-size: 24px !important; }
  h2, .entry-content h2 { font-size: 20px !important; }
  h3, .entry-content h3 { font-size: 18px !important; }
  h4, .entry-content h4 { font-size: 16px !important; }

  .ast-header-break-point .main-header-menu .menu-link,
  .ast-header-break-point .main-header-menu > li > a,
  .ast-header-break-point .ast-mobile-header-wrap .main-header-menu a {
    font-size: 14px !important;
  }

  .wp-block-gallery figcaption,
  .wp-block-image figcaption,
  .wp-block-button__link,
  button,
  input,
  textarea,
  .wpcf7-form label {
    font-size: 14px !important;
  }

  /* 모바일 본문 좌우 여백 */
  .entry-content p,
  .entry-content h2,
  .entry-content h3,
  .entry-content h4,
  .entry-content ul,
  .entry-content ol {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .entry-content ul,
  .entry-content ol {
    padding-left: 28px !important;
  }

  .entry-content h2[style*="text-align:center"],
  .entry-content h2[style*="text-align: center"],
  .entry-content h3[style*="text-align:center"],
  .entry-content h3[style*="text-align: center"],
  .entry-content h4[style*="text-align:center"],
  .entry-content h4[style*="text-align: center"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 모바일 영상 반응형 */
  .entry-content iframe,
  .entry-content video,
  .entry-content .wp-block-embed__wrapper iframe,
  .entry-content .wp-block-embed__wrapper video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }

  .entry-content,
  .ast-container {
    overflow-x: hidden;
  }

  /* 모바일 갤러리 1열 */
  .wp-block-gallery {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  .wp-block-gallery .blocks-gallery-item,
  .wp-block-gallery.columns-2 .blocks-gallery-item,
  .wp-block-gallery.columns-3 .blocks-gallery-item,
  .wp-block-gallery.columns-4 .blocks-gallery-item,
  .wp-block-gallery figure.wp-block-image,
  .wp-block-gallery.has-nested-images figure.wp-block-image {
    width: 100% !important;
    flex: 0 0 100% !important;
    margin: 0 !important;
  }
}


/* VideoPress는 절대 잘리지 않게 */
.wp-block-jetpack-videopress,
.wp-block-videopress,
.jetpack-videopress,
.videopress-block {
  height: auto !important;
  overflow: visible !important;
}

/* 내부 영상 */
.wp-block-jetpack-videopress video,
.wp-block-videopress video,
.jetpack-videopress video {
  object-fit: contain !important;
}

.video-js.videopress-cover .vjs-tech {
  object-fit: contain !important;
  width: 100% !important;
  height: 100% !important;
}

/* 헤더 전체 높이 줄이기 */
#masthead,
.site-header,
.ast-primary-header-bar,
.main-header-bar {
  min-height: 60px !important;
}

/* 헤더 내부 여백 제거 */
#masthead .ast-builder-grid-row,
#masthead .site-header-section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* 메뉴 높이 줄이기 */
#masthead .main-header-menu > li > a {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

/* 로고 크기 제한 */
#masthead .custom-logo,
#masthead .site-logo-img img {
  max-height: 36px !important;
  width: auto !important;
}

/* 본문 시작 위치 맞추기 */
.site-content {
  padding-top: 20px !important;
}

@media (max-width: 768px) {
  .site-content,
  #primary {
    padding-top: 30px !important;
  }
}
}