/* ── HazloEn3D Upload Form ───────────────────────────────────────────── */

.h3d-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 8px 12px 48px;
    font-family: inherit;
    color: #1e1b4b;
}

/* ── Cabecera ────────────────────────────────────────────────────────── */
.h3d-header {
    text-align: center;
    margin-bottom: 28px;
}

.h3d-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(108,99,255,.09), rgba(78,205,196,.09));
    border: 1px solid rgba(108,99,255,.18);
    color: #6c63ff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 50px;
    margin-bottom: 14px;
}

.h3d-header h2 {
    font-size: clamp(1.6rem, 4.5vw, 2.3rem);
    font-weight: 900;
    color: #1e1b4b;
    margin: 0 0 10px;
    line-height: 1.2;
}

.h3d-header p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
    line-height: 1.55;
}

/* ── Tarjeta principal ───────────────────────────────────────────────── */
.h3d-card {
    background: #fff;
    border-radius: 28px;
    box-shadow:
        0 2px 4px rgba(0,0,0,.04),
        0 8px 32px rgba(108,99,255,.09),
        0 32px 80px rgba(108,99,255,.07);
    padding: 36px 40px 40px;
}

/* ── Indicador de pasos ──────────────────────────────────────────────── */
.h3d-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 36px;
    gap: 0;
}

.h3d-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
}

.h3d-step-num {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #9ca3af;
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s, border-color .3s, color .3s, box-shadow .3s;
    position: relative;
    z-index: 1;
}

.h3d-step-label {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 600;
    white-space: nowrap;
    transition: color .3s;
}

.h3d-step-connector {
    flex: 1 1 auto;
    min-width: 48px;
    max-width: 90px;
    height: 2px;
    background: #e5e7eb;
    margin-top: 21px;
    transition: background .4s;
}

.h3d-step-item.is-active .h3d-step-num {
    background: linear-gradient(135deg, #6c63ff, #4ecdc4);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 18px rgba(108,99,255,.38);
}
.h3d-step-item.is-active .h3d-step-label { color: #6c63ff; }

.h3d-step-item.is-done .h3d-step-num {
    background: linear-gradient(135deg, #6c63ff, #4ecdc4);
    border-color: transparent;
    color: #fff;
}
.h3d-step-item.is-done .h3d-step-label { color: #6c63ff; }

.h3d-step-connector.is-done {
    background: linear-gradient(90deg, #6c63ff, #4ecdc4);
}

/* ── Panel (paso) ────────────────────────────────────────────────────── */
.h3d-pane {
    animation: h3d-fadein .3s ease both;
}

.h3d-pane-heading {
    margin-bottom: 22px;
}
.h3d-pane-heading h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e1b4b;
    margin: 0 0 4px;
}
.h3d-pane-heading p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

/* ── Zona de upload (gradiente en borde) ─────────────────────────────── */
.h3d-drop-area {
    background:
        linear-gradient(#fdfcff, #fdfcff) padding-box,
        linear-gradient(135deg, #6c63ff, #4ecdc4) border-box;
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 52px 24px;
    min-height: 220px;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: background .25s, transform .2s;
}

.h3d-drop-area:hover {
    background:
        linear-gradient(#f8f6ff, #f8f6ff) padding-box,
        linear-gradient(135deg, #6c63ff, #4ecdc4) border-box;
}

.h3d-drop-area.h3d-drag-active {
    background:
        linear-gradient(#f0ecff, #f0ecff) padding-box,
        linear-gradient(135deg, #6c63ff, #4ecdc4) border-box;
    transform: scale(1.015);
}

.h3d-upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.h3d-upload-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 4px;
    animation: h3d-float 3.5s ease-in-out infinite;
}
.h3d-upload-icon svg { width: 100%; height: 100%; }

.h3d-upload-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e1b4b;
    margin: 0;
}

.h3d-upload-or {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d1d5db;
    font-size: 0.82rem;
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
}
.h3d-upload-or::before,
.h3d-upload-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.h3d-upload-hint {
    color: #c4c2d4;
    font-size: 0.78rem;
    margin: 4px 0 0;
}

.h3d-btn-select {
    display: inline-block;
    background: linear-gradient(135deg, #6c63ff, #4ecdc4);
    color: #fff !important;
    border: none;
    padding: 11px 28px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 700;
    transition: transform .15s, box-shadow .15s;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(108,99,255,.28);
}
.h3d-btn-select:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(108,99,255,.42);
}

/* Vista previa de la foto */
.h3d-preview-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}
.h3d-preview-wrapper img {
    max-height: 260px;
    max-width: 100%;
    border-radius: 16px;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(108,99,255,.18);
    display: block;
}
.h3d-btn-change {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    color: #9ca3af;
    padding: 7px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all .2s;
}
.h3d-btn-change:hover {
    border-color: #aaa;
    color: #374151;
}

/* ── Campos del formulario ───────────────────────────────────────────── */
.h3d-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}
.h3d-field--full { grid-column: 1 / -1; }

.h3d-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.h3d-field label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    letter-spacing: .2px;
}
.h3d-req { color: #e53935; }

.h3d-field input,
.h3d-field select,
.h3d-field textarea {
    padding: 12px 15px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.93rem;
    font-family: inherit;
    color: #1e1b4b;
    background: #fafafa;
    transition: border-color .2s, box-shadow .2s, background .2s;
    width: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}
.h3d-field input::placeholder,
.h3d-field textarea::placeholder { color: #c4c2d4; }

.h3d-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-color: #fafafa;
    padding-right: 36px;
}
.h3d-field textarea { resize: vertical; }

.h3d-field input:focus,
.h3d-field select:focus,
.h3d-field textarea:focus {
    outline: none;
    border-color: #6c63ff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108,99,255,.10);
}

/* ── Resumen (paso 3) ────────────────────────────────────────────────── */
.h3d-summary {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: linear-gradient(135deg, #faf9ff, #f0fffe);
    border: 1.5px solid rgba(108,99,255,.10);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 24px;
}

.h3d-summary-photo img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(108,99,255,.2);
    display: block;
    flex-shrink: 0;
}

.h3d-summary-data {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}
.h3d-summary-name {
    font-weight: 800;
    font-size: 1rem;
    color: #1e1b4b;
    margin: 0 0 4px;
}
.h3d-summary-email-txt {
    font-size: 0.87rem;
    color: #6b7280;
    margin: 0 0 8px;
    word-break: break-all;
}
.h3d-summary-material-txt {
    font-size: 0.78rem;
    font-weight: 700;
    color: #6c63ff;
    background: rgba(108,99,255,.08);
    padding: 3px 12px;
    border-radius: 50px;
    display: inline-block;
    margin: 0;
}

/* ── RGPD ────────────────────────────────────────────────────────────── */
.h3d-rgpd { margin-bottom: 8px; }

.h3d-rgpd label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: #6b7280;
    cursor: pointer;
    line-height: 1.55;
}
.h3d-rgpd input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #6c63ff;
    cursor: pointer;
}
.h3d-rgpd a { color: #6c63ff; text-decoration: underline; }

/* ── Mensajes ────────────────────────────────────────────────────────── */
.h3d-messages { margin-top: 12px; text-align: center; }

.h3d-message {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.45;
}
.h3d-message--error {
    background: #fff0f0;
    color: #c62828;
    border: 1px solid #ffcdd2;
}
.h3d-message--success {
    background: #f1fdf4;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* ── Footer de cada paso ─────────────────────────────────────────────── */
.h3d-pane-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    gap: 12px;
}
.h3d-footer--right { justify-content: flex-end; }

/* Botón siguiente / enviar */
.h3d-btn-next,
.h3d-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #6c63ff 0%, #4ecdc4 100%);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    box-shadow: 0 4px 18px rgba(108,99,255,.3);
    letter-spacing: .2px;
}
.h3d-btn-next:hover,
.h3d-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108,99,255,.42);
}
.h3d-btn-submit {
    padding: 13px 36px;
    font-size: 1rem;
    min-width: 200px;
    justify-content: center;
}
.h3d-btn-submit:disabled {
    opacity: .72;
    cursor: not-allowed;
    transform: none;
}

/* Botón atrás */
.h3d-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid #e5e7eb;
    color: #9ca3af;
    padding: 11px 20px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.h3d-btn-back:hover {
    border-color: #9ca3af;
    color: #374151;
}

/* Spinner */
.h3d-spinner {
    width: 18px;
    height: 18px;
    animation: h3d-spin .75s linear infinite;
    flex-shrink: 0;
}
.h3d-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
@keyframes h3d-spin { to { transform: rotate(360deg); } }

/* ── Estado de éxito ─────────────────────────────────────────────────── */
.h3d-success {
    text-align: center;
    padding: 64px 20px;
    animation: h3d-fadein .5s ease;
}

.h3d-success__icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c63ff, #4ecdc4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 26px;
    box-shadow: 0 8px 40px rgba(108,99,255,.35);
}
.h3d-success__icon svg {
    width: 40px;
    height: 40px;
    stroke: #fff;
}
.h3d-success h3 {
    font-size: 1.9rem;
    font-weight: 900;
    color: #1e1b4b;
    margin: 0 0 14px;
}
.h3d-success p {
    color: #4b5563;
    font-size: 1.02rem;
    line-height: 1.65;
    margin-bottom: 10px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}
.h3d-success__email {
    font-size: 0.84rem !important;
    color: #aaa !important;
}

/* ── Honeypot anti-spam ──────────────────────────────────────────────── */
.h3d-hp {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Keyframes ───────────────────────────────────────────────────────── */
@keyframes h3d-fadein {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes h3d-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-7px); }
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 560px) {
    .h3d-card { padding: 24px 18px 28px; }
    .h3d-fields { grid-template-columns: 1fr; }
    .h3d-field--full { grid-column: 1; }
    .h3d-drop-area { padding: 36px 16px; }
    .h3d-step-label { display: none; }
    .h3d-step-connector { min-width: 28px; }
    .h3d-btn-submit { width: 100%; justify-content: center; }
    .h3d-summary { flex-direction: column; align-items: center; text-align: center; }
    .h3d-summary-photo img { width: 100px; height: 100px; }
    .h3d-success { padding: 44px 12px; }
    .h3d-success h3 { font-size: 1.5rem; }
}
