/* PDFPrivado UX común v1
   Ajustes visuales compartidos para portada y herramientas.
   No carga recursos externos y no afecta al motor PDF ni a la privacidad. */

/* Portada más compacta sin perder el mensaje principal */
.home-hero {
    margin-bottom: 1.25rem !important;
}
.home-hero .home-hero-inner {
    padding-top: 1.35rem !important;
    padding-bottom: 1.55rem !important;
    gap: 1.5rem !important;
}
.home-hero h2 {
    font-size: clamp(2rem, 3vw, 2.55rem) !important;
    line-height: 1.08 !important;
    margin-bottom: 0.85rem !important;
}
.home-hero-copy {
    padding: 0.85rem 1rem !important;
    margin-bottom: 1rem !important;
}
.home-hero-copy p {
    line-height: 1.45 !important;
}
.home-hero-media {
    max-width: 24rem !important;
}
.home-tools-section {
    margin-top: 1.5rem !important;
    margin-bottom: 3.25rem !important;
}
.home-tools-grid {
    gap: 1rem !important;
}
.home-tool-card {
    padding: 1rem !important;
    min-height: 8.5rem;
}
.home-tool-card .w-14.h-14 {
    width: 3rem !important;
    height: 3rem !important;
    font-size: 1.35rem !important;
}

/* Layout común para herramientas */
.tool-page-shell {
    padding-top: 2rem !important;
    padding-bottom: 1.75rem !important;
}
.tool-page-shell .tool-header {
    margin-bottom: 1rem !important;
}
.tool-page-shell .tool-header h1 {
    font-size: clamp(1.85rem, 2.4vw, 2.2rem) !important;
    line-height: 1.15 !important;
}
.tool-page-shell .tool-header p {
    margin-bottom: 0 !important;
}
.tool-page-shell .web-limit-note {
    margin-top: 0.55rem !important;
    padding: 0.42rem 0.85rem !important;
    font-size: 0.86rem !important;
}
.tool-page-shell .tool-card {
    max-width: 980px !important;
}
.tool-page-shell .pdf24-box {
    min-height: 245px !important;
}
.tool-page-shell .empty-state {
    min-height: 240px !important;
}
.tool-page-shell .btn-orange-upload {
    padding: 12px 30px !important;
    font-size: 1.12rem !important;
    margin-bottom: 0.7rem !important;
}
.tool-page-shell .privacy-hook {
    top: 12px !important;
    right: 16px !important;
}

/* Estado compacto cuando ya hay archivos cargados */
.tool-page-shell .pdf24-box.has-file,
.tool-page-shell .pdf24-box.has-files {
    min-height: 0 !important;
}
.tool-page-shell .pdf24-box.has-file .populated-state,
.tool-page-shell .pdf24-box.has-files .populated-state {
    flex-grow: 0 !important;
}
.tool-page-shell .pdf24-box.has-file .populated-topbar,
.tool-page-shell .pdf24-box.has-files .populated-topbar {
    padding: 9px 16px !important;
}
.tool-page-shell .pdf24-box.has-file .instruction-text,
.tool-page-shell .pdf24-box.has-files .instruction-text {
    font-size: 0.84rem !important;
}

/* Unir PDF compacto */
.tool-page-shell .pdf24-box.has-files .sortable-area {
    padding: 16px 18px !important;
    max-height: 280px !important;
    min-height: 110px !important;
}
.tool-page-shell .pdf24-box.has-files .toolbar {
    padding: 10px 16px !important;
}
.tool-page-shell .pdf24-box.has-files .view-grid .file-item {
    width: 124px !important;
    min-height: 112px !important;
    padding: 10px 8px !important;
}
.tool-page-shell .pdf24-box.has-files .view-grid .file-icon {
    font-size: 2rem !important;
}

/* Dividir PDF compacto */
.tool-page-shell .pdf24-box.has-file .workspace-dividir {
    padding: 16px 18px !important;
    gap: 12px !important;
}
.tool-page-shell .pdf24-box.has-file .single-file-card {
    width: 188px !important;
    min-height: 112px !important;
    padding: 12px 10px !important;
}
.tool-page-shell .pdf24-box.has-file .single-file-card .file-icon {
    font-size: 2rem !important;
    margin-bottom: 6px !important;
}
.tool-page-shell .pdf24-box.has-file .single-file-card .file-meta {
    margin-top: 4px !important;
}
.tool-page-shell .pdf24-box.has-file .opciones-dividir {
    padding: 1rem 1.25rem !important;
    max-width: 560px !important;
}
.tool-page-shell .pdf24-box.has-file .rango-inputs {
    margin-top: 10px !important;
    padding: 12px !important;
}
.tool-page-shell .pdf24-box.has-file .tool-alert {
    padding: 0.7rem 0.9rem !important;
}

/* Botones y bloque Pro menos “zoom” */
.tool-page-shell .action-container {
    margin-top: 1.1rem !important;
}
.tool-page-shell .btn-unir-final,
.tool-page-shell .btn-dividir-final {
    padding: 12px 38px !important;
    font-size: 1.1rem !important;
}
.tool-page-shell .cta-desktop {
    margin-top: 2rem !important;
    margin-bottom: 1.25rem !important;
    padding: 1.6rem !important;
}
.tool-page-shell .cta-desktop h2 {
    font-size: 1.35rem !important;
}

@media (max-width: 768px) {
    .home-hero .home-hero-inner {
        padding-top: 1rem !important;
        padding-bottom: 1.25rem !important;
    }
    .home-hero h2 {
        font-size: 1.9rem !important;
    }
    .home-hero-media {
        max-width: 20rem !important;
    }
    .home-tool-card {
        min-height: auto;
    }
    .tool-page-shell {
        padding-top: 1.35rem !important;
    }
    .tool-page-shell .pdf24-box,
    .tool-page-shell .empty-state {
        min-height: 220px !important;
    }
    .tool-page-shell .pdf24-box.has-file,
    .tool-page-shell .pdf24-box.has-files {
        min-height: 0 !important;
    }
    .tool-page-shell .pdf24-box.has-file .workspace-dividir,
    .tool-page-shell .pdf24-box.has-files .sortable-area {
        padding: 12px !important;
    }
    .tool-page-shell .pdf24-box.has-file .single-file-card {
        width: 100% !important;
        max-width: 290px !important;
    }
}
/* PDFPRIVADO_ACCESSIBILITY_GLOBAL_V1_START */
.pdfprivado-skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10000;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #111827;
    font-weight: 800;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.28);
    transform: translateY(-180%);
}

.pdfprivado-skip-link:focus {
    transform: translateY(0);
}

:where(
    a,
    button,
    input,
    select,
    textarea,
    [role="button"],
    [role="option"],
    [tabindex]
):focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 3px;
}

#contenido-principal:focus {
    outline: none;
}

.pdfp-language-button:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bg-fixed {
        background-attachment: scroll !important;
    }
}
/* PDFPRIVADO_ACCESSIBILITY_GLOBAL_V1_END */
/* PDFPrivado accessibility contrast v1 */

/* Portada */
.hero-section .home-hero-copy {
    background: rgba(0, 0, 0, 0.78) !important;
}

.hero-section .home-hero-copy p {
    color: #ffffff !important;
}

.home-hero span.bg-yellow-500\/20 {
    background-color: #fef3c7 !important;
    border-color: #b45309 !important;
    color: #713f12 !important;
}

.home-hero .text-red-500 {
    color: #fca5a5 !important;
}

.reto-badge {
    border-color: #b45309 !important;
    color: #713f12 !important;
}

.pro-badge,
.btn-pro {
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.btn-pro:hover {
    background-color: #1e40af !important;
}

/* Información, privacidad y estados */
.web-limit-note {
    color: #9a3412 !important;
}

.privacy-link,
.privacy-hook-empty,
.privacy-hook-populated {
    color: #1d4ed8 !important;
}

.privacy-note,
.ext-local,
.meta-local {
    color: #047857 !important;
}

.stat-value.success {
    color: #047857 !important;
}

/* Comprimir */
#compress-form .btn-orange-upload,
#compress-form .btn-compress-action:not(.btn-compress-secondary) {
    background-color: #047857 !important;
    color: #ffffff !important;
}

#compress-form .btn-orange-upload:hover,
#compress-form .btn-compress-action:not(.btn-compress-secondary):hover {
    background-color: #065f46 !important;
}

#compress-form .progress-bar {
    background-color: #047857 !important;
}

/* Proteger y desproteger */
#protection-form .btn-orange-upload,
#protection-form .btn-unlock-action:not(.btn-unlock-secondary) {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
}

#protection-form .btn-orange-upload:hover,
#protection-form .btn-unlock-action:not(.btn-unlock-secondary):hover {
    background-color: #3730a3 !important;
}

/* Herramientas naranjas */
.split-shell .upload-button,
.split-shell .download-button,
.wm-shell .upload-button,
.wm-shell .download-button,
.number-shell .upload-button,
.number-shell .download-button,
.rotate-shell .upload-button,
.rotate-shell .download-button,
.ext-upload,
.ext-download:not(.ext-copy),
.meta-upload,
.meta-download {
    background-color: #b45309 !important;
    color: #ffffff !important;
}

.split-shell .empty-state:hover .upload-button,
.wm-shell .empty-state:hover .upload-button,
.number-shell .empty-state:hover .upload-button,
.rotate-shell .empty-state:hover .upload-button,
.ext-empty:hover .ext-upload,
.meta-empty:hover .meta-upload,
.ext-download:not(.ext-copy):hover,
.meta-download:hover {
    background-color: #92400e !important;
}

/* Organizar, eliminar y unir */
.organize-shell .upload-button,
.organize-shell .download-button {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
}

.organize-shell .empty-state:hover .upload-button,
.organize-shell .download-button:hover {
    background-color: #3730a3 !important;
}

/* Límites de componentes interactivos */
.split-box,
.organize-box,
.wm-box,
.number-box,
.rotate-box,
.ext-box,
.meta-box {
    border-color: #64748b;
}

.page-mark,
.page-check {
    border-color: #64748b;
}

.meta-empty-value {
    color: #64748b;
}
