/* 개별 계산기 페이지 전용 스타일 - 기존 styles.css와 동일한 UI */

/* ===== CALCULATOR-EACH-HERO 섹션 스타일 ===== */
.calculator-each-hero {
    margin-top: 70px;
    padding: 0;
    background: #F7F1E9;
    text-align: center;
}

.hero-image-container {
    width: 100%;
    max-width: 750px;
    height: 250px;
    margin: 0 auto;
    position: relative;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-text-overlay {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    text-align: left;
    color: #333333;
    z-index: 2;
    max-width: 90%;
    padding-left: 30px;
}

.hero-text-overlay .main-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.7rem;
    line-height: 1.2;
}

.hero-text-overlay .calculator-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    line-height: 1.2;
}

.hero-text-overlay .calculator-description {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.6;
    opacity: 0.95;
}

/* Content Section */
.content {
    padding: 0 0 0 0;
}

/* Modern Input Design */
.modern-input-container {
    margin-bottom: 2rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.modern-input-wrapper {
    position: relative;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 2px;
    display: flex;
    align-items: center;
}

.modern-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 400;
    color: #333333;
    padding: 2px 4px;
    text-align: left;
    flex: 1;
}

.modern-input::placeholder {
    color: #666666;
    font-weight: 300;
}

.modern-input-unit {
    color: #333333;
    font-weight: 300;
    font-size: 1rem;
    pointer-events: none;
    margin-left: 8px;
    padding-right: 4px;
}

.modern-input-label {
    margin-top: 6px;
    font-size: 0.9rem;
    color: #666666;
    font-weight: 300;
    text-align: left;
}

/* 마진율 슬라이더 스타일 */
.margin-slider-container {
    width: 100%;
    max-width: 300px;
}

.margin-slider {
    width: 100%;
}

.margin-value-label {
    margin-top: 6px;
    font-size: 0.9rem;
    color: #666666;
    font-weight: 300;
    text-align: left;
}

/* ===== HERO 섹션 스타일 ===== */
.hero {
    background: #F7F1E9;
    padding: 6rem 0 4rem 0; /* 상단 패딩 증가 (헤더 높이만큼) */
    text-align: center;
    margin-top: 70px; /* 헤더 높이만큼 마진 추가 */
}

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

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #333333;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* ===== 계산기 컨테이너 스타일 ===== */
.calculator-container {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    background: #FAFAFA;
    padding: 2rem 50px;
}

/* Calculator Links */
.calculator-link {
    max-width: 750px;
    margin: 0 auto;
    background: #FAFAFA;
    padding: 0 50px 2rem 50px;
}

.calculator-link-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.calculator-link-btn {
    display: inline-block;
    padding: 0.75rem 1rem;
    background: #ffffff;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.calculator-link-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.calculator-form {
    max-width: 500px;
    margin: 0 auto;
}

.calculator-form h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.3rem;
    text-align: center;
}

/* ===== 폼 그룹 스타일 ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
}

/* ===== 계산 버튼 스타일 ===== */
.calculate-btn {
    width: 200px;
    height: 50px;
    background: #6c757d; /* 비활성화 상태: 그레이 */
    color: white;
    padding: 0;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
    margin: 0 auto 1.5rem auto;
    opacity: 0.6;
    display: block;
}

.calculate-btn:enabled {
    background: #1e3a8a; /* 활성화 상태: 짙은 남색 */
    cursor: pointer;
    opacity: 1;
}

.calculate-btn:enabled:hover {
    background: #1e40af; /* 호버 시 더 밝은 남색 */
}

.calculate-btn:enabled:active {
    background: #1e3a8a; /* 클릭 시 원래 색상 */
}

/* ===== 결과 표시 스타일 ===== */
.result {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.highlight {
    background: #e3f2fd;
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: 6px;
    font-weight: 600;
    color: #1976d2;
}

.result-item.highlight:last-child {
    margin-bottom: -1rem;
}

.result-item.section-header {
    background: #f8f9fa;
    margin: 0 -1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

/* ===== 에러 메시지 스타일 ===== */
.error {
    color: #dc3545;
    background: #f8d7da;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

/* ===== 결과 섹션 스타일 ===== */
.result-section {
    margin-top: 2rem;
    padding: 2rem;
/*    background:#ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;*/
}

.result-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.result-left {
    flex: 1;
    text-align: center;
}

.result-title {
    font-size: 1rem;
    font-weight: 500;
    color: #333333;
    margin-bottom: 0.8rem;
    text-align: center;
}

.pie-chart {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto 1rem;
    background: conic-gradient(
        #1b4231 0deg 0deg,
        #f59b26 0deg 360deg
    );
}

.percentage {
    position: absolute;
    font-size: 1.1rem;
    font-weight: 400;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.large-portion-percentage {
    top: 60%;
    left: 73%;
    transform: translateX(-50%);
}

.small-portion-percentage {
        bottom: 70%;
    left: 35%;
    transform: translateX(-50%);
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    flex-direction: row;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: row;
    font-size: 0.9rem;
    color: #333;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.large-portion-dot {
    background-color: #2C3E50 !important;
}

.small-portion-dot {
    background-color: #D2B48C !important;
}

.result-right {
    flex: 1;
}

.result-summary {
    margin-bottom: 0rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border: none;
    font-size: 1rem;
    font-weight: 400;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.annual-income {
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: 6px;
    font-weight: 600;
    color: #1976d2;
    border-bottom: none;
}

.result-item.total-tax {
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: 6px;
    font-weight: 600;
    color: #856404;
    border-bottom: none;
}

.result-label {
    font-weight: 400;
    color: #555555;
}

.result-value {
    font-weight: 400;
    color: #333333;
    text-align: right;
}

.result-divider {
    border-top: 1px solid #888888;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.tax-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.tax-details .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.tax-details .detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
    font-weight: 400;
}

.detail-value {
    color: #333;
    font-weight: 500;
}

/* ===== 반응형 디자인 ===== */

/* 태블릿 스타일 (768px ~ 1023px) */
@media (max-width: 1023px) {
    .hero-image-container {
        width: calc(100% - 2rem);
        max-width: 750px;
        margin: 0 auto;
    }
    
    .calculator-container  {
        width: calc(100% - 2rem);
        max-width: 750px;
        margin: 0 auto;
    }
}

/* 880px 이하 반응형 스타일 */
@media (max-width: 880px) {

    .hero-text-overlay .main-title {
        font-size: 14px;
        margin-bottom: 0.5rem;

    }
    
    .hero-text-overlay .calculator-title {
        font-size: 32px;
        margin-bottom: 0.7rem;

    }
    
    .hero-text-overlay .calculator-description {
        font-size: 13px;
    }
    
    .calculator-link-buttons {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        max-height: 160px;
        margin: 0 auto;
    }
    
    .calculator-link-buttons .calculator-link-btn {
        flex: 1;
        padding : 0.5rem 0;
    }
}

/* 776px 이하 세로 배열 */
@media (max-width: 776px) {
    .hero-image-container {
        height: 200px;
        margin: 0 auto;
    }
    .calculator-link-buttons {
        flex-direction: column;
        max-width: 160px;
    }
    
    /* 개별계산기 결과 섹션 세로배열 */
    .result-content {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        text-align: center;
    }
    
    /* 개인vs법인 비교 계산기는 776px 이하에서도 가로배열 유지 */
    .result-content.compare-calculator {
        flex-direction: row;
        gap: 1rem;
    }
    
    /* 다른 계산기들의 결과 텍스트 크기 조정 (개인vs법인 비교 계산기 제외) */
    .result-content:not(.compare-calculator) .result-item,
    .result-content:not(.compare-calculator) .result-label,
    .result-content:not(.compare-calculator) .result-value {
        font-size: 13px;
    }
    .hero-text-overlay .main-title {
        font-size: 12px;
        margin-bottom: 0.5rem;

    }
    
    .hero-text-overlay .calculator-title {
        font-size: 24px;
        margin-bottom: 0.7rem;

    }
    
    .hero-text-overlay .calculator-description {
        font-size: 10px;
    }
}

/* 모바일 전용 스타일 (0px ~ 730px) */
@media (max-width: 730px) {
    .result-content {
        align-items: center;
        text-align: center;
    }

    .result-item {
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
    }
    
    /* 개인vs법인 비교 계산기만 730px 이하에서도 가로 정렬 */
    .result-content.compare-calculator {
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .result-content.compare-calculator .result-left,
    .result-content.compare-calculator .result-right {
        flex: 1;
        min-width: 0;
    }
    
    .result-content.compare-calculator .result-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .result-content.compare-calculator .pie-chart {
        width: 80px;
        height: 80px;
        margin: 0.5rem auto;
    }
    
    .result-content.compare-calculator .chart-legend {
        margin-top: 0.5rem;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .result-content.compare-calculator .legend-item {
        font-size: 0.7rem;
    }
    
    .result-content.compare-calculator .result-label,
    .result-content.compare-calculator .result-value {
        font-size: clamp(9px, 2vw, 13px);
    }
    
    .result-section.compare-calculator-section {
        padding-left: 0;
        padding-right: 0;
    }
}

/* 530px 이하에서 개인vs법인 비교 계산기 텍스트 크기 조정 */
@media (max-width: 530px) {
    /* clamp() 함수로 반응형 처리되므로 별도 설정 불필요 */
    
    .result-item.section-header {
        flex-direction: row;
        justify-content: center;
    }
    
    .result-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .result-left {
        flex: none;
    }
    
    .result-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .pie-chart {
        width: 150px;
        height: 150px;
    }
    
    .percentage {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    
    .hero-text-overlay {
        padding-left: 15px;
    }
    
    .calculator-form {
        max-width: 300px;
    }
    .result-section {
        padding: 1rem;
    }
    
    .result-title {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .pie-chart {
        width: 120px;
        height: 120px;
    }
    
    .percentage {
        font-size: 1rem;
    }
    
    .result-item {
        font-size: 0.9rem;
    }
    
    .tax-details .detail-item {
        font-size: 0.8rem;
    }
    
    /* calculator-each-hero 모바일 스타일 */
    .calculator-each-hero {
        padding: 0;
    }
    
    .hero-image-container {
        width: calc(100% - 2rem);
        max-width: 750px;
        height: 200px;
        margin: 0 1rem;
    }
    

}
