/* ========================================================
   iComing 가이드 및 아티클 전용 공통 스타일시트 (guide.css)
   ======================================================== */

:root {
    --guide-primary: #1a73e8;
    --guide-primary-dark: #0d47a1;
    --guide-text-title: #0f172a;
    --guide-text-body: #334155;
    --guide-text-muted: #64748b;
    --guide-border: #e2e8f0;
    --guide-bg-box: #f8fafc;
}

/* 1. 가이드 상단 타이틀 및 메타 */
.article-category {
    display: inline-block !important;
    background: #e3eefd !important;
    color: #1a73e8 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    margin-bottom: 12px !important;
}

.page-title, h1.page-title {
    font-size: 26px !important;
    color: #0f172a !important;
    margin: 0 0 16px !important;
    line-height: 1.4 !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
}

.article-meta {
    font-size: 13.5px !important;
    color: #64748b !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 16px !important;
    margin-bottom: 24px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px 16px !important;
    align-items: center !important;
}

/* 2. 본문 타이포그래피 */
.article-container, .content-card {
    line-height: 1.8 !important;
    color: #334155 !important;
    font-size: 15.5px !important;
}

.article-container h2, .content-card h2 {
    font-size: 20px !important;
    color: #0f172a !important;
    margin: 36px 0 16px !important;
    padding-left: 12px !important;
    border-left: 4px solid #1a73e8 !important;
    font-weight: 700 !important;
    letter-spacing: -0.3px !important;
}

.article-container h3, .content-card h3 {
    font-size: 17px !important;
    color: #1e293b !important;
    margin: 24px 0 12px !important;
    font-weight: 700 !important;
}

.article-container p, .content-card p {
    margin: 0 0 18px !important;
    line-height: 1.8 !important;
    color: #334155 !important;
}

.article-container ul, .content-card ul,
.article-container ol, .content-card ol {
    margin: 0 0 20px !important;
    padding-left: 22px !important;
    line-height: 1.8 !important;
    color: #334155 !important;
}

.article-container li, .content-card li {
    margin-bottom: 8px !important;
}

/* 3. 표(Table) 스타일 (사유 1 줄바꿈 방지 및 본문 왼쪽 정렬) */
.info-table, .article-container table, .content-card table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 24px 0 !important;
    font-size: 14.5px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
}

.info-table th, .article-container table th, .content-card table th {
    background-color: #f8fafc !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding: 13px 14px !important;
    border: 1px solid #e2e8f0 !important;
    white-space: nowrap !important;
}

.info-table td, .article-container table td, .content-card table td {
    padding: 13px 16px !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    line-height: 1.65 !important;
    text-align: left !important;
    word-break: keep-all !important;
}

/* 첫 번째 구분 열(사유 1, 구분 등) 줄바꿈 절대 방지 및 중앙 정렬 */
.info-table th:first-child, .info-table td:first-child,
.article-container table th:first-child, .article-container table td:first-child,
.content-card table th:first-child, .content-card table td:first-child {
    white-space: nowrap !important;
    min-width: 75px !important;
    width: 1% !important;
    text-align: center !important;
    font-weight: 700 !important;
}

.info-table tr:nth-child(even), .article-container table tr:nth-child(even), .content-card table tr:nth-child(even) {
    background-color: #fbfcfe !important;
}

/* 4. 강조 카드 / 콜아웃 박스 / 팁 박스 */
.callout-card, .intro-box, .tip-box {
    background-color: #eff6ff !important;
    border-left: 4px solid #3b82f6 !important;
    padding: 18px 22px !important;
    border-radius: 0 10px 10px 0 !important;
    margin: 24px 0 !important;
    font-size: 15px !important;
    color: #1e40af !important;
    line-height: 1.7 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.tip-box {
    background-color: #f0fdf4 !important;
    border-left: 4px solid #22c55e !important;
    color: #15803d !important;
}

.warning-box {
    background-color: #fef2f2 !important;
    border-left: 4px solid #ef4444 !important;
    color: #b91c1c !important;
}

/* 5. FAQ 아코디언/박스 */
.faq-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 18px 22px !important;
    margin-bottom: 14px !important;
}

.faq-q {
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 8px !important;
    font-size: 15.5px !important;
}

.faq-a {
    color: #475569 !important;
    font-size: 14.5px !important;
    line-height: 1.7 !important;
}

/* 6. 모바일 반응형 최적화 */
@media (max-width: 768px) {
    .page-title, h1.page-title {
        font-size: 21px !important;
    }
    .article-container, .content-card {
        padding: 22px 16px !important;
    }
    .info-table, .article-container table, .content-card table {
        font-size: 13px !important;
    }
    .info-table th, .info-table td,
    .article-container table th, .article-container table td,
    .content-card table th, .content-card table td {
        padding: 10px 8px !important;
    }
}

/* 7. 가이드 내장 모의 계산기 위젯 공통 스타일 (프리미엄 표준화) */
.calc-widget {
    background: #ffffff !important;
    border: 1.5px solid #bfdbfe !important;
    border-radius: 12px !important;
    padding: 26px 24px !important;
    margin: 28px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.06) !important;
}

.calc-widget .calc-title, .calc-widget h3 {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #1e40af !important;
    margin: 0 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    border-left: none !important;
    padding-left: 0 !important;
    text-align: left !important;
}

.calc-widget .form-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    margin-bottom: 16px !important;
}

.calc-widget .form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.calc-widget label {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #334155 !important;
}

.calc-widget select, .calc-widget input {
    width: 100% !important;
    height: 44px !important;
    padding: 0 12px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    background: #f8fafc !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
}

.calc-widget select:focus, .calc-widget input:focus {
    border-color: #2563eb !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

/* 모든 위젯 버튼 클래스 완벽 지원 */
.calc-widget button,
.calc-widget .btn-calc,
.calc-widget .calc-btn,
.calc-widget .widget-btn {
    width: 100% !important;
    height: 46px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-top: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-family: inherit !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2) !important;
}

.calc-widget button:hover,
.calc-widget .btn-calc:hover,
.calc-widget .calc-btn:hover,
.calc-widget .widget-btn:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
}

.calc-widget .result-box, .calc-widget .widget-result {
    background: #eff6ff !important;
    border: 1.5px solid #bfdbfe !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin-top: 20px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.calc-widget .result-highlight {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #1e40af !important;
    margin: 8px 0 !important;
}

/* 다중 비교형 결과 그리드 (3열/2열) */
.calc-widget .result-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    margin: 16px 0 !important;
}

@media (max-width: 600px) {
    .calc-widget .result-grid {
        grid-template-columns: 1fr !important;
    }
}

.calc-widget .result-card {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 16px 12px !important;
    text-align: center !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.calc-widget .result-card.best {
    border-color: #86efac !important;
    background: #f0fdf4 !important;
}

.calc-widget .result-card .label {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    line-height: 1.3 !important;
}

.calc-widget .result-card .value {
    font-size: 22px !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    font-variant-numeric: tabular-nums !important;
    line-height: 1.2 !important;
}

.calc-widget .result-tip-text {
    font-size: 13px !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    margin-top: 14px !important;
    margin-bottom: 0 !important;
    padding: 10px 14px !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    text-align: center !important;
}
/* 8. 가이드 하단 계산기 유도 CTA 배너 & 가로형 바로가기 배너 (글자색 100% 순백색 보장) */
.calc-banner, a.calc-banner {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    color: #ffffff !important;
    padding: 20px 24px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    margin: 28px 0 !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.25) !important;
    transition: all 0.2s ease !important;
}

.calc-banner:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(29, 78, 216, 0.35) !important;
}

.calc-banner-text {
    flex: 1 !important;
}

.calc-banner-text h4, .calc-banner h4 {
    margin: 0 0 6px !important;
    font-size: 17.5px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
    border-left: none !important;
    padding-left: 0 !important;
}

.calc-banner-text p, .calc-banner p {
    margin: 0 !important;
    font-size: 14px !important;
    color: #ffffff !important;
    opacity: 0.95 !important;
    line-height: 1.5 !important;
}

.calc-banner-btn {
    background: #ffffff !important;
    color: #1d4ed8 !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    margin-left: 16px !important;
}

@media (max-width: 600px) {
    .calc-banner {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 14px !important;
    }
    .calc-banner-btn {
        margin-left: 0 !important;
        width: 100% !important;
        text-align: center !important;
    }
}

.cta-box, .guide-cta-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-radius: 12px !important;
    padding: 32px 28px !important;
    text-align: center !important;
    margin: 32px 0 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    color: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.3) !important;
}

.cta-box h3, .cta-box .cta-title, .guide-cta-card h3, .guide-cta-card .cta-title {
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    margin: 0 0 12px !important;
    border-left: none !important;
    padding-left: 0 !important;
    text-align: center !important;
}

.cta-box p, .cta-box .cta-desc, .guide-cta-card p, .guide-cta-card .cta-desc {
    color: #ffffff !important;
    font-size: 15px !important;
    margin: 0 0 22px !important;
    line-height: 1.6 !important;
    text-align: center !important;
    opacity: 0.95 !important;
}

.cta-box strong, .guide-cta-card strong {
    color: #ffffff !important;
}

.cta-box .cta-buttons, .guide-cta-card .cta-buttons {
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.cta-box .btn-cta, .cta-box a.btn-cta, .guide-cta-card .btn-cta, .guide-cta-card a.btn-cta {
    background: #2563eb !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 13px 24px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.cta-box .btn-cta:hover, .guide-cta-card .btn-cta:hover {
    background: #1d4ed8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4) !important;
}


/* =========================================================
   연관 도구 & 가이드 추천 컨텍스추얼 링크 박스 (공통 표준)
   ========================================================= */
.related-tools-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #2563eb !important;
    border-radius: 10px !important;
    padding: 20px 22px !important;
    margin: 32px 0 24px !important;
    box-sizing: border-box !important;
}

.related-tools-title {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.related-tools-desc {
    font-size: 14px !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    margin: 0 0 14px 0 !important;
}

.related-tools-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.related-tool-link {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #2563eb !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.related-tool-link:hover {
    background: #eff6ff !important;
    border-color: #2563eb !important;
    color: #1d4ed8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15) !important;
}
