/* ==========================================
   DocCraftr — SEO Section  (seo.css)
   Premium · Modern · On-brand
   ========================================== */

/* ── Wrapper ── */
.seo-section {
    margin-top: 5rem;
    padding: 0 0 4rem;
    position: relative;
}

/* Top divider rule with fade */
.seo-section::before {
    content: '';
    display: block;
    height: 1px;
    margin-bottom: 4rem;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--border2) 25%,
            var(--border2) 75%,
            transparent 100%);
}

/* ── Section intro ── */
.seo-section>h2:first-of-type {
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

/* Accent underline on first H2 */
.seo-section>h2:first-of-type::after {
    content: '';
    display: block;
    height: 3px;
    width: 2.5rem;
    background: var(--accent);
    border-radius: 100px;
    margin-top: 0.45rem;
}

.seo-section>p:first-of-type {
    font-size: 1rem;
    color: var(--text2);
    max-width: 640px;
    line-height: 1.75;
    margin-bottom: 3rem;
}

/* ── Shared H2 for subsequent headings ── */
.seo-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--text);
    margin: 3.5rem 0 1.25rem;
}

/* ── "How to" ordered list — step cards ── */
.seo-section ol {
    list-style: none;
    counter-reset: seo-steps;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.seo-section ol li {
    counter-increment: seo-steps;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.25rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text2);
    line-height: 1.55;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.seo-section ol li::before {
    content: counter(seo-steps);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    display: flex;
}

.seo-section ol li:hover {
    border-color: var(--accent-border);
    box-shadow: 0 4px 18px rgba(232, 69, 10, 0.08);
    transform: translateY(-2px);
}

/* ── "Why Use" unordered list — pill grid ── */
.seo-section ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.seo-section ul li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    color: var(--text2);
    font-weight: 500;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.seo-section ul li::before {
    content: '✓';
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--accent);
    background: var(--accent-bg);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.seo-section ul li:hover {
    border-color: var(--accent-border);
    color: var(--text);
    background: var(--accent-bg);
}

/* ── FAQ ── */
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

/* Left accent bar */
.faq-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 3px 0 0 3px;
    opacity: 0;
    transition: opacity 0.2s;
}

.faq-item:hover {
    border-color: var(--accent-border);
    box-shadow: 0 4px 20px rgba(232, 69, 10, 0.07);
}

.faq-item:hover::before {
    opacity: 1;
}

.faq-item h3 {
    font-family: var(--font-display);
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.faq-item h3::before {
    content: 'Q';
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent);
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    padding: 0.15rem 0.42rem;
    border-radius: 5px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.faq-item p {
    font-size: 0.875rem;
    color: var(--text2);
    line-height: 1.7;
    padding-left: 1.85rem;
    /* align under question text */
}

/* ── Related Tools ── */
.related-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.related-tools a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    transition: all 0.18s;
    letter-spacing: -0.01em;
}

.related-tools a::before {
    content: '↗';
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.7;
    transition: opacity 0.18s, transform 0.18s;
}

.related-tools a:hover {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(232, 69, 10, 0.1);
}

.related-tools a:hover::before {
    opacity: 1;
    transform: translate(1px, -1px);
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .seo-section ol {
        grid-template-columns: 1fr 1fr;
    }

    .faq-item {
        padding: 1.25rem 1.25rem 1.25rem 1.5rem;
    }

    .faq-item p {
        padding-left: 0;
    }
}

@media (max-width: 400px) {
    .seo-section ol {
        grid-template-columns: 1fr;
    }
}