/* ============================================================
   Free SEO Tools - shared styles
   Kuwait SEO (brand: emerald #10B981 / deep #047857 / #064e3b, gold #FBBF24)
   Direction-agnostic: works for both RTL (ar) and LTR (en)
   ============================================================ */

.tools-page { --t-primary:#10B981; --t-deep:#047857; --t-dark:#064e3b; --t-gold:#FBBF24; }

.tool-hero {
    position: relative;
    padding: 3rem 0 2.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ecfdf5 50%, #f0fdf4 100%);
    overflow: hidden;
}
.tool-hero .breadcrumbs-inline { font-size: .85rem; color: #64748B; margin-bottom: 1.25rem; }
.tool-hero .breadcrumbs-inline a { color: #047857; text-decoration: none; }
.tool-hero .breadcrumbs-inline a:hover { text-decoration: underline; }
.tool-hero .breadcrumbs-inline span { margin: 0 .35rem; color: #94A3B8; }

.tool-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .4rem 1rem;
    background: rgba(16,185,129,.1);
    color: #047857;
    border-radius: 50px;
    font-size: .78rem; font-weight: 700;
    letter-spacing: .04em; margin-bottom: 1rem;
}
.tool-hero h1 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800; line-height: 1.3; color: #0F172A;
    margin: 0 0 1rem; max-width: 780px;
}
.tool-hero h1 .grad {
    background: linear-gradient(135deg, #10B981, #047857);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tool-hero .lead { font-size: 1.1rem; color: #475569; line-height: 1.8; max-width: 680px; margin: 0; }

/* Tools grid layout */
.tool-wrap { padding: 2.5rem 0 3rem; }
.tool-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2rem; align-items: start; }
.tool-panel {
    background: #fff; border: 1px solid #E5E7EB; border-radius: 16px;
    padding: 1.75rem; box-shadow: 0 8px 28px rgba(0,0,0,.06);
}
.tool-panel h2 { font-size: 1.15rem; font-weight: 800; color: #0F172A; margin: 0 0 1.25rem; }
.tool-panel h2 .sub { display:block; font-size:.82rem; font-weight:500; color:#64748B; margin-top:.25rem; }

/* Form controls */
.tool-field { margin-bottom: 1.35rem; }
.tool-field:last-child { margin-bottom: 0; }
.tool-field label {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: .9rem; font-weight: 700; color: #1E293B; margin-bottom: .55rem;
}
.tool-field label .val { color: #047857; font-weight: 800; font-variant-numeric: tabular-nums; }
.tool-field .hint { font-size: .78rem; color: #94A3B8; font-weight: 500; }

.tool-input, .tool-select, .tool-textarea {
    width: 100%; padding: .7rem .85rem;
    border: 1.5px solid #E5E7EB; border-radius: 10px;
    font-family: inherit; font-size: .95rem; color: #1E293B;
    background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.tool-input:focus, .tool-select:focus, .tool-textarea:focus {
    outline: none; border-color: #10B981; box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}
.tool-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

/* Range slider */
input[type="range"].tool-range {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 8px; border-radius: 50px;
    background: #E5E7EB; outline: none; margin: .3rem 0;
}
input[type="range"].tool-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px; border-radius: 50%;
    background: #10B981; cursor: pointer;
    border: 3px solid #fff; box-shadow: 0 2px 6px rgba(16,185,129,.4);
    transition: transform .1s ease;
}
input[type="range"].tool-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
input[type="range"].tool-range::-moz-range-thumb {
    width: 22px; height: 22px; border-radius: 50%;
    background: #10B981; cursor: pointer;
    border: 3px solid #fff; box-shadow: 0 2px 6px rgba(16,185,129,.4);
}
.range-scale { display: flex; justify-content: space-between; font-size: .72rem; color: #94A3B8; margin-top: .15rem; }

/* Checkbox / radio rows */
.tool-check { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .7rem; cursor: pointer; }
.tool-check input { margin-top: .2rem; width: 16px; height: 16px; accent-color: #10B981; cursor: pointer; }
.tool-check span { font-size: .9rem; color: #334155; line-height: 1.4; }
.tool-check span small { display: block; color: #94A3B8; font-size: .78rem; }

/* Result / output panel */
.tool-result-panel {
    background: linear-gradient(160deg, #064e3b 0%, #047857 60%, #10B981 130%);
    color: #fff; border-radius: 16px; padding: 1.75rem;
    box-shadow: 0 14px 40px rgba(4,120,87,.35);
    position: sticky; top: 90px;
}
.tool-result-panel h2 { color: #fff; }
.tool-result-panel .muted { color: rgba(255,255,255,.75); }

.big-metric { margin: 1rem 0 1.25rem; }
.big-metric .label { font-size: .8rem; letter-spacing: .06em; color: rgba(255,255,255,.7); font-weight: 700; }
.big-metric .value {
    font-size: clamp(2.2rem, 5vw, 3.1rem); font-weight: 900; line-height: 1.05;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg,#fff, #a7f3d0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1rem; }
.metric-mini {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px; padding: .85rem 1rem;
}
.metric-mini .mlabel { font-size: .72rem; color: rgba(255,255,255,.7); letter-spacing: .04em; font-weight: 700; }
.metric-mini .mval { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: .15rem; }

/* Code / output box — always LTR (URLs, code) */
.output-box {
    position: relative; direction: ltr; text-align: left;
    background: #0F172A; color: #e2e8f0; border-radius: 12px;
    padding: 1.1rem; font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: .82rem; line-height: 1.65; white-space: pre-wrap; word-break: break-word;
    max-height: 340px; overflow: auto; border: 1px solid #1e293b;
}
.output-actions { display: flex; gap: .6rem; margin-top: .9rem; flex-wrap: wrap; }

/* Buttons */
.tbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .7rem 1.2rem; border-radius: 10px; font-weight: 700; font-size: .9rem;
    font-family: inherit; cursor: pointer; border: 0; text-decoration: none;
    transition: transform .15s ease, background .15s ease; white-space: nowrap;
}
.tbtn:hover { transform: translateY(-1px); }
.tbtn-primary { background: #10B981; color: #fff; }
.tbtn-primary:hover { background: #047857; color:#fff; }
.tbtn-accent { background: #FBBF24; color: #422006; }
.tbtn-accent:hover { background: #f59e0b; color:#422006; }
.tbtn-ghost { background: #fff; color: #047857; border: 2px solid rgba(16,185,129,.25); }
.tbtn-ghost:hover { background: rgba(16,185,129,.06); }
.tbtn-light { background: rgba(255,255,255,.14); color:#fff; border:1px solid rgba(255,255,255,.25); }
.tbtn-light:hover { background: rgba(255,255,255,.24); }

.copied-flash {
    position: absolute; top: .6rem; inset-inline-end: .6rem;
    background: #16a34a; color: #fff; font-size: .72rem; font-weight: 700;
    padding: .25rem .6rem; border-radius: 50px; opacity: 0; transform: translateY(-4px);
    transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.copied-flash.show { opacity: 1; transform: translateY(0); }

/* SERP preview — always LTR (Google renders URLs/latin LTR) */
.serp-preview {
    background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; padding: 1.1rem 1.25rem;
    font-family: arial, sans-serif; direction: ltr; text-align: left;
}
.serp-preview .serp-url { color: #202124; font-size: .82rem; display:flex; align-items:center; gap:.4rem; }
.serp-preview .serp-url .fav { width:16px;height:16px;border-radius:50%;background:#ecfdf5;display:inline-block;flex-shrink:0; }
.serp-preview .serp-url .path { color:#5f6368; }
.serp-preview .serp-title { color: #1a0dab; font-size: 1.2rem; line-height: 1.3; margin: .2rem 0 .25rem; font-weight: 400; }
.serp-preview .serp-desc { color: #4d5156; font-size: .875rem; line-height: 1.58; }

/* char counter */
.counter { font-variant-numeric: tabular-nums; font-weight: 700; }
.counter.ok { color: #16a34a; }
.counter.warn { color: #d97706; }
.counter.over { color: #dc2626; }

/* Keyword density results */
.kd-stats { display:grid; grid-template-columns: repeat(3,1fr); gap:.75rem; margin-bottom:1.25rem; }
.kd-stat { background:#F8FAFC; border:1px solid #E5E7EB; border-radius:12px; padding:.9rem 1rem; text-align:center; }
.kd-stat .n { font-size:1.6rem; font-weight:800; color:#047857; line-height:1; font-variant-numeric:tabular-nums; }
.kd-stat .l { font-size:.75rem; color:#64748B; margin-top:.3rem; letter-spacing:.03em; font-weight:600; }
.kd-tabs { display:flex; gap:.4rem; margin-bottom:1rem; flex-wrap:wrap; }
.kd-tab { padding:.45rem .9rem; border-radius:50px; border:1.5px solid #E5E7EB; background:#fff; color:#475569; font-weight:700; font-size:.82rem; cursor:pointer; }
.kd-tab.active { background:#10B981; border-color:#10B981; color:#fff; }
.kd-row { display:grid; grid-template-columns: 1fr auto; gap:.75rem; align-items:center; padding:.5rem 0; border-bottom:1px solid #F1F5F9; }
.kd-row .kw { font-weight:600; color:#1E293B; font-size:.9rem; }
.kd-row .bar-wrap { display:flex; align-items:center; gap:.6rem; }
.kd-bar { height:8px; border-radius:50px; background:linear-gradient(90deg,#10B981,#34d399); min-width:4px; }
.kd-row .cnt { font-size:.82rem; color:#64748B; font-variant-numeric:tabular-nums; min-width:74px; text-align:end; }

/* Empty state */
.tool-empty { text-align:center; color:#94A3B8; padding:2.5rem 1rem; }
.tool-empty svg { width:44px; height:44px; margin-bottom:.75rem; color:#cbd5e1; }

/* Notice / disclaimer */
.tool-note { font-size:.8rem; color:#94A3B8; margin-top:1rem; line-height:1.5; }

/* CTA band with lead form */
.tool-cta {
    background: linear-gradient(135deg,#064e3b,#047857); color: #fff; border-radius: 20px; padding: 2.5rem;
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center;
    margin: 1rem 0 0;
}
.tool-cta h2 { color:#fff; font-size: 1.6rem; font-weight: 800; margin: 0 0 .6rem; }
.tool-cta p { color: rgba(255,255,255,.85); margin: 0; line-height: 1.7; }
.tool-cta-form { display:flex; flex-direction:column; gap:.7rem; }
.tool-cta-form input {
    width:100%; padding:.8rem 1rem; border-radius:10px; border:0; font-family:inherit; font-size:.95rem;
}
.tool-cta-form .msg { font-size:.85rem; min-height:1.1rem; }
.tool-cta-form .msg.ok { color:#a7f3d0; } .tool-cta-form .msg.err { color:#fecaca; }

/* Educational content block */
.tool-article { max-width: 820px; }
.tool-article h2 { font-size:1.55rem; font-weight:800; color:#0F172A; margin:0 0 1rem; }
.tool-article p { color:#475569; line-height:1.9; font-size:1.03rem; margin:0 0 1rem; }
.tool-article a { color:#047857; font-weight:600; }

/* Related / hub cards */
.related-tools { padding: 1rem 0 3.5rem; }
.related-tools h2 { font-size:1.35rem; font-weight:800; color:#0F172A; margin:0 0 1.25rem; }
.rt-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap:1rem; }
.rt-card {
    display:block; background:#fff; border:1px solid #E5E7EB; border-radius:14px; padding:1.25rem;
    text-decoration:none; transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.rt-card:hover { transform:translateY(-3px); box-shadow:0 10px 30px rgba(0,0,0,.08); border-color:rgba(16,185,129,.35); }
.rt-ico { width:42px;height:42px;border-radius:11px;display:flex;align-items:center;justify-content:center;color:#fff;margin-bottom:.85rem; }
.rt-card h3 { font-size:1rem; font-weight:800; color:#0F172A; margin:0 0 .3rem; }
.rt-card p { font-size:.85rem; color:#64748B; margin:0; line-height:1.5; }

/* Tools hub cards */
.hub-grid { display:grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap:1.5rem; }
.hub-card {
    display:flex; flex-direction:column; background:#fff; border:1px solid #E5E7EB; border-radius:16px;
    padding:1.75rem; text-decoration:none; transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.hub-card:hover { transform:translateY(-4px); box-shadow:0 16px 40px rgba(0,0,0,.09); border-color:rgba(16,185,129,.4); }
.hub-ico { width:52px;height:52px;border-radius:13px;display:flex;align-items:center;justify-content:center;color:#fff;margin-bottom:1.15rem; }
.hub-card h3 { font-size:1.2rem; font-weight:800; color:#0F172A; margin:0 0 .5rem; }
.hub-card p { font-size:.92rem; color:#64748B; margin:0 0 1.1rem; line-height:1.7; flex-grow:1; }
.hub-card .hub-go { font-weight:700; color:#047857; font-size:.9rem; display:inline-flex; align-items:center; gap:.35rem; }
.hub-card:hover .hub-go { gap:.6rem; }

.ico-green { background:linear-gradient(135deg,#10B981,#047857); }
.ico-gold  { background:linear-gradient(135deg,#fbbf24,#d97706); }
.ico-teal  { background:linear-gradient(135deg,#2dd4bf,#0d9488); }
.ico-blue  { background:linear-gradient(135deg,#60a5fa,#2563eb); }
.ico-violet{ background:linear-gradient(135deg,#a78bfa,#7c3aed); }

/* Responsive */
@media (max-width: 900px) {
    .tool-layout { grid-template-columns: 1fr; }
    .tool-result-panel { position: static; }
    .tool-cta { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .tool-panel, .tool-result-panel { padding: 1.35rem; }
    .metric-row { grid-template-columns: 1fr; }
    .tool-cta { padding: 1.75rem; }
    .kd-stats { grid-template-columns: 1fr; }
}

/* ============================================================
   Industry / niche pages (SEO by Industry) — emerald palette, RTL-friendly
   ============================================================ */
.niche-stats { max-width: 1120px; margin: -34px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; z-index: 2; }
.niche-stat { background: #fff; border: 1px solid #E5E7EB; border-radius: 16px; padding: 24px; box-shadow: 0 8px 28px rgba(0,0,0,.06); text-align: center; }
.niche-stat .n { font-size: 2.1rem; font-weight: 900; color: #047857; line-height: 1; }
.niche-stat .l { font-size: .9rem; color: #64748B; margin-top: 8px; line-height: 1.45; }

.niche-section { max-width: 1120px; margin: 0 auto; padding: 3.25rem 20px; }
.niche-section h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 800; color: #0F172A; margin: 0 0 .75rem; }
.niche-section .section-intro { color: #475569; font-size: 1.05rem; line-height: 1.8; max-width: 720px; margin: 0 0 1.9rem; }

.niche-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.4rem; }
.niche-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 16px; padding: 1.6rem; transition: transform .15s ease, box-shadow .15s ease; }
.niche-item:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.08); }
.niche-item .ni-ico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #10B981, #047857); color: #fff; margin-bottom: .9rem; }
.niche-item .ni-ico svg { width: 22px; height: 22px; }
.niche-item h3 { font-size: 1.05rem; font-weight: 800; color: #0F172A; margin: 0 0 .45rem; }
.niche-item p { font-size: .92rem; color: #64748B; line-height: 1.7; margin: 0; }

.niche-pains { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.niche-pains li { display: flex; align-items: flex-start; gap: .65rem; color: #475569; font-size: .98rem; line-height: 1.6; }
.niche-pains li svg { width: 20px; height: 20px; color: #d97706; flex-shrink: 0; margin-top: 2px; }

.niche-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.niche-step { background: #fff; border: 1px solid #E5E7EB; border-radius: 14px; padding: 1.4rem; }
.niche-step .num { width: 38px; height: 38px; border-radius: 50%; background: #10B981; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: .75rem; }
.niche-step h3 { font-size: 1rem; font-weight: 700; color: #0F172A; margin: 0 0 .3rem; }
.niche-step p { font-size: .88rem; color: #64748B; line-height: 1.6; margin: 0; }

.niche-band { background: #F0FDF4; border-top: 1px solid #dcfce7; border-bottom: 1px solid #dcfce7; }
.niche-faq { max-width: 820px; margin: 0 auto; }
.niche-faq-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 14px; padding: 1.25rem 1.5rem; margin-bottom: .9rem; }
.niche-faq-item h3 { font-size: 1.05rem; font-weight: 700; color: #0F172A; margin: 0 0 .5rem; }
.niche-faq-item p { color: #475569; line-height: 1.8; font-size: .97rem; margin: 0; }

@media (max-width: 900px) {
    .niche-stats { grid-template-columns: 1fr; margin-top: 0; }
    .niche-steps { grid-template-columns: repeat(2, 1fr); }
    .niche-pains { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .niche-steps { grid-template-columns: 1fr; } }
