/**
 * EcrioX PDF Platform - Core Stylesheet
 * Premium, minimalist, conversion-focused styling inspired by modern PDF SaaS tools.
 * Distinctive Emerald-Green visual identity communicating simplicity, speed and trust.
 */

:root {
  --pdf-accent: #16A36A;
  --pdf-accent-hover: #108653;
  --pdf-accent-dark: #087F50;
  --pdf-accent-light: #EAF6EF;
  --pdf-accent-border: #C8DDD1;
  --pdf-accent-gradient: linear-gradient(135deg, #16A36A, #087F50);

  --pdf-cat-organize: #087F50;
  --pdf-cat-organize-bg: #EAF6EF;
  --pdf-cat-optimize: #16A36A;
  --pdf-cat-optimize-bg: #EAF6EF;
  --pdf-cat-convert: #0D9488;
  --pdf-cat-convert-bg: rgba(13, 148, 136, 0.08);
  --pdf-cat-edit: #16A36A;
  --pdf-cat-edit-bg: #EAF6EF;
}

[data-theme="dark"] {
  --pdf-accent: #10B981;
  --pdf-accent-hover: #34D399;
  --pdf-accent-dark: #087F50;
  --pdf-accent-light: rgba(22, 163, 106, 0.16);
  --pdf-accent-border: rgba(22, 163, 106, 0.35);
  --pdf-accent-gradient: linear-gradient(135deg, #10B981, #087F50);

  --pdf-cat-organize: #34D399;
  --pdf-cat-organize-bg: rgba(52, 211, 153, 0.12);
  --pdf-cat-optimize: #10B981;
  --pdf-cat-optimize-bg: rgba(16, 185, 129, 0.12);
  --pdf-cat-convert: #2DD4BF;
  --pdf-cat-convert-bg: rgba(45, 212, 191, 0.12);
  --pdf-cat-edit: #34D399;
  --pdf-cat-edit-bg: rgba(52, 211, 153, 0.12);
}

/* ==========================================================================
   1. HERO SECTION & PDF DROPZONE
   ========================================================================== */
.pdf-hero-section {
  padding: 4.5rem 1.25rem 3.5rem;
  text-align: center;
  background: radial-gradient(circle at 50% 10%, var(--pdf-accent-light) 0%, transparent 70%);
  position: relative;
}

.pdf-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: var(--pdf-accent-light);
  color: var(--pdf-accent);
  border: 1px solid var(--pdf-accent-border);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.pdf-hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-main);
  max-width: 860px;
  margin: 0 auto 1.25rem;
}

.pdf-hero-title .highlight-red,
.pdf-hero-title .highlight-green {
  background: var(--pdf-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pdf-hero-desc {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Prominent PDF Upload Dropzone */
.pdf-hero-dropzone-wrapper {
  max-width: 640px;
  margin: 0 auto;
}

.pdf-hero-dropzone {
  background: var(--bg-surface);
  border: 2px dashed var(--border-color);
  border-radius: 20px;
  padding: 2.75rem 2rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.pdf-hero-dropzone:hover,
.pdf-hero-dropzone.dragover {
  border-color: var(--pdf-accent);
  background: var(--pdf-accent-light);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -10px rgba(22, 163, 106, 0.2);
}

.pdf-drop-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--pdf-accent-light);
  color: var(--pdf-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  transition: transform 0.2s ease;
}

.pdf-hero-dropzone:hover .pdf-drop-icon {
  transform: scale(1.08);
}

.pdf-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--pdf-accent-gradient);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.875rem 2.25rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(22, 163, 106, 0.35);
  transition: all 0.2s ease;
  margin-bottom: 0.85rem;
}

.pdf-select-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -5px rgba(22, 163, 106, 0.45);
}

.pdf-drop-subtext {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.pdf-drop-privacy-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin-top: 1rem;
}

/* ==========================================================================
   2. CATEGORY FILTER TABS
   ========================================================================== */
.pdf-filter-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin: 2.5rem 0 3.5rem;
}

.pdf-filter-btn {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.pdf-filter-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle-hover);
  border-color: var(--border-color-hover);
}

.pdf-filter-btn.active {
  background: var(--pdf-accent);
  color: #ffffff;
  border-color: var(--pdf-accent);
  box-shadow: 0 4px 12px rgba(22, 163, 106, 0.25);
}

/* ==========================================================================
   3. PDF TOOLS GRID & CARDS
   ========================================================================== */
.pdf-category-group {
  margin-bottom: 4rem;
}

.pdf-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
}

.pdf-cat-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pdf-cat-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.pdf-cat-badge.organize { background: var(--pdf-cat-organize-bg); color: var(--pdf-cat-organize); }
.pdf-cat-badge.optimize { background: var(--pdf-cat-optimize-bg); color: var(--pdf-cat-optimize); }
.pdf-cat-badge.convert  { background: var(--pdf-cat-convert-bg); color: var(--pdf-cat-convert); }
.pdf-cat-badge.edit     { background: var(--pdf-cat-edit-bg); color: var(--pdf-cat-edit); }

.pdf-cat-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.pdf-cat-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Responsive Grid */
.pdf-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Tool Card */
.pdf-tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.pdf-tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--pdf-accent);
  box-shadow: 0 14px 28px -6px rgba(22, 163, 106, 0.14);
}

[data-theme="dark"] .pdf-tool-card:hover {
  border-color: var(--pdf-accent);
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.5);
}

.pdf-tool-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: transform 0.2s ease;
}

.pdf-tool-card:hover .pdf-tool-icon-box {
  transform: scale(1.08);
}

.pdf-tool-icon-box.organize { background: var(--pdf-cat-organize-bg); color: var(--pdf-cat-organize); }
.pdf-tool-icon-box.optimize { background: var(--pdf-cat-optimize-bg); color: var(--pdf-cat-optimize); }
.pdf-tool-icon-box.convert  { background: var(--pdf-cat-convert-bg); color: var(--pdf-cat-convert); }
.pdf-tool-icon-box.edit     { background: var(--pdf-cat-edit-bg); color: var(--pdf-cat-edit); }

.pdf-tool-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdf-tool-name .arrow-icon {
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease;
  color: var(--pdf-accent);
}

.pdf-tool-card:hover .pdf-tool-name .arrow-icon {
  opacity: 1;
  transform: translateX(0);
}

.pdf-tool-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
  flex-grow: 1;
}

/* ==========================================================================
   4. QUICK ACTION MODAL FOR HERO UPLOAD
   ========================================================================== */
.hero-action-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.hero-action-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-action-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2.25rem;
  position: relative;
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-action-modal.active .hero-action-modal-card {
  transform: scale(1);
}

.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-file-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-subtle);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.75rem;
}

.modal-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}

.hero-action-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.hero-action-card:hover {
  background: var(--pdf-accent-light);
  border-color: var(--pdf-accent);
  transform: translateX(3px);
}

.hero-action-card.loading {
  opacity: 0.6;
  pointer-events: none;
}

.hero-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--pdf-accent-light);
  color: var(--pdf-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-action-info {
  flex-grow: 1;
}

.hero-action-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
}

.hero-action-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   5. VALUE PROPOSITION & TRUST SECTION
   ========================================================================== */
.pdf-trust-section {
  padding: 5rem 1.25rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.trust-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
}

.trust-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
}

.trust-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--pdf-accent-light);
  color: var(--pdf-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.trust-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.trust-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   6. PROMINENT CALL TO ACTION: ALL OTHER UTILITIES
   ========================================================================== */
.all-tools-banner {
  margin: 4.5rem auto 1rem;
  background: linear-gradient(135deg, rgba(22, 163, 106, 0.05), rgba(8, 127, 80, 0.08));
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.all-tools-banner-text {
  max-width: 600px;
}

.all-tools-banner-text h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.all-tools-banner-text p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .pdf-hero-section {
    padding: 3rem 1rem 2rem;
  }
  .pdf-hero-dropzone {
    padding: 2rem 1.25rem;
  }
  .pdf-tools-grid {
    grid-template-columns: 1fr;
  }
  .all-tools-banner {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   EcrioX PDF Learning Center & Technical Guides Styling
   ========================================================================== */

.guide-article {
  max-width: 820px;
  margin: 0 auto 4rem;
  background-color: var(--bg-surface);
  padding: 2.75rem 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
}

@media (max-width: 640px) {
  .guide-article {
    padding: 1.75rem 1.25rem;
  }
}

.guide-meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.guide-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.guide-meta-badge {
  background: rgba(22, 163, 106, 0.1);
  color: var(--pdf-accent);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guide-toc {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0 2.25rem;
}

.guide-toc-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.guide-toc a {
  color: var(--pdf-accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.guide-toc a:hover {
  text-decoration: underline;
  color: var(--pdf-accent-hover);
}

.guide-callout {
  background: var(--bg-subtle);
  border-left: 4px solid var(--pdf-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.guide-callout.tip {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.06);
}

.guide-callout.warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}

.guide-callout strong {
  color: var(--text-main);
}

.guide-step-card {
  display: flex;
  gap: 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.25rem 0;
}

.guide-step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--pdf-accent);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.guide-step-body h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.guide-step-body p {
  margin: 0;
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.guide-cta-box {
  background: linear-gradient(135deg, rgba(22, 163, 106, 0.08) 0%, rgba(8, 127, 80, 0.04) 100%);
  border: 2px dashed rgba(22, 163, 106, 0.35);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0;
}

.guide-cta-box h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.guide-cta-box p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 1.25rem;
  line-height: 1.5;
}

.comparison-table-wrap {
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.comparison-table th {
  background: var(--bg-subtle);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
}

.comparison-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: var(--bg-subtle);
}

/* Guide Grid on Hub page */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin: 2.5rem 0;
}

.guide-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.guide-card:hover {
  transform: translateY(-3px);
  border-color: var(--pdf-accent);
  box-shadow: 0 12px 28px -6px rgba(22, 163, 106, 0.12);
}

.guide-card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pdf-accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.guide-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.guide-card-excerpt {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.guide-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-subtle);
}

