/* PDF Tools CMS - main stylesheet */
:root {
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;
  --card: #f8fafc;
  --card-hover: #f1f5f9;
  --brand-fg: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  --radius: 12px;
}
html[data-theme="dark"] {
  --bg: #0b1220;
  --fg: #e5e7eb;
  --muted: #94a3b8;
  --border: #1f2937;
  --card: #111827;
  --card-hover: #1f2937;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.4);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { line-height: 1.25; color: var(--fg); }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 1.8em 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 20px; padding: 14px 20px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.3rem; color: var(--brand); }
.main-nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.main-nav a { color: var(--fg); font-weight: 500; }
.main-nav a:hover { color: var(--brand); }
.lang-switcher select {
  background: var(--card); color: var(--fg); border: 1px solid var(--border);
  padding: 6px 10px; border-radius: 8px; font: inherit;
}
.theme-toggle {
  background: var(--card); border: 1px solid var(--border); color: var(--fg);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 16px;
}

/* Main */
main.container { padding-top: 32px; padding-bottom: 60px; }

/* Hero */
.hero { text-align: center; padding: 20px 0 10px; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; margin: 0 auto 20px; }

/* PDF Tool */
.pdf-tool {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; margin: 24px 0; box-shadow: var(--shadow);
}
.drop-zone {
  position: relative; border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; cursor: pointer; transition: .2s;
  background: var(--bg);
}
.drop-zone:hover, .drop-zone.drag { border-color: var(--brand); background: var(--card-hover); }
.drop-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-icon { font-size: 42px; }
.dz-hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.file-name { margin-top: 10px; color: var(--brand); font-weight: 600; }

.presets { margin-top: 24px; }
.preset-label { display: block; font-weight: 700; margin-bottom: 12px; font-size: .95rem; }

.preset-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.preset-row-smart {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 12px;
}

/* Custom size box — completely separate from preset cards */
.custom-size-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
  flex-wrap: wrap;
}
.custom-size-box:hover { border-color: var(--brand); }
.custom-size-box:has(.custom-radio-hidden:checked) {
  border-color: var(--brand);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 20%, transparent);
}
.custom-radio-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.custom-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--fg);
  cursor: pointer;
  user-select: none;
  flex: 1;
  min-width: 180px;
}
.custom-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  position: relative;
  transition: all .15s;
}
.custom-size-box:has(.custom-radio-hidden:checked) .custom-dot {
  border-color: var(--brand);
}
.custom-size-box:has(.custom-radio-hidden:checked) .custom-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--brand);
}
.custom-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  transition: border-color .15s;
  direction: ltr;
}
.custom-size-box:has(.custom-radio-hidden:checked) .custom-input-group {
  border-color: var(--brand);
  background: var(--bg);
}
.custom-input-group input[type=number] {
  border: 0;
  background: transparent;
  color: var(--fg) !important;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 0;
  outline: none;
  width: 100px;
  text-align: center;
  -moz-appearance: textfield;
}
.custom-input-group input[type=number]::-webkit-outer-spin-button,
.custom-input-group input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.custom-input-group input[type=number]::placeholder {
  color: var(--muted);
  font-weight: 500;
  opacity: .7;
}
.custom-suffix {
  font-size: .9rem;
  font-weight: 700;
  color: var(--muted);
}

.preset {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  font-weight: 600;
  font-size: .95rem;
  transition: all .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 56px;
}
.preset:hover { border-color: var(--brand); transform: translateY(-1px); }
.preset input { position: absolute; opacity: 0; pointer-events: none; }
.preset:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-fg);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 35%, transparent);
}

/* Smart presets — bigger, with icon + title + sub */
.preset-row-smart .preset {
  padding: 14px 12px;
  min-height: 80px;
}
.preset-icon { font-size: 22px; line-height: 1; margin-bottom: 4px; }
.preset-title { font-size: .95rem; font-weight: 700; line-height: 1.2; }
.preset-sub { font-size: .72rem; font-weight: 500; opacity: .75; margin-top: 2px; }

/* Best preset — green accent */
.preset-best { border-color: color-mix(in srgb, #10b981 60%, var(--border)); }
.preset-best:hover { border-color: #10b981; }
.preset-best:has(input:checked) {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,.35);
}

/* Max preset — orange accent */
.preset-max { border-color: color-mix(in srgb, #f59e0b 60%, var(--border)); }
.preset-max:hover { border-color: #f59e0b; }
.preset-max:has(input:checked) {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
  box-shadow: 0 4px 14px rgba(245,158,11,.35);
}

/* Custom preset removed — now uses .custom-size-box (separate row) */

.btn-primary {
  display: inline-block; background: var(--brand); color: var(--brand-fg);
  border: 0; padding: 14px 28px; font-size: 1.05rem; font-weight: 700;
  border-radius: 10px; cursor: pointer; margin-top: 20px; width: 100%;
  transition: transform .1s, opacity .15s;
}
.btn-primary:hover { transform: translateY(-1px); opacity: .94; }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.result { margin-top: 20px; }
.result-ok {
  background: linear-gradient(135deg, color-mix(in srgb, #10b981 12%, var(--bg)), color-mix(in srgb, #10b981 6%, var(--bg)));
  border: 1.5px solid color-mix(in srgb, #10b981 35%, var(--border));
  padding: 28px 24px;
  border-radius: 14px;
  text-align: center;
}
.result-ok .result-icon { font-size: 48px; line-height: 1; margin-bottom: 8px; }
.result-ok h3 { margin: 0 0 18px; color: #059669; font-size: 1.3rem; }
.result-stats {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.stat-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 18px; min-width: 110px;
}
.stat-item .stat-label { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.stat-item .stat-val { display: block; font-size: 1.25rem; font-weight: 800; color: var(--fg); margin-top: 2px; }
.stat-item-new { border-color: #10b981; }
.stat-item-new .stat-val { color: #059669; }
.stat-arrow { font-size: 1.6rem; color: var(--muted); }
.stat-saved {
  display: inline-block; background: #10b981; color: #fff;
  padding: 6px 14px; border-radius: 999px;
  font-weight: 700; font-size: .9rem;
  width: 100%; max-width: max-content;
}
.btn-download { background: #059669 !important; width: auto !important; display: inline-block; padding: 14px 32px !important; }
.btn-download:hover { background: #047857 !important; }
.result-err { background: #fee2e2; color: #991b1b; padding: 16px; border-radius: 10px; }
.result-note { margin-top: 14px !important; color: var(--muted); }
html[data-theme=dark] .result-ok { background: linear-gradient(135deg, color-mix(in srgb, #10b981 18%, var(--bg)), color-mix(in srgb, #10b981 8%, var(--bg))); }
html[data-theme=dark] .result-ok h3 { color: #34d399; }
html[data-theme=dark] .stat-item-new .stat-val { color: #34d399; }
html[data-theme=dark] .result-err { background: #450a0a; color: #fecaca; }

/* Content */
.page-content { max-width: 900px; margin: 0 auto; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 16px; margin: 20px 0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.card h3 { margin-top: 0; font-size: 1.1rem; }

.kb-table { width: 100%; border-collapse: collapse; margin: 16px 0; background: var(--card); border-radius: 10px; overflow: hidden; }
.kb-table th, .kb-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.kb-table th { background: var(--card-hover); font-weight: 700; }
html[dir=rtl] .kb-table th, html[dir=rtl] .kb-table td { text-align: right; }

details { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
details summary { cursor: pointer; font-size: 1.05rem; }
details[open] summary { margin-bottom: 8px; }

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 20px; margin-top: 20px; }
.blog-card { background: var(--card); border: 1px solid var(--border); padding: 22px; border-radius: 10px; }
.blog-card h2, .blog-card h3 { margin-top: 0; }
.blog-card h2 a, .blog-card h3 a { color: var(--fg); }
.blog-card .read-more { color: var(--brand); font-weight: 600; }
.blog-post .meta { color: var(--muted); font-size: .9rem; }
.latest-blogs { margin-top: 50px; }

/* Ads */
.ad-slot { margin: 24px 0; text-align: center; min-height: 90px; }
.ad-header { padding: 10px 20px; }

/* Footer */
.site-footer { background: var(--card); border-top: 1px solid var(--border); padding: 50px 0 20px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 30px; }
.site-footer h4 { margin-top: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; color: var(--muted); font-size: .9rem; }

/* Old mobile rule removed — see comprehensive responsive overhaul at bottom */

/* ============ New design elements ============ */

/* Hero variants */
.hero-sm { padding: 30px 0 20px; text-align: center; }
.hero-sm h1 { margin: 0 0 .3em; font-size: clamp(1.8rem, 4vw, 2.4rem); }

/* Prose section */
.prose { max-width: 820px; margin: 0 auto; }
.prose p, .prose li { font-size: 1.02rem; line-height: 1.75; }
.prose .muted { color: var(--muted); font-size: .9rem; }

/* Check list */
.check-list { list-style: none; padding: 0; margin: 16px 0; }
.check-list li { position: relative; padding: 8px 0 8px 32px; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: var(--brand-fg);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Callout box */
.callout {
  background: var(--card); border-left: 4px solid var(--brand);
  padding: 18px 22px; border-radius: 0 10px 10px 0; margin: 20px 0;
}
.callout-warn { border-left-color: #f59e0b; }
.callout ul { margin: 0; padding-left: 20px; }
.callout li { margin: 6px 0; }

/* Card icon */
.card-icon { font-size: 32px; line-height: 1; margin-bottom: 8px; }

/* CTA box */
.cta-box {
  background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 70%, #000) 100%);
  color: #fff; padding: 36px; border-radius: 14px; text-align: center;
  margin: 40px 0 20px; box-shadow: 0 10px 40px rgba(0,0,0,.15);
}
.cta-box h3 { color: #fff; margin: 0 0 8px; font-size: 1.4rem; }
.cta-box p { margin: 0 0 18px; opacity: .95; }
.cta-box .btn-primary {
  background: #fff; color: var(--brand); width: auto;
  padding: 12px 30px; margin-top: 0;
}
.cta-box .btn-primary:hover { background: #f8fafc; }

/* Inline button */
.btn-primary.inline { display: inline-block; width: auto; padding: 11px 24px; margin-top: 8px; font-size: 1rem; }

/* Contact grid */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px; margin: 30px 0 50px;
}
.contact-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 30px 24px; text-align: center; transition: transform .2s, box-shadow .2s;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.contact-card h3 { margin: 12px 0 8px; }
.contact-card p { color: var(--muted); font-size: .95rem; min-height: 48px; }
.contact-icon { font-size: 42px; line-height: 1; }

/* Max compress preset highlight removed — see new design above */


/* ============ Home page WOW design ============ */

/* Hero XL */
.hero-xl {
  padding: 60px 20px 40px;
  text-align: center;
  background: radial-gradient(ellipse at top, color-mix(in srgb, var(--brand) 10%, transparent), transparent 60%);
  border-radius: 0 0 30px 30px;
  margin-bottom: 30px;
}
.hero-xl h1 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  margin: 16px 0 16px;
  letter-spacing: -.02em;
}
.hero-xl .grad {
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 50%, #a855f7));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-xl .lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 740px;
  margin: 0 auto 28px;
  line-height: 1.65;
}
.hero-badge {
  display: inline-block;
  padding: 8px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--brand);
}
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
}
.trust-item span { color: var(--fg); }

/* Tool section */
.tool-section { margin: 0 auto 50px; max-width: 760px; }

/* Privacy notice in widget */
.privacy-notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 14px 16px;
  background: color-mix(in srgb, #10b981 10%, var(--bg));
  border: 1px solid color-mix(in srgb, #10b981 30%, var(--border));
  border-radius: 10px;
  font-size: .9rem;
}
.privacy-notice .pn-icon { font-size: 22px; line-height: 1.2; }
.privacy-notice strong { color: #059669; }
html[data-theme=dark] .privacy-notice { background: color-mix(in srgb, #10b981 12%, var(--bg)); }
html[data-theme=dark] .privacy-notice strong { color: #34d399; }
.result-note { margin-top: 12px !important; color: var(--muted); }

/* Stats section */
.stats-section {
  background: var(--card);
  border-radius: 18px;
  padding: 36px 24px;
  margin: 50px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  text-align: center;
}
.stat-box .stat-num {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 50%, #a855f7));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.stat-box .stat-label {
  font-size: .85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 6px;
  font-weight: 600;
}

/* Section headings */
.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 36px;
}
.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}
.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

/* Steps section */
.how-section { margin: 60px 0; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  position: relative;
}
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px 28px;
  position: relative;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}
.step-icon { font-size: 42px; margin: 8px 0 12px; }
.step h3 { margin: 0 0 8px; }
.step p { color: var(--muted); margin: 0; }

/* Features grid */
.features-section { margin: 80px 0; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  transition: transform .2s, border-color .2s;
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 14px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.feature-card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.feature-card p { color: var(--muted); margin: 0; line-height: 1.6; }

/* Targets grid */
.targets-section { margin: 80px 0; }
.targets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.target-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 18px;
  text-align: center;
  transition: transform .2s, border-color .2s;
}
.target-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.target-card-pop { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--card)); position: relative; }
.target-card-pop::after {
  content: 'POPULAR';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: var(--brand-fg);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 999px;
}
.target-size { font-size: 1.6rem; font-weight: 800; color: var(--brand); }
.target-best { font-size: .85rem; color: var(--muted); margin: 8px 0 12px; min-height: 32px; }
.target-bar { background: var(--border); height: 6px; border-radius: 3px; overflow: hidden; }
.target-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 50%, #a855f7)); }

/* Users grid */
.users-section { margin: 80px 0; }
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.user-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
}
.user-emoji { font-size: 38px; line-height: 1; }
.user-card h4 { margin: 12px 0 8px; font-size: 1.05rem; }
.user-card p { color: var(--muted); margin: 0; font-size: .9rem; line-height: 1.55; }

/* FAQ */
.faq-section { margin: 80px 0; max-width: 820px; margin-left: auto; margin-right: auto; }
.faq-list details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 12px;
  transition: border-color .2s;
}
.faq-list details:hover { border-color: var(--brand); }
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  color: var(--brand);
  font-weight: 300;
  transition: transform .2s;
}
.faq-list details[open] summary::after { content: '−'; }
.faq-list details[open] summary { margin-bottom: 12px; }
.faq-list details p { margin: 0; color: var(--muted); line-height: 1.65; }

/* Final CTA */
.cta-final {
  text-align: center;
  background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 50%, #a855f7) 100%);
  color: #fff;
  padding: 60px 30px;
  border-radius: 24px;
  margin: 60px 0 20px;
  box-shadow: 0 20px 60px color-mix(in srgb, var(--brand) 30%, transparent);
}
.cta-final h2 { color: #fff; margin: 0 0 10px; font-size: clamp(1.8rem, 4vw, 2.4rem); }
.cta-final p { margin: 0 0 24px; opacity: .95; font-size: 1.1rem; }
.btn-cta {
  background: #fff !important;
  color: var(--brand) !important;
  font-size: 1.1rem !important;
  padding: 16px 36px !important;
  font-weight: 800 !important;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.2); }

/* Old duplicates removed — comprehensive responsive rules below */

/* ============ FULL MOBILE RESPONSIVE OVERHAUL ============ */

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid var(--border);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: all .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Tablet and below — hamburger appears */
@media (max-width: 880px) {
  .header-inner {
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: nowrap;
  }
  .logo { font-size: 1.15rem; }
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 80px 24px 24px;
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 100;
    overflow-y: auto;
  }
  html[dir=rtl] .main-nav {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 8px 0 30px rgba(0,0,0,.15);
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a {
    display: block;
    width: 100%;
    padding: 13px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }
  .main-nav a:last-of-type { border-bottom: 0; }
  .main-nav .lang-switcher { width: 100%; margin-top: 12px; }
  .main-nav .lang-switcher select { width: 100%; padding: 10px 14px; font-size: 1rem; }
  .main-nav .theme-toggle { margin-top: 12px; }
}

/* Desktop — hide hamburger, normal nav */
@media (min-width: 881px) {
  .nav-toggle { display: none !important; }
  .main-nav {
    display: flex !important;
    transform: none !important;
    position: static;
    width: auto;
    flex-direction: row;
    align-items: center;
    background: transparent;
    box-shadow: none;
    padding: 0;
    gap: 18px;
    flex: 1;
    overflow: visible;
  }
  .main-nav a {
    border: 0;
    padding: 0;
  }
}

/* Mobile-friendly preset rows */
@media (max-width: 720px) {
  .preset-row { grid-template-columns: repeat(3, 1fr); }
  .preset-row-smart { grid-template-columns: 1fr 1fr; }
  .preset { font-size: .85rem; padding: 12px 6px; }
  .preset-row-smart .preset { min-height: 72px; padding: 12px 8px; }
  .preset-icon { font-size: 18px; }
  .preset-title { font-size: .85rem; }
  .preset-sub { font-size: .65rem; }

  .custom-size-box {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .custom-label { width: 100%; min-width: 0; justify-content: flex-start; }
  .custom-input-group {
    width: 100%;
    justify-content: center;
  }
  .custom-input-group input[type=number] { width: 120px; font-size: 1.05rem; }
}

@media (max-width: 480px) {
  .preset-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .preset-row-smart { grid-template-columns: 1fr; }
  .pdf-tool { padding: 16px; border-radius: 12px; }
  .drop-zone { padding: 28px 14px; }
  .dz-icon { font-size: 36px; }
}

/* Hero responsive */
@media (max-width: 720px) {
  .hero-xl { padding: 36px 16px 24px; border-radius: 0 0 20px 20px; }
  .hero-xl h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .hero-xl .lead { font-size: 1rem; }
  .hero-badge { font-size: .78rem; padding: 6px 14px; }
  .trust-bar { gap: 14px; row-gap: 8px; }
  .trust-item { font-size: .8rem; }
}

/* Stats / Steps / Features / Targets / Users — already use auto-fit minmax, but tighten on mobile */
@media (max-width: 720px) {
  .stats-section { padding: 24px 16px; margin: 32px 0; }
  .stats-grid { gap: 14px; }
  .stat-box .stat-num { font-size: 1.8rem; }
  .stat-box .stat-label { font-size: .72rem; }

  .how-section, .features-section, .targets-section, .users-section, .faq-section { margin: 50px 0; }
  .section-head { margin-bottom: 26px; }
  .section-head h2 { font-size: 1.4rem; }
  .section-sub { font-size: .95rem; }

  .steps-grid, .features-grid, .users-grid { gap: 14px; }
  .step, .feature-card, .user-card, .blog-card { padding: 22px 18px; }

  .targets-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .target-card { padding: 18px 12px; }
  .target-size { font-size: 1.3rem; }
  .target-best { font-size: .75rem; min-height: 28px; }

  .cta-final { padding: 40px 22px; border-radius: 18px; margin: 40px 0 16px; }
  .cta-final h2 { font-size: 1.5rem; }
  .cta-final p { font-size: 1rem; }
  .btn-cta { font-size: 1rem !important; padding: 14px 28px !important; }
}

/* Result stats responsive */
@media (max-width: 540px) {
  .result-ok { padding: 22px 16px; }
  .result-ok h3 { font-size: 1.15rem; }
  .result-stats { gap: 10px; flex-direction: column; }
  .result-stats .stat-arrow { transform: rotate(90deg); font-size: 1.4rem; }
  .stat-item { width: 100%; min-width: 0; padding: 10px 14px; }
  .btn-download { width: 100% !important; padding: 14px 20px !important; }
}

/* Footer responsive */
@media (max-width: 720px) {
  .site-footer { padding: 36px 0 18px; margin-top: 40px; }
  .footer-grid { gap: 24px; margin-bottom: 22px; }
  .footer-bottom { font-size: .8rem; }
}

/* Tables in content responsive */
@media (max-width: 640px) {
  .kb-table { font-size: .85rem; }
  .kb-table th, .kb-table td { padding: 8px 10px; }
  .page-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* FAQ responsive */
@media (max-width: 540px) {
  .faq-list details { padding: 14px 16px; }
  .faq-list summary { font-size: .95rem; padding-right: 26px; }
}

/* Blog grid responsive */
@media (max-width: 540px) {
  .blog-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* Privacy notice responsive */
@media (max-width: 540px) {
  .privacy-notice { padding: 12px 14px; gap: 10px; }
  .privacy-notice .pn-icon { font-size: 18px; }
  .privacy-notice small { font-size: .8rem; line-height: 1.5; }
}

/* Container padding on small screens */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  main.container { padding-top: 24px; padding-bottom: 40px; }
}

/* Overflow safety - prevent any horizontal scroll on the body */
body { overflow-x: hidden; }
img, video, iframe { max-width: 100%; height: auto; }
