/* ============================================
   공통 계산기 스타일 (심플 버전)
   - 모든 계산기에서 사용
   - 깔끔하고 간결한 디자인
   - 모바일 최적화
   ============================================ */

/* 계산기 컨테이너 */
.tool-calc {
    max-width: 600px;
    margin: 0 auto 40px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 입력 섹션 */
.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-field label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.input-field input {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
    background: #ffffff;
}

.input-field input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-field input::placeholder {
    color: #9ca3af;
}

/* 결과 섹션 */
.calc-results {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

.result-main {
    text-align: center;
    margin-bottom: 16px;
}

.result-main .value {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1;
    margin-bottom: 8px;
}

.result-main .label {
    display: block;
    font-size: 14px;
    color: #6b7280;
}

.result-status {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    padding: 12px;
    background: #ffffff;
    border-radius: 6px;
}

/* 결과 그리드 (여러 결과 표시) */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.result-item {
    text-align: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.result-item .label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.result-item .value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
}

/* 색상 변형 */
.result-item .value.primary { color: #3b82f6; }
.result-item .value.success { color: #10b981; }
.result-item .value.warning { color: #f59e0b; }
.result-item .value.danger { color: #ef4444; }

/* 빠른 참조 */
.quick-reference {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.ref-item {
    font-size: 13px;
    color: #6b7280;
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 6px;
    white-space: nowrap;
}

/* 콘텐츠 섹션 */
.content-section {
    max-width: 800px;
    margin: 0 auto 32px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.content-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.content-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    margin-top: 24px;
}

.content-section h3:first-child {
    margin-top: 0;
}

.content-section p {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 12px;
}

.content-section ul,
.content-section ol {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.7;
    padding-left: 24px;
    margin-bottom: 12px;
}

.content-section li {
    margin-bottom: 8px;
}

.content-section strong {
    color: #1f2937;
    font-weight: 600;
}

/* 테이블 */
.content-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 15px;
}

.content-section table td,
.content-section table th {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.content-section table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 15px;
}

/* FAQ 섹션 */
.faq-section {
    max-width: 800px;
    margin: 0 auto 32px;
}

.faq-section h2,
.faq-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 12px;
}

.faq-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.faq-item p {
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}

/* 관련 도구 (심플) */
.related-tools-simple {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.related-tools-simple p {
    color: #6b7280;
    margin: 0;
}

.related-tools-simple a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.related-tools-simple a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* 모바일 최적화 */
@media (max-width: 640px) {
    .tool-calc {
        padding: 24px 20px;
        border-radius: 8px;
    }

    .result-main .value {
        font-size: 36px;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .quick-reference {
        flex-direction: column;
        align-items: stretch;
    }

    .ref-item {
        text-align: center;
    }

    .content-section {
        padding: 20px 16px;
        border-radius: 8px;
    }

    .content-section h2 {
        font-size: 20px;
    }

    .content-section h3 {
        font-size: 18px;
    }

    .content-section p {
        font-size: 15px;
    }

    .faq-item {
        padding: 16px;
    }
}

/* 다크모드 지원 (선택사항) */
@media (prefers-color-scheme: dark) {
    .tool-calc {
        background: #1f2937;
        border-color: #374151;
    }

    .input-field label {
        color: #d1d5db;
    }

    .input-field input {
        background: #111827;
        border-color: #374151;
        color: #f9fafb;
    }

    .input-field input:focus {
        border-color: #3b82f6;
    }

    .calc-results {
        background: #111827;
        border-color: #374151;
    }

    .result-main .label,
    .result-item .label {
        color: #9ca3af;
    }

    .result-status {
        background: #1f2937;
        color: #d1d5db;
    }

    .result-item {
        background: #1f2937;
        border-color: #374151;
    }

    .result-item .value {
        color: #e5e7eb;
    }

    .ref-item {
        background: #374151;
        color: #9ca3af;
    }

    .content-section {
        background: #1f2937;
        border-color: #374151;
    }

    .content-section h2,
    .content-section h3,
    .content-section strong {
        color: #f9fafb;
    }

    .content-section p,
    .content-section li {
        color: #d1d5db;
    }

    .faq-section h2,
    .faq-section h3 {
        color: #f9fafb;
    }

    .faq-item {
        background: #1f2937;
        border-color: #374151;
    }

    .faq-item h4 {
        color: #f9fafb;
    }

    .faq-item p {
        color: #d1d5db;
    }

    .related-tools-simple {
        background: #1f2937;
        border-color: #374151;
    }

    .related-tools-simple p {
        color: #9ca3af;
    }
}

/* ============================================
   광고 스타일 (도구 페이지 전용)
   ============================================ */

/* 광고 컨테이너 공통 */
.ad-container {
    margin: 40px auto;
    padding: 20px 0;
    text-align: center;
    max-width: 100%;
}

/* 광고 라벨 */
.ad-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 1px;
    font-weight: 500;
}

/* 위치 1: 도구 직후 */
.ad-after-tool {
    margin-top: 40px;
    margin-bottom: 48px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
}

/* 위치 2: 콘텐츠 하단 */
.ad-after-content {
    margin-top: 48px;
    margin-bottom: 32px;
    padding: 24px 16px;
    background: #f9fafb;
    border-radius: 12px;
}

/* Placeholder 스타일 (개발 환경) */
.ad-placeholder {
    background: #f3f4f6;
    padding: 60px 20px;
    text-align: center;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    opacity: 0.7;
}

.ad-placeholder p {
    margin: 8px 0;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .ad-container {
        margin: 24px auto;
        padding: 16px 0;
    }

    .ad-after-tool {
        margin-top: 24px;
        margin-bottom: 32px;
        padding-top: 24px;
    }

    .ad-after-content {
        margin-top: 32px;
        margin-bottom: 24px;
        padding: 20px 12px;
    }

    .ad-placeholder {
        padding: 40px 16px;
    }
}

/* 다크모드 */
@media (prefers-color-scheme: dark) {
    .ad-after-content {
        background: #1f2937;
    }

    .ad-label {
        color: #6b7280;
    }

    .ad-after-tool {
        border-top-color: #374151;
    }

    .ad-placeholder {
        background: #1f2937;
        border-color: #374151;
    }
}

/* ============================================
   FAQ 스키마 스타일 (SEO 최적화)
   ============================================ */

.faq-schema {
    max-width: 800px;
    margin: 48px auto 0;
    padding: 0 20px;
}

.faq-schema [itemtype="https://schema.org/Question"] {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.faq-schema [itemtype="https://schema.org/Question"]:last-child {
    border-bottom: none;
}

.faq-schema h3[itemprop="name"] {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.5;
}

.faq-schema [itemprop="text"] p {
    font-size: 17px;
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .faq-schema {
        margin: 32px auto 0;
        padding: 0 16px;
    }

    .faq-schema [itemtype="https://schema.org/Question"] {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }

    .faq-schema h3[itemprop="name"] {
        font-size: 18px;
    }

    .faq-schema [itemprop="text"] p {
        font-size: 16px;
    }
}

/* 다크모드 */
@media (prefers-color-scheme: dark) {
    .faq-schema [itemtype="https://schema.org/Question"] {
        border-bottom-color: #374151;
    }

    .faq-schema h3[itemprop="name"] {
        color: #f9fafb;
    }

    .faq-schema [itemprop="text"] p {
        color: #d1d5db;
    }
}
