/* ═══════════════════════════════════════
   PDF COMPRESSOR — Page-specific styles
   Global vars/header/footer from filecraftyhub.css
   ═══════════════════════════════════════ */

/* ── PAGE HERO (same pattern as merger) ── */
.tool-hero {
  background: linear-gradient(160deg, #1e40af 0%, #2563eb 55%, #3b82f6 100%);
  padding: 36px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tool-hero::before {
  content: '';
  position: absolute;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  top: -100px; right: -80px;
  pointer-events: none;
}

.tool-hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.tool-hero-icon {
  font-size: 2.8rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.2));
}

.tool-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  line-height: 1.1;
  text-align: left;
}

.tool-hero-sub {
  color: rgba(255,255,255,.8);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  margin-top: 4px;
}

.tool-hero .trust-pills { justify-content: center; }
.tool-hero .trust-pills span {
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.22);
}

/* ── WRAPPER ── */
.compress-container {
  padding-top: 28px;
  padding-bottom: 48px;
}

/* ── MAIN CARD ── */
.compress-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
  padding: 28px 24px;
  border: 1.5px solid #e2e8f0;
  margin-bottom: 20px;
}

/* ── UPLOAD AREA ── */
.upload-area {
  border: 2.5px dashed #94a3b8;
  border-radius: 16px;
  padding: 40px 20px 32px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .25s, background .25s, transform .2s;
  margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #2563eb;
  background: #eff6ff;
  transform: scale(1.01);
}

.upload-icon-wrap {
  font-size: 2.8rem;
  margin-bottom: 10px;
  line-height: 1;
}

.upload-area h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.upload-area p {
  color: #64748b;
  font-size: 0.82rem;
}

/* ── FILE INFO BAR ── */
.file-info-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.file-info-icon { font-size: 1.4rem; flex-shrink: 0; }

.file-info-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-info-text strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-info-text span {
  font-size: 0.75rem;
  color: #64748b;
}

.change-file-btn {
  background: #fff;
  border: 1.5px solid #bfdbfe;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background .2s;
}
.change-file-btn:hover { background: #dbeafe; }

/* ── QUALITY BLOCK ── */
.quality-block {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.quality-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.quality-header label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

.quality-value-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.quality-value-wrap input {
  width: 62px;
  padding: 6px 10px;
  text-align: center;
  border: 2px solid #2563eb;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  color: #1e293b;
  outline: none;
}

.quality-value-wrap span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

input[type="range"] {
  width: 100%;
  accent-color: #2563eb;
  height: 6px;
  cursor: pointer;
}

.quality-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.quality-labels span {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
}

/* ── COMPRESS BUTTON ── */
.compress-btn {
  width: 100%;
  padding: 14px;
  background: #2563eb;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s, transform .15s, opacity .2s;
  margin-bottom: 16px;
}

.compress-btn:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.compress-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* ── PROGRESS ── */
.progress-wrap {
  margin-bottom: 16px;
}

.progress-status {
  font-size: 0.83rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 8px;
  text-align: center;
}

.progress-track {
  background: #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  height: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  width: 0%;
  border-radius: 8px;
  transition: width .3s ease;
}

/* ── RESULT ── */
.result-block {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 14px;
  padding: 20px;
  animation: fadeUp .3s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.result-icon { font-size: 2rem; flex-shrink: 0; }

.result-stats p {
  font-size: 0.83rem;
  color: #166534;
  margin-bottom: 3px;
}

.result-stats strong { color: #14532d; }

.reduction-text {
  font-size: 0.9rem !important;
  font-weight: 700;
  color: #16a34a !important;
}

.download-btn {
  width: 100%;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
}

.download-btn:hover { background: #15803d; }

/* ── HOW IT WORKS ── */
.how-it-works {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
  flex-wrap: wrap;
}

.how-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  min-width: 80px;
}

.step-num {
  width: 32px; height: 32px;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-step strong { font-size: 0.82rem; font-weight: 700; color: #1e293b; }
.how-step span   { font-size: 0.72rem; color: #64748b; }

.how-arrow { color: #94a3b8; font-size: 1.2rem; font-weight: 700; }

/* ── NAV ALL TOOLS ── */
.nav-all {
  background: rgba(255,255,255,.2) !important;
  font-weight: 700 !important;
}

/* ── MOBILE ── */
@media (max-width: 480px) {
  .compress-card { padding: 20px 16px; }
  .tool-hero-inner { flex-direction: column; gap: 10px; }
  .tool-hero-title,
  .tool-hero-sub  { text-align: center; }
  .how-arrow      { display: none; }
  .how-it-works   { gap: 20px; }
  .quality-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}