/* =========================================
   모던 스타일 리뉴얼
   ========================================= */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

.form-wrapper { 
    width: 100%; max-width: 760px; margin: 0 auto; font-family: 'Pretendard', sans-serif; display: flex; flex-direction: column;     
}    
.form-wrapper * { box-sizing: border-box; margin: 0; padding: 0; }

.form-section { background: #ffffff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); padding: 30px; margin-bottom: 20px; }
.question-title-top { font-size: 1.6rem; font-weight: 700; color: #1e293b; text-align: center; margin-bottom: 10px; }
.question-description { color: #64748b; text-align: center; line-height: 1.6; margin-bottom: 5px; word-break: keep-all; }

/* 🌟 상단 이벤트 배너 스타일 완벽 정렬 🌟 */
.price-banner-wrap { text-align: left; margin-bottom: 35px; padding: 15px; border-bottom: 2px solid #e2e8f0; }
.price-banner-main { 
    display: flex; flex-direction: row; justify-content: space-between; align-items: flex-end; width: 100%; flex-wrap: wrap; 
}    
.price-banner-title-group {
    display: flex; flex-direction: row; align-items: flex-end; gap: 8px; margin-bottom: 5px;
}
.price-banner-badge { 
    font-size: 2.2rem; color: #60a5fa; font-weight: 800; letter-spacing: 2px; 
    -webkit-text-emphasis: dot #60a5fa; text-emphasis: dot #60a5fa; margin: 0; line-height: 1;
}
.price-banner-title { 
    font-size: 2.2rem; font-weight: 800; color: #1e40af; margin: 0; line-height: 1;
}
.price-banner-price-box { display: flex; align-items: baseline; gap: 8px; margin-left: auto; }
.price-old { font-size: 1.1rem; color: #94a3b8; position: relative; display: inline-block; }
.price-line { position: absolute; bottom: 10px; left: 0; width: 100%; height: 2px; background-color: #f472b6; transform: rotate(0deg); transform-origin: bottom left; }
.price-arrow { position: absolute; top: -2px; right: -12px; color: #f472b6; font-weight: 800; font-size: 1.2rem; }
.price-new { font-size: 2.2rem; font-weight: 800; color: #1e40af; padding-left: 12px; }
.price-new span { font-size: 1.5rem; }
.price-note { font-size: 1rem; color: #1e40af; font-weight: 700; }

/* 스텝 인디케이터 */
.step-indicator { display: flex; justify-content: space-between; align-items: center; position: relative; max-width: 300px; margin: 0 auto 35px; }
.step-indicator::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: #e2e8f0; z-index: 1; transform: translateY(-50%); }
.step-dot { width: 40px; height: 40px; border-radius: 50%; background-color: #f1f5f9; color: #94a3b8; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; z-index: 2; transition: all 0.3s; border: 2px solid #e2e8f0; position: relative; }
.step-dot.active { background-color: #3b82f6; border-color: #3b82f6; color: #fff; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3); }

.form-step { display: none; animation: fadeIn 0.4s ease-in-out; }
.form-step.active { display: block; }

/* =========================================
   ★ 1단계: HTML 검사항목 표 스타일 
   ========================================= */
.inspection-table { width: 100%; font-size: 0.85rem; table-layout: auto !important; }
.inspection-table th, .inspection-table td { border: 1px solid #cbd5e1; padding: 12px 10px; vertical-align: middle; }
.inspection-table thead th { background-color: #1565c0; text-align: center; font-size: 1.1rem; padding: 14px; letter-spacing: 2px; color:#fff;}

.inspection-table tbody th { width: 1% !important; white-space: nowrap !important; padding: 8px 10px; font-size: 0.8rem; background-color: #f0f7ff; }
.inspection-table tbody td { color: #334155; line-height: 1.5; font-weight: 500; }
.gender-badge { display: inline-block; border-radius: 50%; width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: 0.75rem; color: white; margin: 0 2px 0 4px; font-weight: normal; }
.gender-badge.m { background-color: #3b82f6; }
.gender-badge.f { background-color: #ec4899; }
.inspection-table .footer-row td { background-color: #f0f7ff; color: #1565c0; font-weight: 700; text-align: center; font-size: 1.05rem; }

/* 10대 암 안내 박스 */
.info-box-wrap { background-color: #f4f6f9; padding: 15px 20px; margin-bottom: 30px; border-radius: 0 0 8px 8px; color: #1e5b9b; font-size: 0.95rem; line-height: 1.6; font-weight: 600; margin-top: 10px; }
.info-box-wrap .sub-text { padding-left: 12px; font-weight: 500; }

.add-inspect-title { font-size: 1.3rem; font-weight: 800; color: #1e293b; margin-bottom: 15px; letter-spacing: -0.5px; }
.add-inspect-list { display: flex; flex-direction: column; gap: 10px; }
.add-inspect-item { display: flex; align-items: stretch; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.add-inspect-num { display: flex; align-items: center; justify-content: center; width: 40px; font-size: 1.2rem; font-weight: 700; color: #94a3b8; background: #fff; border-right: 1px solid #e2e8f0; }
.add-inspect-badge { display: flex; align-items: center; justify-content: center; width: 110px; color: #fff; font-weight: 800; font-size: 1.15rem; flex-direction: column; text-align: center; line-height: 1.1; padding: 10px 0; }
.badge-w { background-color: #f472b6; }
.badge-b { background-color: #1e3a8a; }
.badge-h { background-color: #1e40af; }
.badge-p { background-color: #3b82f6; }
.add-inspect-desc { flex: 1; padding: 12px 15px; font-size: 0.95rem; color: #334155; line-height: 1.5; display: flex; align-items: center; font-weight: 600; }
.add-inspect-price { display: flex; align-items: center; justify-content: center; padding: 0 20px; font-weight: 800; font-size: 1.1rem; color: #1e293b; }
.add-inspect-price i { font-size: 0.8rem; margin-right: 6px; color: #94a3b8; }

/* 입력 폼 타이틀 & 컨테이너 */
.input-group-title { font-size: 1.1rem; font-weight: 700; color: #334155; margin: 25px 0 10px 5px; display: flex; align-items: center; }
.input-group-title::before { content: ''; display: inline-block; width: 4px; height: 16px; background: #3b82f6; margin-right: 8px; border-radius: 2px; }

/* 모던 인풋 */
.modern-input-row { display: flex; gap: 10px; margin-bottom: 15px; }
.modern-input-wrapper { flex: 1; position: relative; }
.modern-input-wrapper input, .modern-input-wrapper select { width: 100%; height: 52px; padding: 0 15px; font-size: 1rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; color: #1e293b; transition: all 0.2s; outline: none; font-family: inherit; }
.modern-input-wrapper input:focus, .modern-input-wrapper select:focus { border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.separator-text { display: flex; align-items: center; color: #94a3b8; font-weight: bold; }

/* =========================================
   ★ 프로그램 선택 버튼 
   ========================================= */
.program-list { list-style: none; margin-top: 10px; }
.program-list li { margin-bottom: 12px; }
.program-label { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border: 1px solid #e2e8f0; border-radius: 12px; cursor: pointer; transition: 0.2s; background: #fff; }
.program-label:hover { background: #f8fafc; border-color: #cbd5e1; }
.program-label:has(input:checked) { background: #eff6ff; border-color: #3b82f6; box-shadow: 0 4px 12px rgba(59,130,246,0.15); }
.program-label.fixed { background: #eff6ff; border-color: #3b82f6; cursor: default; }
.program-label input[type="radio"], .program-label input[type="checkbox"] { display: none; }

.program-info { flex: 1; }
.program-info strong { display: block; font-size: 1.15rem; color: #1e293b; margin-bottom: 6px; transition: 0.2s; }
.program-info p { font-size: 0.95rem; color: #64748b; line-height: 1.4; margin: 0; }
.program-label:has(input:checked) .program-info strong { color: #1d4ed8; }

.custom-check-icon { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #cbd5e1; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; background: #fff; margin-left: 15px; }
.custom-check-icon::after { content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; font-size: 14px; color: transparent; transition: all 0.2s; }
.program-label:has(input:checked) .custom-check-icon { background-color: #3b82f6; border-color: #3b82f6; transform: scale(1.1); }
.program-label:has(input:checked) .custom-check-icon::after { color: #fff; }

/* =========================================
   ★ 사전 문진 버튼
   ========================================= */
.q-radio-group { display: flex; gap: 10px; margin-top: 10px; }
.q-radio-group label { flex: 1; border: 1px solid #cbd5e1; border-radius: 8px; padding: 14px; text-align: center; cursor: pointer; background: #fff; transition: 0.2s; font-weight: 600; color: #475569; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.05rem; position: relative; }
.q-radio-group label:hover { background: #f8fafc; }
.q-radio-group label:has(input:checked) { border-color: #3b82f6; background: #eff6ff; color: #1d4ed8; box-shadow: 0 2px 8px rgba(59,130,246,0.15); }
.q-radio-group label:has(input:checked)::before { content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; font-size: 16px; color: #1d4ed8; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.q-radio-group input { display: none; }

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.addtion-description { color: #BE1D25; font-size: 0.95rem; font-weight: bold; background: #fff0f0; padding: 12px; border-radius: 8px; margin-top: 10px; display: none; line-height: 1.5; }

/* 하단 비용 바 (Step 2 전용) */
.price-summary { 
    background: rgba(255, 251, 235, 1); border: 2px solid #fde68a; border-radius: 12px; padding: 15px 20px; 
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05); margin-bottom: 15px; 
}
.price-summary-top { display: flex; justify-content: space-between; align-items: center; }
.price-summary .label { font-size: 1.1rem; font-weight: 600; color: #b45309; }
.price-summary .total { font-size: 1.6rem; font-weight: 800; color: #92400e; }
.selected-items-list { margin-top: 15px; padding-top: 15px; border-top: 1px dashed rgba(180, 83, 9, 0.3); font-size: 0.95rem; color: #92400e; line-height: 1.6; display: none; }

/* 버튼 스타일 */
.step-btn-group { display: flex; gap: 15px; margin-top: 30px; }
.btn-step { flex: 1; height: 60px; font-size: 1.1rem; font-weight: 700; border: none; border-radius: 12px; cursor: pointer; transition: 0.2s; font-family: inherit; }
.btn-prev { background: #f1f5f9; color: #7f9fcb; }
.btn-prev:hover { background: #e2e8f0; color: #1e293b; }
.btn-next { background: #f15a1a; color: #fff; box-shadow: 0 4px 10px rgba(59,130,246,0.3); }
.btn-next:hover { background: #b56645; transform: translateY(-2px); }
.btn-submit { background: #10b981; color: #fff; box-shadow: 0 4px 10px rgba(16,185,129,0.3); }
.btn-submit:hover { background: #059669; transform: translateY(-2px); }

/* =========================================
   ★ 하단 서브 버튼 (카카오톡, 전화) - 아이콘 전용
   ========================================= */
.sub-btn-group { display: flex; gap: 10px; width: auto; }
.btn-sub { 
    flex: none; width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center; 
    font-size: 1.6rem; /* 아이콘만 있으므로 크기를 약간 키움 */
    font-weight: 700; text-decoration: none !important; transition: 0.2s; cursor: pointer;
}
.btn-sub:hover, .btn-sub:focus, .btn-sub:active {
    text-decoration: none !important;
}
.btn-kakao { background-color: #FEE500; color: #371D1E; }
.btn-kakao:hover { background-color: #FADA0A; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(254, 229, 0, 0.3); }

.btn-phone { background-color: #80b0f4; color: #ffffff; }
.btn-phone:hover { background-color: #5a7ba9; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(71, 85, 105, 0.3); }

/* 🌟 새로 추가된 개인정보 약관 동의 세부 스타일 🌟 */
.agree-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; height: 350px; overflow-y: auto; font-size: 0.9rem; line-height: 1.6; color: #475569; margin: 15px 0; }
.agree-box h2 { font-size: 1.1rem; color: #1e40af; margin: 25px 0 10px; font-weight: 800; border-bottom: 2px solid #cbd5e1; padding-bottom: 5px; }
.agree-box h2:first-child { margin-top: 0; }
.agree-box h3 { font-size: 1rem; color: #334155; margin: 15px 0 8px; font-weight: 700; }
.agree-box p { margin-bottom: 10px; word-break: keep-all; }
.agree-box ul { list-style: none; margin-bottom: 15px; padding-left: 0; }
.agree-box ul li { margin-bottom: 5px; color: #64748b; font-size: 0.85rem; padding-left: 8px; text-indent: -8px;}
.agree-box .check-area { background: #eff6ff; padding: 12px 15px; border-radius: 6px; margin: 10px 0 20px; font-weight: 600; color: #1d4ed8; font-size: 0.9rem; text-align: center; border: 1px solid #bfdbfe; }
.agree-table { width: 100%; border-collapse: collapse; margin-bottom: 15px; font-size: 0.85rem; background: #fff; }
.agree-table th, .agree-table td { border: 1px solid #cbd5e1; padding: 10px; text-align: left; vertical-align: middle; word-break: keep-all;}
.agree-table th { background-color: #f1f5f9; color: #334155; font-weight: 700; text-align: center; }

.custom-checkbox { 
    display: flex; align-items: center; justify-content: center; gap: 10px; 
    cursor: pointer; font-size: 1.1rem; font-weight: 600; color: #1e293b; margin-top: 20px; 
}
.custom-checkbox input { display: none; } /* 기본 체크박스 숨김 */

/* 새롭게 추가되는 예쁜 체크박스 디자인 */
.agree-check-icon { 
    width: 26px; height: 26px; border: 2px solid #cbd5e1; border-radius: 6px; 
    display: flex; align-items: center; justify-content: center; background: #fff; transition: 0.2s; 
}
.agree-check-icon::after { 
    content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; 
    font-size: 14px; color: transparent; transition: 0.2s; 
}

/* 체크되었을 때의 색상 변화 */
.custom-checkbox input:checked + .agree-check-icon { 
    background: #3b82f6; border-color: #3b82f6; 
}
.custom-checkbox input:checked + .agree-check-icon::after { 
    color: #fff; 
}

/* 달력 CSS */
.cal-slider-container { position: relative; width: 100%; overflow: hidden; margin-top: 10px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
.cal-slider-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; background: #f8fafc; padding: 10px 15px; border-radius: 12px; }
.cal-slider-nav button { background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px 16px; cursor: pointer; font-weight: bold; color: #475569; transition: background 0.2s; }
.cal-slider-nav button:hover { background: #e2e8f0; }
.cal-month-title { font-size: 1.15rem; font-weight: 700; color: #1e293b; margin: 0; }
.cal-slider-track { display: flex; flex-wrap: nowrap; transition: transform 0.3s ease-in-out; width: 100%; }
.calendar-slide { flex: 0 0 100%; width: 100%; box-sizing: border-box; }
.calendar-slide table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.calendar-slide th { padding: 10px 0; border-bottom: 1px solid #e2e8f0; font-weight: 700; background-color: #f8fafc; font-size: 0.95rem; }
.calendar-slide td { border: 1px solid #f1f5f9; padding: 0; vertical-align: middle; height: 60px; text-align: center; }
.calendar-slide label { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; cursor: pointer; font-size: 1.05rem; }
.calendar-slide input[type="radio"] { display: none; }
.calendar-slide label:has(input:checked) { background-color: #3b82f6; color: #fff; font-weight: bold; }
.calendar-slide .form-disabled { color: #94a3b8; cursor: not-allowed; background-color: #f8fafc; font-size: 0.95rem; }

/* 모달 공통 스타일 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.7); z-index: 99999; justify-content: center; align-items: center; backdrop-filter: blur(4px); }    
.modal-overlay.active { display: flex; animation: fadeIn 0.2s; }
.modal-box { background: #fff; width: 90%; max-width: 450px; border-radius: 16px; padding: 30px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); position: relative; }
#infoModalBody { min-height: 0; }
.btn-modal-close { display: block; width: 100%; height: 50px; background: #3b82f6; color: #fff; font-size: 1.1rem; font-weight: 700; border: none; border-radius: 8px; cursor: pointer; margin-top: 20px; transition: 0.2s;}
.btn-modal-close:hover { background: #2563eb; }

/* =========================================
   ★ 모바일 대응 (반응형 코드 최적화)
   ========================================= */
@media (max-width: 430px) {
    html, body { overflow-x: clip; max-width: 100vw; margin: 0; padding: 0; }
    .form-wrapper { width: 100%; max-width: 100%; padding: 0 10px; overflow-x: clip; box-sizing: border-box; }
    .form-section { width: 100%; padding: 20px 15px; margin-bottom: 15px; box-sizing: border-box; } 
    
    /* 모바일에서도 인풋을 가로 한 줄로 유지하고 간격을 살짝 줄입니다 */
    .modern-input-row { flex-direction: row; gap: 5px; width: 100%; }
    
    /* 모바일에서 숨겨졌던 하이픈(-)을 다시 보이게 합니다 */
    .separator-text { display: flex; font-size: 0.9rem; padding: 0 2px; }
    
    /* 좁은 모바일 화면에 3칸이 다 들어가도록 인풋 좌우 여백을 줄여줍니다 */
    .modern-input-wrapper input, .modern-input-wrapper select { 
        width: 100%; max-width: 100%; box-sizing: border-box;
        padding: 0 8px; /* 모바일용 여백 축소 */
        font-size: 0.95rem; /* 글자 크기 미세 조정 */
    }
    .separator-text { display: none; }
    .step-indicator { max-width: 100%; gap: 10px; }
    .step-dot { width: 35px; height: 35px; font-size: 1rem; }
    
    /* 상단 배너 반응형 */
    .price-banner-wrap { padding: 10px 5px; }
    
    .price-banner-main { 
        flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; 
    }
    
    .price-banner-title-group {
        display: flex; flex-direction: row; width: 100%; justify-content: center; align-items: flex-end; gap: 6px;
    }
    
    .price-banner-badge, .price-banner-title { 
        font-size: 1.8rem; margin: 0; display: inline-block; line-height: 1; 
    }
    
    .price-banner-price-box { justify-content: center; margin-left: 0; }

    .price-new { font-size: 1.8rem; padding-left: 8px;}
    .price-new span { font-size: 1.2rem; }
    .price-old { font-size: 1rem; }
    .price-arrow { position: absolute; top: -4px; right: -12px; color: #f472b6; font-weight: 800; font-size: 1.2rem; }

    /* 정보 박스 반응형 */
    .info-box-wrap { padding: 12px 10px; font-size: 0.85rem; letter-spacing:-0.5px; width: 100%; margin-top: 10px; box-sizing: border-box;}
    .info-box-wrap .sub-text { padding-left: 0; margin-top: 5px; font-size:0.8rem;}

    /* 테이블이 모바일 밖으로 삐져나가지 않도록 고정 및 텍스트 줄바꿈 허용 */
    .inspection-table { width: 100%; font-size: 0.85rem; table-layout: fixed; } 
    .inspection-table th, .inspection-table td { padding: 8px 5px; word-break: break-word; } 
    .inspection-table tbody th { width: 25%; font-size: 0.8rem; white-space: normal; } 
    .gender-badge { width: 16px; height: 16px; line-height: 16px; font-size: 0.7rem; }

    .calendar-slide td { height: 50px; }
    
    /* 아이템 고정 너비들을 모바일 비율에 맞춰 약간 줄임 */
    .add-inspect-item { flex-wrap: wrap; width: 100%; box-sizing: border-box; }
    .add-inspect-badge { width: 80px; font-size: 1rem; }
    .add-inspect-num { width: 35px; }
    .add-inspect-desc { width: 100%; order: 3; border-top: 1px solid #e2e8f0; }
    .add-inspect-price { order: 2; margin-left: auto; padding: 0 10px; font-size: 1rem; } 
    
    .program-label { flex-direction: row; flex-wrap: wrap; width: 100%; box-sizing: border-box; }
    .program-info { width: calc(100% - 45px); }
}

/* 📌 공통 버튼 영역 고정용 스타일 (Sticky Bottom) */
.sticky-bottom-btn { 
    position: -webkit-sticky; /* iOS 사파리 호환성 추가 */
    position: sticky; 
    bottom: 10px; 
    z-index: 110; 
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(5px); 
    -webkit-backdrop-filter: blur(5px); /* iOS 사파리 블러 호환성 추가 */
    padding: 15px 10px; 
    border-radius: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1); 
    margin-top: 30px;
    
    /* 💡 모바일 스크롤 덜덜 떨림(Jitter) 방지 💡 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

/* Step 2 전용 하단 바 고정 (비용 안내 + 이전/다음 버튼) */
.sticky-bottom-bar {
    position: -webkit-sticky; 
    position: sticky; 
    bottom: 10px; 
    z-index: 110; 
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 15px 10px; 
    border-radius: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    
    /* 💡 모바일 스크롤 덜덜 떨림(Jitter) 방지 💡 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

.sticky-tabs {
    position: -webkit-sticky; /* 사파리 지원 */
    position: sticky;
    top: 0;
    display: flex;
    margin-bottom: 12px;
    background: #fff;
    border-bottom: 1px solid #eee;
    z-index: 100;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 5px;
}

.tab-item {
    flex: 1;
    padding: 15px 0;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: #888;
    cursor: pointer;
    transition: 0.3s;
}

.tab-item:hover {
    text-decoration: none;
    color: #1565c0;
}

.tab-item:not([href]) {
    color: #fff;
    background: #0451a5;
    border-bottom: 3px solid #fff;
}

/* --- [추가] 이미지 더보기 관련 스타일 시작 --- */
.img-expand-container {
    position: relative;
    background-color: #fff;
}
.img-wrap {
    /* aspect-ratio로 초기 높이 비율을 설정 (가로 대비 세로 비율 조절 필요 시 숫자 변경) */
    aspect-ratio: 1 / 2.5; 
    overflow: hidden;
    will-change: transform, aspect-ratio, max-height;
    transform: translateZ(0); /* 렌더링 버벅임, 텍스트/이미지 깜빡임 방지 */
    transition: max-height 0.8s ease-in-out, aspect-ratio 0.8s ease-in-out;
}
.img-wrap.expanded {
    /* 버튼을 누르면 원본 이미지 비율만큼 모두 보이도록 설정 */
    aspect-ratio: auto;
    max-height: 10000px; /* 전체 이미지를 다 덮을 수 있도록 큰 값을 줌 */
}

.img-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
}
.img-more-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 30px;
    background-color: #fff;
    border: 2px solid #1565c0;
    color: #1565c0;
    font-size: 15px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 10;
    transition: all 0.2s;
}
.img-more-btn:hover {
    background-color: #1565c0;
    color: #fff;
}

/* 버튼 클릭 후(expanded 클래스 추가 시) 그라데이션과 버튼 숨기기 */
.img-expand-container.expanded .img-gradient,
.img-expand-container.expanded .img-more-btn {
    display: none;
}
/* --- [추가] 이미지 더보기 관련 스타일 끝 --- */