/* =========================================
   PDFHub — Main Stylesheet
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ---------- Reset & Variables ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --red:       #E8321A;
  --red-dark:  #C42A13;
  --red-light: #FF6B52;
  --ink:       #111214;
  --ink-soft:  #3A3D42;
  --mist:      #F4F3F0;
  --mist-dark: #E8E7E3;
  --white:     #FFFFFF;
  --teal:      #0CB89E;
  --teal-dark: #098F7A;
  --border:    rgba(17,18,20,0.10);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 12px 40px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10), 0 24px 64px rgba(0,0,0,0.10);
  --radius:    14px;
  --radius-lg: 22px;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--mist);
  color: var(--ink);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); cursor: pointer; }

/* ---------- Ad Containers (Google Ads compliant) ---------- */
.ad-slot {
  width: 100%;
  text-align: center;
  padding: 8px 0;
}

.ad-slot-top {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.ad-slot-middle {
  margin: 32px 0;
}

.ad-label {
  display: block;
  font-size: 10px;
  font-family: var(--font-body);
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  text-align: center;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--ink);
  flex-shrink: 0;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg { width: 20px; height: 20px; fill: white; }
.logo span { color: var(--red); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.nav-btn {
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.nav-btn:hover {
  background: var(--mist);
  color: var(--ink);
}

.nav-btn.active {
  background: var(--red);
  color: var(--white);
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--white);
  padding: 56px 24px 52px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(232,50,26,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 70% at 80% 40%, rgba(12,184,158,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.85);
}

.hero-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--red-light);
}

.hero p {
  font-size: 1.05rem;
  opacity: 0.7;
  max-width: 520px;
  margin: 0 auto;
}

.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  opacity: 0.7;
}

.trust-item svg {
  width: 16px; height: 16px;
  fill: var(--teal);
  opacity: 1;
}

/* ---------- Main Layout ---------- */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ---------- Tool Card ---------- */
.tool-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 36px;
  margin-bottom: 28px;
}

.tool-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.tool-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: var(--mist);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.6rem;
}

.tool-icon-wrap.active-tool {
  background: rgba(232,50,26,0.08);
}

.tool-meta { flex: 1; }

.tool-name {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.tool-desc {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 640px;
  margin-bottom: 28px;
}

/* ---------- Upload Zone ---------- */
.upload-zone {
  border: 2px dashed var(--mist-dark);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--mist);
  position: relative;
  margin-bottom: 16px;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--red);
  background: rgba(232,50,26,0.03);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(232,50,26,0.08);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon-wrap {
  width: 64px;
  height: 64px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-sm);
}

.upload-icon-wrap svg {
  width: 30px; height: 30px;
  fill: var(--red);
}

.upload-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.upload-sub {
  font-size: 0.85rem;
  color: var(--ink-soft);
  opacity: 0.7;
}

.upload-sub span {
  color: var(--red);
  font-weight: 600;
}

/* ---------- File List ---------- */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.file-item {
  background: var(--mist);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideUp 0.25s ease;
}

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

.file-thumb {
  width: 36px; height: 36px;
  background: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.file-info { flex: 1; min-width: 0; }

.file-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.file-size {
  font-size: 0.78rem;
  color: var(--ink-soft);
  opacity: 0.6;
}

.file-remove {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  font-size: 1rem;
}

.file-remove:hover {
  background: var(--red);
  border-color: var(--red);
  color: white;
  transform: scale(1.08);
}

/* ---------- Options Panel ---------- */
.options-panel {
  background: var(--mist);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 20px;
}

.options-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.option-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.option-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.option-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.option-group select,
.option-group input[type="text"],
.option-group input[type="range"] {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  transition: border-color var(--transition);
  outline: none;
}

.option-group select:focus,
.option-group input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232,50,26,0.08);
}

/* ---------- Progress ---------- */
.progress-wrap {
  margin-bottom: 20px;
}

.progress-track {
  height: 6px;
  background: var(--mist-dark);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red) 0%, var(--red-light) 100%);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 100px;
}

.progress-label {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 8px;
  text-align: center;
}

/* ---------- Action Buttons ---------- */
.action-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  min-width: 180px;
  flex: 1;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(232,50,26,0.30);
}

.btn-primary:hover:not(:disabled) {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(232,50,26,0.38);
}

.btn-ghost {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  background: var(--mist);
  border-color: var(--ink-soft);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ---------- Download Area ---------- */
.download-area {
  margin-top: 24px;
  background: rgba(12,184,158,0.06);
  border: 1px solid rgba(12,184,158,0.2);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

.download-success {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 12px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--teal);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(12,184,158,0.28);
  transition: all var(--transition);
  text-decoration: none;
}

.btn-download:hover {
  background: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(12,184,158,0.36);
}

/* ---------- FAQ Section ---------- */
.faq-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 36px;
  margin-bottom: 28px;
}

.section-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.faq-item:last-child {
  border-bottom: 1px solid var(--border);
}

.faq-q {
  font-weight: 700;
  font-size: 0.97rem;
  color: var(--ink);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.faq-q::before {
  content: 'Q';
  background: var(--red);
  color: white;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}

.faq-a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.65;
  padding-left: 24px;
}

/* ---------- Related Tools ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.tool-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--mist);
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  transition: all var(--transition);
}

.tool-link:hover {
  background: var(--white);
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.tool-link .tl-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.6);
  padding: 56px 24px 32px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: auto;
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .hero { padding: 36px 16px; }
  .tool-card, .faq-card { padding: 20px; }
  .btn { min-width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
