.elementor-4004 .elementor-element.elementor-element-b92ba6f{--display:flex;--flex-direction:column;--container-widget-width:100%;--container-widget-height:initial;--container-widget-flex-grow:0;--container-widget-align-self:initial;--flex-wrap-mobile:wrap;}/* Start custom CSS for html, class: .elementor-element-911330f */*{
margin:0;
padding:0;
box-sizing:border-box;
}

.hero{
padding:70px 20px;
background:
radial-gradient(circle at top right,#dff5ff 0%,transparent 30%),
radial-gradient(circle at bottom left,#ffe9f3 0%,transparent 25%),
#fff;
}

.container{
max-width:950px;
margin:auto;
}

.hero-box{
background:#fff;
border:1px solid #edf4fb;
border-radius:28px;
padding:50px;
text-align:center;
box-shadow:0 20px 50px rgba(39,162,234,.08);
}

.badge{
display:inline-block;
padding:8px 18px;
background:#eef8ff;
border-radius:30px;
color:#2d9ee8;
font-size:14px;
margin-bottom:18px;
}

.hero h1{
font-size:42px;
font-weight:800;
line-height:1.5;
color:#173a58;
margin-bottom:18px;
}

.hero h1 span{
display:block;
color:#2da5ef;
}

.hero p{
max-width:700px;
margin:0 auto 35px;
font-size:16px;
line-height:2;
color:#64809b;
}

.search-box{

display:flex;
align-items:center;
justify-content:space-between;

gap:12px;

width:100%;
max-width:720px;

margin:auto;

padding:10px;

background:#fff;

border:2px solid #dfeffc;

border-radius:60px;

box-shadow:0 8px 30px rgba(0,0,0,.04);

}

.search-box button{

flex:0 0 auto;

border:none;

background:#35a7f5;

color:#fff;

padding:14px 30px;

border-radius:40px;

font-size:15px;

font-weight:700;

cursor:pointer;

transition:.3s;

white-space:nowrap;

}

.search-box button:hover{
background:#2498e8;
}

.search-box input{

flex:1;

width:100%;

min-width:0;

border:none;

outline:none;

background:transparent;

font-size:16px;

font-family:inherit;

text-align:right;

}

.google-icon{

width:42px;

height:42px;

flex:0 0 42px;

border-radius:50%;

background:#f8fbff;

display:flex;

align-items:center;

justify-content:center;

position:relative;

}

.google-icon span{

position:absolute;

width:14px;

height:14px;

border-radius:50%;

}

.blue{
background:#4285F4;
top:7px;
left:14px;
}

.red{
background:#EA4335;
top:14px;
right:7px;
}

.yellow{
background:#FBBC05;
bottom:7px;
right:14px;
}

.green{
background:#34A853;
bottom:14px;
left:7px;
}

.tags{

display:flex;

justify-content:center;

gap:12px;

flex-wrap:wrap;

margin-top:28px;

}

.tags span{

padding:9px 16px;

background:#f7fbff;

border:1px solid #e8f3fb;

border-radius:30px;

font-size:14px;

color:#5f7892;

}

@media(max-width:768px){

.hero{
padding:40px 15px;
}

.hero-box{
padding:30px 20px;
}

.hero h1{
font-size:30px;
}

.search-box{

flex-direction:column;

border-radius:20px;

padding:15px;

}

.search-box input{

width:100%;

padding:12px;

text-align:center;

}

.search-box button{

width:100%;

}

.google-icon{

margin-bottom:5px;

}

}/* End custom CSS */
/* Start custom CSS for html, class: .elementor-element-1bd897f */.problem-section{

padding:90px 20px;

background:#f9fcff;

}

.problem-section .container{

max-width:1150px;

margin:auto;

}

.section-title{

text-align:center;

max-width:760px;

margin:auto auto 60px;

}

.section-title span{

display:inline-block;

padding:8px 18px;

background:#eaf8ff;

border-radius:30px;

color:#2aa4ee;

font-size:14px;

margin-bottom:18px;

}

.section-title h2{

font-size:38px;

color:#173a58;

margin-bottom:18px;

line-height:1.6;

}

.section-title p{

font-size:16px;

line-height:2;

color:#68829b;

}

.problem-grid{

display:grid;

grid-template-columns:repeat(3,1fr);

gap:25px;

}

.problem-card{

background:#fff;

border-radius:22px;

padding:35px 30px;

border:1px solid #eaf2fb;

transition:.3s;

text-align:center;

}

.problem-card:hover{

transform:translateY(-8px);

box-shadow:0 15px 40px rgba(0,0,0,.06);

}

.problem-card.active{

border:2px solid #35a8f5;

box-shadow:0 15px 35px rgba(53,168,245,.12);

}

.icon{

width:70px;

height:70px;

margin:auto;

border-radius:50%;

background:#eef9ff;

display:flex;

align-items:center;

justify-content:center;

font-size:28px;

margin-bottom:20px;

}

.problem-card h3{

font-size:22px;

color:#173a58;

margin-bottom:15px;

}

.problem-card p{

font-size:15px;

line-height:2;

color:#69839b;

}

@media(max-width:900px){

.problem-grid{

grid-template-columns:1fr;

}

.section-title h2{

font-size:30px;

}

}/* End custom CSS */
/* Start custom CSS for html, class: .elementor-element-2df0be1 */.how-work{

padding:90px 20px;

background:#fff;

}

.how-work .container{

max-width:1150px;

margin:auto;

}

.section-head{

text-align:center;

max-width:700px;

margin:auto auto 70px;

}

.section-head span{

display:inline-block;

padding:8px 18px;

background:#eef9ff;

color:#30a6ef;

border-radius:30px;

font-size:14px;

margin-bottom:18px;

}

.section-head h2{

font-size:38px;

color:#173a58;

margin-bottom:18px;

line-height:1.6;

}

.section-head p{

color:#68839c;

font-size:16px;

line-height:2;

}

.steps{

display:grid;

grid-template-columns:repeat(3,1fr);

gap:30px;

position:relative;

}

.steps::before{

content:"";

position:absolute;

top:38px;

right:15%;

left:15%;

height:2px;

background:#d9eefc;

z-index:0;

}

.step{

position:relative;

background:#fff;

border:1px solid #ebf3fb;

border-radius:22px;

padding:35px;

text-align:center;

z-index:1;

transition:.3s;

}

.step:hover{

transform:translateY(-8px);

box-shadow:0 20px 40px rgba(44,167,243,.08);

}

.number{

width:75px;

height:75px;

margin:auto auto 25px;

background:linear-gradient(135deg,#35a8f5,#84d7ff);

border-radius:50%;

display:flex;

align-items:center;

justify-content:center;

font-size:24px;

font-weight:700;

color:#fff;

}

.step h3{

font-size:22px;

color:#173a58;

margin-bottom:15px;

}

.step p{

font-size:15px;

line-height:2;

color:#6a849d;

}

@media(max-width:900px){

.steps{

grid-template-columns:1fr;

}

.steps::before{

display:none;

}

.section-head h2{

font-size:30px;

}

}/* End custom CSS */
/* Start custom CSS for html, class: .elementor-element-85c235d */@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700;800&display=swap');

  :root {
    color-scheme: light;
    font-family: "Vazirmatn", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    font-weight: 400;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    --bg: #f4f9ff;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --border: #dce7f5;
    --text: #10233f;
    --muted: #5f748f;
    --accent: #4d8fe7;
    --accent-strong: #2d6fca;
    --accent-soft: #eaf4ff;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    min-width: 320px;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
  }

  button, input, textarea { font: inherit; }

  .app-shell {
    min-height: 100vh;
    padding: 24px 16px;
    background: linear-gradient(135deg, #f4f9ff 0%, #f8fbff 45%, #f0f7ff 100%);
  }

  .app-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
  }

  .tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 16px 44px rgba(16, 35, 63, 0.07);
    padding: 26px;
  }

  .tool-head {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 18px;
  }

  .eyebrow {
    margin: 0 0 8px 0;
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.24em;
  }

  .tool-head h1 { margin: 0 0 8px 0; font-size: 1.55rem; line-height: 1.5; }
  .sub { margin: 0; color: var(--muted); line-height: 1.9; }

  .form-panel { display: flex; flex-direction: column; gap: 14px; }
  .field-group { display: flex; flex-direction: column; gap: 7px; }
  .field-group label { font-size: 0.95rem; font-weight: 700; }

  .input, .textarea, .file-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--text);
    background: #fff;
    transition: border-color 180ms ease, box-shadow 180ms ease;
  }

  .input:focus, .textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(77, 143, 231, 0.16);
  }

  .textarea { min-height: 120px; resize: vertical; }
  .file-meta { font-size: 0.85rem; color: var(--muted); }

  .primary-btn {
    border: 0;
    border-radius: 999px;
    padding: 13px 16px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  .primary-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(45, 111, 202, 0.2); }
  .primary-btn:disabled { opacity: 0.7; cursor: wait; transform: none; box-shadow: none; }

  .status-line { margin: 2px 0 0 0; font-size: 0.9rem; color: var(--muted); text-align: center; }

  .analysis-card {
    background: #0b1220;
    border: 1px solid #1c2740;
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 22px 60px rgba(8, 15, 30, 0.28);
    text-align: right;
  }

  .analysis-title { margin: 0 0 22px 0; color: #fff; font-size: 1.9rem; font-weight: 800; }

  .analysis-block {
    background: #131c30;
    border: 1px solid #22304d;
    border-radius: 18px;
    padding: 20px 22px;
    margin-bottom: 18px;
  }

  .analysis-block:last-child { margin-bottom: 0; }
  .block-label { margin: 0 0 10px 0; color: #9aa6f0; font-size: 1.1rem; font-weight: 800; }
  .block-text { margin: 0; color: #d7deec; line-height: 2; font-size: 1.02rem; }

  .dotted-list {
    margin: 0; padding-right: 22px; color: #d7deec;
    display: flex; flex-direction: column; gap: 12px; font-size: 1.02rem;
    list-style: disc;
  }
  .dotted-list li { line-height: 1.9; }
  .dotted-list li::marker { color: #7d8cf0; }

  .missing-title { display: block; color: #fff; font-weight: 700; }
  .missing-url { display: block; color: #8ea1c4; font-size: 0.85rem; margin-top: 3px; word-break: break-all; }

  .pill-row { display: flex; flex-wrap: wrap; gap: 8px; }

  .pill {
    display: inline-flex; align-items: center;
    padding: 10px 18px; border-radius: 999px;
    background: #1b2439; color: #c7d2ea;
    font-weight: 700; font-size: 0.9rem; line-height: 1; white-space: nowrap;
  }

  .diff-0 { background: rgba(52,199,130,0.16); color: #7ee6b0; }
  .diff-1 { background: rgba(240,190,90,0.16); color: #f2cf85; }
  .diff-2 { background: rgba(240,110,110,0.16); color: #f3a0a0; }

  .st-0 { background: rgba(240,190,90,0.2); color: #ffd479; }
  .st-1 { background: rgba(240,110,110,0.18); color: #f3a0a0; }
  .st-2 { background: rgba(52,199,130,0.16); color: #7ee6b0; }
  .st-3 { background: rgba(125,140,240,0.18); color: #b7c1f6; }

  .on-yes { background: rgba(52,199,130,0.14); color: #7ee6b0; }
  .on-no  { background: rgba(150,165,190,0.14); color: #a6b4cc; }

  .kw-list { display: flex; flex-direction: column; }

  .kw-card {
    border-bottom: 1px solid #22304d;
    padding: 18px 4px;
  }
  .kw-card:first-child { padding-top: 4px; }
  .kw-card:last-child { border-bottom: 0; padding-bottom: 4px; }

  .kw-head {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 10px; margin-bottom: 12px;
  }
  .kw-name { color: #fff; font-weight: 800; font-size: 1.08rem; }
  .kw-meta { margin-bottom: 12px; }
  .kw-titles { margin-top: 4px; }
  .kw-titles li { color: #d7deec; }

  .loader { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle; margin-left: 8px; }
  @keyframes spin { to { transform: rotate(360deg); } }

  @media (max-width: 640px) {
    .app-shell { padding: 14px; }
    .tool-card, .analysis-card { padding: 20px; border-radius: 20px; }
    .tool-head h1 { font-size: 1.3rem; }
    .analysis-title { font-size: 1.5rem; }
  }
<script>(function(){

const form = document.getElementById("mainForm");
const btn = document.getElementById("submitBtn");
const status = document.getElementById("statusLine");
const results = document.getElementById("results");

form.addEventListener("submit", async function(e){

    e.preventDefault();

    const topic = document.getElementById("topic").value;
    const keyword = document.getElementById("competitors").value;

    btn.disabled = true;
    btn.innerHTML = "در حال تحلیل...";
    status.innerHTML = "در حال ارسال اطلاعات به موتور تحلیل...";

    try {

        const response = await fetch(
            "/wp-json/seo-tool/v1/analyze",
            {
                method:"POST",
                headers:{
                    "Content-Type":"application/json"
                },
                body:JSON.stringify({
                    topic:topic,
                    keyword:keyword,
                    competitors:[]
                })
            }
        );


        const data = await response.json();


        if(data.error){

            results.innerHTML = `
            <section class="analysis-card">
                <h2 class="analysis-title">
                خطا
                </h2>
                <p class="block-text">
                ${data.error}
                </p>
            </section>
            `;

            return;
        }


        let html = `
        <section class="analysis-card">

        <h2 class="analysis-title">
        نتایج تحلیل
        </h2>


        <div class="analysis-block">

        <p class="block-label">
        عنوان‌های پیشنهادی:
        </p>

        <ul class="dotted-list">
        `;


        if(data.titles && data.titles.length){

            data.titles.forEach(function(title){

                html += `
                <li>${title}</li>
                `;

            });

        }else{

            html += `
            <li>
            عنوانی تولید نشد
            </li>
            `;

        }


        html += `
        </ul>
        </div>
        `;



        if(data.serp && data.serp.length){

            html += `
            <div class="analysis-block">

            <p class="block-label">
            نتایج گوگل:
            </p>

            <ul class="dotted-list">
            `;


            data.serp.forEach(function(item){

                html += `
                <li>
                <span class="missing-title">
                ${item.title}
                </span>

                <span class="missing-url">
                ${item.url}
                </span>
                </li>
                `;

            });


            html += `
            </ul>
            </div>
            `;

        }


        html += `
        </section>
        `;


        results.innerHTML = html;

        status.innerHTML = "تحلیل با موفقیت انجام شد.";


    } catch(error){

        results.innerHTML = `
        <section class="analysis-card">
        <h2 class="analysis-title">
        خطا در اتصال
        </h2>

        <p class="block-text">
        اتصال به PHP برقرار نشد.
        </p>

        </section>
        `;

        console.log(error);

    }


    finally{

        btn.disabled=false;
        btn.innerHTML="تحلیل و پیشنهاد عنوان مقاله";

    }


});


})();
</script>/* End custom CSS */
/* Start custom CSS for html, class: .elementor-element-4280320 */.tool-preview{

padding:90px 20px;

background:#f9fcff;

}

.tool-preview .container{

max-width:1150px;

margin:auto;

}

.section-title{

text-align:center;

max-width:720px;

margin:0 auto 60px;

}

.section-title span{

display:inline-block;

padding:8px 18px;

background:#eef8ff;

border-radius:30px;

color:#30a5ef;

font-size:14px;

margin-bottom:18px;

}

.section-title h2{

font-size:38px;

color:#173a58;

margin-bottom:18px;

}

.section-title p{

font-size:16px;

line-height:2;

color:#6b839a;

}

.preview-grid{

display:grid;

grid-template-columns:repeat(2,1fr);

gap:25px;

}

.preview-card{

background:#fff;

border-radius:22px;

padding:30px;

border:1px solid #e8f2fb;

transition:.3s;

}

.preview-card:hover{

transform:translateY(-6px);

box-shadow:0 15px 35px rgba(38,163,239,.08);

}

.card-head{

display:flex;

align-items:center;

gap:12px;

margin-bottom:20px;

}

.status{

width:14px;

height:14px;

border-radius:50%;

display:block;

}

.green{

background:#4fd58b;

}

.blue{

background:#36a8f4;

}

.pink{

background:#ff9bc8;

}

.yellow{

background:#ffc857;

}

.preview-card h3{

font-size:24px;

color:#173a58;

margin-bottom:15px;

}

.preview-card p{

font-size:15px;

line-height:2;

color:#69839b;

}

.preview-card ul{

margin:0;

padding-right:18px;

line-height:2.3;

color:#4f6881;

}

.priority{

margin-bottom:18px;

}

.priority span{

display:inline-block;

padding:10px 22px;

background:#e7f8ef;

color:#2ea76c;

border-radius:30px;

font-weight:700;

}

@media(max-width:900px){

.preview-grid{

grid-template-columns:1fr;

}

.section-title h2{

font-size:30px;

}

}/* End custom CSS */