/* =========================================================================
   JobJankari Image Background Changer — Stylesheet
   System-font, no external font/CSS framework requests (fast first paint).
   ========================================================================= */

:root{
  --blue:        #1B6FC9;
  --blue-hover:  #155A9F;
  --blue-dark:   #0F3D5C;
  --navy-dark:   #0A2C43;
  --blue-tint:   #EAF2FE;
  --blue-tint-2: #DCEBFE;
  --grad: linear-gradient(135deg, #1B6FC9 0%, #4C9BE8 100%);
  --bg:          #F6F9FC;
  --surface:     #FFFFFF;
  --ink:         #16232E;
  --muted:       #5B6B7A;
  --border:      #E3E9EF;
  --border-strong:#C9D6E2;
  --success:     #1E8E5A;
  --success-tint:#E7F6EE;
  --danger:      #B3261E;
  --danger-tint: #FBEAE9;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 2px rgba(15,61,92,0.05), 0 6px 20px rgba(15,61,92,0.06);
  --shadow-pop:  0 16px 36px rgba(15,61,92,0.16);

  --container: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img,svg{ display:block; max-width:100%; }
a{ color: var(--blue); }
h1,h2,h3{ color: var(--navy-dark); line-height:1.2; margin:0 0 .5em; font-weight:750; letter-spacing:-0.01em; }
p{ margin:0 0 1em; }
ul,ol{ margin:0; padding:0; }
button{ font-family: inherit; }

.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link{ position:absolute; left:-9999px; top:0; background:var(--navy-dark); color:#fff; padding:.75rem 1.25rem; z-index:1000; border-radius:0 0 var(--radius-sm) 0; }
.skip-link:focus{ left:0; }
:focus-visible{ outline: 3px solid #86BEF2; outline-offset: 2px; }

/* ===================== BUTTONS ===================== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5em;
  font-weight:650; font-size:.95rem; border-radius: var(--radius-md);
  padding:.75em 1.4em; border:1.5px solid transparent; cursor:pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease, box-shadow .15s;
  text-decoration:none; line-height:1.2; min-height:46px;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{ background: var(--grad); color:#fff; box-shadow: 0 6px 16px rgba(27,111,201,.28); }
.btn-primary:hover{ box-shadow: 0 8px 22px rgba(27,111,201,.36); }
.btn-primary:disabled{ background:#9FC1E8; box-shadow:none; cursor:not-allowed; }
.btn-secondary{ background:#fff; color: var(--blue-dark); border-color: var(--border-strong); }
.btn-secondary:hover{ background: var(--blue-tint); border-color: var(--blue); }
.btn-ghost{ background:transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover{ color: var(--danger); border-color:#F1C6C2; }
.btn-lg{ padding:.95em 2em; font-size:1.02rem; width:100%; max-width:360px; }
.btn-sm{ padding:.45em .9em; font-size:.85rem; min-height:38px; }

.icon-btn{
  width:38px; height:38px; border-radius:50%; border:1px solid var(--border-strong);
  background:#fff; color: var(--blue-dark); font-weight:700; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; font-size:.85rem;
}
.icon-btn:hover{ background: var(--blue-tint); border-color: var(--blue); }

/* ===================== HEADER ===================== */
.site-header{ background:#fff; border-bottom:1px solid var(--border); position: sticky; top:0; z-index:50; }
.header-inner{ max-width: var(--container); margin:0 auto; padding:.85rem 1.25rem; display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.logo{ display:flex; align-items:center; gap:.6rem; text-decoration:none; }
.logo-mark{ width:38px; height:38px; border-radius:11px; background: var(--grad); color:#fff; font-weight:800; font-size:.95rem; display:flex; align-items:center; justify-content:center; }
.logo-text{ font-weight:800; font-size:1.15rem; color: var(--navy-dark); }
.logo-dot{ color: var(--blue); font-weight:600; }
.primary-nav ul{ display:flex; gap:1.6rem; list-style:none; }
.primary-nav a{ color: var(--ink); text-decoration:none; font-weight:500; font-size:.95rem; padding:.4rem .1rem; border-bottom:2px solid transparent; }
.primary-nav a:hover{ color: var(--blue); border-bottom-color: var(--blue); }
.nav-toggle{ display:none; width:44px; height:44px; border:1px solid var(--border-strong); border-radius: var(--radius-sm); background:#fff; cursor:pointer; flex-direction:column; align-items:center; justify-content:center; gap:5px; }
.nav-toggle span{ width:20px; height:2px; background: var(--navy-dark); border-radius:2px; }

/* ===================== AD CONTAINERS ===================== */
.ad-container{
  max-width: var(--container); margin: 1.5rem auto; padding:1rem; min-height:90px;
  display:flex; align-items:center; justify-content:center; background:#EFF4F9;
  border:1px dashed var(--border-strong); border-radius: var(--radius-sm);
}
.ad-placeholder-label{ font-size:.8rem; color: var(--muted); }
/* Reserved AdSense container. See README section H for insertion instructions. */

/* ===================== HERO ===================== */
.hero{ padding: 2.75rem 1.25rem .5rem; text-align:center; }
.hero-inner{ max-width: 720px; margin:0 auto; }
.eyebrow{
  display:inline-block; font-size:.78rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color: var(--blue); background: var(--blue-tint); padding:.35rem .9rem; border-radius:999px; margin-bottom:1rem;
}
.hero h1{ font-size: clamp(1.8rem, 4vw, 2.5rem); }
.hero-subhead{ font-size:1.08rem; color: var(--muted); max-width:52ch; margin:0 auto 1.4rem; }
.trust-badges{ display:flex; flex-wrap:wrap; justify-content:center; gap: .6rem 1.4rem; list-style:none; margin-bottom:.5rem; }
.trust-badges li{ display:flex; align-items:center; gap:.4rem; font-size:.85rem; color: var(--blue-dark); font-weight:600; }
.trust-badges svg{ color: var(--blue); flex-shrink:0; }

/* ===================== STEPS BAR ===================== */
.steps-bar{ padding: .5rem 1.25rem 1.5rem; }
.steps-bar ol{ max-width: 640px; margin:0 auto; display:flex; justify-content:space-between; list-style:none; position:relative; }
.steps-bar ol::before{
  content:''; position:absolute; top:15px; left:6%; right:6%; height:2px; background: var(--border-strong); z-index:0;
}
.step{ position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; gap:.4rem; flex:1; }
.step-num{
  width:32px; height:32px; border-radius:50%; background:#fff; border:2px solid var(--border-strong);
  color: var(--muted); font-weight:700; font-size:.9rem; display:flex; align-items:center; justify-content:center;
}
.step-label{ font-size:.72rem; color: var(--muted); font-weight:600; text-align:center; max-width:90px; }
.step.is-active .step-num{ border-color: var(--blue); color: var(--blue); background: var(--blue-tint); }
.step.is-active .step-label{ color: var(--blue-dark); }
.step.is-done .step-num{ border-color: var(--success); background: var(--success); color:#fff; }
.step.is-done .step-num::after{ content:'✓'; }

/* ===================== TOOL CARD ===================== */
.tool-section{ padding: 0 1.25rem 2rem; }
.tool-card{
  max-width: 760px; margin:0 auto; background:#fff; border:1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 1.75rem;
}
.file-error{
  margin-bottom:1rem; background: var(--danger-tint); color: var(--danger); border:1px solid #F1C6C2;
  border-radius: var(--radius-sm); padding:.75rem 1rem; font-size:.92rem; font-weight:500;
}

/* Upload zone */
.upload-zone{
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--blue-tint) 0%, #F5FAFF 100%);
  text-align:center; padding: 3rem 1.25rem; cursor:pointer; transition: border-color .15s, transform .1s;
}
.upload-zone.is-dragover{ border-color: var(--blue); transform: scale(1.01); }
.upload-illustration{ margin-bottom: .5rem; display:flex; justify-content:center; }
.upload-title{ font-weight:750; color: var(--navy-dark); font-size:1.15rem; margin:.5rem 0 .1rem; }
.upload-or{ color: var(--muted); font-size:.85rem; margin:.2rem 0 .9rem; }
.upload-hint{ color: var(--muted); font-size:.82rem; margin: 1rem 0 0; }

/* Meta row */
.image-meta-row{ display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1.25rem; }
.image-meta{ display:flex; flex-direction:column; gap:.15rem; min-width:0; }
.image-meta-name{ font-weight:700; color: var(--navy-dark); word-break:break-all; }
.image-meta-details{ font-size:.82rem; color: var(--muted); }
.image-meta-actions{ display:flex; gap:.5rem; flex-wrap:wrap; }

/* Compare */
.compare-shell{ margin-bottom: 1.75rem; }
.compare-labels{ display:flex; justify-content:space-between; font-size:.78rem; font-weight:700; color: var(--muted); text-transform:uppercase; letter-spacing:.04em; padding: 0 .1rem .4rem; }
.compare-wrap{
  position:relative; width:100%; aspect-ratio: 4 / 5; max-height: 480px; margin: 0 auto;
  border-radius: var(--radius-md); overflow:hidden; background:
    repeating-conic-gradient(#EDF1F5 0% 25%, #fff 0% 50%) 50% / 22px 22px;
  border: 1px solid var(--border);
}
.compare-before, .compare-after{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.compare-after-clip{ position:absolute; inset:0; overflow:hidden; width:50%; border-right: 2px solid #fff; }
.compare-handle{
  position:absolute; top:50%; left:50%; width:34px; height:34px; border-radius:50%; background:#fff;
  box-shadow: var(--shadow-pop); transform: translate(-50%,-50%); pointer-events:none;
  display:flex; align-items:center; justify-content:center;
}
.compare-handle::before{ content:'⇔'; color: var(--blue); font-weight:700; }
.compare-slider{ width:100%; margin-top:.75rem; accent-color: var(--blue); }
.zoom-controls{ display:flex; justify-content:center; gap:.6rem; margin-top:.75rem; }

/* Step blocks */
.step-block{ border-top:1px solid var(--border); padding-top:1.5rem; margin-top:1.5rem; }
.step-block-title{ font-size:1.05rem; margin-bottom:.4rem; }
.step-block-desc{ color: var(--muted); font-size:.88rem; margin-bottom:1.1rem; }

.progress-block{ margin-top:1.25rem; }
.progress-bar{ height:8px; background: var(--border); border-radius:999px; overflow:hidden; }
.progress-fill{ height:100%; width:0%; background: var(--grad); border-radius:999px; transition: width .3s ease; }
.progress-label{ margin:.6rem 0 0; color: var(--blue-dark); font-weight:600; font-size:.9rem; }

/* Swatches */
.swatch-row{ display:flex; flex-wrap:wrap; gap:.75rem; margin-bottom:1.25rem; }
.swatch{
  background:#fff; border:1.5px solid var(--border-strong); border-radius: var(--radius-md);
  padding: .7rem .6rem; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:.45rem;
  width: 92px; transition: border-color .15s, box-shadow .15s;
}
.swatch:hover{ border-color: var(--blue); }
.swatch[aria-pressed="true"]{ border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.swatch-preview{
  width:36px; height:36px; border-radius:50%; border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; font-size:1rem;
}
.swatch-transparent{ background: repeating-conic-gradient(#E4E9EE 0% 25%, #fff 0% 50%) 50% / 10px 10px; }
.swatch-rainbow{ background: conic-gradient(red, orange, yellow, green, blue, violet, red); }
.swatch-label{ font-size:.72rem; font-weight:600; color: var(--muted); text-align:center; }

.custom-color-panel, .custom-image-panel{
  background: var(--bg); border:1px solid var(--border); border-radius: var(--radius-md);
  padding: 1rem; margin-bottom:1.25rem;
}
.custom-color-panel label{ display:block; font-weight:600; font-size:.88rem; margin-bottom:.5rem; color: var(--navy-dark); }
.custom-color-row{ display:flex; gap:.6rem; align-items:center; }
.custom-color-row input[type="color"]{ width:46px; height:40px; border:1px solid var(--border-strong); border-radius:8px; padding:2px; background:#fff; cursor:pointer; }
.custom-color-row input[type="text"]{ flex:1; padding:.55rem .7rem; border:1px solid var(--border-strong); border-radius:8px; font-family:inherit; font-size:.92rem; }

.custom-image-panel{ display:flex; align-items:center; gap:.9rem; flex-wrap:wrap; }
.custom-image-name{ font-size:.85rem; color: var(--muted); }

.more-options{ border:1px solid var(--border); border-radius: var(--radius-md); padding: .2rem .9rem; margin-top:.5rem; }
.more-options summary{ cursor:pointer; font-weight:650; padding:.8rem 0; color: var(--blue-dark); list-style:none; }
.more-options summary::-webkit-details-marker{ display:none; }
.more-options summary::before{ content:'▸'; color: var(--blue); margin-right:.5rem; }
.more-options[open] summary::before{ content:'▾'; }
.more-options-body{ padding: .3rem 0 1.1rem; }
.crop-presets{ display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom: .9rem; }
.chip{
  border:1.5px solid var(--border-strong); background:#fff; border-radius:999px; padding:.5rem 1rem;
  font-size:.85rem; font-weight:600; color: var(--blue-dark); cursor:pointer;
}
.chip.is-active{ border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.custom-size-row{ display:flex; gap:1rem; flex-wrap:wrap; margin-bottom:.8rem; }
.custom-size-row label{ display:flex; flex-direction:column; gap:.3rem; font-size:.85rem; font-weight:600; color: var(--navy-dark); }
.custom-size-row input{ padding:.5rem .7rem; border:1px solid var(--border-strong); border-radius:8px; width:120px; font-family:inherit; }
.field-hint{ color: var(--muted); font-size:.82rem; margin:0; }

/* Download */
.format-tabs{ display:flex; gap:.5rem; margin-bottom:1rem; }
.format-tab{
  flex:1; border:1.5px solid var(--border-strong); background:#fff; border-radius: var(--radius-sm);
  padding:.65rem; font-weight:700; font-size:.9rem; color: var(--muted); cursor:pointer;
}
.format-tab.is-active{ border-color: var(--blue); color: var(--blue); background: var(--blue-tint); }
.format-tab:disabled{ opacity:.45; cursor:not-allowed; }
.quality-row{ display:flex; align-items:center; gap:.8rem; margin-bottom:1.1rem; }
.quality-row label{ font-weight:600; font-size:.88rem; color: var(--navy-dark); flex-shrink:0; }
.quality-row input[type="range"]{ flex:1; accent-color: var(--blue); }
.quality-row span{ font-size:.85rem; font-weight:700; color: var(--blue-dark); width:44px; text-align:right; }
.filename-field{ display:block; font-weight:600; font-size:.88rem; color: var(--navy-dark); margin-bottom:1.25rem; }
.filename-row{ display:flex; align-items:center; gap:.4rem; margin-top:.4rem; }
.filename-row input{ flex:1; padding:.6rem .75rem; border:1px solid var(--border-strong); border-radius:8px; font-family:inherit; font-size:.92rem; }
.filename-row span{ color: var(--muted); font-weight:600; }

/* ===================== SEO CONTENT ===================== */
.seo-content{ padding: 1rem 1.25rem 2.5rem; }
.seo-inner{ max-width: 760px; margin:0 auto; }
.seo-inner h2{ font-size:1.4rem; margin-top:2rem; }
.seo-inner h2:first-child{ margin-top:0; }
.how-to-list{ list-style:none; counter-reset: step; display:flex; flex-direction:column; gap:.75rem; }
.how-to-list li{ counter-increment: step; padding-left:2.2rem; position:relative; }
.how-to-list li::before{
  content: counter(step); position:absolute; left:0; top:0; width:1.6rem; height:1.6rem;
  background: var(--grad); color:#fff; border-radius:50%; font-size:.8rem; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}
.internal-links{ color: var(--muted); }

/* ===================== FAQ ===================== */
.faq-section{ padding: 0 1.25rem 3rem; }
.faq-inner{ max-width:760px; margin:0 auto; }
.faq-list{ border-top:1px solid var(--border); }
.faq-item{ border-bottom:1px solid var(--border); }
.faq-question{
  width:100%; text-align:left; background:none; border:none; padding:1.1rem .2rem;
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  font-weight:650; font-size:1rem; color: var(--navy-dark); cursor:pointer;
}
.faq-caret{ color: var(--blue); font-size:1.2rem; transition: transform .15s; flex-shrink:0; }
.faq-question[aria-expanded="true"] .faq-caret{ transform: rotate(45deg); }
.faq-answer{ max-height:0; overflow:hidden; transition: max-height .2s ease; }
.faq-answer p{ padding: 0 .2rem 1.1rem; color: var(--muted); margin:0; }

/* ===================== FOOTER ===================== */
.site-footer{ background: var(--navy-dark); color:#CBD9E5; margin-top:2rem; }
.footer-inner{ max-width: var(--container); margin:0 auto; padding:2.5rem 1.25rem 1.5rem; display:flex; flex-wrap:wrap; justify-content:space-between; gap:2rem; }
.footer-brand p{ color:#93A8BB; font-size:.9rem; max-width:32ch; margin-top:.4rem; }
.footer-logo{ color:#fff; }
.footer-links{ display:flex; flex-wrap:wrap; gap:1rem 1.5rem; }
.footer-links a{ color:#CBD9E5; text-decoration:none; font-size:.92rem; }
.footer-links a:hover{ color:#fff; text-decoration:underline; }
.footer-copyright{ text-align:center; font-size:.82rem; color:#7690A6; padding:1rem 1.25rem 1.5rem; border-top:1px solid rgba(255,255,255,.08); margin:0; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 760px){
  .primary-nav{ position:absolute; top:100%; left:0; right:0; background:#fff; border-bottom:1px solid var(--border); display:none; }
  .primary-nav.is-open{ display:block; }
  .primary-nav ul{ flex-direction:column; gap:0; padding:.5rem 1.25rem 1rem; }
  .primary-nav a{ display:block; padding:.8rem 0; border-bottom:1px solid var(--border); }
  .nav-toggle{ display:flex; }

  .tool-card{ padding:1.25rem; }
  .step-label{ display:none; }
  .steps-bar ol::before{ left:10%; right:10%; }
  .image-meta-actions{ width:100%; }
  .image-meta-actions .btn{ flex:1; }
  .compare-wrap{ aspect-ratio: 3/4; max-height: 420px; }
  .btn-lg{ max-width:none; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}
