/* NoCloudPDF — interfaz inspirada en la composición de vert.sh.
   Solo modifica presentación. Los controles, IDs, traducciones y scripts originales siguen en sus archivos. */
:root {
  --primary: #2454c6;
  --primary-hover: #173b9b;
  --bg: #edf5ff;
  --card: #fff;
  --text: #16253e;
  --muted: #5b6b84;
  --border: #dce7f6;
  --radius: 20px;
}

html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body.ncp-home,
body.ncp-info {
  color: var(--text);
  background:
    linear-gradient(105deg, transparent 13.5%, rgba(30, 75, 150, .12) 13.6%, transparent 13.8%,
      transparent 35%, rgba(30, 75, 150, .10) 35.1%, transparent 35.3%,
      transparent 65%, rgba(30, 75, 150, .10) 65.1%, transparent 65.3%,
      transparent 86%, rgba(30, 75, 150, .09) 86.1%, transparent 86.3%) top / 100% 690px no-repeat,
    linear-gradient(180deg, #82b8ff 0, #b8d8ff 360px, #e0efff 660px, #f7faff 1030px, #f7faff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.52;
  overflow-x: clip;
}
body.ncp-home > header,
body.ncp-home > main,
body.ncp-home > footer,
body.ncp-info > header,
body.ncp-info > main,
body.ncp-info > footer { position: relative; z-index: 1; }

/* Navegación flotante. La marca original sigue siendo la marca de NoCloudPDF. */
body.ncp-home > header,
body.ncp-info > header {
  width: min(calc(100% - 32px), 1190px);
  max-width: 1190px;
  min-height: 74px;
  margin: 22px auto 0;
  padding: 10px 18px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(28, 68, 137, .10), 0 2px 4px rgba(18, 49, 103, .06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(10px, 1.3vw, 20px);
}
.ncp-home .logo {
  flex: 0 0 auto;
  min-width: 0;
  padding: 5px 10px;
  border-radius: 15px;
  background: linear-gradient(135deg, #deecff, #a9cbff);
  border: 1px solid #a6c5fa;
}
.ncp-home .logo svg { width: clamp(148px, 15vw, 180px); height: auto; max-width: 100%; }
.ncp-home .logo #primaryGrad stop:first-child { stop-color: #67a7ff; }
.ncp-home .logo #primaryGrad stop:last-child { stop-color: #2862dc; }
.ncp-home .logo #accentGrad stop:first-child { stop-color: #2862dc; }
.ncp-home .logo #accentGrad stop:last-child { stop-color: #173b9b; }
.ncp-home .logo svg text { fill: #172c50; }
.ncp-home .logo svg tspan { fill: #2862dc; }
.ncp-home .logo svg text:last-child { fill: #2555aa; }
body.ncp-home .site-nav,
body.ncp-info nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}
body.ncp-home .site-nav a,
body.ncp-info nav a {
  color: #162438;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 13px;
  padding: 11px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
body.ncp-home .site-nav a:hover,
body.ncp-info nav a:hover { color: #1c48ad; background: #eaf2ff; transform: translateY(-1px); }
body.ncp-home .site-nav a:first-child,
body.ncp-info nav a:first-child { background: #edf0f4; }
body.ncp-home .site-nav a:first-child:hover,
body.ncp-info nav a:first-child:hover { background: #e0e8f4; }
.ncp-nav-icon { width: 19px; height: 19px; flex: 0 0 19px; color: #0d1b2e; }
body.ncp-home .language-picker,
body.ncp-info .language-picker { color: #304461; white-space: nowrap; flex: 0 1 auto; }
body.ncp-home .language-picker select,
body.ncp-info .language-picker select {
  min-width: 0;
  width: clamp(118px, 12vw, 177px);
  max-width: 100%;
  padding: 10px 31px 10px 11px;
  border: 1px solid #dbe5f5;
  border-radius: 12px;
  color: #18304f;
  background: #fff;
  font: inherit;
  text-overflow: ellipsis;
}
body.ncp-home .language-picker select:focus-visible,
body.ncp-info .language-picker select:focus-visible,
body.ncp-home :is(a, button, input, select, [role="button"]):focus-visible,
body.ncp-info :is(a, input, select):focus-visible {
  outline: 3px solid #2454c6;
  outline-offset: 2px;
}
body.ncp-home header .badge {
  color: #254c9b;
  background: #e6f0ff;
  border: 1px solid #cbdfff;
  white-space: nowrap;
  font-weight: 750;
  padding: 8px 10px;
}
body.ncp-info header strong {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 7px 15px;
  border-radius: 14px;
  background: linear-gradient(135deg, #deecff, #a9cbff);
  border: 1px solid #a6c5fa;
}

/* Portada: mensaje y zona de subida juntos, sin duplicar el input original. */
body.ncp-home main#principal {
  max-width: 1050px;
  margin: clamp(32px, 6vw, 78px) auto 64px;
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  grid-template-areas:
    "hero workspace"
    "intro intro"
    "tools tools"
    "sideads sideads"
    "banner banner"
    "editorial editorial"
    "square square"
    "native native";
  gap: 0 clamp(18px, 2.5vw, 36px);
  align-items: start;
}
.ncp-home .hero {
  grid-area: hero;
  min-width: 0;
  min-height: 345px;
  margin: 0;
  padding: 34px 8px 22px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #17243c;
  text-align: start;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ncp-home .hero::before,
.ncp-home .hero::after { content: none; }
.ncp-home .hero h1 {
  color: #14213b;
  font-size: clamp(2.35rem, 4.5vw, 3.65rem);
  line-height: 1.07;
  letter-spacing: -.055em;
  font-weight: 850;
  max-width: 14ch;
  margin: 0 0 22px;
}
.ncp-home .hero p {
  color: #3d5275;
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.58;
}
.ncp-home .ncp-trustline {
  color: #3a527c;
  justify-content: flex-start;
  margin-top: 25px;
  gap: 8px;
  font-size: .75rem;
}
.ncp-home .ncp-trustline span {
  background: rgba(255,255,255,.56);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(39, 82, 168, .16);
  white-space: normal;
}
.ncp-home .ncp-trustline span::before { background: #2454c6; }
.ncp-home main#principal > .workspace,
.ncp-home main#principal > #ncp-extra-workspace {
  grid-area: workspace;
  min-width: 0;
  margin: 0;
  min-height: 345px;
  padding: clamp(20px, 3vw, 34px);
  border-radius: 24px;
  border: 1px solid #dbe8fa;
  background: #fff;
  box-shadow: 0 15px 38px rgba(32, 76, 150, .13), 0 2px 4px rgba(20, 51, 107, .08);
}
.ncp-home main#principal > .workspace.hidden,
.ncp-home main#principal > #ncp-extra-workspace.hidden { display: none; }
.ncp-home .dropzone:not(.hidden) {
  display: grid;
  place-content: center;
  min-height: 272px;
  padding: 23px 20px;
  background: #f9fcff;
  border: 2px dashed #acc8ef;
  border-radius: 18px;
  text-align: center;
}
.ncp-home .dropzone::before {
  content: "⇧";
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  background: #8cb7ff;
  color: #103678;
  border-radius: 50%;
  font-size: 2.15rem;
  line-height: 1;
  font-weight: 700;
}
.ncp-home .dropzone:hover,
.ncp-home .dropzone.drag-over {
  background: #e8f2ff;
  border-color: #3568ce;
}
.ncp-home .dropzone > p:first-child { color: #1c3050; }
.ncp-home #dynamic-options:empty { display: none; }
.ncp-home #dynamic-options:not(:empty) { margin-bottom: 14px; }
.ncp-home .workspace .btn,
.ncp-home .ncp-extra-description + .ncp-file-picker + div .btn {
  background: #2758cf;
  color: #fff;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 6px 17px rgba(39, 88, 207, .22);
}
.ncp-home .workspace .btn:hover { background: #1d44a9; }
.ncp-home #status { color: var(--muted); }
.ncp-home .ncp-section-intro {
  grid-area: intro;
  display: block;
  margin: clamp(38px, 5vw, 64px) 0 20px;
  text-align: center;
}
.ncp-home .ncp-section-intro h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  letter-spacing: -.045em;
  color: #152743;
  margin: 0;
}
.ncp-home .ncp-section-intro p { margin-top: 5px; color: #536584; font-size: .96rem; }
.ncp-home .grid-tools {
  grid-area: tools;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 0;
}
.ncp-home .tool-card {
  min-width: 0;
  min-height: 154px;
  padding: 18px 14px;
  background: #fff;
  border: 1px solid #e0e9f6;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(36, 76, 145, .07);
  transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
}
.ncp-home .tool-card:hover {
  transform: translateY(-4px);
  border-color: #84a8e8;
  box-shadow: 0 13px 27px rgba(36, 76, 145, .13);
}
.ncp-home .tool-card.active {
  background: #f2f7ff;
  border-color: #2758cf;
  box-shadow: 0 0 0 2px rgba(36, 84, 198, .12);
}
.ncp-home .tool-icon {
  width: 51px;
  height: 51px;
  margin: 0 auto 7px;
  background: #dceaff;
  border-radius: 50%;
  font-size: 1.6rem;
}
.ncp-home .tool-card:nth-child(4n+2) .tool-icon { background: #e3e9ff; }
.ncp-home .tool-card:nth-child(4n+3) .tool-icon { background: #dff5ed; }
.ncp-home .tool-card:nth-child(4n+4) .tool-icon { background: #ffefdf; }
.ncp-home .tool-title { color: #203450; font-size: .94rem; }
.ncp-home .tool-desc { color: #60728c; font-size: .78rem; }
.ncp-home .ncp-inline-side-ads { grid-area: sideads; }
/* Los laterales son hijos del main posicionado. Reservamos su anchura fuera de
   ese contenedor; las coordenadas basadas en el viewport los ponían encima
   de la portada y del selector de archivos con el nuevo diseño. */
@media (min-width: 1000px) {
  .ncp-home .ncp-inline-side-ads > .ncp-ad-sidebar-left {
    left: -172px;
    right: auto;
  }
  .ncp-home .ncp-inline-side-ads > .ncp-ad-sidebar-right {
    left: auto;
    right: -172px;
  }
}
.ncp-home .ncp-ad-banner { grid-area: banner; margin: 28px auto 10px; }
.ncp-home .editorial { grid-area: editorial; margin: 18px 0 0; }
.ncp-home .editorial-panel,
.ncp-home .guide-card { border-color: #dfe9f7; border-radius: 18px; }
.ncp-home .editorial h2 { color: #203455; }
.ncp-home .guide-card h3 { color: #2a56ab; }
.ncp-home .ncp-ad-square { grid-area: square; margin: 26px auto 10px; }
.ncp-home .ncp-ad-native { grid-area: native; margin: 12px auto 0; }
.ncp-home .ncp-ad:has(iframe)::before,
.ncp-home .ncp-ad:has([id^="container-"]:not(:empty))::before {
  content: attr(aria-label);
  text-transform: uppercase;
}

/* Guía y privacidad conservan sus textos y selector y comparten la misma identidad. */
body.ncp-info > header { max-width: 960px; }
.ncp-info header strong {
  color: #193050;
  font-size: 1.22rem;
  letter-spacing: -.04em;
}
.ncp-info main { margin: 43px auto 65px; }
.ncp-info h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  letter-spacing: -.055em;
  color: #1b3153;
  max-width: 19ch;
}
.ncp-info .lead { color: #4b5f7d; }
.ncp-info article {
  border: 1px solid #dce8f7;
  border-radius: 20px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 8px 23px rgba(36, 76, 145, .07);
}
.ncp-info article h2 { color: #274a83; }
.ncp-info a { color: #2454ba; }
body.ncp-home > footer,
body.ncp-info > footer {
  width: 100%;
  background: rgba(255,255,255,.79);
  color: #586b86;
  border-top: 1px solid #dce6f4;
  box-shadow: none;
}
.ncp-home footer a, .ncp-info footer a { color: #2755af !important; }

@media (max-width: 1249px) {
  body.ncp-home main#principal {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "hero"
      "workspace"
      "intro"
      "tools"
      "sideads"
      "banner"
      "editorial"
      "square"
      "native";
  }
  .ncp-home .hero {
    min-height: 0;
    padding: 7px 4px 29px;
    text-align: center;
    align-items: center;
  }
  .ncp-home .hero h1 { max-width: 18ch; margin: 0 auto 17px; }
  .ncp-home .hero p { margin: 0 auto; }
  .ncp-home .ncp-trustline { justify-content: center; }
  .ncp-home main#principal > .workspace,
  .ncp-home main#principal > #ncp-extra-workspace { min-height: 0; }
  .ncp-home .dropzone:not(.hidden) { min-height: 228px; }
  .ncp-home .grid-tools { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  body.ncp-home > header,
  body.ncp-info > header {
    justify-content: center;
    border-radius: 25px;
    gap: 8px 15px;
  }
  .ncp-home .site-nav,
  .ncp-info header nav { order: 3; justify-content: center; width: 100%; flex: 1 0 100%; }
  .ncp-home .language-picker { order: 1; }
  .ncp-home header .badge { order: 2; }
  .ncp-home .grid-tools { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  body.ncp-home > header,
  body.ncp-info > header {
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 12px;
    border-radius: 23px;
    gap: 10px;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-areas: "brand badge" "language language" "nav nav";
  }
  body.ncp-info > header { grid-template-areas: "brand brand" "language language" "nav nav"; }
  .ncp-home .logo,
  .ncp-info header strong { grid-area: brand; justify-self: start; }
  .ncp-home .logo svg { width: 151px; height: auto; }
  .ncp-home header .badge { grid-area: badge; display: inline-flex; justify-self: end; }
  .ncp-home .language-picker,
  .ncp-info .language-picker { grid-area: language; width: 100%; max-width: 100%; margin: 0; }
  .ncp-home .language-picker span,
  .ncp-info .language-picker span { display: inline; }
  .ncp-home .language-picker select,
  .ncp-info .language-picker select { width: 100%; flex: 1 1 auto; padding: 9px 29px 9px 10px; }
  body.ncp-home .site-nav,
  body.ncp-info header nav {
    grid-area: nav;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    width: 100%;
    gap: 5px;
    min-width: 0;
    overflow: visible;
  }
  body.ncp-home .site-nav a,
  body.ncp-info header nav a {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    justify-content: flex-start;
    text-align: start;
    line-height: 1.2;
    padding: 10px 9px;
    font-size: .83rem;
  }
  .ncp-nav-icon { width: 17px; height: 17px; flex-basis: 17px; }
  body.ncp-home main#principal { margin: 28px auto 46px; padding: 0 12px; }
  .ncp-home .hero { padding-bottom: 23px; }
  .ncp-home .hero h1 { font-size: clamp(2.1rem, 9vw, 2.8rem); }
  .ncp-home .ncp-trustline { margin-top: 17px; gap: 6px; }
  .ncp-home .ncp-trustline span { font-size: .68rem; padding: 5px 8px; }
  .ncp-home main#principal > .workspace,
  .ncp-home main#principal > #ncp-extra-workspace { padding: 15px; border-radius: 19px; }
  .ncp-home .dropzone:not(.hidden) { min-height: 204px; }
  .ncp-home .grid-tools { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .ncp-home .tool-card { min-height: 141px; padding: 13px 8px; }
  .ncp-home .tool-icon { width: 43px; height: 43px; font-size: 1.4rem; }
  .ncp-home .ncp-section-intro { margin-top: 38px; }
  .ncp-info main { padding-inline: 16px; margin-top: 33px; }
}
@media (max-width: 390px) {
  body.ncp-home > header,
  body.ncp-info > header {
    grid-template-columns: minmax(0,1fr);
    grid-template-areas: "brand" "badge" "language" "nav";
  }
  body.ncp-info > header { grid-template-areas: "brand" "language" "nav"; }
  .ncp-home header .badge { justify-self: start; }
}
@media (max-width: 359px) {
  .ncp-home .tool-title { font-size: .82rem; }
  .ncp-home .tool-desc { font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ncp-home .tool-card,
  .ncp-home .site-nav a,
  .ncp-info nav a { transition: none; transform: none; }
}
