/* ==========================================================================
   GetIntoPDF.com — Modern, Clean PDF Tools Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800&display=swap');

:root {
  /* Color Palette */
  --primary: #4c6ef5;
  --primary-hover: #3b5bdb;
  --primary-light: #edf2ff;
  --secondary: #15aabf;
  --accent: #ff6b6b;
  --accent-hover: #fa5252;
  --dark: #1a1f36;
  --dark-surface: #101426;
  --text-main: #2b2c40;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #94a3b8;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(76, 110, 245, 0.25);

  /* Radius & Transitions */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* Container */
  --container-max: 1200px;
}

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

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

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

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

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

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font: inherit;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-content {
  flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', sans-serif;
  color: var(--dark);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -0.01em; margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 0.75rem; }

/* Navbar */
.site-header {
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--dark);
}

.brand-logo img {
  width: 38px;
  height: 38px;
}

.brand-logo span strong {
  color: var(--primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  padding: 0.5rem 0.25rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 480px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  z-index: 200;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dropdown-item svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--dark);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

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

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

.btn-accent {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

/* Hero Section */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #edf2ff 50%, #f0fdfa 100%);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 1rem auto 2rem;
}

/* Tool Grid */
.tools-grid-section {
  padding: 2rem 0 5rem;
}

.grid-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  justify-content: center;
}

.tool-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.1s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  will-change: transform;
}

.tool-card:hover {
  box-shadow: 0 20px 40px rgba(76, 110, 245, 0.12), 0 1px 3px rgba(0,0,0,0.05);
  border-color: rgba(255, 255, 255, 1);
}

.tool-icon svg {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tool-card:hover .tool-icon svg {
  transform: scale(1.15) rotate(5deg);
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.tool-card h3 {
  font-size: 1.2rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.tool-card .card-link {
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Tool Workspace / Dropzone */
.tool-workspace {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.05);
  padding: 2.5rem 2rem;
  max-width: 900px;
  margin: 0 auto 2.5rem;
  position: relative;
  z-index: 10;
}

.dropzone {
  border: 2px dashed rgba(76, 110, 245, 0.4);
  background: rgba(237, 242, 255, 0.5);
  border-radius: var(--radius-md);
  padding: 4rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  overflow: hidden;
}

.dropzone::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(76, 110, 245, 0.1) 0%, rgba(21, 170, 191, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(237, 242, 255, 0.8);
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(76, 110, 245, 0.15);
}

.dropzone:hover::before, .dropzone.dragover::before {
  opacity: 1;
}

.dropzone-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  color: var(--primary);
  filter: drop-shadow(0 4px 6px rgba(76, 110, 245, 0.3));
  position: relative;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dropzone:hover .dropzone-icon, .dropzone.dragover .dropzone-icon {
  transform: translateY(-8px) scale(1.05);
}

.dropzone-content {
  position: relative;
  z-index: 2;
}

.dropzone h3 {
  font-size: 1.5rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dropzone p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.file-input {
  display: none;
}

/* File list & Options */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.2rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.file-item-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.file-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.file-item-size {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.remove-file-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
}

.remove-file-btn:hover {
  background: #ffe3e3;
}

.tool-options {
  background: var(--bg-subtle);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark);
}

.form-control {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  outline: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(76, 110, 245, 0.15);
}

/* Progress bar */
.progress-bar-container {
  width: 100%;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 1.5rem 0;
  display: none;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

/* Result Box */
.result-box {
  display: none;
  background: #ebfbee;
  border: 1px solid #b2f2bb;
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
  margin-top: 1.5rem;
}

.result-box.active {
  display: block;
}

.result-box h4 {
  color: #2b8a3e;
  margin-bottom: 0.5rem;
}

.result-box p {
  color: #2b8a3e;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

/* Trust Signals Banner */
.trust-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  padding: 1.25rem;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  margin-bottom: 3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trust-item svg {
  width: 20px;
  height: 20px;
}

/* Content & Guide Section */
.content-section {
  max-width: 860px;
  margin: 0 auto 5rem;
  padding: 0 1rem;
}

.content-section h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.content-section p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  color: #334155;
}

.content-section ul, .content-section ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.content-section li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-question svg {
  transition: transform 0.2s ease;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

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

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  display: none;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

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

/* Footer */
.site-footer {
  background: var(--dark);
  color: #cbd5e1;
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #94a3b8;
  max-width: 320px;
}

.footer-title {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  font-family: 'Inter', sans-serif;
}

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

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #2e3654;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #64748b;
}

/* Utilities & Grid Helpers */
.text-center { text-align: center; }
.hidden { display: none !important; }

/* AdSense Placeholders */
.adsense-placeholder {
  width: 100%;
  background: var(--bg-subtle);
  border: 2px dashed var(--border-focus);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.adsense-placeholder.leaderboard {
  max-width: 970px;
  height: 90px;
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* ==========================================================================
   Archetype 1: Grid Workspace (Organize, Merge, Split, Rotate, JPG/PDF)
   ========================================================================== */
.editor-toolbar {
  position: sticky;
  top: 80px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 999px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}
.organize-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
  justify-items: center;
  background: var(--bg-alt);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  min-height: 400px;
}
.organize-page-wrapper {
  position: relative;
  background: #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 8px;
  overflow: hidden;
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
}
.organize-page-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -5px rgba(0,0,0,0.15), 0 4px 6px -2px rgba(0,0,0,0.1);
}
.organize-page-wrapper:active { cursor: grabbing; }
.organize-page-wrapper.dragging {
  opacity: 0.5;
  transform: scale(0.95);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}
.organize-page-wrapper.drag-over { outline: 2px dashed var(--primary); outline-offset: 4px; }
.organize-page-wrapper.deleted { opacity: 0.3; filter: grayscale(100%); }
.pdf-canvas { display: block; transition: transform 0.3s ease; }
.page-number-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(26, 31, 54, 0.85);
  color: #fff;
  font-size: 0.85rem; font-weight: 600;
  text-align: center; padding: 6px;
}
.page-actions {
  position: absolute; top: 0; left: 0; right: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
  display: flex; justify-content: flex-end; padding: 8px;
  opacity: 0; transition: opacity 0.2s;
}
.organize-page-wrapper:hover .page-actions, .organize-page-wrapper.deleted .page-actions { opacity: 1; }
.action-btn {
  background: rgba(255,255,255,0.9); border: none; border-radius: 4px;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-dark); transition: background 0.2s, color 0.2s;
}
.action-btn:hover { background: #fff; color: var(--danger); }
.deleted-overlay {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--danger); color: #fff; padding: 4px 12px;
  border-radius: 20px; font-size: 0.85rem; font-weight: bold;
  display: none; z-index: 10;
}
.organize-page-wrapper.deleted .deleted-overlay { display: block; }

/* Split PDF Specifics */
.organize-page-wrapper.page-selected {
  outline: 3px solid var(--primary);
  outline-offset: -3px;
}
.selected-overlay {
  position: absolute; top: 10px; right: 10px;
  background: var(--primary); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; opacity: 0; transition: opacity 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 10;
}
.organize-page-wrapper.page-selected .selected-overlay { opacity: 1; }

.split-cut-zone {
  position: absolute; top: 0; right: -15px; width: 30px; height: 100%;
  display: flex; align-items: center; justify-content: center;
  z-index: 20; cursor: col-resize; opacity: 0; transition: opacity 0.2s;
}
.organize-page-wrapper:hover .split-cut-zone { opacity: 1; }
.split-cut-btn {
  background: #fff; border: 1px solid var(--border-color); color: var(--text-dark);
  border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: all 0.2s;
}
.split-cut-btn:hover { background: var(--primary); color: #fff; transform: scale(1.1); }
.cut-line-active {
  position: absolute; top: 0; right: -8px; width: 2px; height: 100%;
  border-right: 2px dashed var(--danger); z-index: 15;
}
.cut-badge {
  position: absolute; top: 50%; right: -20px; transform: translateY(-50%);
  background: var(--danger); color: #fff; padding: 2px 6px; border-radius: 12px;
  font-size: 0.75rem; font-weight: bold; z-index: 16;
}

/* Shimmer Loading Animation */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.loading-shimmer {
  background: #f6f7f8;
  background-image: linear-gradient(90deg, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
  background-repeat: no-repeat;
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}
.loading-shimmer .pdf-canvas { opacity: 0; }

/* Preview Modal Styles */
.preview-modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.preview-modal.active { opacity: 1; pointer-events: auto; }
.preview-content {
  position: relative; max-width: 90vw; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center;
}
.preview-canvas-container {
  background: #fff; border-radius: 8px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: auto; max-height: 85vh;
}
.preview-canvas-container canvas { max-width: 100%; height: auto; display: block; }
.close-modal-btn {
  position: absolute; top: -40px; right: 0;
  background: rgba(255,255,255,0.2); color: #fff; border: none;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s;
}
.close-modal-btn:hover { background: rgba(255,255,255,0.4); }
.preview-spinner {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Responsive */
@media (max-width: 900px) {
  .dropdown-menu {
    position: static;
    transform: none !important;
    width: 100%;
    box-shadow: none;
    border: none;
    display: none;
    grid-template-columns: 1fr;
  }
  .dropdown.active .dropdown-menu {
    display: grid;
  }
  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: none;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.active {
    display: flex;
  }
  .mobile-toggle {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .tool-workspace {
    padding: 1.5rem 1rem;
  }
  .dropzone {
    padding: 2.5rem 1rem;
  }
}

/* Blog & Article Video Embed Styling */
.blog-video-container {
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: var(--dark);
}

.blog-video-player {
  width: 100%;
  max-height: 480px;
  display: block;
  object-fit: contain;
  background: #000000;
}

.video-caption {
  padding: 0.85rem 1.25rem;
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid #1e293b;
}

/* ==========================================================================
   PDF Editor / Annotator Component Styles
   ========================================================================== */

/* Editor Container */
.editor-container {
  margin-top: 1.5rem;
}

/* Sticky Toolbar */
.editor-toolbar {
  position: sticky;
  top: 72px;
  z-index: 50;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.toolbar-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border);
}
.toolbar-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.toolbar-btn.danger { color: var(--accent); }
.toolbar-btn.danger:hover { background: #fff0f0; }
.toolbar-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.toolbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 0.25rem;
  flex-shrink: 0;
}

.toolbar-spacer { flex: 1; }

.toolbar-color {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  background: none;
}

.toolbar-select {
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
}

/* Editor Pages Container */
.editor-pages {
  padding: 1rem 0 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  min-height: 400px;
}

/* Single Page Wrapper */
.editor-page {
  position: relative;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06);
  border-radius: 2px;
  overflow: visible;
}

.pdf-canvas {
  display: block;
}

.page-number-label {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Annotation Overlay Layer */
.annotation-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  pointer-events: none;
}
.annotation-layer.active {
  pointer-events: all;
  cursor: crosshair;
}

/* Individual Annotations */
.annotation {
  position: absolute;
  pointer-events: all;
  cursor: move;
  user-select: none;
  z-index: 15;
}
.annotation.selected {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.text-annotation {
  background: transparent;
  border: 1px dashed transparent;
  padding: 2px 4px;
  min-width: 30px;
  min-height: 1.2em;
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  line-height: 1.3;
  white-space: pre-wrap;
  word-break: break-word;
}
.text-annotation:focus {
  border-color: var(--primary);
  outline: none;
  background: rgba(76, 110, 245, 0.04);
}
.text-annotation.editing {
  cursor: text;
  border-color: var(--primary);
}

.rect-annotation {
  border: 2px solid;
  background: transparent;
}

.highlight-annotation {
  pointer-events: all;
  border-radius: 2px;
}

.freehand-annotation {
  pointer-events: none;
}
.freehand-annotation svg {
  display: block;
  overflow: visible;
}

/* Resize Handles */
.resize-handle {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border: 1px solid #ffffff;
  position: absolute;
  border-radius: 50%;
  z-index: 20;
  cursor: nwse-resize;
}
.resize-handle.top-left { top: -4px; left: -4px; cursor: nwse-resize; }
.resize-handle.top-right { top: -4px; right: -4px; cursor: nesw-resize; }
.resize-handle.bottom-left { bottom: -4px; left: -4px; cursor: nesw-resize; }
.resize-handle.bottom-right { bottom: -4px; right: -4px; cursor: nwse-resize; }

/* Signature Modal */
.sig-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.sig-modal {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 560px;
  overflow: hidden;
  animation: slideUp 0.25s ease;
}
.sig-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sig-modal-header h3 { font-size: 1.1rem; color: var(--text-main); }
.sig-modal-close {
  background: none; border: none; font-size: 1.5rem;
  color: var(--text-muted); cursor: pointer; line-height: 1;
}
.sig-modal-body { padding: 1.5rem; }
.sig-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Signature Tabs */
.sig-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.sig-tab {
  flex: 1;
  padding: 0.65rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-subtle);
  border: none;
  color: var(--text-muted);
  transition: var(--transition);
}
.sig-tab.active {
  background: var(--primary-light);
  color: var(--primary);
}
.sig-tab:not(:last-child) { border-right: 1px solid var(--border); }

/* Signature Canvas */
.sig-canvas {
  width: 100%;
  height: 180px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  cursor: crosshair;
  touch-action: none;
  background: #fafafa;
}

/* Typed Signature Input */
.sig-type-input {
  width: 100%;
  padding: 1.25rem;
  font-size: 2rem;
  font-family: 'Dancing Script', cursive, serif;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-main);
  background: #fafafa;
}

/* Signature Image Preview */
.sig-preview {
  max-width: 300px;
  max-height: 120px;
  margin: 1rem auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* Placed Signature on Page */
.signature-placement {
  position: absolute;
  cursor: move;
  pointer-events: all;
  z-index: 15;
  user-select: none;
}
.signature-placement img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.signature-placement.selected {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Page Thumbnail Grid (Organize tool) */
.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.25rem;
  padding: 2rem 0;
}

.page-thumb {
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: grab;
  transition: var(--transition);
  position: relative;
}
.page-thumb:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.page-thumb.dragging {
  opacity: 0.5;
  border-color: var(--primary);
}
.page-thumb.drop-target {
  border-color: var(--accent);
  border-style: dashed;
}
.page-thumb .thumb-canvas {
  display: block;
  width: 100%;
  height: auto;
}
.thumb-controls {
  padding: 0.5rem 0.65rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.thumb-delete {
  width: 22px; height: 22px;
  border: none; background: none;
  color: var(--accent); font-size: 1rem;
  cursor: pointer; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.thumb-delete:hover { background: #fff0f0; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Editor Responsive */
@media (max-width: 768px) {
  .editor-toolbar {
    position: relative;
    top: 0;
    gap: 0.3rem;
    padding: 0.4rem;
  }
  .toolbar-btn { font-size: 0.75rem; padding: 0.35rem 0.5rem; }
  .toolbar-divider { display: none; }
  .editor-pages { padding: 1rem 0; gap: 1.5rem; }
}

/* =========================================================
   ARCHETYPE 3: Utility Mode (Processing Cards)
   ========================================================= */
.utility-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: slideUp 0.4s ease-out;
}

.file-info-chip {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.file-info-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.file-info-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.file-info-name {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.95rem;
}

.file-info-size {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.utility-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.glass-input {
  background: rgba(255,255,255,0.6) !important;
  border: 1px solid rgba(0,0,0,0.1) !important;
  backdrop-filter: blur(4px);
  border-radius: var(--radius-md) !important;
  padding: 0.8rem 1rem !important;
  font-size: 1rem !important;
  transition: all 0.2s ease !important;
}

.glass-input:focus {
  background: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(76, 110, 245, 0.1) !important;
}

.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--bg-subtle);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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