/* Noto Sans KR 폰트 임포트 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

/* Reset 및 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #FDFBF7; /* 따뜻한 느낌의 아주 연한 베이지색 */
    -webkit-user-select: none; /* 텍스트 드래그 방지 */
    -moz-user-select: none; /* 텍스트 드래그 방지 */
    -ms-user-select: none; /* 텍스트 드래그 방지 */
    user-select: none; /* 텍스트 드래그 방지 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header */
.main-header {
    background-color: #FFFFFF; /* 흰색 헤더 유지 */
    padding: 20px 0; /* 헤더 패딩 늘려 로고 영역 확보 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* 부드러운 그림자 */
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header .logo {
    font-size: 1.6em; /* 로고 크기 좀 더 키움 */
    font-weight: 700;
    color: #4A4A4A; /* 짙은 회색으로 변경하여 세련된 느낌 강조 */
    white-space: nowrap;
}

.main-header .logo a {
    color: #4A4A4A;
    transition: color 0.3s ease;
}

.main-header .logo a:hover {
    color: #8C8C8C; /* 호버 시 약간 밝은 회색 */
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-weight: 500;
    color: #666; /* 메뉴 텍스트 색상 */
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #7D5A46; /* 따뜻한 브라운 톤 악센트 */
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 3px; /* 밑줄 두께 증가 */
    background-color: #7D5A46; /* 따뜻한 브라운 톤 악센트 */
    border-radius: 2px;
}

/* Hero Section (index.html) */
.hero-section {
    background-color: #F8F3EC; /* 따뜻한 베이지 배경 */
    color: #333;
    padding: 100px 0;
    text-align: center;
    border-radius: 12px; /* 더 둥근 모서리 */
    margin-top: 40px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); /* 부드럽고 깊이 있는 그림자 */
}

.hero-section h2 {
    font-size: 3.2em; /* 제목 크기 키움 */
    margin-bottom: 25px;
    color: #5A463B; /* 진하고 따뜻한 브라운 */
    font-weight: 700;
}

.hero-section p {
    font-size: 1.3em; /* 본문 크기 키움 */
    margin-bottom: 50px;
    color: #666;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 25px; /* 버튼 간격 키움 */
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 18px 40px; /* 버튼 패딩 키움 */
    border-radius: 35px; /* 더 둥근 버튼 */
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 1.1em;
}

.primary-btn {
    background-color: #7D5A46; /* 따뜻한 브라운 톤 */
    color: #FFFFFF;
    border-color: #7D5A46;
    box-shadow: 0 5px 15px rgba(125, 90, 70, 0.2); /* 브라운 톤에 맞는 그림자 */
}

.primary-btn:hover {
    background-color: #5A463B; /* 더 진한 브라운 톤 */
    border-color: #5A463B;
    transform: translateY(-3px); /* 호버 시 약간 올라감 */
    box-shadow: 0 8px 20px rgba(125, 90, 70, 0.3);
}

.secondary-btn {
    background-color: #FFFFFF;
    color: #7D5A46; /* 따뜻한 브라운 톤 */
    border-color: #7D5A46;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.secondary-btn:hover {
    background-color: #F8F3EC; /* 따뜻한 베이지 배경 */
    color: #5A463B;
    border-color: #5A463B;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Info Section */
.info-section {
    padding: 80px 0; /* 패딩 증가 */
    text-align: center;
    background-color: #FFFFFF;
    margin-top: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

.info-section h3 {
    font-size: 2.4em; /* 제목 크기 증가 */
    margin-bottom: 30px;
    color: #4A4A4A; /* 짙은 회색 */
    font-weight: 600;
}

.info-section p {
    font-size: 1.15em; /* 본문 크기 증가 */
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.info-section .warning-text {
    color: #D32F2F; /* 경고 텍스트는 빨간색 유지 */
    font-weight: 600;
    margin-top: 40px;
    font-size: 1.05em;
    padding: 15px;
    background-color: #FFF2F2; /* 경고 배경색 */
    border-left: 5px solid #D32F2F;
    border-radius: 8px;
}

/* Questionnaire Page (adult.html, child.html) */
.questionnaire-page {
    padding: 60px 0;
    background-color: #FFFFFF;
    border-radius: 12px;
    margin-top: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

.questionnaire-page h2 {
    text-align: center;
    font-size: 2.6em;
    margin-bottom: 25px;
    color: #5A463B; /* 진하고 따뜻한 브라운 */
    font-weight: 700;
}

.questionnaire-page .intro-text {
    text-align: center;
    font-size: 1.15em;
    color: #666;
    margin-bottom: 35px;
    line-height: 1.7;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.questionnaire-page .warning-text {
    text-align: center;
    color: #D32F2F;
    font-weight: 600;
    margin-bottom: 50px;
    font-size: 1.05em;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 15px;
    background-color: #FFF2F2;
    border-left: 5px solid #D32F2F;
    border-radius: 8px;
}

.question-section {
    background-color: #FDFBF7; /* 따뜻한 연한 베이지 */
    border: 1px solid #EEE;
    border-radius: 10px; /* 더 둥근 모서리 */
    padding: 30px 35px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* 부드러운 그림자 */
}

.question-section h3 {
    font-size: 1.5em; /* 제목 크기 증가 */
    color: #7D5A46; /* 따뜻한 브라운 악센트 */
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid #F0E0D0; /* 따뜻한 색상의 구분선 */
    font-weight: 600;
}

.question-item {
    margin-bottom: 25px;
}

.question-item p {
    font-size: 1.1em; /* 질문 텍스트 크기 증가 */
    font-weight: 500;
    color: #444;
    margin-bottom: 18px;
    line-height: 1.7;
}

.radio-group {
    display: flex;
    gap: 20px; /* 라디오 버튼 간격 증가 */
    flex-wrap: wrap;
    justify-content: flex-start;
}

.radio-group label {
    background-color: #F8F3EC; /* 따뜻한 베이지 */
    color: #7D5A46; /* 따뜻한 브라운 텍스트 */
    padding: 12px 20px; /* 패딩 증가 */
    border-radius: 25px; /* 더 둥근 모양 */
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #DED7CB; /* 따뜻한 테두리 색상 */
    display: flex;
    align-items: center;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.radio-group label:hover {
    background-color: #F0EADF; /* 더 연한 따뜻한 베이지 */
    border-color: #C8B9A0;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.radio-group input[type="radio"] {
    margin-right: 10px;
    accent-color: #7D5A46; /* 라디오 버튼 색상도 따뜻한 브라운으로 */
    transform: scale(1.1); /* 라디오 버튼 약간 키움 */
}

/* 선택된 라디오 버튼 스타일 */
.radio-group input[type="radio"]:checked + span {
    color: #FFFFFF; /* 선택 시 흰색 텍스트 */
}

.radio-group input[type="radio"]:checked {
    background-color: #7D5A46; /* 선택 시 따뜻한 브라운 배경 */
}


.questionnaire-page .primary-btn {
    display: block;
    width: 350px; /* 버튼 너비 증가 */
    margin: 50px auto 0 auto; /* 마진 증가 */
    font-size: 1.2em; /* 폰트 크기 증가 */
    padding: 18px 35px; /* 패딩 증가 */
    border-radius: 35px;
}

/* Modal */
/* Result Modal Styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    animation: fadeIn 0.3s forwards;
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto; /* 뷰포트 상단에 가깝게 조정 */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    max-width: 900px; /* 모달의 최대 너비 확장 */
    width: 90%;
    animation: slideInTop 0.4s forwards;
    box-sizing: border-box; /* 패딩 포함 너비 계산 */
    color: #333;
}

.modal-content h3 {
    text-align: center;
    color: #7D5A46;
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 700;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: #777;
    text-decoration: none;
}

.result-section {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 25px; /* 섹션 간 간격 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 새로운 제목 스타일 */
.result-summary-title {
    color: #2c3e50;
    font-size: 1.35em;
    margin-bottom: 15px;
    border-bottom: 2px solid #ddebfd;
    padding-bottom: 10px;
    font-weight: 600;
    text-align: center; /* 제목 중앙 정렬 */
}

/* 총점/고점 개수 표시 텍스트 스타일 */
.result-summary-text {
    font-size: 1.4em;
    text-align: center;
    color: #007bff; /* 파란색 계열로 유지 */
    font-weight: 700;
    margin-bottom: 20px;
}

.result-summary-text .highlight-score {
    color: #dc3545; /* 점수 강조 색상 (빨간색) */
    font-size: 1.1em; /* 전체 텍스트와 어우러지게 */
}

.result-interpretation p {
    margin-bottom: 12px;
    line-height: 1.8;
    font-size: 1.05em;
}

.result-interpretation ul {
    list-style-type: disc;
    margin-left: 25px;
    margin-bottom: 12px;
}

.result-interpretation li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* 주요 결과 강조 텍스트 스타일 */
.result-highlight {
    color: #007bff; /* 주요 결과 강조 */
    font-weight: 600;
    font-size: 1.05em;
}

.high-score-section .result-interpretation {
    margin-bottom: 20px; /* 결과 해설과 참고 섹션 사이 간격 */
}

.high-score-calculation-reference {
    background-color: #f0f8ff; /* 연한 파란색 배경 */
    border-left: 5px solid #a7d9ff; /* 왼쪽 파란색 선 */
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 0.95em;
    color: #555;
    margin-top: 20px;
}

.high-score-calculation-reference strong {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.high-score-calculation-reference ul {
    list-style-type: none; /* 불릿 제거 */
    padding-left: 0;
    margin-top: 10px;
}

.high-score-calculation-reference li {
    margin-bottom: 5px;
    line-height: 1.5;
}

.final-warning {
    color: #dc3545; /* Warning red */
    font-weight: 600;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 25px;
    font-size: 1.1em;
    padding: 10px;
    border: 1px solid #f5c6cb;
    background-color: #f8d7da;
    border-radius: 8px;
}

.btn.modal-close-btn {
    background-color: #FFFFFF;
    color: #7D5A46; /* 따뜻한 브라운 톤 */
    border-color: #7D5A46;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Footer */
.main-footer {
    background-color: #4A4A4A; /* 짙은 회색으로 변경하여 세련된 느낌 강조 */
    color: #DEDEDE; /* 밝은 회색 텍스트 */
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

.main-footer .container {
    border-top: 1px solid rgba(255, 255, 255, 0.15); /* 투명도 조정 */
    padding-top: 25px;
}

.main-footer p {
    font-size: 0.9em;
    margin-bottom: 10px;
    line-height: 1.5;
}

.main-footer .reference-text {
    font-size: 0.85em;
    color: #B0B0B0; /* 약간 밝은 회색 */
    margin-bottom: 15px;
}


/* Responsive Design */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 20px;
    }

    .main-nav ul {
        gap: 20px;
    }

    .hero-section {
        padding: 80px 0;
        margin-top: 30px;
    }

    .hero-section h2 {
        font-size: 2.5em;
    }

    .hero-section p {
        font-size: 1.1em;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 20px;
    }

    .btn {
        width: 85%;
        max-width: 350px;
        margin: 0 auto;
        padding: 16px 30px;
        font-size: 1em;
    }

    .info-section {
        padding: 50px 0;
        margin-top: 30px;
    }

    .info-section h3 {
        font-size: 2em;
    }

    .info-section p {
        font-size: 1em;
    }

    .info-section .warning-text,
    .questionnaire-page .warning-text {
        font-size: 0.9em;
        padding: 10px;
    }

    .questionnaire-page {
        padding: 40px 0;
        margin-top: 30px;
    }

    .questionnaire-page h2 {
        font-size: 2em;
    }

    .questionnaire-page .intro-text {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .question-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    .question-section h3 {
        font-size: 1.2em;
        margin-bottom: 15px;
        padding-bottom: 8px;
    }
    .question-item p {
        font-size: 1em;
        margin-bottom: 10px;
    }
    .radio-group {
        flex-direction: column;
        gap: 8px;
    }
    .radio-group label {
        font-size: 0.95em;
        padding: 10px 15px;
    }

    .questionnaire-page .primary-btn {
        width: 90%;
        max-width: 300px;
        font-size: 1.1em;
        padding: 15px 30px;
        margin-top: 40px;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        padding: 25px;
    }
    .close-button {
        font-size: 30px;
        top: 15px;
        right: 20px;
    }
    .modal-content h3 {
        font-size: 1.6em;
        margin-bottom: 15px;
    }
.result-summary-text {
    font-size: 1.4em;
    text-align: center;
    color: #007bff; /* 파란색 계열로 유지 */
    font-weight: 700;
    margin-bottom: 20px;
}

.result-summary-text .highlight-score {
    color: #dc3545; /* 점수 강조 색상 (빨간색) */
    font-size: 1.1em; /* 기존보다 살짝 작게, 전체 텍스트와 어우러지게 */
}
    .result-total-score span {
        font-size: 1.4em;
    }
    .result-interpretation h4 {
        font-size: 1.3em;
    }
    .result-interpretation p {
        font-size: 1em;
    }
    .result-interpretation ul {
        font-size: 0.9em;
        margin-left: 20px;
    }
    .final-warning {
        font-size: 0.85em;
        margin-top: 25px;
        margin-bottom: 15px;
    }
    .modal .modal-close-btn {
        font-size: 1em;
        padding: 10px 25px;
    }

    .main-footer {
        padding: 20px 0;
        margin-top: 40px;
    }
    .main-footer .container {
        padding-top: 15px;
    }
    .main-footer p {
        font-size: 0.85em;
    }
    .main-footer .reference-text {
        font-size: 0.75em;
    }
}



/* 추가된 스타일 */

/* 리스트 디스크 기호 복원 및 정돈 */
.question-section ul {
    list-style-type: disc;
    margin-left: 25px;
    padding-left: 5px;
    color: #555;
    font-size: 1.05em;
    line-height: 1.8;
}

.question-section ul li {
    margin-bottom: 12px;
}

/* 본문 행간과 마진 여유 */
.question-section p {
    line-height: 1.9;
    margin-bottom: 20px;
    color: #444;
    font-size: 1.08em;
}

/* 섹션별 배경컬러 번갈아 적용 */
.question-section:nth-child(even) {
    background-color: #FAF7F2;
}

/* 세부 제목 크기와 여백 조정 */
.question-section h4 {
    font-size: 1.25em;
    margin-top: 25px;
    margin-bottom: 15px;
    color: #5A463B;
    font-weight: 600;
}

/* fadeIn 애니메이션 효과 */
.question-section {
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ADHD 약물 페이지를 위한 추가 스타일 및 카드 형식 구현 */

.medication-section {
    margin-bottom: 50px;
    background-color: #FDFBF7;
    border: 1px solid #EEE;
    border-radius: 10px;
    padding: 30px 35px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.8s ease;
}

.medication-section h3 {
    font-size: 1.8em;
    color: #7D5A46;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e6ec;
    padding-bottom: 10px;
}

.medication-section p {
    font-size: 1.05em;
    line-height: 1.8;
    margin-bottom: 25px;
    color: #555;
}

/* 카드 그리드 컨테이너 */
.medication-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 최소 300px, 가능한 만큼 컬럼 생성 */
    gap: 25px; /* 카드 간격 */
    margin-top: 30px;
}

/* 개별 약물 카드 스타일 */
.medication-card {
    background-color: #ffffff;
    border: 1px solid #e0e6ec;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 내용을 위쪽으로 정렬 */
    align-items: flex-start; /* 항목 시작 부분을 왼쪽/위쪽으로 정렬 */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.medication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.medication-card .card-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
    width: 100%; /* 제목이 카드 너비 전체를 차지하도록 */
}

.medication-card .card-detail {
    font-size: 0.95em;
    line-height: 1.7;
    margin-bottom: 10px;
    color: #555;
    width: 100%; /* 내용이 카드 너비 전체를 차지하도록 */
}

.medication-card .card-detail strong {
    color: #4a6fa5;
    margin-right: 5px;
    display: inline-block; /* strong 태그가 라벨 역할을 제대로 하도록 */
    min-width: 90px; /* 라벨 최소 너비 지정 (조정 가능) */
    vertical-align: top; /* 라벨과 내용이 함께 상단 정렬되도록 */
}

/* 모바일 화면을 위한 미디어 쿼리 */
@media (max-width: 768px) {
    .medication-section h3 {
        font-size: 1.5em;
    }

    .medication-section p {
        font-size: 0.95em;
    }

    .medication-grid {
        grid-template-columns: 1fr; /* 모바일에서는 한 줄에 한 카드 */
        gap: 20px; /* 카드 간격 */
    }

    .medication-card {
        padding: 20px;
    }

    .medication-card .card-title {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    .medication-card .card-detail {
        font-size: 0.9em;
        margin-bottom: 8px;
    }

    .medication-card .card-detail strong {
        min-width: 70px; /* 모바일 라벨 최소 너비 조정 */
    }
}

/* 아주 작은 모바일 화면을 위한 추가 조정 */
@media (max-width: 480px) {
    .medication-section h3 {
        font-size: 1.3em;
    }

    .medication-section p {
        font-size: 0.9em;
    }
    .main-nav ul li a {
        font-size: 0.8rem; /* 480px 이하에서 더 줄임 */
        padding: 10px 0px !important; /* 필요에 따라 패딩 조절 */
    }

    .main-footer {
        padding: 20px 0; /* 예: 상하 50px로 더 늘림 */
    }
    /* 푸터 내 텍스트 글자 크기를 조절하여 공간 확보 */
    .main-footer p {
        font-size: 0.8em;
    }
    .main-footer .reference-text {
        font-size: 0.7em;
    }
}