/* PDFNoble.com - Main styles */
:root {
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --primary-light: #818CF8;
  --accent: #06B6D4;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --shadow: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.08);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
  flex-shrink: 0;
}
.logo:hover { color: var(--text); }
.logo-text span { color: var(--primary); }
.logo-icon {
  display: flex;
  filter: drop-shadow(0 2px 6px rgba(79, 70, 229, 0.45));
}
.logo-icon svg {
  display: block;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .2s;
}

.main-nav {
  margin-left: 0;
  flex: 0 0 auto;
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  justify-content: flex-start;
}
.nav-item { position: relative; }
.nav-link, .submenu-trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
}
.nav-link:hover, .submenu-trigger:hover,
.nav-item:hover > .submenu-trigger {
  background: #EEF2FF;
  color: var(--primary);
}
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: .15s ease;
  z-index: 50;
}
.nav-item:hover > .submenu,
.nav-item.open > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
}
.submenu a:hover {
  background: #EEF2FF;
  color: var(--primary);
}
.submenu i {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, #4F46E5, #818CF8);
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.35);
  flex-shrink: 0;
}
.submenu .menu-tool-icon {
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
  background: #FFFBEB;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
  overflow: hidden;
}
.submenu .menu-tool-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.submenu .menu-tool-icon.icon-pdf-to-jpg {
  background: #FFF7ED;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
}

/* Main */
.site-main {
  flex: 1;
  width: 100%;
}

/* Hero */
.hero {
  text-align: center;
  padding: 3.5rem 1.25rem 2.5rem;
  background: linear-gradient(180deg, #EEF2FF 0%, var(--bg) 100%);
}
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}
.hero h1 span { color: var(--primary); }
.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* Cards grid */
.tools-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.tool-card:hover, .tool-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
  outline: none;
}
.tool-card .card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  background: #FFF7ED;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.22);
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.tool-card .card-icon svg {
  display: block;
  width: 52px;
  height: 52px;
}
.tool-card:hover .card-icon {
  transform: scale(1.06);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.32);
}
.card-icon.icon-jpg-to-pdf {
  background: linear-gradient(145deg, #FFFBEB 0%, #FEF3C7 100%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}
.card-icon.icon-pdf-to-jpg {
  background: linear-gradient(145deg, #FFF7ED 0%, #FFEDD5 100%);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.18);
}
.tool-card:hover .card-icon.icon-pdf-to-jpg {
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);
}
.card-icon.blue {
  background: linear-gradient(145deg, #6366F1 0%, #4F46E5 50%, #4338CA 100%);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}
.card-icon.cyan {
  background: linear-gradient(145deg, #22D3EE 0%, #06B6D4 50%, #0891B2 100%);
  box-shadow: 0 6px 16px rgba(8, 145, 178, 0.35);
}
.tool-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
}
.tool-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  flex: 1;
}
.tool-card .card-action {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

/* Trust bar */
.trust-bar {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.trust-bar i { color: var(--success); margin-right: 0.3rem; }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  text-align: center;
  margin-top: auto;
}
.footer-inner p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
  background: #EEF2FF;
  color: var(--primary);
}
.btn-secondary:hover { background: #E0E7FF; }
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Page titles */
.page-header {
  text-align: center;
  padding: 2rem 1.25rem 1rem;
}
.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.page-header p { color: var(--text-muted); }

/* Options */
.options-panel {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
}
.option-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.option-group h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  color: var(--text);
}
.option-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.option-card {
  flex: 1 1 120px;
  min-width: 100px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  text-align: center;
  transition: .15s;
  font-size: 0.9rem;
  font-weight: 500;
}
.option-card:hover { border-color: var(--primary-light); }
.option-card.selected {
  border-color: var(--primary);
  background: #EEF2FF;
  color: var(--primary);
}
.option-card small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.option-card input { display: none; }

/* Progress */
.progress-wrap {
  max-width: 480px;
  margin: 2rem auto;
  text-align: center;
  padding: 2rem 1.25rem;
}
.progress-bar-outer {
  height: 10px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin: 1.25rem 0;
}
.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 99px;
  width: 0%;
  transition: width .3s ease;
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success / Error states */
.result-box {
  max-width: 480px;
  margin: 2rem auto;
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.result-box.success i { color: var(--success); font-size: 3rem; margin-bottom: 1rem; }
.result-box.error i { color: var(--danger); font-size: 3rem; margin-bottom: 1rem; }
.result-box h2 { margin-bottom: 0.5rem; }
.result-box p { color: var(--text-muted); margin-bottom: 1.25rem; }
.result-box .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.result-box .btn i {
  margin-right: 0.35rem;
}
.file-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Human check */
.human-check-box {
  max-width: 420px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: var(--shadow);
}
.human-check-box h2 { margin-bottom: 0.75rem; }
.human-challenge {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 1.25rem 0;
  letter-spacing: 0.05em;
}
.human-check-box input[type="text"] {
  width: 100%;
  max-width: 160px;
  padding: 0.7rem;
  font-size: 1.1rem;
  text-align: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}
.human-check-box input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Alerts */
.alert {
  max-width: 720px;
  margin: 1rem auto;
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.alert-danger {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}
.alert-warning {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}
.alert-info {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; }
  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    display: none;
    padding-left: 1rem;
  }
  .nav-item.open > .submenu { display: block; }
  .hero { padding: 2.5rem 1rem 1.5rem; }
  .tools-grid { grid-template-columns: 1fr; }
}


/* Advertisement slot (above footer) */
.ad-slot {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--bg);
}
.ad-slot-inner {
  max-width: 728px;
  width: 100%;
  min-height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.ad-slot iframe {
  max-width: 100%;
}
@media (max-width: 768px) {
  .ad-slot {
    padding: 0.75rem 0.5rem;
  }
  .ad-slot-inner {
    min-height: 60px;
  }
}


/* SEO content block – readable text, same design system */
.seo-content {
  max-width: 900px;
  margin: 0 auto 2.5rem;
  padding: 0 1.25rem;
}
.seo-content-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
}
.seo-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.seo-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}
.seo-content p,
.seo-content li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.seo-content ul {
  margin: 0.5rem 0 0.75rem 1.2rem;
}
.seo-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
