/* ===========================================================
   jeitoso.com.br — estilos compartilhados
   =========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --border: #e6e8f0;
  --text: #1c2130;
  --muted: #6b7280;
  --accent: #ff6a3d;
  --accent-dark: #e6552a;
  --accent-soft: #fff1ec;
  --teal: #0ea5a3;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(20, 20, 43, 0.06);
  --shadow-lg: 0 12px 28px rgba(20, 20, 43, 0.12);
  --max: 980px;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { letter-spacing: -0.02em; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
header.site {
  background: rgba(246, 247, 251, 0.75);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
header.site .bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}
.logo span.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  box-shadow: 0 4px 12px rgba(255, 106, 61, 0.35);
  border-radius: 11px;
  font-size: 1.1rem;
}
.logo:hover { text-decoration: none; }
nav.main a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: 22px;
  transition: color .15s;
}
nav.main a:hover { color: var(--accent-dark); text-decoration: none; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 14px 0 0;
}
.breadcrumb a { color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 60px 20px 24px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 340px;
  background: radial-gradient(closest-side, rgba(255,106,61,0.16), rgba(255,106,61,0));
  z-index: -1;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  font-weight: 800;
  margin: 0 0 14px;
}
.hero p.lead {
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ---------- Tool card grid (home) ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 30px 0;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: block;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #ffd9c7;
  text-decoration: none;
}
.tool-card .icon {
  font-size: 1.5rem;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: 12px;
  margin-bottom: 14px;
}
.tool-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 9px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ---------- Generic tool page layout ---------- */
.tool-page h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  margin-bottom: 6px;
}
.tool-page .subtitle {
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 26px;
}
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.panel label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  margin-top: 16px;
}
.panel label:first-of-type { margin-top: 0; }
.panel input[type="text"],
.panel input[type="number"],
.panel input[type="password"],
.panel select,
.panel textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 1rem;
  background: #fbfbfd;
  color: var(--text);
  font-family: inherit;
}
.panel textarea { resize: vertical; min-height: 120px; }
.panel input:focus, .panel select:focus, .panel textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.row > div { flex: 1; min-width: 140px; }

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0 6px 16px rgba(255, 106, 61, 0.28);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(255, 106, 61, 0.36); }
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: transparent;
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
  box-shadow: none;
}
.btn.secondary:hover { background: var(--accent-soft); box-shadow: none; }
.btn.small { padding: 8px 14px; font-size: 0.85rem; margin-top: 0; }

.result-box {
  margin-top: 22px;
  padding: 20px;
  background: var(--accent-soft);
  border: 1px solid #ffd9c7;
  border-radius: 14px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.result-box .big {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  color: var(--accent-dark);
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
}
.result-box .caption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 6px;
}

.grid-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.info-box {
  background: #fbfbfd;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.info-box .k {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.info-box .v {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 3px;
  word-break: break-word;
}

/* ---------- FAQ ---------- */
section.content { margin: 40px 0; }
section.content h2 {
  font-size: 1.3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: border-color .15s;
}
details:hover { border-color: #ffd9c7; }
details summary {
  cursor: pointer;
  font-weight: 700;
}
details p { color: var(--muted); margin: 10px 0 0; }

/* ---------- Related tools ---------- */
.related {
  margin: 40px 0;
}
.related h2 { font-size: 1.15rem; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.related-grid a {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  display: block;
}
.related-grid a:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- Ads ---------- */
.ad-slot {
  background: repeating-linear-gradient(45deg, #eef0f6, #eef0f6 10px, #e7e9f2 10px, #e7e9f2 20px);
  border: 1px dashed var(--border);
  border-radius: 10px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 30px 0;
}

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 36px 20px 50px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
footer.site a { color: var(--muted); text-decoration: underline; }
footer.site .foot-links { margin-bottom: 10px; }
footer.site .foot-links a { margin: 0 8px; }

.status { color: var(--muted); font-size: 0.85rem; margin-top: 10px; }

/* ---------- File upload / image list (ferramentas de PDF) ---------- */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  background: #fbfbfd;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone input[type="file"] { display: none; }
.dropzone .dz-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.dropzone .dz-text { color: var(--muted); font-size: 0.9rem; }

.image-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}
.image-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fbfbfd;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
.image-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.image-item .name {
  flex: 1;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-item .actions { display: flex; gap: 4px; flex-shrink: 0; }
.image-item .actions button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
}
.image-item .actions button:hover { background: var(--accent-soft); border-color: var(--accent); }

/* ---------- Sliders / ferramentas de imagem (Canvas API) ---------- */
.slider-row { margin-top: 16px; }
.slider-row .slider-label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.slider-row .slider-label span.val { color: var(--accent-dark); font-family: "SFMono-Regular", Consolas, Menlo, monospace; }
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  outline: none;
  margin: 4px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  box-shadow: 0 2px 6px rgba(255, 106, 61, 0.4);
  cursor: pointer;
  border: 2px solid #fff;
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  box-shadow: 0 2px 6px rgba(255, 106, 61, 0.4);
  cursor: pointer;
  border: 2px solid #fff;
}
.panel input[type="checkbox"] { width: auto; accent-color: var(--accent); }

.img-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.img-preview-grid .box { text-align: center; }
.img-preview-grid .box .label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.img-preview-grid .box img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}
@media (max-width: 560px) {
  .img-preview-grid { grid-template-columns: 1fr; }
}

.image-item .size-info { font-size: 0.75rem; color: var(--muted); flex-shrink: 0; white-space: nowrap; }
.image-item .size-info .down { color: var(--accent-dark); font-weight: 700; }
.image-item a.download-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  padding: 5px 10px;
  flex-shrink: 0;
  white-space: nowrap;
}
.image-item a.download-link:hover { background: var(--accent-soft); }

@media (max-width: 640px) {
  nav.main a { margin-left: 14px; font-size: 0.85rem; }
  .logo { font-size: 1.1rem; }
}
