/* ==========================================================================
   PIXPDF DESIGN SYSTEM & STYLESHEET
   Brand: PIXPDF (https://pixpdf.pro)
   Palette: White + Dark Charcoal (#171717) + Professional Red (#E53935)
   ========================================================================== */

:root {
  --primary-red: #E53935;
  --dark-red: #C62828;
  --light-red: #FFEBEE;
  --very-light-red: #FFF5F5;
  --text-main: #171717;
  --text-muted: #555555;
  --text-light: #777777;
  --bg-main: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --bg-tertiary: #F1F3F5;
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-red: 0 4px 14px 0 rgba(229, 57, 53, 0.28);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --container-max: 1200px;
}

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

html {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition);
}

img, svg {
  vertical-align: middle;
}

.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;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Focus States for Accessibility */
:focus-visible {
  outline: 2px solid var(--primary-red);
  outline-offset: 2px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
:root { --header-h: 60px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
}

.brand-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: auto;
  height: 100%;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active,
.nav-item-dropdown:hover > .nav-link,
.nav-item-dropdown:focus-within > .nav-link {
  color: var(--text-main);
  background-color: var(--bg-tertiary);
}

/* Dropdown menus */
.nav-item-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-item-dropdown .nav-link svg.chevron {
  width: 10px;
  height: 10px;
  opacity: 0.55;
  transition: transform 0.2s ease;
}

.nav-item-dropdown:hover .nav-link svg.chevron,
.nav-item-dropdown:focus-within .nav-link svg.chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% - 6px);
  left: 0;
  min-width: 232px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.05);
  padding: 6px;
  display: none;
  z-index: 250;
}

.nav-dropdown-menu.is-wide {
  min-width: 480px;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-item-dropdown:hover .nav-dropdown-menu.is-wide,
.nav-item-dropdown:focus-within .nav-dropdown-menu.is-wide {
  display: grid;
}

.nav-dropdown-heading {
  padding: 8px 10px 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-light);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease;
}

.nav-dropdown-item:hover {
  background-color: var(--bg-tertiary);
}

/* Small coloured tool icon used in menus */
.nav-ico {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--tc, var(--primary-red));
  background: var(--tc-bg, var(--very-light-red));
}

.nav-ico svg {
  width: 14px;
  height: 14px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* "All tools" button */
.btn-header-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background-color: var(--text-main);
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1.2;
}

.btn-header-all:hover {
  background-color: #000000;
  color: #FFFFFF;
}

/* Mobile Hamburger */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

.mobile-menu-btn:hover {
  background-color: var(--bg-tertiary);
}

/* Mobile Nav Drawer */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: #FFFFFF;
  padding: 8px 16px 32px 16px;
  overflow-y: auto;
  z-index: 99;
  display: none;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--border-color);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav-heading {
  margin-top: 14px;
  padding: 0 10px 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-light);
}

.mobile-nav .nav-link {
  font-size: 15px;
  padding: 9px 10px;
  gap: 10px;
  width: 100%;
}

/* ==========================================================================
   MEGA MENU (ALL TOOLS)
   ========================================================================== */
.mega-menu-overlay {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 150;
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mega-menu-overlay.open {
  display: block;
  opacity: 1;
}

.mega-menu-container {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--header-h) - 8px);
  overflow-y: auto;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 151;
  display: none;
  padding: 32px 0 40px 0;
}

.mega-menu-container.open {
  display: block;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 32px;
}

.mega-category {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mega-cat-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary-red);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--light-red);
}

.mega-tool-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mega-tool-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mega-tool-item a:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-main);
}

.mega-tool-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tc, var(--primary-red));
  flex-shrink: 0;
}

.badge-coming-soon {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: #F1F3F5;
  color: #6C757D;
  margin-left: auto;
}

/* ==========================================================================
   HOMEPAGE HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 64px 0 40px 0;
  text-align: center;
  background: #FFFFFF;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--primary-red);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text-main);
  max-width: 820px;
  margin: 0 auto 16px auto;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  background-color: var(--primary-red);
  color: #FFFFFF;
  font-size: 15.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-red);
}

.btn-primary:hover {
  background-color: var(--dark-red);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  background-color: #FFFFFF;
  color: var(--text-main);
  font-size: 15.5px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-secondary);
}

/* ==========================================================================
   CATEGORY NAVIGATION / FILTER
   ========================================================================== */
.category-filter-wrapper {
  padding: 24px 0 32px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 40px;
}

.category-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-btn {
  padding: 8px 18px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background-color: var(--bg-secondary);
  transition: var(--transition);
}

.cat-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-main);
}

.cat-btn.active {
  background-color: var(--primary-red);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: var(--shadow-red);
}

/* ==========================================================================
   MAIN TOOL GRID
   ========================================================================== */
.tools-grid-section {
  padding: 0 0 64px 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.tool-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  text-decoration: none;
}

.tool-card:hover {
  border-color: var(--tc-hover, var(--border-hover));
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--tc-bg, var(--very-light-red));
  color: var(--tc, var(--primary-red));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: var(--transition);
}

.tool-card:hover .tool-card-icon-wrap {
  background: var(--tc, var(--primary-red));
  color: #FFFFFF;
}

.tool-card-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.tool-card-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.tool-card-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--bg-secondary);
}

.tool-card-action {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-red);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tool-card:hover .tool-card-action {
  text-decoration: underline;
}

/* ==========================================================================
   WHY PIXPDF SECTION
   ========================================================================== */
.why-section {
  padding: 72px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px auto;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.why-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
}

.why-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px auto;
  border-radius: var(--radius-full);
  background: var(--very-light-red);
  color: var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-card-icon svg {
  width: 24px;
  height: 24px;
}

.why-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.why-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   PRIVACY SECTION
   ========================================================================== */
.privacy-section {
  padding: 64px 0;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
}

.privacy-box {
  background: var(--very-light-red);
  border: 1px solid var(--light-red);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.privacy-icon-badge {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--primary-red);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-red);
}

.privacy-icon-badge svg {
  width: 36px;
  height: 36px;
}

.privacy-content h3 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.privacy-content p {
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   HOMEPAGE RESOURCES & FAQ
   ========================================================================== */
.resources-section {
  padding: 64px 0;
  background: #FFFFFF;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.resource-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  background: #FFFFFF;
  transition: var(--transition);
}

.resource-card:hover {
  border-color: var(--primary-red);
  box-shadow: var(--shadow-md);
}

.resource-card h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.resource-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.resource-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-red);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.faq-section {
  padding: 64px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-question {
  width: 100%;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  text-align: left;
}

.faq-question svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 24px 20px 24px;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ==========================================================================
   FINAL CTA
   ========================================================================== */
.final-cta-section {
  padding: 72px 0;
  background: #FFFFFF;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.final-cta-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.final-cta-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ==========================================================================
   TOOL WORKSPACE PAGE
   ========================================================================== */
.tool-page-header {
  padding: 32px 0 24px 0;
  text-align: center;
  background: #FFFFFF;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.breadcrumb a:hover {
  color: var(--primary-red);
}

.breadcrumb-separator {
  color: var(--border-hover);
}

.tool-h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.tool-lead {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* Tool Workspace Stage */
.tool-workspace {
  max-width: 860px;
  margin: 0 auto 48px auto;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px;
}

/* Dropzone Upload Area */
.dropzone {
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  background: var(--bg-secondary);
  transition: var(--transition);
  cursor: pointer;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary-red);
  background: var(--very-light-red);
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--tc-bg, #FFFFFF);
  color: var(--tc, var(--primary-red));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: var(--shadow-sm);
}

.dropzone-icon svg {
  width: 28px;
  height: 28px;
}

.dropzone-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.dropzone-sub {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 18px;
}

.dropzone-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* File List & Items */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.file-icon {
  width: 32px;
  height: 32px;
  color: var(--primary-red);
  flex-shrink: 0;
}

.file-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 480px;
}

.file-size {
  font-size: 12.5px;
  color: var(--text-light);
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-remove-file {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.btn-remove-file:hover {
  background: #FEE2E2;
  color: var(--dark-red);
}

/* Tool Options Panel */
.tool-options-panel {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.options-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main);
  min-width: 140px;
}

.form-control:focus {
  border-color: var(--primary-red);
  outline: none;
}

/* Action Execution Zone */
.action-zone {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-action-large {
  width: 100%;
  max-width: 360px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  background: var(--primary-red);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-action-large:hover {
  background: var(--dark-red);
  transform: translateY(-1px);
}

/* Processing State */
.processing-box {
  padding: 48px 24px;
  text-align: center;
  display: none;
}

.processing-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--light-red);
  border-top-color: var(--primary-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-status-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.processing-sub-text {
  font-size: 14px;
  color: var(--text-muted);
}

/* Success State */
.success-box {
  padding: 48px 24px;
  text-align: center;
  display: none;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--very-light-red);
  color: var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
}

.success-icon svg {
  width: 32px;
  height: 32px;
}

.success-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.success-sub {
  font-size: 14.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.success-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Interactive Canvas / Page Organizer Grid */
.organizer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.page-thumb-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  user-select: none;
}

.page-thumb-card.selected {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 2px var(--light-red);
}

.page-thumb-canvas-wrap {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FAFAFA;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.page-thumb-canvas-wrap canvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-thumb-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.page-thumb-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
}

.page-thumb-actions button {
  padding: 4px;
  border-radius: 4px;
  color: var(--text-muted);
}

.page-thumb-actions button:hover {
  background: var(--bg-tertiary);
  color: var(--primary-red);
}

/* ==========================================================================
   HOW IT WORKS & TOOL SEO CONTENT
   ========================================================================== */
.tool-content-section {
  padding: 48px 0;
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.step-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--bg-secondary);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary-red);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.step-desc {
  font-size: 14.5px;
  color: var(--text-main);
  line-height: 1.5;
}

/* ==========================================================================
   INTERACTIVE PDF EDITOR WORKSPACE & TOOLBAR
   ========================================================================== */
.editor-workspace-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 20px;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
}

.editor-tool-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.editor-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.editor-tool-btn svg {
  width: 16px;
  height: 16px;
}

.editor-tool-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-hover);
}

.editor-tool-btn.active {
  background: var(--primary-red);
  color: #FFFFFF;
  border-color: var(--primary-red);
  box-shadow: var(--shadow-red);
}

.editor-tool-btn.active svg {
  stroke: #FFFFFF;
}

.editor-prop-control {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main);
}

.editor-color-input {
  width: 32px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #FFF;
}

.editor-viewport {
  position: relative;
  width: 100%;
  min-height: 500px;
  max-height: 750px;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
  background: #525659;
  border-radius: var(--radius-md);
}

.editor-page-stage {
  position: relative;
  background: #FFFFFF;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  margin: 0 auto;
  user-select: none;
}

.editor-canvas-bg {
  display: block;
}

.editor-canvas-draw {
  position: absolute;
  top: 0;
  left: 0;
  cursor: crosshair;
  touch-action: none;
}

.editor-canvas-draw.mode-select {
  cursor: default;
  pointer-events: none;
}

.editor-overlay-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.editor-text-item {
  position: absolute;
  pointer-events: auto;
  cursor: move;
  padding: 4px 8px;
  border: 1px dashed var(--primary-red);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  min-width: 80px;
}

.editor-text-item input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  width: 100%;
}

.editor-text-item .btn-del-text {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  background: var(--dark-red);
  color: #FFF;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.editor-stamp-item {
  position: absolute;
  pointer-events: auto;
  cursor: move;
  border: 1px dashed var(--primary-red);
  padding: 2px;
  background: rgba(255, 255, 255, 0.6);
}

.editor-stamp-item img {
  display: block;
  max-width: 100%;
  height: auto;
}

.editor-stamp-item .btn-del-stamp {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  background: var(--dark-red);
  color: #FFF;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Pagination & Navigation Bar */
.editor-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 16px;
}

.editor-page-info {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

/* Signature Modal */
.sig-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sig-modal-backdrop.open {
  display: flex;
}

.sig-modal {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sig-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sig-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.sig-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.sig-tab-btn {
  padding: 6px 14px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.sig-tab-btn.active {
  background: var(--very-light-red);
  color: var(--primary-red);
}

.sig-pad-canvas {
  width: 100%;
  height: 180px;
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-md);
  background: #FAFAFA;
  touch-action: none;
  cursor: crosshair;
}

.sig-type-preview {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Brush Script MT', 'Dancing Script', cursive, sans-serif;
  font-size: 38px;
  color: #171717;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #FAFAFA;
}

.sig-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Related Tools Bar */
.related-tools-section {
  padding: 48px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   OPTIONAL ADSENSE SLOTS (Clean & Away from Primary CTA)
   ========================================================================== */
.pix-ad-slot {
  width: 100%;
  max-width: 970px;
  min-height: 90px;
  margin: 32px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FAFAFA;
  border: 1px dashed #E2E8F0;
  border-radius: var(--radius-sm);
  color: #94A3B8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   STATIC PAGES (About, Contact, Privacy, Terms, Cookies, Resources)
   ========================================================================== */
.article-page {
  padding: 48px 0 80px 0;
}

.article-container {
  max-width: 800px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.article-title {
  font-size: 38px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.article-body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-main);
}

.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 32px 0 12px 0;
  color: var(--text-main);
}

.article-body h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 24px 0 8px 0;
  color: var(--text-main);
}

.article-body p {
  margin-bottom: 16px;
  color: #333333;
}

.article-body ul, .article-body ol {
  margin: 0 0 20px 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body a {
  color: var(--primary-red);
  text-decoration: underline;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: #171717;
  color: #E5E7EB;
  padding: 64px 0 32px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 36px;
  padding-bottom: 48px;
  border-bottom: 1px solid #2D3748;
}

.footer-brand p {
  font-size: 14px;
  color: #9CA3AF;
  line-height: 1.6;
  margin-top: 12px;
  max-width: 280px;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #F3F4F6;
  margin-bottom: 16px;
}

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

.footer-links a {
  font-size: 14px;
  color: #9CA3AF;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: #9CA3AF;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .mega-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-link { padding: 6px 9px; font-size: 13.5px; }
  .nav-dropdown-menu.is-wide { min-width: 420px; }
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-desktop, .btn-header-all {
    display: none;
  }
  .header-inner { gap: 12px; }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero-title {
    font-size: 32px;
  }
  .hero-subtitle {
    font-size: 16px;
  }
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-grid, .resource-grid {
    grid-template-columns: 1fr;
  }
  .privacy-box {
    flex-direction: column;
    padding: 32px 20px;
    text-align: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn-primary, .hero-actions .btn-secondary {
    width: 100%;
  }
  .dropzone {
    padding: 32px 16px;
  }
  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .file-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   BACKGROUND EFFECTS
   Soft colour glows, dot grid and floating document shapes behind the content
   ========================================================================== */
body {
  background-color: #F7F8FC;
  position: relative;
}

/* Page-wide soft colour glows + dot grid (fixed, sits behind everything) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(640px 420px at 8% 4%,  rgba(229, 57, 53, 0.10), transparent 70%),
    radial-gradient(720px 480px at 96% 12%, rgba(79, 70, 229, 0.10), transparent 70%),
    radial-gradient(680px 460px at 70% 96%, rgba(14, 165, 233, 0.09), transparent 70%),
    radial-gradient(560px 380px at 4% 88%,  rgba(245, 158, 11, 0.08), transparent 70%),
    radial-gradient(rgba(15, 23, 42, 0.07) 1px, transparent 1.2px);
  background-size: auto, auto, auto, auto, 24px 24px;
}

/* Hero */
.hero-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0) 100%);
}

.hero-section > .container { position: relative; z-index: 1; }

.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: contain;
}

/* Floating PDF page – left */
.hero-section::before {
  width: 150px; height: 190px;
  left: max(2%, calc(50% - 640px));
  top: 70px;
  transform: rotate(-12deg);
  opacity: 0.9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 190'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23FF6B6B'/%3E%3Cstop offset='1' stop-color='%23C62828'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M14 8h82l40 40v126a8 8 0 0 1-8 8H14a8 8 0 0 1-8-8V16a8 8 0 0 1 8-8z' fill='url(%23g)' opacity='.16'/%3E%3Cpath d='M96 8l40 40H104a8 8 0 0 1-8-8z' fill='%23E53935' opacity='.28'/%3E%3Crect x='28' y='84' width='94' height='8' rx='4' fill='%23E53935' opacity='.28'/%3E%3Crect x='28' y='104' width='70' height='8' rx='4' fill='%23E53935' opacity='.2'/%3E%3Crect x='28' y='124' width='84' height='8' rx='4' fill='%23E53935' opacity='.2'/%3E%3C/svg%3E");
}

/* Floating stack of pages – right */
.hero-section::after {
  width: 190px; height: 190px;
  right: max(2%, calc(50% - 650px));
  top: 110px;
  transform: rotate(10deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 190'%3E%3Crect x='46' y='14' width='100' height='128' rx='10' fill='%234F46E5' opacity='.10' transform='rotate(-8 96 78)'/%3E%3Crect x='58' y='30' width='100' height='128' rx='10' fill='%230EA5E9' opacity='.13' transform='rotate(4 108 94)'/%3E%3Crect x='42' y='42' width='100' height='128' rx='10' fill='%23ffffff' stroke='%234F46E5' stroke-opacity='.25' stroke-width='2'/%3E%3Crect x='58' y='64' width='68' height='8' rx='4' fill='%234F46E5' opacity='.25'/%3E%3Crect x='58' y='84' width='52' height='8' rx='4' fill='%234F46E5' opacity='.18'/%3E%3Ccircle cx='108' cy='134' r='12' fill='%2316A34A' opacity='.25'/%3E%3C/svg%3E");
}

@media (max-width: 1100px) {
  .hero-section::before, .hero-section::after { opacity: 0.45; }
}
@media (max-width: 700px) {
  .hero-section::before, .hero-section::after { display: none; }
}

/* Tools grid area */
.tools-grid-section { background: transparent; }

/* "Why PIXPDF" – diagonal tint with dot texture */
.why-section {
  background:
    radial-gradient(rgba(79, 70, 229, 0.10) 1px, transparent 1.2px) 0 0 / 22px 22px,
    linear-gradient(135deg, #EEF2FF 0%, #FDF2F8 50%, #FFF7ED 100%);
}

/* Privacy */
.privacy-section { background: transparent; }

/* Guides */
.resources-section { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 100%); }

/* FAQ */
.faq-section { background: transparent; }

/* Final call-to-action */
.final-cta-section {
  background:
    radial-gradient(520px 260px at 15% 20%, rgba(229, 57, 53, 0.12), transparent 70%),
    radial-gradient(520px 260px at 85% 80%, rgba(79, 70, 229, 0.12), transparent 70%),
    #FFFFFF;
}

/* Tool pages */
.tool-page-header {
  background:
    radial-gradient(560px 220px at 12% 0%, rgba(229, 57, 53, 0.10), transparent 70%),
    radial-gradient(560px 220px at 88% 0%, rgba(14, 165, 233, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,255,255,0));
}

/* Keep the sticky header crisp over the colourful background */
.site-header { background: rgba(255, 255, 255, 0.92); }
