/* 계산기 페이지 전용 스타일 */
.content {
    padding: 2rem 0;
}

/* 개별 계산기 컨테이너 스타일 */
.calculator-container {
    max-width: 860px;
    margin: 0 auto;
    background: #F7F1E9;
    border-radius: 12px;
    padding: 2rem 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.calculator-filters {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.filter-section h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.calculator-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.calculator-category {
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.calculator-category:hover {
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-2px);
}

.calculator-category.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.calculators-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 0 auto 3rem auto;
    max-width: 750px;
}

.calculator-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    aspect-ratio: 1;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.calculator-image {
    width: 100%;
    height: 60%;
    overflow: hidden;
}

.calculator-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.calculator-card:hover .calculator-image img {
    transform: scale(1.05);
}

.calculator-content {
    padding: 1rem;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calculator-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.calculator-description {
    color: #666;
    line-height: 1.4;
    margin-bottom: 0;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.calculator-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.calculator-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}


/* 모달 스타일 */
.calculator-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 2rem;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

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

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

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

.calculate-btn {
    width: 100%;
    background: #6c757d; /* 비활성화 상태: 그레이 */
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: not-allowed; /* 비활성화 상태에서는 클릭 불가 */
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    opacity: 0.6; /* 비활성화 상태에서는 투명도 적용 */
}

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

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

.calculate-btn:enabled:active {
    transform: translateY(0);
}

.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;
}

.error {
    color: #dc3545;
    background: #f8d7da;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-style: italic;
}

/* 법인-개인사업자 비교 계산기 전용 스타일 */
.corp-solo-calculator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.corp-solo-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.corp-solo-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.2rem;
}

.corp-solo-header p {
    color: #6c757d;
    font-size: 1.1em;
}

.corp-solo-input-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.corp-solo-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.corp-solo-input-group {
    display: flex;
    flex-direction: column;
}

.corp-solo-input-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-size: 1rem;
}

.corp-solo-input-group input {
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.corp-solo-input-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.corp-solo-calculate-btn {
    background: #6c757d; /* 비활성화 상태: 그레이 */
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
    margin: 1rem 0;
    opacity: 0.6;
}

.corp-solo-calculate-btn:enabled {
    background: linear-gradient(135deg, #1e3a8a, #1e40af); /* 활성화 상태: 짙은 남색 그라데이션 */
    cursor: pointer;
    opacity: 1;
}

.corp-solo-calculate-btn:enabled:hover {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    transform: translateY(-2px);
}

.corp-solo-calculate-btn:enabled:active {
    transform: translateY(0);
}

.corp-solo-error-messages {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.corp-solo-results-section {
    display: none;
}

.corp-solo-results-section.show {
    display: block;
}

.corp-solo-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.corp-solo-comparison-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 25px;
    position: relative;
}

.corp-solo-comparison-card.individual {
    border-color: #28a745;
}

.corp-solo-comparison-card.corporate {
    border-color: #007bff;
}

.corp-solo-card-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.corp-solo-card-header h3 {
    margin: 0;
    font-size: 1.5em;
}

.corp-solo-comparison-card.individual .corp-solo-card-header h3 {
    color: #28a745;
}

.corp-solo-comparison-card.corporate .corp-solo-card-header h3 {
    color: #007bff;
}

.corp-solo-chart-container {
    text-align: center;
    margin-bottom: 25px;
}

.corp-solo-chart-container canvas {
    max-width: 300px;
    max-height: 300px;
}

.corp-solo-info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.corp-solo-info-card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    font-size: 1.2em;
}

.corp-solo-info-table {
    width: 100%;
    border-collapse: collapse;
}

.corp-solo-info-table th,
.corp-solo-info-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.corp-solo-info-table th {
    background: #e9ecef;
    font-weight: 600;
    color: #495057;
}

.corp-solo-info-table .sum-row {
    background: #f8f9fa;
    font-weight: 600;
}

.corp-solo-warnings {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #ffeaa7;
}

.corp-solo-warnings h5 {
    margin-top: 0;
    margin-bottom: 10px;
}

.corp-solo-warnings ul {
    margin: 0;
    padding-left: 20px;
}

.corp-solo-summary-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
    text-align: center;
}

.corp-solo-summary-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.corp-solo-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.corp-solo-summary-item {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 8px;
}

.corp-solo-summary-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.corp-solo-summary-item .amount {
    font-size: 1.5em;
    font-weight: 600;
}

/* 모바일 전용 스타일 (0px ~ 767px) */
@media (max-width: 767px) {
    .calculators-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .calculator-content {
        padding: 0.75rem;
    }
    
    .calculator-title {
        font-size: 1rem;
    }
    
    .calculator-description {
        font-size: 0.8rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .calculator-categories {
        flex-direction: column;
    }
    
    /* 법인-개인사업자 비교 계산기 모바일 스타일 */
    .corp-solo-comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .corp-solo-input-grid {
        grid-template-columns: 1fr;
    }
    
    .corp-solo-header h1 {
        font-size: 1.8rem;
    }
    
    .corp-solo-comparison-card {
        padding: 20px;
    }
    
    .corp-solo-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .calculator-description {
        font-size: 1rem;
    }
}

@media (max-width: 766px) {
    .calculator-title {
        font-size: clamp(1.2rem, 4vw, 2.3rem);
    }
    
    .calculator-description {
        font-size: clamp(0.7rem, 3vw, 1rem);
    }
    
    .calculator-content {
        padding: 0.75rem;
        text-align: center;
    }
    
    .calculator-card {
        aspect-ratio: 3/2;
        width: 90%;
        margin: 0 auto;
    }
}
