/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --primary:       #4F46E5;
  --primary-dark:  #4338CA;
  --primary-light: #EEF2FF;
  --success:       #16A34A;
  --success-light: #DCFCE7;
  --danger:        #DC2626;
  --gray-50:       #F8FAFF;
  --gray-100:      #F1F4FD;
  --gray-200:      #E5E7EB;
  --gray-400:      #9CA3AF;
  --gray-600:      #4B5563;
  --gray-800:      #1F2937;
  --white:         #FFFFFF;
  --radius-md:     12px;
  --radius-lg:     20px;
  --shadow-sm:     0 1px 4px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:     0 4px 16px rgba(79,70,229,.08), 0 1px 4px rgba(0,0,0,.06);
  --shadow-lg:     0 8px 32px rgba(79,70,229,.12), 0 2px 8px rgba(0,0,0,.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== HEADER ===== */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(79,70,229,.07);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.25rem;
  color: var(--gray-800);
  font-weight: 700;
}

.logo__icon-wrap {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo__text strong { color: var(--primary); }

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__link {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 6px 14px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.nav__link:hover { background: var(--primary-light); color: var(--primary); }

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 3px;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-400);
  padding: 3px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  letter-spacing: 0.03em;
}

.lang-btn:hover { color: var(--primary); }

.lang-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.lang-divider {
  color: var(--gray-200);
  font-size: 0.75rem;
  user-select: none;
}

.nav__badge {
  background: var(--success-light);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ===== HERO ===== */
@keyframes heroGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(30px, -20px) scale(1.1); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(-20px, 15px) scale(0.95); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-12px); }
}

.hero {
  background: linear-gradient(135deg, #09090b 0%, #1d2b6b 40%, #1d4ed8 70%, #4F46E5 100%);
  background-size: 300% 300%;
  animation: heroGradient 9s ease infinite;
  padding: 36px 0 40px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero__pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}
.hero__orb--1 {
  width: 300px; height: 300px;
  background: rgba(29, 78, 216, 0.45);
  top: -80px; left: -60px;
  animation: orbFloat1 7s ease-in-out infinite;
}
.hero__orb--2 {
  width: 250px; height: 250px;
  background: rgba(79, 70, 229, 0.3);
  bottom: -60px; right: -40px;
  animation: orbFloat2 9s ease-in-out infinite;
}

.hero__inner { position: relative; z-index: 1; }

.hero__badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  backdrop-filter: blur(4px);
}

.hero__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero__title-static {
  display: block;
  opacity: 0.9;
}

.hero__carousel {
  display: block;
  min-height: 1.3em;
  overflow: hidden;
  position: relative;
}

.hero__carousel-track {
  display: block;
  position: relative;
}

.hero__slide {
  display: block;
  background: linear-gradient(90deg, #fff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  opacity: 0;
  position: absolute;
  left: 0; right: 0;
  transition: none;
}

.hero__slide--active {
  position: relative;
  opacity: 1;
  animation: slideIn 0.45s ease forwards;
}

.hero__slide--out {
  position: absolute;
  opacity: 1;
  animation: slideOut 0.35s ease forwards;
}

.hero__subtitle {
  font-size: 0.92rem;
  opacity: 0.82;
  max-width: 420px;
  margin: 0 auto 20px;
  line-height: 1.65;
}

.hero__cta {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.4);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 999px;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: background 0.2s, transform 0.2s;
}
.hero__cta:hover {
  background: rgba(255,255,255,0.28);
  transform: translateY(-2px);
}

/* ===== TOOLS SECTION ===== */
.tools-section {
  padding: 24px 0 16px;
}

.tools-section__label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 24px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

/* ===== TOOL CARDS ===== */
.tool-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 20px 24px;
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s;
  text-align: center;
}

.tool-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(79,70,229,0.18);
  transform: translateY(-4px);
}

.tool-card__icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 16px;
}

.tool-card[data-tool="word"]   .tool-card__icon-wrap { background: #EEF2FF; }
.tool-card[data-tool="excel"]  .tool-card__icon-wrap { background: #DCFCE7; }
.tool-card[data-tool="pptx"]   .tool-card__icon-wrap { background: #FEF3C7; }
.tool-card[data-tool="rotate"]  .tool-card__icon-wrap { background: #F3E8FF; }
.tool-card[data-tool="img2pdf"] .tool-card__icon-wrap { background: #FFF1F2; }

.tool-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.tool-card__desc {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 18px;
}

.tool-card__btn {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
}

/* ===== UPLOAD SECTION ===== */
.upload-section {
  padding: 28px 0 40px;
  animation: fadeInUp 0.3s ease;
}

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

/* ===== CARD ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 40px;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  border: 1px solid var(--gray-200);
}

.card--wide {
  max-width: 960px;
}

.card__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.card__tool-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0;
}

/* ===== BACK BUTTON ===== */
.btn--back {
  font-size: 0.82rem;
  padding: 7px 14px;
  white-space: nowrap;
}

/* ===== DROPZONE ===== */
.dropzone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-md);
  padding: 36px 24px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.dropzone__icon svg { width: 64px; height: 64px; margin-bottom: 4px; }

.dropzone__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.dropzone__subtitle {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.dropzone__limit {
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* ===== FILE INFO ===== */
.file-info {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: left;
}

.file-info__icon { font-size: 1.8rem; }

.file-info__details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-info__name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-800);
  word-break: break-all;
}

.file-info__size {
  font-size: 0.78rem;
  color: var(--gray-400);
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.btn-icon:hover { color: var(--danger); background: #FEE2E2; }

/* ===== PROGRESS ===== */
.progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #7C3AED);
  border-radius: 999px;
  animation: indeterminate 1.5s ease-in-out infinite;
}

@keyframes indeterminate {
  0%   { width: 10%; margin-left: 0%; }
  50%  { width: 60%; margin-left: 20%; }
  100% { width: 10%; margin-left: 90%; }
}

.progress-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* ===== DOWNLOAD ===== */
.download-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}

.success-icon { font-size: 2.8rem; }

.download-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-800);
}

/* ===== CARD ACTIONS ===== */
.card__actions { margin-top: 20px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(79,70,229,0.35);
}
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(79,70,229,0.45); }
.btn--primary:active { transform: translateY(0); }

.btn--success {
  background: var(--success);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(22,163,74,0.35);
}
.btn--success:hover { background: #15803D; transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
}
.btn--ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn--large { padding: 13px 32px; font-size: 1rem; }

/* ===== IMÁGENES A PDF ===== */
.img-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
}

.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding: 2px;
}

.img-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--gray-200);
  background: var(--gray-100);
  aspect-ratio: 1;
}

.img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-thumb__name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.52);
  color: #fff;
  font-size: 0.62rem;
  padding: 3px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.img-thumb__remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.img-thumb__remove:hover { background: var(--danger); }

.img-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.img-count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
}

.btn--sm { padding: 7px 16px; font-size: 0.82rem; }

/* ===== UNIR PDFs ===== */
.merge-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  border-radius: 14px;
  border: 2px dashed transparent;
  transition: border-color 0.15s, background 0.15s;
}
.merge-preview-wrap.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.merge-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 2px;
}

.merge-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
}

.merge-item__num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.merge-item__icon { font-size: 1.1rem; flex-shrink: 0; }

.merge-item__name {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.merge-item__size {
  font-size: 0.78rem;
  color: var(--gray-400);
  flex-shrink: 0;
}

.merge-item .img-thumb__remove {
  position: static;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.5;
}
.merge-item .img-thumb__remove:hover { opacity: 1; }

.merge-drop-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px dashed var(--gray-300);
  color: var(--gray-400);
  font-size: 0.82rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  cursor: default;
}
.merge-preview-wrap.drag-over .merge-drop-row {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ===== PDF A IMÁGENES — selector de formato ===== */
.format-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(79,70,229,0.15);
}

.format-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
}

.format-options {
  display: flex;
  gap: 12px;
}

.format-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 2px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
}

.format-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.format-option input[type="radio"] { display: none; }

.format-option__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.format-option__hint {
  font-size: 0.72rem;
  color: var(--gray-400);
}

/* ===== CATEGORÍAS ===== */
.category-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}

.cat-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  text-align: center;
}
.cat-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.cat-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ===== MARCA DE AGUA ===== */
.watermark-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(79,70,229,0.15);
}

/* ===== REDIMENSIONAR IMAGEN ===== */
.resize-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(79,70,229,0.15);
}

.resize-inputs {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.resize-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.resize-field__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.resize-input {
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  color: var(--gray-800);
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
.resize-input:focus { border-color: var(--primary); }
.resize-input::-webkit-outer-spin-button,
.resize-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.resize-x {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-400);
  padding-bottom: 8px;
  flex-shrink: 0;
}

.resize-hint {
  font-size: 0.78rem;
  color: var(--gray-400);
  text-align: center;
}

.resize-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0 4px;
  border-top: 1px solid rgba(79,70,229,0.12);
}

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

.resize-slider-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-600);
}

.resize-percent-badge {
  background: var(--primary);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 12px;
  border-radius: 100px;
  min-width: 52px;
  text-align: center;
}

.resize-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  accent-color: var(--primary);
  cursor: pointer;
  outline: none;
}

.resize-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--gray-400);
  padding: 0 2px;
}

/* ===== GENERADOR DE QR ===== */
.qr-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(79,70,229,0.15);
}

.qr-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--gray-800);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.5;
}
.qr-textarea:focus { border-color: var(--primary); }

/* ===== PDF CON CONTRASEÑA ===== */
.password-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(79,70,229,0.15);
}

.password-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.2s;
}
.password-input:focus { border-color: var(--primary); }

.btn-password-toggle {
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.btn-password-toggle:hover { background: var(--primary-light); border-color: var(--primary); }

/* ===== ORDENAR PDF ===== */
.reorder-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.reorder-loading {
  text-align: center;
  color: var(--gray-400);
  font-size: 0.875rem;
  padding: 24px 0;
}

.reorder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.reorder-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 8px;
  background: var(--white);
  cursor: grab;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
  user-select: none;
}
.reorder-thumb:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(79,70,229,0.12); }
.reorder-thumb.dragging { opacity: 0.4; transform: scale(0.96); }
.reorder-thumb.drag-over-thumb { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.2); transform: scale(1.03); }

.reorder-thumb img {
  width: 100%;
  border-radius: 5px;
  display: block;
  pointer-events: none;
}

.reorder-thumb__num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-500);
}

/* ===== DIVIDIR PDF ===== */
.split-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  padding: 8px 0;
}

.split-info { text-align: center; }

.split-pages-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
}

.split-section-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.split-pool-section { width: 100%; }

.split-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.split-page-chip {
  min-width: 36px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.13s;
  font-family: inherit;
}
.split-page-chip:hover:not([disabled]) {
  background: var(--primary);
  color: var(--white);
}
.split-page-chip.used {
  border-color: var(--gray-200);
  color: var(--gray-400);
  cursor: default;
  opacity: 0.5;
}
.split-page-chip.assigned {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-size: 0.78rem;
}
.split-page-chip.assigned:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #ef4444;
}

.split-parts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.split-part {
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.split-part.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.split-part:hover:not(.active) { border-color: var(--gray-300); }

.split-part-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.split-part-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-700);
}
.split-part.active .split-part-title { color: var(--primary); }

.split-part-del {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.12s;
}
.split-part-del:hover { background: #fee2e2; color: #ef4444; }

.split-part-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  align-items: center;
}

.split-part-empty {
  font-size: 0.8rem;
  color: var(--gray-400);
  font-style: italic;
}

.split-add-part-btn {
  align-self: flex-start;
  background: none;
  border: 1.5px dashed var(--gray-300);
  border-radius: 8px;
  color: var(--gray-500);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.13s;
}
.split-add-part-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ===== ROTATE TOOL ===== */
.rotate-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 8px 0;
}

.pdf-preview-box {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 400px;
  height: 400px;
  max-width: 100%;
}

#pdfPreviewCanvas {
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  display: block;
  max-width: 340px;
  max-height: 340px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.rotate-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.btn-rotate {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(79,70,229,0.4);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  color: white;
}

.btn-rotate svg { width: 28px; height: 28px; }

.btn-rotate:hover {
  background: var(--primary-dark);
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(79,70,229,0.5);
}

.btn-rotate:active { transform: scale(0.95); }
.btn-rotate:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.rotate-angle-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
}

.rotate-actions { width: 100%; display: flex; justify-content: center; }

/* ===== FEATURES ===== */
.features {
  padding: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.features__strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 18px 0;
}

.features__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 32px;
  flex: 1 1 200px;
  justify-content: center;
}

.features__icon { font-size: 1.4rem; flex-shrink: 0; }

.features__item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.features__item strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-900);
}

.features__item span {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.features__divider {
  width: 1px;
  height: 36px;
  background: var(--gray-200);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .nav__link { display: none; }
  .nav__badge { display: none; }
  .features__divider { display: none; }
  .features__item { padding: 10px 16px; border-bottom: 1px solid var(--gray-100); }
  .features__item:last-child { border-bottom: none; }
  .features__strip { padding: 8px 0; }
}

/* ===== FOOTER ===== */
.footer {
  margin-top: auto;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 24px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer__logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}
.footer__logo strong { color: var(--primary); }
.footer__copy { font-size: 0.82rem; color: var(--gray-400); }
.footer__privacy { font-size: 0.82rem; color: var(--gray-400); text-decoration: none; margin-top: 4px; transition: color 0.2s; }
.footer__privacy:hover { color: var(--primary); }

/* ===== ERROR TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1F2937;
  color: var(--white);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 560px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tool-card { padding: 18px 12px; text-align: center; }
  .tool-card__icon-wrap { width: 46px; height: 46px; font-size: 1.3rem; margin: 0 auto 10px; }
  .tool-card__title { font-size: 0.82rem; }
  .tool-card__desc { display: none; }
  .tool-card__btn { font-size: 0.75rem; }
  .card { padding: 24px 18px; }
  .hero { padding: 18px 0 22px; }
  .hero__trust { gap: 14px; }
  .footer__inner { justify-content: center; text-align: center; }
}

/* ===== SEO CONTENT BLOCK ===== */
.tool-seo {
  padding: 56px 32px 64px;
  border-top: 1px solid var(--border);
}
.tool-seo__h1 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.tool-seo__intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 24px;
}
.tool-seo__steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 1.4em;
  max-width: 560px;
}
.tool-seo__steps li {
  font-size: 0.97rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
@media (max-width: 560px) {
  .tool-seo { padding: 36px 16px 44px; }
  .tool-seo__h1 { font-size: 1.35rem; }
}

