﻿/* CTR 계산기 전용 CSS */

.ctr-result-summary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #a78bfa 100%);
    border-radius: 14px;
    padding: 30px;
    color: #fff;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35);
}

.summary-main {
    text-align: center;
    margin-bottom: 20px;
}

.summary-main .summary-label {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.summary-main .summary-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.summary-main .summary-unit {
    font-size: 1.2rem;
    opacity: 0.9;
}

.summary-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 20px 0;
}

.summary-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.summary-item {
    flex: 1;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.summary-item .summary-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.summary-item .summary-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.summary-item .summary-unit {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 결과 해석 섹션 */
.interpretation-section {
    margin-top: 25px;
    padding: 25px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 14px;
}

.interpretation-section h4 {
    margin-bottom: 20px;
    color: var(--dark-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.interpretation-content {
    margin-bottom: 20px;
}

.interpretation-item {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.interpretation-item.excellent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.interpretation-item.good {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

.interpretation-item.fair {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

.interpretation-item.poor {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.interpretation-item h5 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.interpretation-item p {
    margin: 0;
    line-height: 1.6;
}

.disclaimer {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #6c757d;
    border-left: 4px solid #dee2e6;
}

/* 반응형 */
@media (max-width: 768px) {
    .summary-row {
        flex-direction: column;
    }

    .summary-item {
        margin-bottom: 10px;
    }
}

/* CTR 활용 팁 스타일 */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tip-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.tip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.tip-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.tip-card h4 {
    color: #1a1a1a;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.tip-card p {
    color: #666;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* ============= 분석 결과 UI (재설계: 1줄요약 + 3카드 + 접이식) ============= */

/* 모바일 대응: 그리드 반응형 */
@media (max-width: 768px) {
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tip-card {
        padding: 20px;
    }

    .tip-icon {
        font-size: 2rem;
    }

    .tip-card h4 {
        font-size: 1.1rem;
    }

    /* 카드 3분할 → 세로 스택 */
    [style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* 접이식(Accordion) 스타일 */
.accordion-btn {
    border-radius: 12px !important;
    padding: 14px 16px !important;
    background: #f5f5f5 !important;
    border: none !important;
    text-align: left !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: all 0.3s !important;
    width: 100% !important;
}

.accordion-btn:hover {
    background: #efefef !important;
}

.accordion-btn.active {
    background: #667eea !important;
    color: white !important;
}

.accordion-btn.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
    display: inline-block;
}

.accordion-content {
    display: none;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    margin-top: 8px;
    border: 1px solid #e8e8e8;
    animation: slideDown 0.3s ease-out;
}

.accordion-content.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 카드 공통 스타일 */
[id^="card"] {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 불릿 리스트 스타일 */
#cardReasons li::before {
    content: "• ";
    color: #f39c12;
    font-weight: bold;
    margin-right: 8px;
}

/* 체크박스 리스트 스타일 */
#cardActions li::before {
    content: "✓ ";
    color: #27ae60;
    font-weight: bold;
    margin-right: 8px;
    font-size: 1.1rem;
}

/* 링크 버튼 스타일 */
.metric-link-btn {
    display: inline-block;
    padding: 10px 12px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.metric-link-btn:hover {
    background: #7c3aed;
    transform: translateY(-2px);
}

.metric-link-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ======== SEO 콘텐츠 가로폭 정렬 (결과 영역과 100% 동일) ======== */
/* 
   목표: SEO 콘텐츠 섹션의 좌우 끝선을 결과값 카드와 정확히 일치시킨다.
   - calculator-container와 동일한 max-width, margin, padding 적용
*/

.seo-content {
    /* calculator-container와 동일한 규칙 적용 */
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 반응형: 데스크톱 (1200px 이상) */
@media (min-width: 1201px) {
    .seo-content {
        /* calculator-container 내부이므로 부모의 max-width 상속 받음 */
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
}

/* 반응형: 태블릿 (769px ~ 1200px) */
@media (min-width: 769px) and (max-width: 1200px) {
    .seo-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
}

/* 반응형: 모바일 (768px 이하) */
@media (max-width: 768px) {
    .seo-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
}

/* ======== SEO 콘텐츠 내부 요소 스타일 강제 ======== */
.seo-content h2 {
    margin-top: 30px;
    margin-bottom: 24px;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content h3 {
    margin-top: 25px;
    margin-bottom: 16px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.4;
}

.seo-content h4 {
    margin-top: 18px;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.seo-content p {
    margin: 12px 0 16px 0;
    font-size: 0.95rem;
    line-height: 1.75;
    color: #4a5568;
}

.seo-content ul,
.seo-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.seo-content ul {
    list-style: disc;
}

.seo-content ol {
    list-style: decimal;
}

.seo-content li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.7;
}

.seo-content strong {
    font-weight: 600;
    color: #1a1a1a;
}

.seo-content .content-section {
    margin-bottom: 32px;
}

.seo-content .formula-box,
.seo-content .success-box,
.seo-content .faq-item {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.seo-content .faq-item {
    border-left-color: #f39c12;
}

.seo-content .faq-item h4 {
    margin-top: 0;
    color: #667eea;
}

/* 반응형: 모바일에서 여백 축소 */
@media (max-width: 768px) {
    .seo-content h2 {
        font-size: 1.5rem;
        margin-top: 25px;
        margin-bottom: 20px;
    }

    .seo-content h3 {
        font-size: 1.15rem;
        margin-top: 20px;
        margin-bottom: 14px;
    }

    .seo-content h4 {
        font-size: 1rem;
        margin-top: 15px;
        margin-bottom: 10px;
    }

    .seo-content p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .seo-content .content-section {
        margin-bottom: 24px;
    }

    .seo-content .formula-box,
    .seo-content .success-box,
    .seo-content .faq-item {
        padding: 16px;
        margin: 16px 0;
    }
}

/* ======== SEO 카드형 재설계 스타일 ======== */

/* 카드 컨테이너 */
.seo-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.seo-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* 헤더 카드 (특별 스타일) */
.seo-header-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    text-align: center;
    padding: 32px 24px;
    margin-bottom: 24px;
}

.seo-header-card h2 {
    margin: 0 0 8px 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    color: white;
}

.seo-subtitle {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 400;
    color: white;
}

/* 경고 카드 */
.seo-warning-card {
    background: #fff9f0;
    border-left: 4px solid #f39c12;
}

/* 카드 내 제목 */
.seo-card h3 {
    margin: 0 0 16px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

.seo-card h4 {
    margin: 14px 0 10px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
}

/* 본문 텍스트 */
.seo-card p {
    margin: 12px 0 14px 0;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #4a5568;
}

.seo-highlight {
    background: #f0f4ff;
    border-left: 3px solid #667eea;
    padding: 12px 14px;
    margin: 16px 0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.seo-tip {
    background: #f5f5f5;
    border-left: 3px solid #8b5cf6;
    padding: 12px 14px;
    margin: 16px 0;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* ===== 리스트 스타일 ===== */

/* 간단한 불릿 리스트 */
.simple-list {
    list-style: none;
    padding-left: 0;
    margin: 12px 0;
}

.simple-list li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.simple-list li:before {
    content: "▪";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* 원인 리스트 (제목 + 설명) */
.reason-list {
    list-style: none;
    padding-left: 0;
    margin: 14px 0;
}

.reason-list li {
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.reason-list li strong {
    display: block;
    color: #1a1a1a;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.reason-desc {
    font-size: 0.85rem;
    color: #666;
    display: block;
    font-weight: normal;
}

/* 체크리스트 */
.checklist {
    list-style: none;
    padding-left: 0;
    margin: 14px 0;
}

.checklist li {
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.7;
}

.checklist li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 1rem;
}

/* 문제점 리스트 */
.problem-list {
    list-style: none;
    padding-left: 0;
    margin: 14px 0;
}

.problem-list li {
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.problem-list li:before {
    content: "◆";
    position: absolute;
    left: 0;
    color: #e74c3c;
    font-weight: bold;
}

/* ===== 계산식 박스 ===== */
.formula-box {
    background: #f8f9ff;
    border: 1px solid #dde4f0;
    padding: 14px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: #333;
    text-align: center;
    overflow-x: auto;
}

.formula-box code {
    color: #667eea;
    font-weight: 600;
    word-break: break-word;
}

/* ===== 벤치마크 아코디언 ===== */
.benchmark-container {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.benchmark-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.benchmark-toggle {
    width: 100%;
    padding: 14px 16px;
    background: #f9f9f9;
    border: none;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.benchmark-toggle:hover {
    background: #f0f0f0;
}

.benchmark-toggle.active {
    background: #667eea;
    color: white;
}

.toggle-icon {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.benchmark-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.benchmark-content {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    animation: slideDown 0.3s ease-out;
}

.benchmark-stat {
    font-size: 1.1rem;
    color: #667eea;
    margin-bottom: 8px;
    font-weight: 600;
}

.benchmark-stat strong {
    font-size: 1.3rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FAQ 아코디언 ===== */
.faq-accordion {
    margin-top: 12px;
}

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-toggle {
    width: 100%;
    padding: 14px 16px;
    background: #f9f9f9;
    border: none;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-toggle:hover {
    background: #f0f0f0;
}

.faq-toggle.active {
    background: #667eea;
    color: white;
}

.faq-question {
    flex: 1;
    text-align: left;
}

.faq-icon {
    font-weight: bold;
    margin-left: 12px;
    transition: transform 0.3s ease;
    display: inline-block;
    min-width: 20px;
    text-align: center;
}

.faq-toggle.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.show {
    max-height: 600px;
    padding: 16px;
    animation: slideDown 0.3s ease-out;
}

.faq-answer p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #555;
}

/* ===== 반응형 (모바일) ===== */
@media (max-width: 768px) {
    .seo-card {
        padding: 18px;
        margin-bottom: 14px;
        border-radius: 12px;
    }

    .seo-header-card {
        padding: 24px 18px;
        margin-bottom: 18px;
    }

    .seo-header-card h2 {
        font-size: 1.6rem;
    }

    .seo-subtitle {
        font-size: 1rem;
    }

    .seo-card h3 {
        font-size: 1.1rem;
        margin-bottom: 14px;
    }

    .seo-card p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .reason-list li,
    .checklist li,
    .problem-list li {
        font-size: 0.85rem;
    }

    .benchmark-toggle,
    .faq-toggle {
        font-size: 0.85rem;
        padding: 12px 14px;
    }

    .benchmark-content,
    .faq-answer {
        padding: 14px;
    }

    .formula-box {
        font-size: 0.85rem;
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    .seo-card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .seo-header-card {
        padding: 20px 16px;
    }

    .seo-header-card h2 {
        font-size: 1.4rem;
    }

    .seo-card h3 {
        font-size: 1rem;
    }

    .seo-card p {
        font-size: 0.85rem;
        line-height: 1.65;
    }

    .benchmark-toggle,
    .faq-toggle {
        font-size: 0.8rem;
        padding: 11px 12px;
    }
}

