/* ========================================= */
/* 기본 웹사이트 스타일 및 전체 레이아웃 설정 */
/* ========================================= */

body {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 750px; /* 최대 너비를 지정하여 중앙 정렬 */
    margin: 40px auto; /* 상하 마진 40px로 여백 확보 */
    padding: 20px;
    background-color: #f8f8f8; /* 전체 페이지 배경색 */
}

h1, h2, h3, h4 {
    color: #2c3e50; /* 기본 헤더 색상 */
    font-weight: bold;
}

h1 {
    font-size: 2.5em; /* 메인 제목 크기 */
    margin-bottom: 25px;
    text-align: center;
}

h2 {
    font-size: 2em; /* 섹션 제목 크기 */
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    text-align: center;
}

h3 {
    font-size: 1.6em; /* 서브 섹션 제목 크기 */
    margin-top: 30px;
    margin-bottom: 15px;
    color: #34495e;
}

h4 {
    font-size: 1.3em;
    margin-top: 20px;
    margin-bottom: 10px;
}

p {
    margin-bottom: 15px;
}

ul {
    list-style-type: none; /* 기본 불릿 제거, 필요시 개별 섹션에서 추가 */
    padding-left: 0;
}

ul li {
    margin-bottom: 10px;
}

a {
    color: #3498db; /* 링크 기본 색상 */
    text-decoration: none; /* 밑줄 제거 */
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
    color: #2980b9; /* 링크 호버 색상 */
    text-decoration: underline; /* 호버 시 밑줄 표시 */
}

/* ========================================= */
/* 헤더 (Header) 스타일 */
/* ========================================= */

header {
    background-color: #ffffff;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    border-radius: 8px;
    text-align: center;
}

.header-content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 15px;
    text-align: center;
}

header h1 a {
    color: #2c3e50;
    text-decoration: none;
}

header nav ul {
    display: flex; /* 메뉴 항목 가로 정렬 */
    justify-content: center;
    padding: 0;
    margin: 0;
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    color: #555;
    font-weight: bold;
    padding: 5px 0;
    position: relative; /* 밑줄 애니메이션을 위해 */
}

header nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: #3498db;
    bottom: 0;
    left: 0;
    transition: width 0.3s ease-in-out;
}

header nav ul li a:hover::after {
    width: 100%;
}


/* ========================================= */
/* 메인 콘텐츠 및 공통 섹션 스타일 */
/* ========================================= */

main {
    padding: 20px 0;
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
}

.page-title h2 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 10px;
    border-bottom: none;
    padding-bottom: 0;
}

.page-title p {
    font-size: 1.1em;
    color: #666;
}

.content-block {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #3498db;
    color: white;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.button:hover {
    background-color: #2980b9;
}


/* ========================================= */
/* 푸터 (Footer) 스타일 */
/* ========================================= */

footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    background-color: #2c3e50;
    color: #ecf0f1;
    border-top: 1px solid #34495e;
    border-radius: 8px;
}

.footer-content {
    max-width: 960px;
    margin: 0 auto;
}

footer ul {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

footer ul li {
    margin: 0 10px;
}

footer ul li a {
    color: #ecf0f1;
    text-decoration: none;
}

footer ul li a:hover {
    color: #3498db;
    text-decoration: underline;
}

footer p {
    font-size: 0.9em;
    margin: 0;
}


/* ========================================= */
/* 문의하기 페이지 (contact.html) 스타일 */
/* ========================================= */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #34495e;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: calc(100% - 20px); /* 패딩 고려 */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box; /* 패딩이 너비에 포함되도록 */
}

.form-group textarea {
    resize: vertical; /* 세로 크기 조절 가능 */
    min-height: 120px;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.form-note {
    font-size: 0.9em;
    color: #777;
    margin-top: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
}

.form-note strong {
    color: #856404;
}


/* ========================================= */
/* 블로그 페이지 (blog_*.html) 스타일 */
/* ========================================= */

.blog-post-content {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.blog-post-content h3 {
    text-align: left;
    margin-top: 25px;
    margin-bottom: 15px;
    color: #34495e;
    border-bottom: 1px dashed #eee; /* 소제목 아래 점선 추가 */
    padding-bottom: 5px;
}

.blog-post-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.blog-post-content ul {
    list-style-type: disc; /* 블로그 본문 목록은 점으로 */
    padding-left: 25px;
    margin-bottom: 20px;
}

.blog-post-content ul li {
    margin-bottom: 8px;
}

.blog-post-content figure {
    margin: 25px 0;
    text-align: center;
}

.blog-post-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.blog-post-content figcaption {
    font-size: 0.9em;
    color: #777;
    margin-top: 10px;
}

.post-meta {
    text-align: center;
    font-size: 0.9em;
    color: #777;
    margin-top: -10px; /* 제목과의 간격 조정 */
    margin-bottom: 30px;
}

.call-to-action-small {
    text-align: center;
    margin-top: 30px;
}

.call-to-action-small .button {
    padding: 10px 20px;
    font-size: 1em;
}

.related-posts {
    background-color: #f9f9f9;
    padding: 25px;
    border-top: 1px solid #eee;
    border-radius: 8px;
}

.related-posts h3 {
    text-align: left;
    margin-top: 0;
    margin-bottom: 15px;
    color: #34495e;
    border-bottom: none;
    padding-bottom: 0;
}

.related-posts ul {
    list-style-type: none; /* 관련글은 점 없이 */
    padding-left: 0;
}

.related-posts ul li {
    margin-bottom: 8px;
}

.related-posts ul li a {
    font-size: 1em;
    color: #555;
    transition: color 0.2s ease;
}

.related-posts ul li a:hover {
    color: #3498db;
    text-decoration: underline;
}


/* ========================================= */
/* 테스트 페이지 (test_*.html) 스타일 */
/* (단일 문제 표시, 진행바, 커스텀 라디오 버튼) */
/* ========================================= */

.test-container {
    background-color: #f4f7f6; /* 테스트 섹션 전체의 연한 배경색 */
    border-radius: 8px;
    padding: 30px; /* 전체 테스트 컨테이너 패딩 유지 */
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* 약간 더 강한 그림자 효과로 입체감 부여 */
}

/* 각 질문 카드 스타일 */
.test-question {
    background-color: #fff; /* 각 질문 카드 배경색을 흰색으로 */
    border: 1px solid #e0e0e0; /* 질문 카드 테두리 */
    border-radius: 10px; /* 모서리를 좀 더 둥글게 */
    padding: 30px; /* 질문 카드 내부 패딩 증가 */
    margin-bottom: 40px; /* 질문 카드 간 간격 증가 */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* 카드임을 강조하는 그림자 효과 */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* 호버 애니메이션 */
}

.test-question:hover {
    transform: translateY(-5px); /* 호버 시 살짝 떠오르는 효과 */
    box-shadow: 0 6px 16px rgba(0,0,0,0.12); /* 호버 시 그림자 강조 */
}

/* 질문 텍스트 스타일 */
.test-question p {
    font-weight: bold;
    margin-bottom: 20px; /* 질문 텍스트 아래 간격 증가 */
    font-size: 1.25em; /* 질문 글자 크기 더 확대 */
    color: #2c3e50; /* 질문 글자색 강조 */
    line-height: 1.5; /* 줄 간격 넓히기 */
}

/* 답변 항목 (label) 스타일 */
.test-question label {
    display: block;
    margin-bottom: 25px; /* 답변 항목 간 간격 유지 */
    cursor: pointer;
    padding: 15px 20px; /* 패딩 유지 */
    border: 1px solid #dcdcdc; /* 테두리 다시 추가 (선택 시 강조를 위해) */
    border-radius: 8px;
    background-color: #fefefe; /* 배경색을 흰색 계열로 변경 */
    color: #333;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    padding-left: 20px; /* 라디오 버튼 공간 제거 (숨겨진 상태 유지) */
}

.test-question label:hover {
    background-color: #eaf4f9; /* 호버 시 연한 파란색 배경 */
    border-color: #3498db; /* 호버 시 파란색 테두리 */
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1); /* 호버 시 그림자 효과 */
}

/* 커스텀 라디오 버튼 스타일 */
.test-question input[type="radio"] {
             display: none; /* 라디오 버튼 숨기기 */
    position: absolute; /* label 내부에서 절대 위치 지정 */
    left: 20px; /* 왼쪽에서 20px 떨어진 위치 */
    top: 50%; /* 상단에서 50% 위치 */
    transform: translateY(-50%) scale(1.3); /* Y축 중앙 정렬 및 크기 확대 */
    -webkit-appearance: none; /* 기본 라디오 버튼 스타일 제거 */
    -moz-appearance: none;
    appearance: none;
    width: 20px; /* 커스텀 라디오 버튼 너비 */
    height: 20px; /* 커스텀 라디오 버튼 높이 */
    border: 2px solid #ccc; /* 테두리 색상 */
    border-radius: 50%; /* 원형 */
    outline: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* 커스텀 라디오 버튼 선택 시 내부 원형 표시 */
.test-question input[type="radio"]:checked {
    background-color: #3498db; /* 선택 시 배경색 */
    border-color: #3498db; /* 선택 시 테두리색 */
}

.test-question input[type="radio"]:checked::after {
    content: '';
    display: block;
    width: 10px; /* 내부 원 크기 */
    height: 10px; /* 내부 원 크기 */
    border-radius: 50%;
    background: #fff; /* 내부 원 색상 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 라디오 버튼 선택 시 텍스트 스타일 */
.test-question input[type="radio"]:checked + span {
    font-weight: bold;
    color:  #3498db; /* 선택된 답변 글자 색상 강조 */
}

/* 진행 바 컨테이너 */
.progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 10px;
    height: 15px; /* 진행바 높이 */
    margin-bottom: 30px; /* 질문 카드 위 간격 */
    overflow: hidden; /* 내부 바가 둥근 모서리를 넘지 않도록 */
}

/* 실제 진행 바 */
.progress-bar {
    height: 100%;
    width: 0%; /* 초기 너비 */
    background-color: #2ecc71; /* 진행바 색상 */
    border-radius: 10px;
    transition: width 0.4s ease-in-out; /* 너비 변화 애니메이션 */
}

/* 네비게이션 버튼 그룹 */
.navigation-buttons {
    display: flex;
    justify-content: space-between; /* 버튼들을 양 끝으로 정렬 */
    margin-top: 40px; /* 보기와 버튼 사이 간격 증가 */
}

.navigation-buttons .button {
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 8px;
    flex-grow: 1; /* 버튼이 공간을 채우도록 확장 */
    margin: 0 10px; /* 버튼 사이 간격 */
    min-width: 120px; /* 버튼 최소 너비 */
}

.navigation-buttons .prev-btn {
    background-color: #95a5a6; /* 이전 버튼 색상 */
}

.navigation-buttons .prev-btn:hover {
    background-color: #7f8c8d;
}

.navigation-buttons .next-btn {
    background-color: #3498db; /* 다음 버튼 색상 */
}

.navigation-buttons .next-btn:hover {
    background-color: #2980b9;
}

.navigation-buttons .submit-btn {
    background-color: #2ecc71; /* 제출 버튼 색상 */
}

.navigation-buttons .submit-btn:hover {
    background-color: #27ae60;
}


/* 테스트 결과 섹션 */
.test-result {
    margin-top: 50px; /* 결과 섹션 상단 마진 증가 */
    padding: 40px; /* 패딩 증가 */
    border: 3px solid #3498db; /* 테두리 두께 및 색상 강조 */
    border-radius: 12px; /* 모서리 좀 더 둥글게 */
    background-color: #f0f8f8; /* 배경색 변경 */
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* 결과 섹션 그림자 */
}

.test-result h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: none;
    padding-bottom: 0;
}

.test-result h4 {
    font-size: 2.5em; /* 결과 유형명 크기 더 키우기 */
    color: #e74c3c; /* 결과 유형명 색상 */
    margin-bottom: 25px; /* 아래 마진 증가 */
}

.test-result p {
    font-size: 1.2em; /* 결과 설명 글자 크기 증가 */
    line-height: 1.8; /* 줄 간격 넓히기 */
    margin-bottom: 30px;
}