/* ============================================================
   pdf2jpg.in — style.css
   Colorful, responsive theme (violet → pink → amber)
   ============================================================ */

:root {
  --violet: #7c3aed;
  --violet-dark: #5b21b6;
  --pink: #ec4899;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --grad: linear-gradient(135deg, #7c3aed 0%, #ec4899 55%, #f59e0b 100%);
  --grad-soft: linear-gradient(135deg, rgba(124,58,237,.10), rgba(236,72,153,.10), rgba(245,158,11,.12));
  --ink: #1e1b29;
  --ink-soft: #55516b;
  --muted: #8a86a3;
  --bg: #ffffff;
  --bg-soft: #f7f5fd;
  --card: #ffffff;
  --line: #e9e6f5;
  --ok: #10b981;
  --err: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(93, 44, 178, .10);
  --shadow-lg: 0 18px 50px rgba(93, 44, 178, .18);
  --maxw: 1160px;
  --font-head: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; height: auto; }
a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--pink); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; color: var(--ink); }
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark { width: 38px; height: 38px; flex: none; }
.logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 10px; }
.main-nav a { padding: 8px 13px; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--ink-soft); }
.main-nav a:hover { background: var(--bg-soft); color: var(--violet); }
.main-nav a.active { background: var(--grad); color: #fff; }
.header-right { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.lang-select {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 10px; border-radius: 999px; font-size: .88rem; font-family: var(--font-body);
  cursor: pointer; max-width: 150px;
}
.lang-select:focus { outline: 2px solid var(--violet); }
.nav-toggle {
  display: none; background: none; border: 1.5px solid var(--line); border-radius: 10px;
  width: 42px; height: 40px; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: 12px 24px; border-radius: 999px; border: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-align: center;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(236,72,153,.35); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(236,72,153,.45); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost { background: #fff; color: var(--violet); border: 2px solid var(--violet); }
.btn-ghost:hover { background: var(--violet); color: #fff; }
.btn-soft { background: var(--bg-soft); color: var(--ink); border: 1.5px solid var(--line); }
.btn-soft:hover { border-color: var(--violet); color: var(--violet); }
.btn-sm { padding: 8px 16px; font-size: .88rem; }
.btn-danger { background: #fff; color: var(--err); border: 1.5px solid var(--err); }
.btn-danger:hover { background: var(--err); color: #fff; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #4c1d95 0%, #7c3aed 40%, #be185d 78%, #b45309 100%);
  color: #fff; padding: 64px 0 110px;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(2px); opacity: .35; pointer-events: none;
}
.hero::before { width: 340px; height: 340px; background: radial-gradient(circle, #f59e0b, transparent 70%); top: -90px; inset-inline-end: -60px; }
.hero::after { width: 420px; height: 420px; background: radial-gradient(circle, #ec4899, transparent 70%); bottom: -160px; inset-inline-start: -120px; }
.hero-inner { position: relative; z-index: 1; max-width: 1240px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(24px, 4vw, 54px); align-items: stretch; text-align: left; }
.hero-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; align-self: stretch; padding-block: 20px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  padding: 7px 16px; border-radius: 999px; font-size: .88rem; font-weight: 600; letter-spacing: .3px;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 4.3vw, 3.3rem); font-weight: 800; margin: 18px 0 14px; max-width: 780px; }
.hero h1 .grad-text { background: linear-gradient(90deg, #fde68a, #fb7185, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.hero-sub { color: rgba(255,255,255,.88); font-size: clamp(1rem, 2.2vw, 1.18rem); max-width: 640px; margin: 0 0 26px; }
.hero-ctas { display: flex; gap: 14px; justify-content: flex-start; flex-wrap: wrap; }
.hero .btn-light { background: #fff; color: var(--violet-dark); }
.hero .btn-light:hover { color: var(--violet-dark); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.hero .btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7); }
.hero .btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; }
.hero-stats { display: flex; gap: 28px; justify-content: flex-start; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .stat { text-align: center; }
.hero-stats b { display: block; font-family: var(--font-head); font-size: 1.35rem; }
.hero-stats span { font-size: .82rem; color: rgba(255,255,255,.75); }

/* ---------- tool ---------- */
.tool-wrap { margin: 0; position: relative; z-index: 5; padding: 0; min-width: 0; }
.tool-card {
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); padding: 30px; max-width: none; margin-inline: auto;
}
.tool-head { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.tool-head h2 { font-size: 1.45rem; }
.tool-head .pill { background: var(--grad); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; letter-spacing: .5px; text-transform: uppercase; }
.dropzone {
  border: 2.5px dashed #c4b5fd; background: var(--grad-soft);
  border-radius: var(--radius); padding: 42px 20px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--pink); background: rgba(236,72,153,.08); }
.dropzone .dz-icon { width: 58px; height: 58px; margin-bottom: 10px; }
.dropzone .dz-main { font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; margin-bottom: 4px; }
.dropzone .dz-or { color: var(--muted); font-size: .88rem; margin-bottom: 12px; }
.dropzone input[type=file] { display: none; }
.privacy-note {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  color: var(--ok); font-size: .88rem; font-weight: 600; margin-top: 14px; text-align: center; flex-wrap: wrap;
}
.file-info {
  display: none; align-items: center; gap: 12px; background: var(--bg-soft);
  border: 1px solid var(--line); padding: 12px 16px; border-radius: var(--radius-sm); margin-top: 16px; flex-wrap: wrap;
}
.file-info .fi-icon { width: 34px; height: 34px; flex: none; }
.file-info .fi-name { font-weight: 600; overflow-wrap: anywhere; }
.file-info .fi-meta { color: var(--muted); font-size: .85rem; }
.file-info .fi-change { margin-inline-start: auto; }
.tool-error { display: none; margin-top: 14px; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; padding: 12px 16px; border-radius: var(--radius-sm); font-size: .92rem; }

.settings { display: none; margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 20px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; font-family: var(--font-head); }
.field .hint { font-weight: 400; color: var(--muted); font-size: .8rem; display: block; }
.field select, .field input[type=text] {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: var(--font-body); background: #fff; color: var(--ink);
}
.field select:focus, .field input:focus { outline: 2px solid var(--violet); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--pink); }
.range-row output { font-weight: 700; color: var(--violet); min-width: 46px; text-align: center; }
.tool-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.tool-actions .btn { flex: 1; min-width: 180px; }

.progress-wrap { display: none; margin-top: 18px; padding: 14px 16px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.progress-bar { background: #e9e5f4; border-radius: 999px; height: 14px; overflow: hidden; border: 1px solid var(--line); }
.progress-fill { height: 100%; width: 0%; background: var(--grad); border-radius: 999px; transition: width .25s ease; }
.progress-text { font-size: .88rem; color: var(--ink-soft); font-weight: 600; margin-top: 8px; text-align: center; }

.results { display: none; margin-top: 24px; }
.results-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.results-head h3 { font-size: 1.15rem; margin-inline-end: auto; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.result-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff;
  box-shadow: var(--shadow); text-align: center; position: relative;
}
.result-card img { width: 100%; aspect-ratio: 8.5/11; object-fit: cover; object-position: top; display: block; background: #f1f1f5; }
.result-card .rc-name { font-size: .78rem; color: var(--ink-soft); padding: 6px 8px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-card .rc-size { font-size: .72rem; color: var(--muted); }
.result-card .btn { width: calc(100% - 16px); margin: 8px; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 38px; }
.section-head .eyebrow { color: var(--pink); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: .8rem; }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 8px 0 10px; }
.section-head p { color: var(--ink-soft); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.icon-chip {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px; color: #fff;
}
.icon-chip svg { width: 26px; height: 26px; }
.chip-1 { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.chip-2 { background: linear-gradient(135deg, #ec4899, #f472b6); }
.chip-3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.chip-4 { background: linear-gradient(135deg, #10b981, #34d399); }
.chip-5 { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.chip-6 { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: .95rem; }

.steps { counter-reset: step; }
.step { display: flex; gap: 18px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step-num {
  counter-increment: step; flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: var(--grad); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
}
.step-num::before { content: counter(step); }
.step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: .95rem; }

/* ---------- blog cards ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.post-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card .pc-banner { height: 8px; }
.pc-banner-1 { background: linear-gradient(90deg, #7c3aed, #ec4899); }
.pc-banner-2 { background: linear-gradient(90deg, #ec4899, #f59e0b); }
.pc-banner-3 { background: linear-gradient(90deg, #3b82f6, #7c3aed); }
.pc-banner-4 { background: linear-gradient(90deg, #10b981, #3b82f6); }
.pc-banner-5 { background: linear-gradient(90deg, #f59e0b, #f43f5e); }
.post-card .pc-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .pc-tag { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--pink); }
.post-card h3 { font-size: 1.08rem; line-height: 1.4; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--violet); }
.post-card p { color: var(--ink-soft); font-size: .92rem; flex: 1; }
.pc-meta { display: flex; gap: 14px; color: var(--muted); font-size: .8rem; align-items: center; }
.pc-meta svg { width: 14px; height: 14px; vertical-align: -2px; }
.post-card .pc-read { font-weight: 600; color: var(--violet); font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 20px; font-family: var(--font-head);
  font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
}
.faq-item[open] summary::before { content: "−"; }
.faq-item summary:hover { color: var(--violet); }
.faq-item .faq-a { padding: 0 20px 20px 60px; color: var(--ink-soft); font-size: .95rem; }
.faq-cat { font-family: var(--font-head); font-weight: 700; color: var(--violet-dark); text-transform: uppercase; letter-spacing: 1.2px; font-size: .85rem; margin: 30px 0 14px; max-width: 820px; margin-inline: auto; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, #312e81, #7c3aed 55%, #db2777);
  border-radius: 24px; color: #fff; text-align: center; padding: 48px 28px; box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; font-size: clamp(1.4rem, 3.2vw, 2rem); margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 560px; margin: 0 auto 22px; }

/* ---------- ads ---------- */
.ad-slot { margin: 26px auto; text-align: center; }
.ad-slot:not(.ad-active) { display: none; }
.ad-slot .ad-label { font-size: .7rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ad-box { min-height: 90px; border: 1.5px dashed #d8d3ee; border-radius: var(--radius-sm); background: var(--bg-soft); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .82rem; padding: 10px; }
.ad-slot.ad-active .ad-box { border-style: solid; border-color: transparent; background: transparent; min-height: 0; padding: 0; }
.ad-slot.ad-sidebar .ad-box { min-height: 250px; }
.ad-slot.ad-infeed .ad-box { min-height: 100px; }

/* ---------- breadcrumb ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--violet); }
.breadcrumb .sep { margin: 0 6px; }

/* ---------- article page ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; margin-top: 34px; }
.article-main {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px; box-shadow: var(--shadow);
}
.article-main h1 { font-size: clamp(1.6rem, 3.8vw, 2.3rem); margin: 10px 0 12px; }
.article-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; margin-bottom: 22px; align-items: center; }
.article-meta .pc-tag { color: var(--pink); font-weight: 700; }
.article-body { font-size: 1.02rem; color: #33303f; }
.article-body p { margin: 14px 0; }
.article-body h2 { font-size: 1.4rem; margin: 34px 0 12px; padding-top: 6px; }
.article-body h3 { font-size: 1.12rem; margin: 24px 0 10px; }
.article-body ul, .article-body ol { margin: 14px 0 14px 24px; display: grid; gap: 8px; }
.article-body li { margin-bottom: 2px; }
.article-body a { font-weight: 600; }
.article-body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .92rem; }
.article-body th { background: var(--bg-soft); font-family: var(--font-head); text-align: left; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 12px; }
.article-body blockquote {
  border-inline-start: 4px solid var(--pink); background: var(--bg-soft);
  padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 18px 0; font-style: italic; color: var(--ink-soft);
}
.article-body .tip-box { background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(236,72,153,.08)); border: 1px solid #e2d9fa; border-radius: var(--radius-sm); padding: 16px 18px; margin: 18px 0; font-size: .95rem; }
.article-body img { border-radius: var(--radius-sm); }
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 22px; margin: 20px 0; }
.toc b { font-family: var(--font-head); display: block; margin-bottom: 8px; }
.toc ol { margin-left: 18px; font-size: .92rem; }
.toc a { color: var(--ink-soft); }
.toc a:hover { color: var(--violet); }
.article-cta {
  background: var(--grad-soft); border: 1px solid #e2d9fa; border-radius: var(--radius);
  padding: 24px; margin-top: 30px; text-align: center;
}
.article-cta h3 { margin-bottom: 6px; }
.article-cta p { color: var(--ink-soft); font-size: .93rem; margin-bottom: 14px; }

/* ---------- sidebar ---------- */
.sidebar { position: sticky; top: 88px; display: grid; gap: 22px; }
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.side-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.side-links { display: grid; gap: 10px; }
.side-links a { font-size: .92rem; color: var(--ink-soft); display: flex; gap: 8px; align-items: baseline; }
.side-links a:hover { color: var(--violet); }
.side-links a::before { content: "→"; color: var(--pink); font-weight: 700; }
.side-cta { background: var(--grad); color: #fff; border: none; text-align: center; }
.side-cta h3 { color: #fff; }
.side-cta p { color: rgba(255,255,255,.85); font-size: .88rem; margin-bottom: 14px; }
.side-cta .btn { background: #fff; color: var(--violet-dark); width: 100%; }
.side-cta .btn:hover { color: var(--violet-dark); }

/* ---------- legal pages ---------- */
.legal-wrap { max-width: 860px; margin-inline: auto; }
.legal-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); margin-top: 20px; }
.legal-body h1 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); margin-bottom: 6px; }
.legal-updated { color: var(--muted); font-size: .88rem; margin-bottom: 24px; }
.legal-body h2 { font-size: 1.28rem; margin: 30px 0 10px; }
.legal-body h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.legal-body p, .legal-body li { color: #3a3748; font-size: .98rem; }
.legal-body p { margin: 10px 0; }
.legal-body ul, .legal-body ol { margin: 10px 0 10px 24px; display: grid; gap: 6px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; margin-top: 26px; align-items: start; }
.contact-form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; font-size: .9rem; font-family: var(--font-head); margin-bottom: 6px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: var(--font-body); background: #fff; color: var(--ink);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--violet); }
.hp-field { position: absolute; left: -9999px; opacity: 0; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 10px; }
.contact-aside { display: grid; gap: 18px; }
.contact-info-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.contact-info-card h3 { margin-bottom: 10px; }
.contact-info-card p { color: var(--ink-soft); font-size: .93rem; }
.contact-info-card a { font-weight: 600; }
.form-msg { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .93rem; display: none; }
.form-msg.ok { display: block; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.form-msg.err { display: block; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ---------- 404 ---------- */
.nf-wrap { text-align: center; padding: 90px 20px 100px; }
.nf-code { font-family: var(--font-head); font-weight: 800; font-size: clamp(4.5rem, 16vw, 8rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.nf-wrap h1 { font-size: 1.6rem; margin: 10px 0; }
.nf-wrap p { color: var(--ink-soft); max-width: 480px; margin: 0 auto 26px; }
.nf-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { background: linear-gradient(160deg, #2e1065 0%, #4c1d95 45%, #831843 100%); color: rgba(255,255,255,.82); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; padding: 52px 0 34px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 9px; }
.site-footer a { color: rgba(255,255,255,.82); font-size: .92rem; }
.site-footer a:hover { color: #fde68a; }
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: .9rem; max-width: 320px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 18px 0; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .85rem; }
.footer-bottom .fb-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(30, 27, 41, .97); color: #e8e5f5; padding: 16px 20px;
  display: none; align-items: center; gap: 16px; flex-wrap: wrap; box-shadow: 0 -8px 30px rgba(0,0,0,.3);
}
.cookie-banner.show { display: flex; }
.cookie-banner p { font-size: .88rem; flex: 1; min-width: 260px; }
.cookie-banner a { color: #fbbf24; text-decoration: underline; }
.cookie-banner .cb-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner .btn-accept { background: var(--grad); color: #fff; }
.cookie-banner .btn-decline { background: transparent; color: #e8e5f5; border: 1.5px solid rgba(255,255,255,.4); }
.cookie-banner .btn { padding: 9px 20px; font-size: .88rem; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-copy { text-align: center; }
  .hero-ctas, .hero-stats { justify-content: center; }
  .hero p.hero-sub { margin-inline: auto; }
}

@media (max-width: 860px) {
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 20px 18px; gap: 6px;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; border-radius: 10px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 46px 0; }
  .hero { padding: 44px 0 100px; }
  .hero-stats { gap: 20px; }
  .tool-card { padding: 20px 16px; }
  .article-main { padding: 24px 18px; }
  .legal-body { padding: 26px 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .tool-actions .btn { min-width: 100%; }
  .lang-select { max-width: 110px; }
}

/* ---------- RTL ---------- */
[dir="rtl"] .article-body ul, [dir="rtl"] .article-body ol,
[dir="rtl"] .legal-body ul, [dir="rtl"] .legal-body ol,
[dir="rtl"] .toc ol { margin-left: 0; margin-right: 24px; }
[dir="rtl"] .hp-field { left: auto; right: -9999px; }
[dir="rtl"] .breadcrumb .sep { transform: scaleX(-1); }

@media print {
  .site-header, .site-footer, .cookie-banner, .ad-slot, .sidebar, .article-cta { display: none !important; }
}
