/* Project-specific styles for YeahPDF - PDF Tools */
/* Uses base design system variables from style.css */

/* Hero Section */
.hero-section {
  position: relative;
  margin: 2rem 0 4rem;
  padding: 4rem 0 5rem;
  overflow: hidden;
}

.hero-background-animation {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    #667eea 0%,
    #764ba2 25%,
    #f093fb 50%,
    #4facfe 75%,
    #00f2fe 100%
  );
  background-size: 400% 400%;
  animation: heroGradientShift 15s ease infinite;
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}

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

.hero-container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  position: relative;
  z-index: 1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
  align-content: center;
  overflow: visible;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  align-items: center;
  overflow: visible;
}

.hero-title,
.hero-description {
  text-align: center;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title {
  font-size: clamp(36px, 5.5vw, 58px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  background: linear-gradient(
    135deg,
    var(--text-color) 0%,
    var(--link) 60%,
    rgba(139, 92, 246, 0.9) 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  animation: heroTitleGradientShift 8s ease infinite;
  position: relative;
  padding-bottom: 0.3em;
  overflow: visible;
  display: block;
}

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

.hero-description {
  font-size: 1.4rem;
  color: var(--text-color);
  margin: 0;
  line-height: 1.7;
  font-weight: 400;
}

.hero-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem;
  overflow: visible;
}

.hero-feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  padding: 1.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
  opacity: 1;
}

.hero-feature-card:hover {
  border-color: #667eea;
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.2);
  transform: translateY(-4px) scale(1.02);
  animation: none;
}

.hero-feature-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-small);
  background: linear-gradient(
    135deg,
    rgba(110, 231, 183, 0.95) 0%,
    rgba(52, 211, 153, 0.98) 50%,
    rgba(16, 185, 129, 0.95) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 6px 20px rgba(110, 231, 183, 0.35),
    0 2px 8px rgba(52, 211, 153, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.15);
  animation:
    iconPulse 2s ease-in-out infinite,
    iconGradientShift 4s ease infinite;
  background-size: 200% 200%;
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

.hero-feature-card:hover .hero-feature-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(
    135deg,
    rgba(52, 211, 153, 0.98) 0%,
    rgba(110, 231, 183, 1) 50%,
    rgba(16, 185, 129, 0.98) 100%
  );
  background-size: 200% 200%;
  box-shadow:
    0 10px 28px rgba(110, 231, 183, 0.5),
    0 4px 12px rgba(52, 211, 153, 0.3),
    inset 0 2px 6px rgba(255, 255, 255, 0.4),
    inset 0 -1px 3px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  border-width: 2px;
  animation: iconGradientShift 2s ease infinite;
}

.hero-feature-text {
  color: var(--text-color);
  font-size: 1.6rem;
  line-height: 1.5;
  margin: 0;
  font-weight: 400;
  flex: 1;
}

.hero-upload {
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: center;
  height: 100%;
}

.hero-upload-box {
  width: 100%;
  max-width: 560px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.98) 100%
  );
  backdrop-filter: blur(10px);
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 3.5rem 2.5rem;
  text-align: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  animation: heroUploadFloat 6s ease-in-out infinite;
}

@keyframes heroUploadFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero-upload-box:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 1) 100%
  );
}

.hero-upload-box.drag-over {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 25px 70px rgba(102, 126, 234, 0.2);
  animation: heroUploadPulse 1s ease-in-out infinite;
  border-color: rgba(102, 126, 234, 0.5);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 1) 100%
  );
}

@keyframes heroUploadPulse {
  0%,
  100% {
    transform: translateY(-8px) scale(1.05);
  }
  50% {
    transform: translateY(-12px) scale(1.06);
  }
}

.hero-upload-process {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  pointer-events: none;
  z-index: 1;
  width: calc(100% - 2.5rem);
  max-width: 100%;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: heroProcessPulse 3s ease-in-out infinite;
}

.process-step:nth-child(1) {
  animation-delay: 0s;
}

.process-step:nth-child(3) {
  animation-delay: 1s;
}

.process-step:nth-child(5) {
  animation-delay: 2s;
}

.process-step i {
  font-size: 2.5rem;
  color: #667eea;
  animation: heroStepIcon 3s ease-in-out infinite;
}

.process-step:nth-child(1) i {
  animation-delay: 0s;
}

.process-step:nth-child(3) i {
  animation-delay: 1s;
}

.process-step:nth-child(5) i {
  animation-delay: 2s;
}

.process-step span {
  font-size: 1rem;
  font-weight: 700;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.process-arrow {
  color: rgba(102, 126, 234, 0.7);
  font-size: 1.5rem;
  animation: heroArrowPulse 3s ease-in-out infinite;
}

.process-arrow:nth-child(2) {
  animation-delay: 0.5s;
}

.process-arrow:nth-child(4) {
  animation-delay: 1.5s;
}

@keyframes heroProcessPulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@keyframes heroStepIcon {
  0%,
  100% {
    transform: scale(1);
    color: #667eea;
  }
  50% {
    transform: scale(1.15);
    color: #764ba2;
  }
}

@keyframes heroArrowPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: translateX(0);
  }
  50% {
    opacity: 0.9;
    transform: translateX(4px);
  }
}

.hero-upload-content {
  position: relative;
  z-index: 2;
  padding-top: 6rem;
}

.hero-upload-icon-wrapper {
  display: none;
}

.hero-upload-icon {
  font-size: 5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 2;
  animation: heroIconFloat 3s ease-in-out infinite;
  display: inline-block;
}

@keyframes heroIconFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-15px) rotate(5deg);
  }
  75% {
    transform: translateY(-5px) rotate(-5deg);
  }
}

.hero-upload-icon-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.15) 0%,
    rgba(118, 75, 162, 0.15) 100%
  );
  border-radius: 50%;
  z-index: 1;
  animation: heroIconBgPulse 3s ease-in-out infinite;
}

@keyframes heroIconBgPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.3;
  }
}

.hero-upload-box.drag-over .hero-upload-icon {
  animation: heroIconSpin 0.6s ease-in-out infinite;
}

@keyframes heroIconSpin {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-10px) rotate(180deg) scale(1.1);
  }
}

.hero-upload-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  background: linear-gradient(
    135deg,
    var(--text-color) 0%,
    var(--link) 60%,
    rgba(139, 92, 246, 0.9) 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroTitleGradientShift 8s ease infinite;
}

.hero-upload-hint {
  color: var(--muted-text);
  font-size: 1.4rem;
  margin: 0 0 2rem;
  font-weight: 400;
}

.hero-upload-separator {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  position: relative;
}

.hero-upload-separator::before,
.hero-upload-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.hero-upload-separator span {
  padding: 0 1rem;
  color: var(--muted-text);
  font-size: 1.25rem;
  font-weight: 600;
}

.hero-upload-button {
  font-size: 1.2rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-upload-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.hero-upload-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.hero-upload-button:hover::before {
  left: 100%;
}

.hero-upload-button:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.hero-upload-button i {
  font-size: 1.1rem;
}

.hero-upload-limit {
  margin-top: 1.5rem;
  color: var(--muted-text);
  font-size: 1.4rem;
  font-weight: 400;
}

.hero-upload-formats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Hero upload PDF/convert choice modal — uses base_modal.css .modal, .modal-content, .modal-header, .modal-body */
.hero-choice-modal-backdrop {
  position: absolute;
  inset: 0;
}

.hero-choice-modal-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--muted-text, #94a3b8);
  margin: 0 0 0.25rem;
  font-weight: 700;
}

#heroPdfChoiceModal .modal-header h3 {
  margin: 0;
  font-size: 1.35rem;
}

.hero-choice-modal-subtitle {
  margin: 0.35rem 0 0;
  color: var(--muted-text, #94a3b8);
}

.hero-choice-modal-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.hero-choice-card {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-muted, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
}

.hero-choice-card-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-height: 0;
}

.hero-choice-card-label {
  display: block;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--link, #6366f1);
  margin: 0;
}

.hero-choice-filename-block,
.hero-choice-select {
  width: 100%;
  min-height: 3.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-muted, rgba(255, 255, 255, 0.12));
  background: var(--input-bg, var(--card-bg, #0f172a));
  color: var(--text-color, #e5e7eb);
  font-size: 0.95rem;
  box-sizing: border-box;
  line-height: 1.35;
}

.hero-choice-filename-block {
  font-weight: 600;
  word-break: break-word;
  display: flex;
  align-items: center;
  height: 3.75rem;
  margin-bottom: 1.5rem;
}

.hero-choice-select {
  cursor: pointer;
  height: 3.75rem;
}

.hero-choice-card-hint {
  margin: 0;
  color: var(--muted-text, #94a3b8);
  font-size: 0.875rem;
  line-height: 1.4;
}

.hero-choice-action {
  align-self: center;
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.format-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 0 8px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  z-index: 1;
}

.format-badge > * {
  position: relative;
  z-index: 2;
}

.format-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.25) 0%,
    transparent 70%
  );
  opacity: 0.5;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.format-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.format-badge:hover::before {
  opacity: 0.8;
}

.format-pdf {
  background: linear-gradient(
    135deg,
    rgba(229, 62, 62, 0.9) 0%,
    rgba(197, 48, 48, 0.95) 50%,
    rgba(229, 62, 62, 0.85) 100%
  );
}

.format-word {
  background: linear-gradient(
    135deg,
    rgba(41, 128, 185, 0.9) 0%,
    rgba(52, 152, 219, 0.95) 50%,
    rgba(41, 128, 185, 0.85) 100%
  );
}

.format-excel {
  background: linear-gradient(
    135deg,
    rgba(39, 174, 96, 0.9) 0%,
    rgba(46, 213, 115, 0.95) 50%,
    rgba(39, 174, 96, 0.85) 100%
  );
}

.format-ppt {
  background: linear-gradient(
    135deg,
    rgba(231, 76, 60, 0.9) 0%,
    rgba(235, 77, 75, 0.95) 50%,
    rgba(231, 76, 60, 0.85) 100%
  );
}

.format-jpg {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.9) 0%,
    rgba(118, 75, 162, 0.95) 50%,
    rgba(102, 126, 234, 0.85) 100%
  );
}

.format-png {
  background: linear-gradient(
    135deg,
    rgba(72, 187, 120, 0.9) 0%,
    rgba(56, 161, 105, 0.95) 50%,
    rgba(72, 187, 120, 0.85) 100%
  );
}

.format-gif {
  background: linear-gradient(
    135deg,
    rgba(237, 137, 54, 0.9) 0%,
    rgba(221, 107, 32, 0.95) 50%,
    rgba(237, 137, 54, 0.85) 100%
  );
}

.format-webp {
  background: linear-gradient(
    135deg,
    rgba(66, 153, 225, 0.9) 0%,
    rgba(49, 130, 206, 0.95) 50%,
    rgba(66, 153, 225, 0.85) 100%
  );
}

/* Dark theme upload section */
body.theme-dark .hero-upload-box {
  background: var(--card-bg);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

body.theme-dark .hero-upload-box:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.25);
  background: var(--card-bg);
}

body.theme-dark .hero-upload-box.drag-over {
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.3);
  background: var(--card-bg);
}

body.theme-dark .hero-upload-icon-bg {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.12) 100%
  );
}

body.theme-dark .hero-upload-process {
  opacity: 0.7;
}

body.theme-dark .process-step i {
  color: #a78bfa;
}

body.theme-dark .process-step span {
  color: #e2e8f0;
}

body.theme-dark .process-arrow {
  color: rgba(167, 139, 250, 0.8);
}

body.theme-dark .process-step i {
  animation: heroStepIconDark 3s ease-in-out infinite;
}

@keyframes heroStepIconDark {
  0%,
  100% {
    transform: scale(1);
    color: #a78bfa;
  }
  50% {
    transform: scale(1.15);
    color: #c4b5fd;
  }
}

body.theme-dark .hero-upload-separator::before,
body.theme-dark .hero-upload-separator::after {
  background: rgba(255, 255, 255, 0.15);
}

body.theme-dark .hero-upload-separator span {
  color: rgba(255, 255, 255, 0.7);
}

body.theme-dark .format-badge {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(0, 0, 0, 0.3);
  color: #ffffff;
  font-weight: 700;
}

body.theme-dark .format-badge:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Responsive Hero Section */
@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .hero-text {
    width: 100%;
    align-items: center;
  }

  .hero-title,
  .hero-description {
    text-align: center;
  }

  .hero-title {
    font-size: clamp(31px, 4.9vw, 46px);
  }

  .hero-description {
    font-size: 1.2rem;
  }

  .hero-upload-box {
    max-width: 100%;
  }

  .hero-features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .hero-feature-text {
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    margin: 1rem 0 3rem;
    padding: 3rem 0 4rem;
  }

  .hero-title {
    font-size: clamp(28px, 6vw, 34px);
    line-height: 1.2;
  }

  .hero-description {
    font-size: 1.1rem;
  }

  .hero-features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hero-feature-card {
    padding: 1.25rem;
    gap: 1.25rem;
  }

  .hero-feature-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
  }

  .hero-feature-text {
    font-size: 1.3rem;
  }

  .hero-upload-box {
    padding: 2.5rem 2rem;
  }

  .hero-upload-content {
    padding-top: 5rem;
  }

  .hero-upload-process {
    gap: 1.25rem;
    top: 15px;
    width: calc(100% - 2rem);
  }

  .process-step i {
    font-size: 2rem;
  }

  .process-step span {
    font-size: 0.85rem;
  }

  .process-arrow {
    font-size: 1.25rem;
  }

  .hero-upload-icon {
    font-size: 4rem;
  }

  .hero-upload-title {
    font-size: 1.4rem;
  }

  .hero-upload-button {
    font-size: 1.1rem;
    padding: 0.875rem 2rem;
  }

  .hero-upload-formats {
    gap: 0.5rem;
    margin-top: 1.25rem;
  }

  .format-badge {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Tool Grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
  max-width: 100%;
  justify-content: start;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-large);
  padding: 1.75rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: block;
  color: inherit;
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.tool-card:hover {
  border-color: #667eea;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.15);
  text-decoration: none;
  color: inherit;
}

.tool-card.last-used {
  border-color: #667eea;
  border-width: 2px;
  background: rgba(102, 126, 234, 0.08);
}

.tool-card.last-used::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.tool-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.tool-icon.tool-icon-conversion {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 2.4rem;
  line-height: 1;
}

.tool-icon.tool-icon-conversion .tool-icon-conversion-arrow {
  font-size: 1.5rem;
  opacity: 0.72;
}

/* Category colors for all tool icons */
.tool-card[data-tool-category='edit'] .tool-icon {
  color: #667eea; /* Purple blue */
}

.tool-card[data-tool-category='convert'] .tool-icon {
  color: #06b6d4; /* Cyan */
}

.tool-card[data-tool-category='organize'] .tool-icon {
  color: #3b82f6; /* Blue */
}

.tool-card[data-tool-category='protect'] .tool-icon {
  color: #f97316; /* Orange */
}

.tool-card:hover .tool-icon {
  transform: scale(1.05);
  opacity: 0.9;
}

.tool-card h3 {
  color: var(--heading-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.tool-card p {
  color: var(--muted-text);
  font-size: 1.35rem;
  margin: 0;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

/* Dark mode tool card adjustments */
body.theme-dark .tool-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Dark mode category colors - slightly brighter */
body.theme-dark .tool-card[data-tool-category='edit'] .tool-icon {
  color: #a78bfa;
}

body.theme-dark .tool-card[data-tool-category='convert'] .tool-icon {
  color: #22d3ee;
}

body.theme-dark .tool-card[data-tool-category='organize'] .tool-icon {
  color: #60a5fa;
}

body.theme-dark .tool-card[data-tool-category='protect'] .tool-icon {
  color: #fb923c;
}

/* Tools Section */
.tools-section {
  text-align: center;
  margin-bottom: 3rem;
}

.tools-section-title {
  text-align: center;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  background: linear-gradient(
    135deg,
    var(--text-color) 0%,
    var(--link) 60%,
    rgba(139, 92, 246, 0.9) 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 8s ease infinite;
}

.tools-section h1.tools-section-title {
  font-size: clamp(34px, 5vw, 50px);
}

.tools-section h2.tools-section-title {
  font-size: clamp(22px, 3.3vw, 30px);
}

.tools-section > h3 {
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.3;
}

.tools-section > h4 {
  font-size: clamp(15px, 1.9vw, 20px);
  line-height: 1.35;
}

.tools-section-description {
  text-align: center;
  font-size: 1.35rem;
  color: var(--muted-text);
  margin-bottom: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

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

/* Tab System */
.tab-list {
  display: flex;
  gap: 3.125rem; /* 50px */
  margin: 0 auto 2.5rem auto;
  position: relative;
  padding-bottom: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: center;
  max-width: fit-content;
}

.tab-list::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  padding: 1rem 0;
  margin: 0;
  border: none;
  background: none;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 1.375rem;
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  white-space: nowrap;
  transition: color 200ms ease-in-out;
  z-index: 1;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  outline: none;
  color: #1e293b;
}

.tab:focus {
  outline: 2px solid #6366f1;
  outline-offset: 4px;
  border-radius: 4px;
}

.tab i {
  font-size: 32px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 200ms ease-in-out;
  color: #1e293b;
}

.tab span {
  transition: color 200ms ease-in-out;
}

.tab:hover:not(.active) {
  color: #0f172a;
}

.tab:hover:not(.active) i {
  color: #0f172a;
}

.tab.active {
  color: #4f46e5;
  font-weight: 500;
}

.tab.active i {
  color: #4f46e5;
}

.tab.active span {
  color: #4f46e5;
}

.tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 1px;
  transition:
    left 300ms cubic-bezier(0.4, 0, 0.2, 1),
    width 300ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  background: #4f46e5;
}

body.theme-dark .tab {
  color: #94a3b8;
}

body.theme-dark .tab i {
  color: #94a3b8;
}

body.theme-dark .tab:hover:not(.active) {
  color: #cbd5e1;
}

body.theme-dark .tab:hover:not(.active) i {
  color: #cbd5e1;
}

body.theme-dark .tab.active {
  color: #a5b4fc;
  font-weight: 500;
}

body.theme-dark .tab.active i {
  color: #a5b4fc;
}

body.theme-dark .tab.active span {
  color: #a5b4fc;
}

body.theme-dark .tab-indicator {
  background: #a5b4fc;
}

.tab-panels {
  padding: 0 0 4rem 0;
}

.tab-panels .tab-panel {
  display: none;
}

.tab-panels .tab-panel.active {
  display: block;
}

/* Mobile current tab label */
.mobile-tab-label {
  display: none;
}

@media (max-width: 768px) {
  .tab-list {
    gap: 2rem;
    margin: 0.75rem auto 2rem auto;
    padding-bottom: 0.625rem;
  }

  .tab {
    font-size: 1.125rem;
    padding: 0.875rem 0;
  }

  .tab span {
    display: none;
  }

  .tab i {
    font-size: 28px;
    width: 28px;
    height: 28px;
  }

  .mobile-tab-label {
    display: block;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--link);
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 480px) {
  .tab-list {
    gap: 1.5rem;
  }

  .tab i {
    font-size: 26px;
    width: 26px;
    height: 26px;
  }

  .mobile-tab-label {
    font-size: 1.3rem;
  }
}

/* Tool Search Bar */
.tool-search-container {
  max-width: 980px;
  margin: 0 auto 2.5rem auto;
  width: 100%;
}

.tool-search-container .search-field {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.tool-search-container .search-field__input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .tool-search-container {
    max-width: 100%;
    margin-bottom: 2rem;
  }
}

.tool-search-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted-text);
}

.tool-search-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
  color: var(--muted-text);
}

.tool-search-empty p {
  font-size: 1.25rem;
  margin: 0;
  color: var(--muted-text);
}

/* Tool Interface */
.tool-interface {
  margin-top: 2rem;
}

.tool-interface h2 {
  color: var(--heading-color);
  font-size: clamp(20px, 2.7vw, 27px);
  margin-bottom: 1.5rem;
  line-height: 1.25;
}

.tool-interface h2 i {
  color: var(--link);
  margin-right: 0.5rem;
}

.tool-interface h3 {
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.3;
}

.tool-interface h4 {
  font-size: clamp(15px, 1.9vw, 20px);
  line-height: 1.35;
}

/* File Lists */
.file-list {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Images-to-PDF: grid of image cards */
.file-list-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.file-list-images-grid .file-item-with-thumb {
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding: 0.5rem;
  margin-bottom: 0;
}

.file-list-images-grid .file-item-thumb-img {
  width: 100%;
  height: 80px;
  min-width: 0;
  min-height: 80px;
  margin-right: 0;
  margin-bottom: 0.4rem;
}

.file-list-images-grid .file-item-name {
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 0;
  margin-bottom: 0.15rem;
}

.file-list-images-grid .file-item-size {
  font-size: 0.7rem;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0.35rem;
}

.file-list-images-grid .file-item-remove {
  align-self: center;
  margin: 5px 0 0 0;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  margin-bottom: 0.5rem;
}

.file-item-thumb-img {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  object-fit: cover;
  border-radius: var(--radius-small);
  border: 1px solid var(--border-color);
  margin-right: 0.75rem;
  flex-shrink: 0;
  background: var(--card-bg);
}

.file-item-with-thumb .file-item-name {
  margin-right: 0.5rem;
}

.file-item-name {
  flex: 1;
  color: var(--text-color);
  font-size: 0.9em;
  word-break: break-all;
}

.file-item-size {
  color: var(--muted-text);
  font-size: 0.85em;
  margin-left: 1rem;
  margin-right: 0.5rem;
}

.file-item-remove {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--muted-text);
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  box-sizing: border-box;
  position: relative;
}

.file-item-remove i {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1;
  display: block;
  width: 1em;
  height: 1em;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.file-item-remove:hover {
  background: rgba(220, 53, 69, 0.15);
  border-color: #dc3545;
  color: #dc3545;
  transform: scale(1.05);
}

.file-item-remove:active {
  transform: scale(0.95);
}

/* Draggable File Items for Merge Tool */
.file-item-draggable {
  cursor: move;
  transition: all 0.2s ease;
}

.file-item-draggable:hover {
  border-color: var(--link);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-item-dragging {
  opacity: 0.5;
  border-color: var(--link);
  box-shadow: 0 4px 12px rgba(var(--link-rgb, 0, 123, 255), 0.3);
}

.file-item-drag-over {
  border-color: var(--link);
  background: rgba(var(--link-rgb, 0, 123, 255), 0.05);
  position: relative;
}

.file-item-drag-over-top::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--link);
  border-radius: 2px;
}

.file-item-drag-over-bottom::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--link);
  border-radius: 2px;
}

.file-item-drag-handle {
  color: var(--muted-text);
  cursor: grab;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.file-item-drag-handle:active {
  cursor: grabbing;
}

.file-item-draggable:hover .file-item-drag-handle {
  color: var(--link);
}

/* File Info */
.file-info {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  font-size: 1.4rem;
}

.file-info-item {
  display: flex;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.4rem;
}

.file-info-item:last-child {
  border-bottom: none;
}

.file-info-item strong {
  color: var(--heading-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.file-info-icon {
  color: var(--link);
  font-size: 1.8rem;
}

.file-info-item span {
  color: var(--text-color);
}

/* Page Checkboxes */
.page-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  margin-top: 0.5rem;
}

.page-checkbox-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
}

.page-checkbox-item label {
  margin-left: 0.5rem;
  color: var(--text-color);
  cursor: pointer;
  font-size: 0.9em;
}

/* Result Area */
.result-area {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-large);
}

.result-area.success {
  border-color: #66bb6a;
  background: rgba(102, 187, 106, 0.05);
}

.result-area.error {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.05);
}

.result-message {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.result-message.success {
  color: #66bb6a;
}

.result-message.error {
  color: #dc3545;
}

.result-download {
  margin-top: 1rem;
}

.result-edit-pdf {
  margin-top: 1rem;
}

.result-continue {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.result-continue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.result-continue-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--heading-color);
}

.result-continue-more {
  font-size: 13px;
  color: var(--muted-text);
  text-decoration: none;
}

.result-continue-more:hover {
  color: var(--heading-color);
  text-decoration: underline;
}

.result-continue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.continue-tool-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  background: var(--card-bg);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.continue-tool-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  transform: translateY(-1px);
}

.continue-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--continue-tool-color, #667eea);
  flex-shrink: 0;
  font-size: 16px;
}

.continue-tool-card i {
  margin-right: 0 !important;
}

.continue-tool-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading-color);
  flex: 1;
}

.continue-tool-arrow {
  color: var(--muted-text);
  font-size: 12px;
}

.continue-tool-card[data-tool='compress'] {
  --continue-tool-color: #f59e0b;
}

.continue-tool-card[data-tool='merge'] {
  --continue-tool-color: #3b82f6;
}

.continue-tool-card[data-tool='split'] {
  --continue-tool-color: #ef4444;
}

.continue-tool-card[data-tool='protect'] {
  --continue-tool-color: #f97316;
}

.continue-tool-card[data-tool='organize'] {
  --continue-tool-color: #0ea5e9;
}

.continue-tool-card[data-tool='edit'] {
  --continue-tool-color: #667eea;
}

.continue-tool-card[data-tool='compress-image'] {
  --continue-tool-color: #f59e0b;
}

.continue-tool-card[data-tool='resize-image'] {
  --continue-tool-color: #0ea5e9;
}

.continue-tool-card[data-tool='crop-image'] {
  --continue-tool-color: #ef4444;
}

.continue-tool-card[data-tool='watermark-image'] {
  --continue-tool-color: #8b5cf6;
}

.continue-tool-card[data-tool='edit-image'] {
  --continue-tool-color: #10b981;
}

body.theme-dark .continue-tool-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

body.theme-dark .continue-tool-icon {
  background: rgba(255, 255, 255, 0.08);
}

.result-edit-pdf-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  background: rgba(0, 0, 0, 0.02);
}

.result-edit-pdf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-medium);
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted-text);
  font-size: 1.25rem;
  flex-shrink: 0;
  padding: 16px;
  margin-left: 10px;
}

.result-edit-pdf-icon i {
  opacity: 0.9;
  margin-right: 0 !important;
}

.result-edit-pdf-text {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  flex: 1;
  min-width: 0;
}

.result-edit-pdf-inner .button {
  flex-shrink: 0;
  margin-left: auto;
}

@media (max-width: 768px) {
  .result-edit-pdf-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .result-edit-pdf-inner .button {
    margin-left: 0;
  }
}

.result-stats {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--muted-text);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
}

.result-stats-item {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0;
}

.result-stats-item strong {
  font-weight: 600;
  font-size: 0.9rem;
}

.result-stats-item:last-child {
  margin-bottom: 0;
}

/* Loading State */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--link);
  animation: spin 0.8s linear infinite;
  margin-right: 0.5rem;
}

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

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Image Preview Grid */
.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.image-preview-item {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  overflow: hidden;
  background: transparent;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  padding: 0.6rem;
  text-align: center;
}

.image-preview-item img,
.image-preview-image {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  margin-bottom: 0.5rem;
}

.image-preview-page {
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--text-color);
  margin-bottom: 0.4rem;
}

.image-preview-item:hover {
  border-color: var(--link);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
  transform: translateY(-2px);
}

.image-preview-item:hover img {
  transform: scale(1.02);
}

.image-preview-download {
  margin-top: 0.6rem;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 40px;
}

.image-preview-download i {
  display: block;
  line-height: 1;
  font-size: 1.05rem;
  width: 1em;
  height: 1em;
}

.image-preview-label {
  padding: 0.5rem;
  text-align: center;
  font-size: 0.85em;
  color: var(--muted-text);
  background: var(--card-bg);
}

.image-preview-meta {
  margin-top: 0.25rem;
  font-size: 0.75em;
  color: var(--muted-text);
}

.image-preview-actions {
  display: flex;
  justify-content: center;
  padding: 0 0.5rem 0.5rem;
  background: transparent;
}

.image-preview-button,
.image-preview-download {
  padding: 0.45rem 0.9rem;
  font-size: 0.9em;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.image-preview-download {
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  line-height: 1;
}

.image-preview-download i {
  font-size: 0.95rem;
}

.extract-images-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.extract-images-toolbar {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.extract-images-toolbar label {
  margin: 0;
  color: var(--heading-color);
  font-size: 1.1rem;
  font-weight: 600;
}

.extract-images-toolbar select {
  max-width: 220px;
  min-height: 44px;
}

.extract-file-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.extract-file-box {
  padding: 1.5rem;
  border-radius: var(--radius-large);
  border: 1px solid var(--border-color);
  background: transparent;
  text-align: center;
  transition: all 0.3s ease;
}

.extract-file-box:hover {
  border-color: #667eea;
  transform: translateY(-2px);
}

.extract-file-box-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.12) 0%,
    rgba(118, 75, 162, 0.12) 100%
  );
  color: #667eea;
  font-size: 1.8rem;
}

.extract-file-box-value {
  font-size: 1.55rem;
  color: var(--heading-color);
  word-break: break-word;
  font-weight: 600;
}

.extract-file-box-label {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.extract-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 1.25rem;
  font-weight: 600;
}

.extract-badge i {
  font-size: 1.2rem;
}

.extract-result-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.extract-result-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.extract-result-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--heading-color);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.extract-result-subtitle {
  font-size: 1.2rem;
  color: var(--text-color);
  font-weight: 500;
}

.extract-result-actions {
  margin: 0;
}

.extract-result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.extract-stat-card {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  background: var(--input-bg);
  text-align: center;
}

.extract-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-text);
}

.extract-stat-value {
  margin-top: 0.35rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--heading-color);
}

.extract-result-message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-small);
  font-weight: 500;
}

.extract-result-message.success {
  background: rgba(102, 187, 106, 0.12);
  color: #4caf50;
}

.extract-result-message.error {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}

/* OCR Tool Styles */
.ocr-progress {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-large);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--input-bg);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 999px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  text-align: center;
  color: var(--text-color);
  font-size: 0.95rem;
  margin: 0;
}

.ocr-result-container {
  padding: 1rem 0;
}

.ocr-result-container h3 {
  margin-bottom: 1rem;
  color: var(--heading-color);
  font-size: 1.3rem;
}

.ocr-text-preview {
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--text-color);
}

.ocr-result-message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-small);
  font-weight: 500;
}

.ocr-result-message.success {
  background: rgba(102, 187, 106, 0.12);
  color: #4caf50;
}

.ocr-result-message.error {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}

.ocr-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.ocr-options-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

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

#ocrPages {
  height: calc(100% + 1px);
  min-height: 45px;
}

.ocr-language-dropdown {
  position: relative;
}

.ocr-language-dropdown .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 44px;
  outline: none;
}

.ocr-language-dropdown .dropdown-toggle .fi {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-block;
  flex-shrink: 0;
}

.ocr-language-dropdown .dropdown-toggle:hover {
  background: var(--card-bg);
  border-color: transparent;
  box-shadow: 0 0 0 1px var(--link);
  border-radius: 6px;
}

.ocr-language-dropdown .dropdown-toggle:focus,
.ocr-language-dropdown .dropdown-toggle:focus-visible {
  background: var(--card-bg);
  border-color: transparent;
  box-shadow: 0 0 0 1px var(--link);
  border-radius: 6px;
  outline: none;
}

.ocr-language-dropdown .dropdown-toggle i {
  margin-left: auto;
  font-size: 0.875rem;
  transition: transform 0.2s ease;
}

.ocr-language-dropdown.open .dropdown-toggle i {
  transform: rotate(180deg);
}

.ocr-language-dropdown:not(.open) .dropdown-toggle:hover i {
  transform: none;
}

.ocr-language-dropdown .dropdown-menu {
  min-width: 100%;
  display: none;
  position: absolute;
  z-index: 1000;
  margin-top: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--link) var(--input-bg);
}

.ocr-language-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.ocr-language-dropdown.open .dropdown-menu {
  display: block;
}

.ocr-language-dropdown .dropdown-item .fi {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-block;
  flex-shrink: 0;
}

.ocr-language-dropdown .dropdown-item:last-child {
  border-bottom: none;
}

.ocr-language-dropdown .dropdown-item:hover {
  background: var(--input-bg);
}

.ocr-language-dropdown .dropdown-toggle::after {
  display: none;
  content: none;
}

header .dropdown-toggle::after,
nav .dropdown-toggle::after,
.navbar .dropdown-toggle::after {
  display: none;
  content: none;
}

.ocr-language-dropdown .dropdown-menu::-webkit-scrollbar {
  width: 8px;
}

.ocr-language-dropdown .dropdown-menu::-webkit-scrollbar-track {
  background: var(--input-bg);
  border-radius: 999px;
}

.ocr-language-dropdown .dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--link);
  border-radius: 999px;
}

@media (max-width: 768px) {
  .ocr-options-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Drag & Drop Zone */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-large);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--card-bg);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dropzone::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--link-rgb, 0, 123, 255), 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.dropzone:hover {
  border-color: var(--link);
  background: rgba(var(--link-rgb, 0, 123, 255), 0.02);
}

.dropzone:hover::before {
  left: 100%;
}

.dropzone.drag-over {
  border-color: var(--link);
  background: rgba(var(--link-rgb, 0, 123, 255), 0.1);
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.dropzone.drag-over::before {
  left: 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.dropzone-icon {
  font-size: 4rem;
  color: var(--link);
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.dropzone.drag-over .dropzone-icon {
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.dropzone-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
}

.dropzone-hint {
  color: var(--muted-text);
  font-size: 0.9em;
}

.dropzone-file-input {
  display: none;
}

/* Hidden file input */
.hidden-file-input {
  display: none;
}

/* Merge tool header - vertical stack: X button on top, then label */
.merge-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

/* Merge tool delete button - red border circle with red X */
.merge-page-delete-btn {
  background: transparent !important;
  color: #e53e3e !important;
  border: 2px solid #e53e3e !important;
  border-radius: 50% !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  transition:
    transform 0.15s,
    border-color 0.15s,
    box-shadow 0.15s !important;
}

.merge-page-delete-btn:hover {
  background: transparent !important;
  border-color: #c53030 !important;
  transform: scale(1.15) !important;
  box-shadow: 0 0 8px rgba(229, 62, 62, 0.5) !important;
}

.merge-page-delete-btn i,
.merge-page-delete-btn .fas,
.merge-page-delete-btn .fa-times {
  color: #e53e3e !important;
  font-size: 1.4rem !important;
  margin-left: 7px !important;
}

.merge-page-delete-btn:hover i,
.merge-page-delete-btn:hover .fas,
.merge-page-delete-btn:hover .fa-times {
  color: #c53030 !important;
}

/* Page label below the X button */
.merge-page-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  width: 100%;
}

/* Undo delete button */
.merge-page-undo-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--link);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.75rem;
  cursor: pointer;
  z-index: 15;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition:
    background 0.15s,
    transform 0.15s;
}

.merge-page-undo-btn:hover {
  background: var(--link-hover);
  transform: translate(-50%, -50%) scale(1.05);
}

/* Merge pages container for proper gap handling */
.merge-pages-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

/* Merge tool - all pages container (flat view) */
.merge-all-pages-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
}

.merge-pages-header,
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.preview-header-title {
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-header-title i {
  color: var(--link);
}

.preview-header-title .merge-pages-title-count {
  margin-left: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: var(--heading-color);
  background: rgba(var(--link-rgb, 51, 102, 255), 0.16);
  border: 1px solid rgba(var(--link-rgb, 51, 102, 255), 0.24);
  line-height: 1.1;
}

.merge-header-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.merge-preview-size {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-large);
  font-size: 1.1rem;
  color: var(--text-color);
}

.merge-preview-size i {
  font-size: 1.25rem;
  color: var(--link);
}

.merge-preview-label {
  font-weight: 600;
  white-space: nowrap;
  font-size: 1.35rem;
}

.merge-preview-slider {
  width: 160px;
  height: 8px;
  border-radius: 4px;
  background: var(--border-color);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  margin: 0 0.5rem;
}

.merge-preview-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--link);
  cursor: pointer;
  border: 3px solid var(--card-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.merge-preview-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.merge-preview-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--link);
  cursor: pointer;
  border: 3px solid var(--card-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.merge-preview-value {
  min-width: 60px;
  text-align: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--link);
  background: var(--card-bg);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-small);
}

.merge-pages-title {
  font-weight: 600;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.merge-pages-title i {
  color: var(--link);
}

.merge-pages-count {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--muted-text);
  background: var(--input-bg);
  padding: 0.5rem 1.25rem;
  border-radius: 1.5rem;
}

/* Merge tool drag info - uses standard alert alert-info, just add margin */
.merge-drag-info {
  margin-bottom: 1rem;
}

.merge-drag-info strong {
  color: #60a5fa;
}

.merge-pages-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: 100px;
}

/* Merge page thumbnails in flat view - 50% BIGGER */
.merge-pages-grid .merge-page-thumbnail {
  position: relative;
  cursor: grab;
  width: calc(165px * var(--preview-scale, 1));
  min-height: calc(220px * var(--preview-scale, 1));
  padding: 0.5rem;
  gap: 0.5rem;
}

.merge-pages-grid .merge-page-thumbnail:active {
  cursor: grabbing;
}

/* Merge tool - BIG page number label */
.merge-pages-grid .merge-page-thumbnail .preview-card-header {
  padding: 0.5rem;
  background: var(--card-bg);
}

.merge-pages-grid .merge-page-thumbnail .page-number {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading-color);
  line-height: 1.1;
}

.merge-pages-grid .merge-page-thumbnail .preview-card-footer {
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

.merge-page-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0 !important;
}

.merge-page-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.merge-page-toggle-slider {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--border-color);
  position: relative;
  transition: background 0.2s ease;
}

.merge-page-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.merge-page-toggle-input:checked + .merge-page-toggle-slider {
  background: var(--link);
}

.merge-page-toggle-input:checked + .merge-page-toggle-slider::after {
  transform: translateX(18px);
}

.merge-file-summary {
  margin-top: 1rem;
}

.merge-file-summary-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.merge-file-summary-row:last-child {
  border-bottom: none;
}

.merge-file-summary-left {
  min-width: 56px;
  font-weight: 700;
  color: var(--heading-color);
}

.merge-file-summary-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}

.merge-file-summary-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-file-summary-size {
  color: var(--muted-text);
  font-size: 0.82em;
  white-space: nowrap;
}

.merge-file-summary-remove {
  margin: 0 !important;
}

/* Thumbnail loading state */
.thumbnail-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  color: var(--muted-text);
}

.preview-disabled-message {
  color: var(--muted-text);
  font-size: 0.85em;
  padding: 0.5rem;
  text-align: center;
  font-style: italic;
}

/* File Info with Preview */
.file-info-with-preview {
  margin-top: 1rem;
}

.file-info-with-preview .file-info {
  margin-bottom: 0.5rem;
}

/* Custom file upload button */
.file-upload-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-color);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.file-upload-button:hover {
  border-color: var(--link);
  color: var(--link);
}

.file-upload-button i {
  font-size: 0.95rem;
}

input[type='file']#htmlToPdfCssFile {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
  }

  .tool-card {
    padding: 1.25rem 1rem;
  }

  .tool-icon {
    font-size: 2.75rem;
    margin-bottom: 0.625rem;
  }

  .tool-icon.tool-icon-conversion {
    font-size: 2.1rem;
    gap: 0.5rem;
  }

  .tool-icon.tool-icon-conversion .tool-icon-conversion-arrow {
    font-size: 1.25rem;
  }

  .tool-card h3 {
    font-size: 17px;
  }

  .tool-card p {
    font-size: 1.2rem;
  }

  .page-checkboxes {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }

  .image-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .dropzone {
    padding: 2rem 1rem;
  }

  .dropzone-icon {
    font-size: 3rem;
  }
}

/* Tool Navigation Buttons */
.tool-nav {
  margin-bottom: 2rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.advanced-toggle {
  margin-top: 1rem;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem 0.7rem 1.1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  height: 44px;
  box-sizing: border-box;
}

.toggle-switch:hover {
  border-color: #27ae60;
  background: rgba(39, 174, 96, 0.05);
}

body.theme-dark .toggle-switch:hover {
  background: rgba(255, 255, 255, 0.03);
}

.toggle-switch span {
  color: var(--text-color);
  margin: 0;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
}

.toggle-switch input[type='checkbox'] {
  width: 52px;
  height: 28px;
  position: relative;
  appearance: none;
  background: #555;
  border-radius: 14px;
  outline: none;
  cursor: pointer;
  transition: background 0.3s;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  pointer-events: none;
  margin: 0;
}

body.theme-light .toggle-switch input[type='checkbox'] {
  background: #ddd;
}

.toggle-switch input[type='checkbox']:checked {
  background: #27ae60;
  border-color: #27ae60;
}

body.theme-light .toggle-switch input[type='checkbox']:checked {
  background: #27ae60;
  border-color: #27ae60;
}

.toggle-switch:has(input[type='checkbox']:checked) {
  background: rgba(39, 174, 96, 0.08);
  border-color: #27ae60;
}

body.theme-dark .toggle-switch:has(input[type='checkbox']:checked) {
  background: rgba(39, 174, 96, 0.12);
  border-color: #27ae60;
}

body.theme-light .toggle-switch:has(input[type='checkbox']:checked) {
  background: rgba(39, 174, 96, 0.08);
  border-color: #27ae60;
}

.toggle-switch input[type='checkbox']::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
  transition: transform 0.3s;
}

.toggle-switch input[type='checkbox']:checked::before {
  transform: translateX(24px) translateY(-50%);
}

.toggle-switch-green input[type='checkbox']:checked {
  background: #16a34a;
  border-color: #16a34a;
}

.toggle-switch-green:has(input[type='checkbox']:checked) {
  background: rgba(22, 163, 74, 0.12);
  border-color: #16a34a;
}

.tool-option-field .toggle-switch {
  width: 100%;
  justify-content: flex-start;
  flex-wrap: nowrap;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 44px;
  padding: 0.7rem 1rem 0.7rem 1.1rem;
}

.tool-option-field .toggle-switch span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.1rem;
  font-weight: 600;
}

.tool-option-field .toggle-switch input[type='checkbox'] {
  margin-top: 0;
  margin-bottom: 0;
}

.optimize-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.optimize-stat-card {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  background: var(--input-bg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.optimize-stat-icon {
  width: 32px;
  height: 32px;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
  font-size: 1rem;
  flex-shrink: 0;
}

.optimize-stat-icon i {
  margin-right: 0 !important;
  font-size: 1.5em;
}

.optimize-stat-label {
  font-size: 0.9rem;
  color: var(--muted-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
  font-weight: bold;
}

.optimize-stat-value {
  font-size: 1rem;
  color: var(--heading-color);
  font-weight: 600;
}

.optimize-download-top {
  margin-bottom: 1rem;
}

.optimize-success-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-large);
  background: linear-gradient(
    135deg,
    rgba(102, 187, 106, 0.18),
    rgba(102, 126, 234, 0.12)
  );
  border: 1px solid rgba(102, 187, 106, 0.35);
  color: #d6f6dc;
  font-weight: 700;
  margin-bottom: 1.25rem;
  animation: optimizeSuccessIn 0.35s ease-out;
}

.optimize-success-banner .result-download {
  margin-top: 0;
}

.optimize-success-banner .button {
  border-radius: 12px;
  padding: 0.7rem 1.25rem;
}

@media (max-width: 768px) {
  .optimize-success-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .optimize-success-banner .button {
    width: 100%;
  }

  .optimize-success-banner .result-action-icon {
    width: auto;
  }
}

.optimize-success-info {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.optimize-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(102, 187, 106, 0.35),
    rgba(102, 126, 234, 0.2)
  );
  border: 1px solid rgba(102, 187, 106, 0.45);
  display: grid;
  place-items: center;
  color: #66bb6a;
  font-size: 0;
}

.optimize-success-icon i {
  color: #66bb6a;
  line-height: 1;
  font-size: 1.25rem;
  display: block;
  transform: translateX(3px);
}

.optimize-success-text {
  font-size: 1.6rem;
  color: #d6f6dc;
}

/* Light theme adjustments for optimize-style result */
body:not(.theme-dark) .optimize-success-banner {
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.12),
    rgba(59, 130, 246, 0.1)
  );
  border-color: rgba(34, 197, 94, 0.35);
  color: #14532d;
}

body:not(.theme-dark) .optimize-success-text {
  color: #14532d;
}

body:not(.theme-dark) .optimize-success-icon {
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.25),
    rgba(59, 130, 246, 0.18)
  );
  border-color: rgba(34, 197, 94, 0.35);
  color: #16a34a;
}

body:not(.theme-dark) .optimize-success-icon i {
  color: #16a34a;
}

body:not(.theme-dark) .optimize-stat-label {
  color: #0f172a;
}

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

.advanced-options {
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-small);
  background: var(--input-bg);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.advanced-options[hidden] {
  display: none;
}

.permissions-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.preview-size-value {
  min-width: 40px;
  text-align: center;
  font-size: 0.85em;
  color: var(--muted-text);
  font-weight: 500;
}

/* File Item Styles */
.file-item-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.file-item-info {
  flex: 1;
}

.overlay-file-item {
  flex-direction: column;
  align-items: stretch;
}

.overlay-file-item .file-item-content {
  width: 100%;
}

.overlay-file-header {
  width: 100%;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.overlay-file-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--heading-color);
  word-break: break-word;
}

.overlay-preview-controls {
  margin-bottom: 0.75rem;
}

/* Result Download Buttons & After-action buttons */
.result-download {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.result-after-actions {
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.result-after-actions .button.share-menu-open {
  background: var(--border-color, #e2e8f0);
  color: var(--text-color, #333);
}
body.theme-dark .result-after-actions .button.share-menu-open {
  background: #334155;
  color: #e2e8f0;
}

.result-after-actions .button {
  white-space: nowrap;
}

/* Remove button (red / danger) - base_style inspired */
.result-action-remove {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #ef4444 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.result-action-remove:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: #ef4444 !important;
  color: #dc2626 !important;
}

.result-action-remove i {
  margin-right: 0;
}
body.theme-light .result-action-remove {
  background: rgba(220, 53, 69, 0.1) !important;
  border-color: rgba(220, 53, 69, 0.35) !important;
  color: #dc3545 !important;
}
body.theme-light .result-action-remove:hover {
  background: rgba(220, 53, 69, 0.18) !important;
  border-color: #dc3545 !important;
  color: #c82333 !important;
}

.button-preview {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

/* Icon-only preview (eye): secondary to Download */
.button-preview-icon {
  padding: 1.7rem !important;
  min-width: auto;
  margin: 0 !important;
}
.button-preview-icon .fas {
  margin: 0;
}

/* File Info and Options - Note: display:none is set via JS, not CSS class */

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
}

.options-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.options-field > label {
  margin: 0;
}

.options-field > select,
.options-field > input,
.options-field > textarea {
  width: 100%;
}

.options-grid > button {
  grid-column: 1 / -1;
}

#deleteOptions .delete-pages-help {
  display: block;
  grid-column: 1 / -1;
}

#deleteOptions .delete-pages-btn {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 0.75rem;
}

/* Tool options - side by side layout */
.tool-options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tool-option-field {
  flex: 1;
  min-width: 150px;
}

.tool-option-field label:not(.toggle-switch) {
  display: block;
  margin-bottom: 0.5rem;
}

.tool-option-field select,
.tool-option-field input {
  width: 100%;
  margin-bottom: 0;
  height: 44px;
  padding: 0.5rem 0.75rem;
}

@media (max-width: 500px) {
  .tool-options-row {
    flex-direction: column;
  }

  .tool-option-field {
    min-width: 100%;
  }
}

/* Input Groups with Margin */
.input-group-margin {
  margin-top: 1rem;
}

/* Page Preview Container */
.page-preview-container {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--input-bg);
  border-radius: var(--radius-small);
}

/* PDF Info Section */
.pdf-info-section {
  margin: 4rem 0;
  padding: 0;
}

.pdf-info-content {
  margin-bottom: 4rem;
}

.pdf-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.pdf-info-item {
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-large);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.pdf-info-item:hover {
  border-color: #667eea;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.15);
}

.pdf-info-item-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.1) 100%
  );
  border-radius: 16px;
  font-size: 2rem;
  color: #667eea;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-info-item:hover .pdf-info-item-icon {
  transform: scale(1.05);
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.15) 0%,
    rgba(118, 75, 162, 0.15) 100%
  );
}

.pdf-info-item h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.pdf-info-item p {
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.pdf-resources {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.pdf-resources-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 1.5rem 0;
  text-align: center;
}

.resource-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-large);
  text-decoration: none;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  width: 100%;
  cursor: pointer;
}

/* Animated gradient border that follows rounded corners */
.resource-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  pointer-events: none;
}

.resource-link:hover {
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.resource-link:hover::before {
  opacity: 1;
}

/* Hide the span border elements - using pseudo-element instead */
.resource-link-border-left,
.resource-link-border-right {
  display: none;
}

.resource-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 2rem;
  position: relative;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Wikipedia - Clean glass style */
.resource-wikipedia .resource-icon {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(245, 245, 245, 0.8) 100%
  );
  color: #1a1a2e;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Adobe - Modern red/coral gradient with transparency */
.resource-adobe .resource-icon {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.85) 0%,
    rgba(220, 38, 38, 0.9) 50%,
    rgba(185, 28, 28, 0.85) 100%
  );
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 4px 16px rgba(239, 68, 68, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ISO - Modern blue/indigo gradient with transparency */
.resource-iso .resource-icon {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.85) 0%,
    rgba(79, 70, 229, 0.9) 50%,
    rgba(67, 56, 202, 0.85) 100%
  );
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 4px 16px rgba(79, 70, 229, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.resource-link:hover .resource-icon {
  transform: scale(1.08) rotate(-3deg);
}

.resource-wikipedia:hover .resource-icon {
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.resource-adobe:hover .resource-icon {
  box-shadow:
    0 8px 24px rgba(239, 68, 68, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.resource-iso:hover .resource-icon {
  box-shadow:
    0 8px 24px rgba(79, 70, 229, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Dark theme adjustments for resource icons */
body.theme-dark .resource-wikipedia .resource-icon {
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.9) 0%,
    rgba(51, 65, 85, 0.8) 100%
  );
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.theme-dark .resource-adobe .resource-icon {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.75) 0%,
    rgba(220, 38, 38, 0.8) 50%,
    rgba(185, 28, 28, 0.75) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.theme-dark .resource-iso .resource-icon {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.75) 0%,
    rgba(79, 70, 229, 0.8) 50%,
    rgba(67, 56, 202, 0.75) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.resource-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.resource-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--heading-color);
  display: block;
  line-height: 1.4;
  letter-spacing: 0.02em;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resource-link:hover .resource-title {
  color: #667eea;
}

.resource-desc {
  font-size: 1.35rem;
  color: var(--text-color);
  display: block;
  line-height: 1.6;
  letter-spacing: 0.01em;
  opacity: 0.85;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resource-link:hover .resource-desc {
  opacity: 1;
}

.resource-arrow {
  flex-shrink: 0;
  color: var(--muted-text);
  font-size: 1.1rem;
  opacity: 0.6;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.resource-link:hover .resource-arrow {
  opacity: 1;
  color: #667eea;
  transform: translateX(4px);
}

/* Dark theme adjustments for resource links */
body.theme-dark .resource-link:hover {
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
  border-color: transparent;
}

body.theme-dark .resource-link:hover .resource-title {
  color: #a5b4fc;
}

body.theme-dark .resource-link:hover .resource-arrow {
  color: #a5b4fc;
}

body.theme-dark .resource-link::before {
  background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #a5b4fc 100%);
}

/* Why PDFDeal Section */
.why-pdfdeal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.why-card {
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-large);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  text-align: left;
}

/* Animated gradient border for why cards */
.why-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  pointer-events: none;
}

.why-card:hover {
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.why-card:hover::before {
  opacity: 1;
}

.why-card-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.1) 100%
  );
  border-radius: 14px;
  font-size: 1.5rem;
  color: #667eea;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.why-card:hover .why-card-icon {
  transform: scale(1.08);
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.15) 0%,
    rgba(118, 75, 162, 0.15) 100%
  );
}

.why-card-content {
  flex: 1;
  position: relative;
  z-index: 2;
}

.why-card h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
  letter-spacing: 0.02em;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.why-card:hover h3 {
  color: #667eea;
}

.why-card p {
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 2;
}

.why-card p strong {
  color: var(--heading-color);
}

/* Contact link in why card */
.why-card-cta {
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.why-card-cta:hover {
  color: #764ba2;
  text-decoration: underline;
}

body.theme-dark .why-card-cta {
  color: #a5b4fc;
}

body.theme-dark .why-card-cta:hover {
  color: #c4b5fd;
}

/* Dark theme for why cards */
body.theme-dark .why-card:hover {
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

body.theme-dark .why-card:hover h3 {
  color: #a5b4fc;
}

body.theme-dark .why-card-icon {
  background: linear-gradient(
    135deg,
    rgba(167, 139, 250, 0.15) 0%,
    rgba(196, 181, 253, 0.15) 100%
  );
  color: #a78bfa;
}

body.theme-dark .why-card:hover .why-card-icon {
  background: linear-gradient(
    135deg,
    rgba(167, 139, 250, 0.2) 0%,
    rgba(196, 181, 253, 0.2) 100%
  );
}

body.theme-dark .why-card::before {
  background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #a5b4fc 100%);
}

/* Testimonials Section */
.testimonials-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 4rem;
  padding: 1px 0.5rem;
}

.testimonials-slider {
  flex: 1;
  overflow: hidden;
  border-radius: var(--radius-large);
  padding: 5px;
}

.testimonials-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.testimonial-card {
  flex: 0 0 auto;
  width: calc((100% - 3rem) / 3);
  min-width: calc((100% - 3rem) / 3);
  max-width: calc((100% - 3rem) / 3);
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-large);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-sizing: border-box;
}

/* Gradient border using the working technique from why-card */
.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  pointer-events: none;
  will-change: opacity;
}

.testimonial-card:hover {
  border-color: var(--card-bg);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.testimonial-card:hover::before {
  opacity: 1;
}

.testimonial-stars {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.testimonial-stars i {
  color: #fbbf24;
  font-size: 1.1rem;
}

.testimonial-text {
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--text-color);
  margin: 0 0 1.5rem 0;
  font-style: italic;
  position: relative;
  z-index: 2;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 6.885rem; /* line-height (1.7) * font-size (1.35rem) * 3 lines = 6.885rem */
  max-height: 6.885rem; /* Ensure all cards have same text height */
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

.testimonial-avatar .fi {
  width: 100%;
  height: 100%;
  display: block;
  background-size: 85%;
  background-position: center;
  background-repeat: no-repeat;
}

.testimonial-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.testimonial-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--heading-color);
}

.testimonial-meta {
  font-size: 1.1rem;
  color: var(--muted-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flag-icon {
  font-size: 1.4rem;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  font-style: normal;
}

.testimonial-meta .flag-icon {
  display: none; /* Hide flag from meta, it's now in the avatar */
}

.testimonial-nav {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.testimonial-nav:hover {
  border-color: #667eea;
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.testimonial-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Dark theme testimonials */
body.theme-dark .testimonial-card:hover {
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

body.theme-dark .testimonial-nav:hover {
  color: #a5b4fc;
  border-color: #a5b4fc;
  background: rgba(165, 180, 252, 0.1);
}

body.theme-dark .testimonial-card::before {
  background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #a5b4fc 100%);
}

/* Responsive testimonials */
@media (max-width: 1024px) {
  .testimonial-card {
    width: calc((100% - 1.5rem) / 2);
    min-width: calc((100% - 1.5rem) / 2);
    max-width: calc((100% - 1.5rem) / 2);
  }
}

@media (max-width: 768px) {
  .testimonials-container {
    padding: 1px 0.25rem;
  }

  .testimonials-slider {
    padding: 5px 0;
  }

  .testimonial-card {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    padding: 1.5rem;
  }

  .testimonial-nav {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .testimonial-text {
    font-size: 1.2rem;
    min-height: 6.12rem; /* line-height (1.7) * font-size (1.2rem) * 3 lines = 6.12rem */
    max-height: 6.12rem;
  }

  .testimonial-name {
    font-size: 1.15rem;
  }

  .testimonial-meta {
    font-size: 1rem;
  }
}

/* PDF Usage Statistics Section */
.pdf-usage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.usage-card {
  padding: 1.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-large);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Animated gradient border for usage cards */
.usage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  pointer-events: none;
}

.usage-card:hover {
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.usage-card:hover::before {
  opacity: 1;
}

.usage-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.usage-card-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.1) 100%
  );
  border-radius: 12px;
  font-size: 1.25rem;
  color: #667eea;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.usage-card:hover .usage-card-icon {
  transform: scale(1.08);
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.15) 0%,
    rgba(118, 75, 162, 0.15) 100%
  );
}

.usage-card-stat {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #667eea;
  line-height: 1;
}

.stat-bar {
  width: 100%;
  height: 6px;
  background: rgba(102, 126, 234, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.usage-source {
  text-align: center;
  font-size: 1.1rem;
  color: var(--muted-text);
  margin-top: 1rem;
  margin-bottom: 4rem;
  font-style: italic;
}

.usage-source a {
  color: #667eea;
  text-decoration: none;
  transition: all 0.3s ease;
}

.usage-source a:hover {
  color: #764ba2;
  text-decoration: underline;
}

body.theme-dark .usage-source a {
  color: #a5b4fc;
}

body.theme-dark .usage-source a:hover {
  color: #c4b5fd;
}

.usage-card h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
  letter-spacing: 0.02em;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.usage-card:hover h3 {
  color: #667eea;
}

.usage-card p {
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 2;
}

.usage-card p strong {
  color: var(--heading-color);
}

/* Dark theme for usage cards */
body.theme-dark .usage-card:hover {
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

body.theme-dark .usage-card:hover h3 {
  color: #a5b4fc;
}

body.theme-dark .stat-number {
  color: #a5b4fc;
}

body.theme-dark .stat-bar {
  background: rgba(167, 139, 250, 0.15);
}

body.theme-dark .stat-bar-fill {
  background: linear-gradient(90deg, #a5b4fc 0%, #c4b5fd 100%);
}

body.theme-dark .usage-card-icon {
  background: linear-gradient(
    135deg,
    rgba(167, 139, 250, 0.15) 0%,
    rgba(196, 181, 253, 0.15) 100%
  );
  color: #a78bfa;
}

body.theme-dark .usage-card:hover .usage-card-icon {
  background: linear-gradient(
    135deg,
    rgba(167, 139, 250, 0.2) 0%,
    rgba(196, 181, 253, 0.2) 100%
  );
}

body.theme-dark .usage-card::before {
  background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #a5b4fc 100%);
}

/* Responsive usage cards */
@media (max-width: 1024px) {
  .pdf-usage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .pdf-usage-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .usage-card {
    padding: 1.5rem;
  }

  .usage-card h3 {
    font-size: 1.4rem;
  }

  .usage-card p {
    font-size: 1.2rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }
}

/* Responsive why cards */
@media (max-width: 768px) {
  .why-pdfdeal-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .why-card {
    padding: 1.5rem;
    gap: 1.25rem;
  }

  .why-card h3 {
    font-size: 1.4rem;
  }

  .why-card p {
    font-size: 1.2rem;
  }

  .why-card-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: 1.25rem;
    border-radius: 12px;
  }
}

/* Responsive PDF Info Section */
@media (max-width: 968px) {
  .pdf-info-section {
    margin: 4rem 0;
  }

  .pdf-info-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pdf-info-item {
    padding: 2rem;
  }

  .resource-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .resource-icon {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
  }

  .resource-title {
    font-size: 1.4rem;
  }

  .resource-desc {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .pdf-info-section {
    margin: 3rem 0;
  }

  .pdf-info-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pdf-info-item {
    padding: 1.75rem;
  }

  .pdf-info-item h3 {
    font-size: 1.4rem;
  }

  .pdf-info-item p {
    font-size: 1.2rem;
  }

  .pdf-info-item-icon {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
  }

  .pdf-resources {
    margin-top: 0;
    padding-top: 0;
  }

  .pdf-resources-title {
    font-size: 1.35rem;
    margin-bottom: 1rem;
  }

  .resource-link {
    padding: 1.5rem;
    gap: 1.25rem;
  }

  .resource-link:hover {
    transform: translateY(-2px);
  }

  .resource-link:hover .resource-icon {
    transform: scale(1.05) rotate(-2deg);
  }

  .resource-icon {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
  }

  .resource-title {
    font-size: 1.4rem;
  }

  .resource-desc {
    font-size: 1.2rem;
  }
}

/* CTA Section */
.cta {
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
  margin-top: 4rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-large);
}

.cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(102, 126, 234, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: ctaFloat 20s ease-in-out infinite;
}

@keyframes ctaFloat {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-30px, 30px);
  }
}

.cta-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

.cta-text {
  flex: 1;
  min-width: 300px;
  max-width: 550px;
}

.cta h3 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  background: linear-gradient(
    135deg,
    var(--text-color) 0%,
    var(--link) 60%,
    rgba(139, 92, 246, 0.9) 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 8s ease infinite;
}

.cta .muted {
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--text-color);
}

.cta-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  min-width: 300px;
  flex-shrink: 0;
}

.cta-button-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 1rem;
}

.cta-pointer {
  position: absolute;
  right: calc(100% + 2rem);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  z-index: 10;
  animation: pointerBounce 2s ease-in-out infinite;
  white-space: nowrap;
  pointer-events: none;
  min-width: 100px;
}

.pointer-svg {
  width: 80px;
  height: 60px;
  color: #667eea;
  filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.4));
  flex-shrink: 0;
}

.pointer-path {
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  animation: drawPath 3s ease-in-out infinite;
}

.pointer-arrow {
  opacity: 0;
  animation: arrowPulse 2s ease-in-out infinite;
  animation-delay: 0.5s;
}

.pointer-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #667eea;
  white-space: nowrap;
  background: rgba(102, 126, 234, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-small);
  border: 1px solid rgba(102, 126, 234, 0.3);
  animation: textPulse 2s ease-in-out infinite;
}

.cta-pulse {
  animation: buttonPulse 2s ease-in-out infinite;
  position: relative;
}

.cta-pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, #667eea, rgba(139, 92, 246, 0.8));
  opacity: 0;
  z-index: -1;
  filter: blur(8px);
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes pointerBounce {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-50%) translateX(-8px);
  }
}

@keyframes drawPath {
  0% {
    stroke-dashoffset: 150;
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  70% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.8;
  }
}

@keyframes arrowPulse {
  0%,
  100% {
    opacity: 0;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(4px);
  }
}

@keyframes textPulse {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes buttonPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

.cta-actions .button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.cta-actions .button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.cta-actions .button::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.3),
    rgba(139, 92, 246, 0.3)
  );
  border-radius: inherit;
  opacity: 0;
  filter: blur(12px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.cta-actions .button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 12px 32px rgba(102, 126, 234, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.cta-actions .button:hover::before {
  opacity: 1;
}

.cta-actions .button:hover::after {
  opacity: 1;
}

.cta-actions .button:active {
  transform: translateY(-1px) scale(0.98);
}

.cta-actions .button-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

/* CTA Responsive */
@media (max-width: 1100px) {
  .cta-pointer {
    right: calc(100% + 1rem);
    min-width: 80px;
  }

  .pointer-svg {
    width: 60px;
    height: 45px;
  }
}

@media (max-width: 992px) {
  .cta-pointer {
    display: none;
  }

  .cta-text {
    min-width: auto;
    max-width: none;
  }

  .cta-body {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .cta-actions {
    min-width: auto;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .cta {
    padding: 3rem 1.5rem;
    margin-top: 3rem;
  }

  .cta h3 {
    font-size: 1.5rem;
  }

  .cta .muted {
    font-size: 1.2rem;
  }

  .cta-button-wrapper {
    margin-right: 0;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-actions .button {
    width: 100%;
    text-align: center;
  }
}

/* Dark theme CTA */
body.theme-dark .cta {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.theme-dark .cta::before {
  background: radial-gradient(
    circle,
    rgba(167, 139, 250, 0.15) 0%,
    transparent 70%
  );
}

body.theme-dark .pointer-svg {
  color: #a5b4fc;
  filter: drop-shadow(0 4px 8px rgba(165, 180, 252, 0.4));
}

body.theme-dark .pointer-text {
  color: #a5b4fc;
  background: rgba(165, 180, 252, 0.1);
  border-color: rgba(165, 180, 252, 0.3);
}

body.theme-dark .cta-pulse::before {
  background: linear-gradient(135deg, #a5b4fc, rgba(196, 181, 253, 0.8));
}

body.theme-dark .cta-actions .button-primary {
  background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 100%);
}

/* FAQ Section */
.faq-container {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.faq-item:hover {
  border-color: #667eea;
  box-shadow:
    0 4px 20px rgba(102, 126, 234, 0.15),
    0 0 0 1px rgba(102, 126, 234, 0.05) inset;
  transform: translateX(5px);
}

.faq-item[aria-expanded='true'],
.faq-item.open {
  border-color: #667eea;
}

.faq-question {
  width: 100%;
  max-width: 100%;
  background: transparent;
  border: none !important;
  padding: 20px 25px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  color: var(--heading-color);
  font-size: 1.05em;
  font-weight: 500;
  transition: color 0.3s ease;
  font-family: inherit;
  box-sizing: border-box;
  overflow: visible;
  white-space: normal;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.faq-question span {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  word-wrap: break-word !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  line-height: 1.5;
  white-space: normal !important;
  display: block;
  pointer-events: none;
}

.faq-question:hover {
  color: #667eea;
}

.faq-item[aria-expanded='true'] .faq-question,
.faq-item.open .faq-question {
  color: #667eea;
}

.faq-question i {
  font-size: 0.9em;
  color: #667eea;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  pointer-events: none;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    padding 0.3s ease;
  padding: 0 25px;
}

.faq-item[aria-expanded='true'] .faq-answer,
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 5px 25px 40px 25px;
}

.faq-answer p {
  color: var(--muted-text);
  line-height: 1.7;
  margin: 0 0 12px 0;
}

.faq-answer p:last-child {
  margin-bottom: 20px;
}

.faq-answer ol {
  margin: 0;
  padding-left: 1.5em;
  color: var(--muted-text);
  line-height: 1.8;
}

.faq-answer ol li {
  margin-bottom: 8px;
}

.faq-answer ol li:last-child {
  margin-bottom: 20px;
}

.faq-answer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.faq-answer a:hover {
  text-decoration: underline;
}

.toggle-button {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(100, 116, 139, 0.4);
  background: transparent;
}

.toggle-button.active {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.toggle-button.active:hover {
  background: #15803d;
  border-color: #15803d;
}

.faq-features {
  list-style: none;
  margin: 12px 0 0 0;
  padding: 0;
}

body.theme-light .faq-item {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(226, 232, 240, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

body.theme-light .faq-item:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow:
    0 3px 15px rgba(102, 126, 234, 0.1),
    0 0 0 1px rgba(102, 126, 234, 0.05) inset;
}

body.theme-light .faq-item[aria-expanded='true'] {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.12);
}

@media (max-width: 768px) {
  .faq-item {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .faq-question {
    padding: 18px 20px;
    font-size: 0.95em;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
  }

  .faq-question span {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 30px) !important;
    padding-right: 0;
    word-wrap: break-word !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto;
    white-space: normal !important;
    display: block !important;
  }

  .faq-question i {
    flex-shrink: 0;
    flex-grow: 0;
    align-self: flex-start;
    margin-top: 2px;
    width: auto;
  }

  .faq-answer {
    padding: 0 20px;
  }

  .faq-item[aria-expanded='true'] .faq-answer {
    padding: 0 20px 18px 20px;
  }
}
