/**
 * Custom CSS
 *
 * This file is for your custom styles.
 * You can add any CSS rules here to customize the Ghost theme.
 *
 * Note: Changes made directly to this file may be overwritten during theme updates.
 * It's recommended to use the Code Injection feature in Ghost for persistent customizations.
 */


/* Your custom CSS goes below this line */
h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	color: var(--color-contrast);
	font-weight: var(--font-weight-semibold);
	font-family: var(--font-family-headings);
}

/* 기본적으로 탭바 숨김 */
.mobile-tab-bar {
  display: none;
}

:where([data-sidebar-collapsed=true]) :where(.navigation-sidebar)+.navigation-tags {
  display: none;
}

/* 사이드 네브바 태그 숨김 */
@media (max-width: 1199px) {
  .navigation.navigation-sidebar.navigation-tags {
    display: none;
  }
}

/* ==================== MOBILE TAB BAR ==================== */

/* 모바일에서만 탭바 표시 (768px 이하) */
@media (max-width: 767px) {
  .mobile-tab-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-background);
    border-top: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    height: 72px;
    z-index: 10000;
    justify-content: space-around;
    align-items: center;
    padding: 0 var(--spacing-4);
  }


  /* 탭 아이템 기본 스타일 */
  .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    color: var(--color-secondary);
    transition: all 0.2s ease;
    padding: var(--spacing-3) var(--spacing-2);
    border-radius: var(--radius-2);
    min-height: 60px;
    position: relative;
  }


  /* 탭 아이템 호버 및 활성 상태 */
  .tab-item:hover,
  .tab-item.tab-active {
    color: var(--ghost-accent-color);
    background: rgba(255, 97, 0, 0.08);
    transform: translateY(-1px);
  }


  /* 활성 탭 인디케이터 */
  .tab-item.tab-active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--ghost-accent-color);
    border-radius: 0 0 var(--radius-1) var(--radius-1);
  }


  /* 탭 아이콘 */
  .tab-icon {
    width: 24px;
    height: 24px;
    margin-bottom: var(--spacing-2);
    display: flex;
    align-items: center;
    justify-content: center;
  }


  .tab-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
  }


  /* 탭 라벨 */
  .tab-label {
    font-size: var(--font-x-small);
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    text-align: center;
  }


  /* 메인 콘텐츠 하단 패딩 (탭바 공간 확보) */
  .main {
    padding-bottom: 92px !important;
  }


  /* 푸터 하단 마진 조정 */
  .layout-footer {
    margin-bottom: var(--spacing-8) !important;
  }
}


:root {
  /* 라이트 모드 기본값 (필요 시) */
  --mobile-tab-bar-background: var(--color-background);
  --mobile-tab-bar-border-top-color: var(--color-border);
}

/* 다크 모드 위한 prefers-color-scheme 미디어쿼리 */
@media (prefers-color-scheme: dark) {
  .mobile-tab-bar {
    background: var(--color-background);
    border-top-color: var(--color-border);
  }
}

/* 태블릿에서는 탭바 숨김 (768px 이상) */
@media (min-width: 768px) {
  .mobile-tab-bar {
    display: none !important;
  }
  
  .main {
    padding-bottom: 0 !important;
  }
  
  .layout-footer {
    margin-bottom: 0 !important;
  }
}


/* 스크롤 시 탭바 애니메이션 (선택사항) */
.tab-bar-hidden .mobile-tab-bar {
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}


.tab-bar-visible .mobile-tab-bar {
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}


.badge-group {
  position: absolute;
  right: var(--spacing-6, 16px);
  bottom: var(--spacing-6, 16px);
  top: auto;
  left: auto;
  z-index: 15;
  display: flex;
  gap: 6px;
  align-items: center;
}

.v-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background-color: rgba(5,5,5,.7);
  border: 0px solid rgba(5,5,5,.7);
  color: white;
  white-space: nowrap;
  user-select: none;
  pointer-events: auto;
}

/* custom.css 또는 코드 인젝션에 적용 가능 */

.content, .content.content {
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding-left: 16px;
  padding-right: 16px;
  gap: 60px;
}

.post-has-sidebar .post-content-grid {
  .post-sidebar .post-card-author,
  form.form-subscribe {
    display: none !important;
  }

  aside.sidebar {
    display: none !important;
  }

}

@media (min-width: 1900px) {
  .section-posts-grid {
		--grid--columns: 4 !important;
  }
}

/* ==================== UNIFIED BANNER STYLES ==================== */
.unified-banner {
  display: block;
  position: relative;
  border-radius: 16px;
  padding: 0 32px;
  color: #000;
  text-decoration: none;
  overflow: hidden;
  background-size: contain;
  background-position: right 32px center;
  background-repeat: no-repeat;
  background-color: #F1F1F1;

  &.about-banner {
    padding: 24px 80px;
    height: 360px;
    background-size: cover;
    background-position: center;
    background-color: transparent;
    .banner-button {
        color: black;
    }
    h3, p {
        color: white;
    }
  }
  
}

.unified-banner-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}

.unified-banner h3 {
  color: #361607;
  font-size: 24px;
  font-weight: 700;
  line-height: 28px;
  margin-bottom: 14px;
}

.unified-banner p {
  color: #361607;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  margin-bottom: 14px;
}

.unified-banner .banner-button {
  background: #FF6100;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  gap: 8px;
  width: fit-content;
  line-height: 22px;
  border: none;
  cursor: pointer;
}

/* 반응형 배경 이미지 크기 조정 */
@media (min-width: 508px) and (max-width: 735px) {
  .unified-banner {
    padding: 0 24px;
    background-size: 200px;
    background-position: right bottom;
  }
  .unified-banner h3 {
    font-size: 20px;
    line-height: 24px;
  }
  .unified-banner p {
    font-size: 14px;
    line-height: 20px;
  }
}

@media (max-width: 507px) {
  .unified-banner {
    background-size: 124px;
    background-position: right bottom;
  }
  .unified-banner h3 {
    font-size: 20px;
    line-height: 24px;
  }
  .unified-banner p {
    font-size: 14px;
    line-height: 20px;
  }
}

/* About Banner 반응형 스타일 */
@media (max-width: 735px) {
    .unified-banner.about-banner {
    background-size: cover;
    padding: 0 24px;
    height: 240px;
  }
}


/* 의료진 및 멤버 프로필 스타일 */
.profile-info {
    position: relative;
    max-width: 700px;
    padding: 40px 56px;
    margin: 16px auto 0;
    border-radius: 10px;

    &:after {
        position: absolute;
        top: 0;
        left: 56px;
        color: #FFF;
        font-size: 15px;
        font-weight: 400;
        padding: 4px 8px;
        justify-content: center;
        align-items: center;
        border-radius: 0 0 4px 4px;
    }

}

.profile-info-card {
    display: flex;
    align-items: center;
    padding: 32px 0;
}


.profile-info-details {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.profile-info-details h3 {
    color: #000;
    font-size: 28px;
    font-weight: 700;
    margin-right: 10px;
}


/* 반응형 디자인 */
@media (max-width: 539px) {
    .profile-info {
        max-width: 100%;
        padding: 40px 12px 20px;
        &:after {
            left: 12px;
        }
        &.reviewer-info {
            padding: 20px 12px 0;

            .reviewer-info-badge {
                margin-bottom: 12px;
            }

            .reviewer-info-description {
                padding-bottom: 20px;
            }
        }

        &.member-info {
            max-width: 100%;
            padding: 40px 12px 20px;
            &:after {
                left: 12px;
            }
        }

        .profile-info-details h3 {
            font-size: 22px;
        }

        .member-info-card {
            padding: 20px 0;
        }

        .member-info-description p {
            font-size: 16px;
        }


        .profile-info-details span{
            font-size: 12px;
        }

        /* 의료진 이미지 반응형 */
        .reviewer-img {
            width: 100px;
            height: 132px;
            margin-right: 12px;
            background-size: 300px 132px;
        }

        .medical-kimdohoon .reviewer-img {
            background-position: -100px 0;
        }

        .medical-imjongwoo .reviewer-img {
            background-position: -200px 0;
        }

        .reviewer-info-description ul {
            gap: 6px;
        }
    }
}

section.mh-cta {
  margin: 32px auto;
}

/* ==================== POST CTA BUTTON ==================== */

/* 포스트 CTA 버튼 */
.post-cta-button {
  max-width: var(--container--width);
  margin: 32px auto;
  text-align: center;
}

.cta-button {
  display: inline-block;
  padding: 20px 0;
  background: #FF6100;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  min-width: 200px;
  width: 100%;
  font-size: 18px;
  font-weight: 700;
  line-height: 20px;
  &:hover {
    color: #fff;
  }
}

.post-has-sidebar section.section-subscription {
  display: none;
}

.section.section-read-next {
  z-index: 4;
}
.post-content div.kg-toggle-card h4.kg-toggle-heading-text {
  font-size: 18px;
}