/* ============================================
   How It Works Page - Styles
   ============================================ */

/* Overview Section */
.hiw-overview-section {
    padding: 60px 0 80px;
    border-bottom: 1px solid var(--border);
}

.hiw-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.hiw-overview-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    transition: all var(--transition);
}

.hiw-overview-card:hover {
    border-color: var(--border-light);
    transform: translateY(-3px);
}

.hiw-overview-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-glow);
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.hiw-overview-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hiw-overview-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Process Section */
.hiw-process-section {
    padding: 100px 0;
}

/* Step Block */
.hiw-step-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 32px;
    transition: border-color var(--transition);
}

.hiw-step-block:hover {
    border-color: var(--border-light);
}

.hiw-step-block:last-of-type {
    margin-bottom: 0;
}

.hiw-step-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.hiw-step-num {
    font-size: 42px;
    font-weight: 900;
    color: rgba(108, 92, 231, 0.2);
    line-height: 1;
    flex-shrink: 0;
}

.hiw-step-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hiw-step-heading h3 {
    font-size: 22px;
    font-weight: 700;
}

.hiw-step-tag {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.tag-purple {
    background: var(--accent-glow);
    color: var(--accent-light);
}

.tag-orange {
    background: var(--orange-bg);
    color: var(--orange);
}

.tag-green {
    background: var(--green-bg);
    color: var(--green);
}

.tag-blue {
    background: var(--blue-bg);
    color: var(--blue);
}

/* Step Body - two column layout */
.hiw-step-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

.hiw-step-description p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.hiw-what-it-does,
.hiw-what-you-get,
.hiw-what-it-checks {
    margin-bottom: 24px;
}

.hiw-what-it-does:last-child,
.hiw-what-you-get:last-child,
.hiw-what-it-checks:last-child {
    margin-bottom: 0;
}

.hiw-what-it-does h4,
.hiw-what-you-get h4,
.hiw-what-it-checks h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hiw-what-it-does ul,
.hiw-what-it-checks ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hiw-what-it-does li,
.hiw-what-it-checks li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 20px;
    position: relative;
}

.hiw-what-it-does li::before,
.hiw-what-it-checks li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.hiw-what-it-does li strong,
.hiw-what-it-checks li strong {
    color: var(--text-primary);
}

/* Output Preview */
.hiw-output-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hiw-output-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.hiw-output-item.hiw-output-pass {
    border-left: 3px solid var(--green);
}

.hiw-output-item.hiw-output-fail {
    border-left: 3px solid var(--red);
}

.hiw-output-item.hiw-output-warn {
    border-left: 3px solid var(--orange);
}

.hiw-output-label {
    font-weight: 700;
    color: var(--accent-light);
    white-space: nowrap;
    min-width: 80px;
}

.hiw-output-pass .hiw-output-label { color: var(--green); }
.hiw-output-fail .hiw-output-label { color: var(--red); }
.hiw-output-warn .hiw-output-label { color: var(--orange); }

.hiw-output-value {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Visual Card (right column) */
.hiw-visual-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.hiw-visual-caption {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 16px;
    font-style: italic;
}

/* Score Demo */
.hiw-score-demo {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.hiw-demo-ring {
    width: 100%;
    height: 100%;
}

.hiw-demo-score {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-light);
}

/* Keyword Demo */
.hiw-keyword-demo {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hiw-kw-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.hiw-kw-num {
    width: 28px;
    height: 28px;
    background: var(--orange-bg);
    color: var(--orange);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.hiw-kw-item div {
    display: flex;
    flex-direction: column;
}

.hiw-kw-item strong {
    font-size: 13px;
    color: var(--text-primary);
}

.hiw-kw-item span {
    font-size: 11px;
    color: var(--text-muted);
}

/* Rewrite Demo */
.hiw-rewrite-demo {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hiw-rewrite-before,
.hiw-rewrite-after {
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.6;
    border-radius: var(--radius-sm);
}

.hiw-rewrite-before {
    background: var(--red-bg);
    color: var(--text-muted);
    border-left: 3px solid var(--red);
}

.hiw-rewrite-after {
    background: var(--green-bg);
    color: var(--text-primary);
    border-left: 3px solid var(--green);
}

.hiw-rewrite-arrow {
    display: flex;
    justify-content: center;
    padding: 8px 0;
}

.hiw-rw-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 6px;
}

.hiw-rw-label.bad {
    background: var(--red);
    color: white;
}

.hiw-rw-label.good {
    background: var(--green);
    color: var(--bg-primary);
}

/* ATS Demo */
.hiw-ats-demo {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hiw-ats-item {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border-left: 3px solid;
    font-size: 13px;
}

.hiw-ats-item.pass {
    background: var(--green-bg);
    border-color: var(--green);
}

.hiw-ats-item.fail {
    background: var(--red-bg);
    border-color: var(--red);
}

.hiw-ats-item.warn {
    background: var(--orange-bg);
    border-color: var(--orange);
}

.hiw-ats-item strong {
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
}

.hiw-ats-item.pass strong { color: var(--green); }
.hiw-ats-item.fail strong { color: var(--red); }
.hiw-ats-item.warn strong { color: var(--orange); }

.hiw-ats-item span {
    color: var(--text-muted);
    font-size: 12px;
}

/* Input Requirements Section */
.hiw-input-section {
    padding: 100px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.hiw-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.hiw-input-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all var(--transition);
}

.hiw-input-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.hiw-input-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--accent-glow);
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.hiw-input-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hiw-input-card > p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.hiw-input-tips {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hiw-input-tips span {
    font-size: 12px;
    color: var(--text-muted);
    padding-left: 16px;
    position: relative;
}

.hiw-input-tips span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
}

/* FAQ Section */
.hiw-faq-section {
    padding: 100px 0;
}

.hiw-faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hiw-faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
}

.hiw-faq-item[open] {
    border-color: var(--border-light);
}

.hiw-faq-item summary {
    padding: 18px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: color var(--transition);
}

.hiw-faq-item summary::-webkit-details-marker {
    display: none;
}

.hiw-faq-item summary::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.hiw-faq-item[open] summary::after {
    content: '\2212';
}

.hiw-faq-item summary:hover {
    color: var(--accent-light);
}

.hiw-faq-answer {
    padding: 0 24px 20px;
}

.hiw-faq-answer p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* CTA Section */
.hiw-cta-section {
    padding: 0 0 100px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .hiw-step-body {
        grid-template-columns: 1fr;
    }

    .hiw-step-visual {
        max-width: 400px;
    }
}

@media (max-width: 900px) {
    .hiw-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hiw-input-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hiw-overview-grid {
        grid-template-columns: 1fr;
    }

    .hiw-step-block {
        padding: 24px 20px;
    }

    .hiw-step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .hiw-step-num {
        font-size: 32px;
    }

    .hiw-step-heading h3 {
        font-size: 18px;
    }

    .hiw-step-body {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hiw-faq-item summary {
        padding: 14px 18px;
        font-size: 14px;
    }

    .hiw-faq-answer {
        padding: 0 18px 16px;
    }
}
