/* ===========================================
   청원한의원 - 16종 초정밀 진단 시스템 페이지 스타일
   =========================================== */


/* ===========================================
   중간 메시지 섹션
   =========================================== */

.diagnosis-message {
    width: 100%;
    padding: 100px 0;
    background: black;
    position: relative;
    overflow: hidden;
}

.diagnosis-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/audio-wave-bg.png') center center;
    background-size: cover;
    opacity: 0.3;
    z-index: 1;
}

.diagnosis-message::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(156, 0, 0, 0.2) 0%, rgba(156, 0, 0, 0) 64%, rgba(156, 0, 0, 0.2) 100%);
    z-index: 2;
}

.message-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.message-title {
    color: white;
    font-size: 36px;
    font-family: 'MaruBuriOTF', 'MaruBuri', 'Pretendard', sans-serif;
    font-weight: 300;
    line-height: 57.6px;
    margin: 0 0 40px 0;
}

.message-description {
    color: white;
    font-size: 20px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 300;
    line-height: 32px;
}

.message-description p {
    margin: 0 0 10px 0;
}

.message-description strong {
    font-weight: 700;
}


/* ===========================================
   진단 단계 공통 스타일
   =========================================== */

.diagnosis-step {
    width: 100%;
    padding: 180px 0px;
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
}

.diagnosis-step.step-2 {
    background: black;
    overflow: hidden;
    max-width: 100%;
}

.diagnosis-step.step-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/blood-cells-bg.jpg') center center;
    background-size: cover;
    z-index: 1;
}

.diagnosis-step.step-1 {
    max-width: 100%;
}

.diagnosis-step.step-1 .step-container {
    max-width: 1120px;
    margin: 0 auto;
}


/* .diagnosis-step.step-2::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    z-index: 2;
} */

.diagnosis-step.step-1,
.diagnosis-step.step-3 {
    background: white;
    position: relative;
    overflow: hidden;
}

.diagnosis-step.step-1::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 846px;
    background: url(../images/abstract-wave-bg.png) no-repeat;
    background-size: contain;
    z-index: 1;
}

.step-header {
    text-align: center;
    margin-bottom: 54px;
    position: relative;
    z-index: 3;
}

.step-number {
    color: #005E32;
    font-size: 26px;
    font-family: 'MaruBuriOTF', 'MaruBuri', 'Pretendard', sans-serif;
    font-weight: 300;
    line-height: 41.6px;
    margin-bottom: 16px;
}

.step-2 .step-number {
    color: white;
}

.step-title {
    color: #3E3E3E;
    font-size: 36px;
    font-family: 'MaruBuriOTF', 'MaruBuri', 'Pretendard', sans-serif;
    font-weight: 600;
    line-height: 57.6px;
    margin: 0;
}

.step-2 .step-title {
    color: white;
}

.step-content {
    position: relative;
    z-index: 3;
}


/* ===========================================
   1단계 - 청력 검사
   =========================================== */

.test-item {
    display: flex;
    align-items: center;
    gap: 41px;
    margin-bottom: 57px;
}

.test-item.reverse {
    flex-direction: row-reverse;
}

.test-image-wrapper {
    width: 600px;
    height: 600px;
    background: #F5F5F5;
    overflow: hidden;
    flex-shrink: 0;
}

.test-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.test-info {
    flex: 1;
    max-width: 478px;
}

.test-title {
    color: #555555;
    font-size: 30px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    margin: 0 0 24px 0;
}

.test-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.test-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.test-detail h4 {
    color: #555555;
    font-size: 20px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    line-height: 32px;
    margin: 0;
}

.test-detail p {
    color: #555555;
    font-size: 18px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 300;
    line-height: 28.8px;
    margin: 0;
}

.comparison {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 16px 0;
}

.comparison-item {
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

.comparison-item .label {
    width: 80px;
    color: #555555;
    font-size: 18px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    line-height: 28.8px;
    flex-shrink: 0;
}

.comparison-item .content {
    color: #555555;
    font-size: 18px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 300;
    line-height: 28.8px;
    flex: 1;
}


/* 아코디언 스타일 */

.accordion-tests {
    display: flex;
    flex-direction: column;
    background: #F7F7FB;
    border-radius: 4px;
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid #F1F1F5;
}


/* .accordion-item:last-child {
    border-bottom: none;
} */

.accordion-header {
    padding: 12px 16px;
    background: #F7F7FB;
    border-top: 1px solid #F1F1F5;
    border-bottom: 1px solid #F1F1F5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.accordion-header:hover {
    background: #F0F0F0;
}

.accordion-header h4 {
    color: #555555;
    font-size: 20px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    line-height: 32px;
    margin: 0;
    flex: 1;
}

.accordion-toggle {
    width: 24px;
    height: 24px;
    background: #F1F1F5;
    border: 1px solid #F1F1F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accordion-toggle svg {
    width: 13px;
    height: 13px;
    color: #787878;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-toggle svg {
    transform: rotate(180deg);
}

.accordion-content {
    background: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 300px;
    /* 충분한 높이로 설정, JavaScript에서 동적으로 조정됨 */
}

.accordion-content p {
    color: #555555;
    font-size: 18px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 300;
    line-height: 28.8px;
    margin: 0;
    padding: 20px 16px;
}


/* ===========================================
   2단계 - 혈액 검사
   =========================================== */

.blood-tests {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 29px;
    position: relative;
    z-index: 3;
}

.blood-test-item {
    width: 381px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.blood-test-item .test-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.blood-test-item .test-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blood-test-item .test-info h3 {
    color: white;
    font-size: 24px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    line-height: 38.4px;
    margin: 0 0 16px 0;
}

.blood-test-item .test-info p {
    color: white;
    font-size: 16px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 300;
    line-height: 25.6px;
    margin: 0;
}


/* ===========================================
   3단계 - 종합 검사
   =========================================== */

.comprehensive-tests {
    display: flex;
    flex-direction: column;
    gap: 60px;
    position: relative;
    z-index: 3;
}

.comprehensive-tests-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.comprehensive-tests-swiper {
    display: none;
}

.test-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 29px;
}

.test-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.test-card .test-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #F5F5F5;
}

.test-card .test-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.test-card .test-info h3 {
    color: #111111;
    font-size: 24px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    line-height: 38.4px;
    margin: 0 0 16px 0;
}

.test-card .test-info p {
    color: #555555;
    font-size: 16px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 300;
    line-height: 25.6px;
    margin: 0;
}


/* ===========================================
   반응형 - 태블릿 (1024px 이하)
   =========================================== */

@media (max-width: 1024px) {
    /* 메시지 섹션 */
    .diagnosis-message {
        padding: 60px 0;
    }
    .message-title {
        font-size: 20px;
        line-height: 32px;
        margin-bottom: 20px;
    }
    .message-description {
        font-size: 14px;
        line-height: 22.4px;
    }
    /* 단계 섹션 */
    .diagnosis-step {
        padding: 80px 16px;
    }
    .step-header {
        margin-bottom: 40px;
    }
    .step-number {
        font-size: 16px;
        line-height: 25.6px;
        margin-bottom: 10px;
    }
    .step-title {
        font-size: 21px;
        line-height: 33.6px;
    }
    /* 1단계 - 테스트 아이템 */
    .test-item {
        flex-direction: column;
        gap: 25px;
        margin-bottom: 40px;
    }
    .test-item.reverse {
        flex-direction: column;
    }
    .test-image-wrapper {
        width: 100%;
        height: auto;
    }
    .test-info {
        max-width: 100%;
        width: 100%;
    }
    .test-title {
        font-size: 22px;
        line-height: 35.2px;
        margin-bottom: 24px;
    }
    .test-details {}
    .test-detail {
        gap: 8px;
    }
    .test-detail h4 {
        font-size: 16px;
        line-height: 25.6px;
    }
    .test-detail p {
        font-size: 14px;
        line-height: 22.4px;
    }
    .comparison-item .label {
        width: 70px;
        font-size: 14px;
        line-height: 22.4px;
    }
    .comparison-item .content {
        font-size: 14px;
        line-height: 22.4px;
    }
    .accordion-header h4 {
        font-size: 16px;
        line-height: 25.6px;
    }
    .accordion-content p {
        font-size: 14px;
        line-height: 22.4px;
    }
    /* 2단계 - 혈액 검사 */
    .blood-tests {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    .blood-test-item {
        width: 100%;
        max-width: 400px;
    }
    .blood-test-item .test-info h3 {
        font-size: 20px;
        line-height: 32px;
    }
    .blood-test-item .test-info p {
        font-size: 14px;
        line-height: 22.4px;
    }
    /* 3단계 - 종합 검사 */
    .comprehensive-tests {
        gap: 0;
    }
    .comprehensive-tests-grid {
        display: none;
    }
    .comprehensive-tests-swiper {
        display: block;
        position: relative;
        padding-bottom: 50px;
        width: 100%;
        padding-left: 8px;
    }
    .comprehensive-tests-swiper .swiper-wrapper {
        display: flex;
    }
    .comprehensive-tests-swiper .swiper-slide {
        height: auto;
    }
    .comprehensive-tests-swiper .test-card {
        width: 100%;
        max-width: 100%;
        height: 100%;
    }
    .test-row {
        display: none;
    }
    .test-card {
        width: 100%;
        max-width: 100%;
    }
    .test-card .test-info h3 {
        font-size: 18px;
        line-height: 28.8px;
    }
    .test-card .test-info p {
        font-size: 14px;
        line-height: 22.4px;
    }
    /* Swiper 네비게이션 버튼 */
    .comprehensive-tests-next,
    .comprehensive-tests-prev {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        color: #005E32;
        margin-top: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    .comprehensive-tests-next:after,
    .comprehensive-tests-prev:after {
        font-size: 16px;
        font-weight: 700;
    }
    .comprehensive-tests-next {
        right: 10px;
    }
    .comprehensive-tests-prev {
        left: 10px;
    }
    /* Swiper 페이지네이션 */
    .comprehensive-tests-pagination {
        bottom: 10px;
        position: absolute;
    }
    .comprehensive-tests-pagination .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        background: #005E32;
        opacity: 0.3;
    }
    .comprehensive-tests-pagination .swiper-pagination-bullet-active {
        opacity: 1;
        background: #005E32;
    }
    .diagnosis-step.step-2::before {
        background: url(../images/blood-cells-bg.jpg) center center;
        background-size: 100%;
        background-repeat: no-repeat;
        background-position: top;
        z-index: 1;
    }
    .diagnosis-step.step-3 {
        padding: 60px 0;
    }
}


/* ===========================================
   반응형 - 작은 모바일 (480px 이하)
   =========================================== */

@media (max-width: 480px) {
    .diagnosis-step {
        padding: 60px 16px;
    }
    .message-title {
        font-size: 18px;
        line-height: 28.8px;
    }
    .step-title {}
    .test-title {
        font-size: 20px;
        line-height: 32px;
    }
}


/* ===========================================
   애니메이션 효과
   =========================================== */

.fade-in-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}