/*
 Theme Name: Astra Child
 Template: astra
 Version: 1.0
*/








/* 기본 바디 & 뷰포트 초기화 */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    height: auto !important;
    min-height: 100%;
    color: #333;
}

* {
    -webkit-user-drag: none !important; 
    user-select: none !important; 
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}


* {
    outline: 0px solid red; /* 디버그용 테두리 */
}


/* 로고 요소에 강제 위치 고정 */
.ast-site-identity, .ast-site-title-wrap, .site-title {
    transform: none !important;
    animation: none !important;
    transition: none !important;
    position: relative !important;
    top: 0 !important;
    margin: 0 !important;
}

/* 모바일 메뉴 리스트 너비 500px로 제한 + 가운데 정렬 */
#ast-hf-mobile-menu .main-header-menu {
    max-width: 500px;
    margin: 0 auto; /* 가운데 정렬 */
    width: 100%; /* 작은 화면에서도 꽉 차는 느낌 */
    padding: 0 16px; /* 좌우 여유 */
    box-sizing: border-box;
}

.main-navigation {
    max-width: 500px;
    margin: 0 auto; /* 가운데 정렬 */
    width: 100%; /* 작은 화면에서도 꽉 차는 느낌 */
    padding: 0 16px; /* 좌우 여유 */
    box-sizing: border-box;
}



/* 햄버거메뉴크기 */
.ast-builder-grid-row {
    background-color: #ffffff !important;
    padding: 0 15px 0 20px;
}

.ast-mobile-menu-trigger-minimal .ast-mobile-svg {
    width: 26px !important;
    height: 26px !important;
}


/* 페이지 전용 스타일 */
.page-id-580 .entry-title {
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    margin: 20px 0 50px 0;
    color: #141414;
}

.page-id-580 .entry-content {
    font-size: 1rem;
    line-height: 1.75;
    font-weight: 400;
}

.entry-content strong {
    font-weight: 800;
}



/* 제목 가운데 정렬 */
.entry-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

/* 본문도 가운데 정렬 (선택) */
.entry-content {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
}




/* ✅ 데스크탑 헤더 완전 제거 */
#ast-desktop-header {
    display: none !important;
}

/* ✅ 모바일 헤더 항상 보이게 강제 */
#ast-mobile-header {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    opacity: 1 !important;
}

/* ✅ 데스크탑에서도 모바일 메뉴 드롭다운 보이게 강제 */
.ast-header-break-point #ast-hf-mobile-menu {
    display: block !important;
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: none !important;
}



/* ✅ hover 효과 */
.ast-header-break-point #ast-hf-mobile-menu .menu-link:hover {
    background-color: #e9f0ff;
}

/* ✅ 햄버거 메뉴 전체 배경 흰색 */
.main-header-menu {
    background-color: #ffffff !important;
}

/* ✅ 서브페이지 싱글페이지넓이 */
.ast-article-single {
    max-width: 500px;
    margin: 0 auto; /* 가운데 정렬 */
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
}



html {
    font-size: 16px !important; /* 1rem = 16px 기준 */
}

body {
    font-family: 'Pretendard', sans-serif;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    background-color: #fff !important;
}



@media (min-width: 921px) {
    .site-header {
        border-bottom: 1px solid #e4e4e4; /* 원하는 색상으로 변경 가능 */
    }
}







/* 스크롤탑버튼 */
#ast-scroll-top {
    background-color: #000000 !important; /* 버튼 배경: 검정 */
    color: #ffffff !important; /* 아이콘 색: 흰색 */
    border-radius: 50%; /* 원형 버튼 */
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}



/* 시작 화면 */
#start-screen h1 {
  font-size: 1.75rem !important;         /* 28px */
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin-bottom: 16px !important;
}

#start-screen p {
  font-size: 1rem !important;        /* 16px */
  line-height: 1.6 !important;
  margin-bottom: 20px !important;
}

#start-screen .views {
  font-size: 0.875rem !important;     /* 14px */
}



/* 버튼 (시작, 결과보기, 다시하기 등 공통) */
button,
#show-result-btn,
.result-btn {
    font-size: 1.125rem !important; /* 18px */
    font-weight: 600 !important;
    font-family: Pretendard !important;
}


.share-btn {
    font-size: 0.875rem !important; /* 14px */
}


.result-ad-btn {
    font-size: 1.125rem !important; /* 18px */
    font-weight: 600 !important;
    font-family: Pretendard !important;
}

.custom-header {
    position: fixed;
    top: 0;
    z-index: 999;
    height: 50px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    left: 0;
    right: 0;
}

.custom-header-inner {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    background-color: #ffffff;
    justify-content: center;
}

.custom-header.dark {
    background-color: rgba(20, 20, 20, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

    .custom-header.dark .custom-header-inner {
        background-color: rgba(20, 20, 20, 0.6) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
    }

..custom-title {
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    background-color: #ffffff;
    justify-content: center;
    height: 50px;
}

    .custom-header.dark .custom-title a,
    .custom-header.dark .partner-text,
    .custom-header.dark span {
        color: #fff !important;
    }

    .custom-header.dark span {
        color: #aaa !important;
    }


.dark-mode {
    background-color: #000 !important;
    color: #fff !important;
}

    .dark-mode .custom-title,
    .dark-mode .start-description,
    .dark-mode .result-title,
    .dark-mode .question-text,
    .dark-mode button {
        color: #fff !important;
        background-color: #141414;
        border-color: #141414;
    }










/* 질문 페이지 */
.question-label {
  font-size: 1rem !important;         /* 16px */
  font-weight: bold !important;
}

.question-text {
  font-size: 1.25rem !important;     /* 28px */
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin-bottom: 20px !important;
}

.choice {
  font-size: 1rem;         /* 16px */
}

/* 진행바 숫자 (1/20) */
#progress-text {
  font-size: 0.875rem !important;     /* 14px */
}

/* 결과 로딩 텍스트 */
#loading-text {
  font-size: 1.125rem !important;     /* 18px */
  font-weight: 600 !important;
}

/* 결과 페이지 */
#result-title {
  font-size: 1.75rem !important;         /* 28px */
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

#result-description {
  font-size: 1rem;         /* 16px */
  line-height: 1.6 !important;
}




/* 공통버튼디자인 */

#start-test-btn {
    line-height: 1.2 !important;
    border-radius: 50px;
    padding: 12px 24px;
    cursor: pointer;
    transition: filter 0.2s ease;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: block;
    text-align: center;
    text-decoration: none;
}



.result-btn,
a.result-btn {
    line-height: 1.2 !important;
    border-radius: 50px;
    padding: 12px 24px;
    cursor: pointer;
    transition: filter 0.2s ease;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
    text-align: center;
    text-decoration: none;
}

#start-test-btn:hover,
.result-btn:hover {
  filter: brightness(0.9);
}



.result-ad-btn {
  height: 48px;
  border-radius: 50px;
  padding: 0 24px;
  cursor: pointer;
  transition: filter 0.2s ease;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  display: flex;
  align-items: center;

}

.result-ad-btn:hover {
  background-color: #ddd;
}








/* 메인 콘텐츠 전체 폭  */
.ast-container {
    max-width: 1024px !important;
    margin: 0 auto !important;
    display: block !important;
}

@media (max-width: 768px) {
  .ast-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}


/* 전체 헤더 컨테이너 너비 제한 */
.site-primary-header-wrap,
.ast-builder-grid-row-container {
    max-width: 500px !important;
    margin: 0 auto !important;
}



/* 전체 헤더 높이 및 내부 그리드 높이 */
.site-primary-header-wrap,
.ast-builder-grid-row-container,
.ast-primary-header-bar,
.site-header-section,
.site-header-primary-section {
    height: 50px !important;
    min-height: 50px !important;
    padding: 0 !important;
    align-items: center;
    border-bottom: none !important;
    box-shadow: none !important;
}






/* 로고 텍스트 정렬 */
.site-branding,
.ast-site-title {
    display: flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    height: 50px !important;
}

.site-title a {
    font-weight: 700 !important; /* 굵게 */
    color: #141414 !important; /* 색도 진한 검정 */
    text-decoration: none !important; /* 밑줄 제거 */
}




/* 로고 이미지 */
.ast-site-identity img {
    max-height: 24px !important;
    height: auto !important;
    margin-right: 6px!important;
}

/* 로고와메뉴좌우여백지정 */
.ast-builder-grid-row {
    padding-left: 20px;
    padding-right: 10px;
}

@media (max-width: 768px) {
    .ast-builder-grid-row {
        padding-left: 8px;
        padding-right: 0px;
    }
}


/* 메뉴 항목 */
.main-header-menu > li > a {
    height: 50px !important;
    line-height: 50px !important;
    padding: 0 12px !important;
}


/* 그리드 줄이기 */
.ast-builder-grid-row-container {
    align-items: center !important;
    height: 50px !important;
}


/* 🔷 메인배너 */
.swiper-slide {
    aspect-ratio: 1 / 1;
    height: auto !important;
}

    .swiper-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }





/* 🔷 전체 테스트 컨테이너 (공통 래퍼) */
#test-container {
    width: 100%;
    max-width: 500px; /* PC에서 최대 폭 제한 */
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    border: 0px solid #000000;
    padding-top:0px;
}

/* 🔷 반응형 설정 (태블릿 이상에서 패딩 증가) */
@media (max-width: 768px) {
    #test-container {
        padding: 0;
        margin: 0 auto;
        width: 100%;
        padding-top:0px;
    }
}



body[class*="single-test-sum"],
body[class*="single-test-factor"] {
    background-color: #f9f9f9 !important;
}


/* 🔷 공통 영역 (시작/질문/결과) */
#start-screen,
.question-section,
#result-block,
#result-section {
    width: 100%;
    box-sizing: border-box;
   
}


#result-block,
#result-section,
#test-interaction,
#start-screen{
        padding-top:70px !important;
}



#start-screen,
#test-interaction {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}



    /* 🔷 이미지 스타일 (시작화면, 결과화면 공통) */
    #result-image,
    #start-screen img {
        max-width: 100%;
        max-height: 100%;
        height: auto;
        display: block;
        margin: 0px auto;
        object-fit: contain;
    }

/* 햄버거 메뉴 아이콘 강제 검정색 */
.ast-mobile-menu-buttons svg,
.ast-mobile-svg {
    color: #000 !important;
    fill: #000 !important;
}




/* ✅ 시작 화면 영역 */
#start-screen {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 30px 20px 30px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@media (max-width: 767px) {
  #start-screen {
    min-height: 100vh;      /* 짧을 경우 화면 가득 채움 */
    height: auto;           /* 콘텐츠가 길 경우 늘어남 (스크롤 허용) */
    box-sizing: border-box; /* 패딩 포함 계산 */
  }
}


.start-text {
    text-align: center;
}

.button-wrap {
    
    
    text-align: center;
}


    #start-screen img {
        max-width: 300px;
        margin: 20px auto;
        display: block;
    }



    /* ✅ 총문항걸리는시간 */
    .start-info-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 14px;
}
.start-info-row .info-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.start-info-row svg {
  display: inline-block;
  vertical-align: middle;
}
.info-divider {
  color: #999;
}





/* ✅ 테스트 영역 */
#test-interaction {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
    box-sizing: border-box;
    border: 0px solid blue;
}




/* ✅ 진행 바 영역 */
.progress-section {
    width: 100%;
    margin-bottom: 30px;
}

#progress-bar-container {
    position: relative;
    width: 100%;
    height: 20px;
    border-radius: 50px;
    overflow: hidden;
    background-color: var(--progress-bg) !important;
}



#progress-bar {
    height: 100%;
    width: 10%;
    transition: width 0.3s ease;
    border-radius: 0 2px 2px 0;
}


#progress-icon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    z-index: 9999;
    pointer-events: none;
}


.circle-back-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background-color: rgba(0, 132, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.circle-back-btn:hover {
  background-color: rgba(0, 132, 255, 0.3);
}

.circle-back-btn:active,
.circle-back-btn:focus {
  background-color: rgba(0, 132, 255, 0.2); /* 평상시랑 동일하게 */
  outline: none;
  box-shadow: none;
}


#prev-question-btn:hover {
  filter: brightness(0.9);
}

.question-image-wrapper {
  height: 120px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.question-image-wrapper img {
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.question-label {
    font-weight: 900; /* 매우 굵게 */
    font-size: 1.6rem !important;
    text-align: center;
    margin-bottom: 10px;
}


/* ✅ 질문 폼 영역 */
#test-form {
    width: 100%;
}

.question-section {
    width: 100%;
}

.question-block {
    display: none;
    text-align: center;
}

    .question-block.active {
        display: block;
    }

.question-text {
    text-align: center;
}


/* ✅ 선택지 버튼 영역 */
.choices {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

@media (max-height: 768px) {
    .choices {
        justify-content: flex-start;
    }
}



.choices button {
    display: block;
    margin: 0px auto;
    padding: 20px;
    width: 100%;
    max-width: 350px;
    border-radius: 6px;
    cursor: pointer;
    transition: filter 0.2s ease;
}

    .choices button:hover {
        filter: brightness(0.9);
    }



@media (max-height: 768px) {
    .choices button {
        padding: 15px 20px;
    }
}



/* ✅ 결과 분석 화면 영역 */
#result-block,
#result-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    padding: 0px 0px 30px;
}



#result-description {
    padding: 30px 0px;
}


@keyframes spin {
    0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loading-circle-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}
#loading-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 8px solid #ddd;
    border-top: 8px solid #4caf50;
    animation: spin 2s linear infinite; 
}
#checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    stroke: #4caf50;
    stroke-width: 5;
    stroke-linecap: round;
    opacity: 0;
    transition: all 0.8s ease;
}

#checkmark.active {
  stroke-dashoffset: 0;
  opacity: 1;
}


/* ✅ 로딩 컨테이너: wrapper 안에서만 동작 */
#result-loading {
    position: relative;
    width: 100%;
    min-height: 100vh; /* 또는 필요 높이 */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 60px 20px;
    overflow: hidden; /* overlay가 튀어나오지 않게 */
}

/* ✅ 덮는 어두운 배경 (투명) */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 0;
    
}

/* ✅ 로딩 인디케이터 내용 */
#result-loading > *:not(.loading-overlay) {
    position: relative;
    z-index: 1;
    color: #fff;
    text-align: center;
}



/* ✅ 결과  영역 */

.share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 50px 0;
}

.share-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter 0.2s;
  outline: none; /* 🔹 포커스 테두리 제거 */
}

.share-btn:focus {
  outline: none; /* 🔹 포커스 시에도 테두리 제거 */
}

.share-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.share-btn:hover {
  filter: brightness(0.85);
}

.share-btn a {
  text-decoration: none;
}


.result-ad-image {
    display: block !important;
}



#result-title {
    padding-top: 30px;
    padding-bottom: 30px;
}

#result-section.test-fullscreen-section {
    background-color: #ffffff !important;
}



.chart-wrapper {
  background-color: var(--chart-bg, #f5f5f5); /* PHP에서 전달된 색상 사용 */
  padding: 20px;
  margin: 20px 20px 0 20px; /* 위 20px, 좌우 20px */
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
  max-width: 500px;
}

/* ✅ 결과에디터영역 */

#result-description span {
  display: inline-block;
  line-height: 1.6;
}

/* ✅ 결과피드백영역 */
#factor-feedback {
    border: 1px solid #ddd; /* 연회색 테두리 */
    padding: 16px; /* 안쪽 여백 */
    margin: 20px 20px 40px 20px; /* 바깥 여백 */
    border-radius: 20px; /* 모서리 둥글게 */
    background-color: #fafafa; /* 살짝 연한 배경 */
    text-align: left; /* 왼쪽 정렬 */
    line-height: 1.6 !important; /* 줄간격 조금 띄워주기 */
    font-size: 1.125rem !important;
}




/* ✅ 결과설명타이틀영역 */
#result-description-title {
    font-weight: bold; /* 볼드 처리 */
    text-align: left; /* 왼쪽 정렬 */
    padding: 0 20px; /* 좌우 여백 */
    margin: 20px 0 10px 0; /* 위아래 여백 */
    font-size: 1.25rem !important;
    line-height: 1.6 !important;
}

#result-description {
    font-size: 1.125rem !important;
    line-height: 1.6 !important;
}



/* ✅ 푸터  영역 */

.site-footer .site-below-footer-wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box;
}

.site-footer .ast-builder-grid-row-container-inner {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.site-footer {
    background-color: #f3f6fb; /* 원하는 색상 */
}